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: Union[float, numpy.ndarray]) Union[float, numpy.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#

Metaclass for singletons.