core.utils

core.utils#

Utility module for soulsgym.

soulsgym.core.utils.get_pid(process_name: str) int#

Get the ID of a process.

Parameters:

process_name – The name of the process.

Returns:

The process ID.

Raises:

RuntimeError – No process with name process_name currently open.

soulsgym.core.utils.wrap_to_pi(x: float | ndarray) float | ndarray#

Wrap an angle into the interval of [-pi, pi].

Parameters:

x – Single angle or array of angles in radians.

Returns:

The wrapped angle.

class soulsgym.core.utils.Singleton#

Bases: type

Metaclass for singletons.