deluca.envs.LDS

class deluca.envs.LDS(*args, **kwargs)[source]

Public Data Attributes:

Inherited from Env

reward_range

action_space

observation_space

observation

assume observations are fully observable

Inherited from JaxObject

name

attrs

Inherited from Env

metadata

reward_range

spec

action_space

observation_space

unwrapped

Completely unwrap this env.

Public Methods:

__init__([state_size, action_size, A, B, C, …])

Initialize self.

step(action)

Run one timestep of the environment’s dynamics.

dynamics(state, action)

None

reset()

Resets the environment to an initial state and returns an initial observation.

Inherited from Env

__new__(cls, *args, **kwargs)

For avoiding super().__init__()

check_spaces()

__init_subclass__(*args, **kwargs)

For avoiding a decorator for each subclass

reset()

Resets the environment to an initial state and returns an initial observation.

dynamics(state, action)

None

check_action(action)

check_observation(observation)

step(action)

Run one timestep of the environment’s dynamics.

jacobian(func, state, action)

hessian(func, state, action)

close()

Override close in your subclass to perform any necessary cleanup.

Inherited from JaxObject

__new__(cls, *args, **kwargs)

For avoiding super().__init__()

__init_subclass__(*args, **kwargs)

For avoiding a decorator for each subclass

__str__()

Return str(self).

__setattr__(key, val)

Implement setattr(self, name, value).

save(path)

load(path)

throw(err, msg)

Inherited from Env

step(action)

Run one timestep of the environment’s dynamics.

reset()

Resets the environment to an initial state and returns an initial observation.

render([mode])

Renders the environment.

close()

Override close in your subclass to perform any necessary cleanup.

seed([seed])

Sets the seed for this env’s random number generator(s).

__str__()

Return str(self).

__enter__()

Support with-statement for the environment.

__exit__(*args)

Support with-statement for the environment.


__init__(state_size=1, action_size=1, A=None, B=None, C=None, seed=0)[source]

Initialize self. See help(type(self)) for accurate signature.

dynamics(state, action)[source]

None

reset()[source]

Resets the environment to an initial state and returns an initial observation.

Note that this function should not reset the environment’s random number generator(s); random variables in the environment’s state should be sampled independently between multiple calls to reset(). In other words, each call of reset() should yield an environment suitable for a new episode, independent of previous episodes.

Returns

the initial observation.

Return type

observation (object)

step(action)[source]

Run one timestep of the environment’s dynamics. When end of episode is reached, you are responsible for calling reset() to reset this environment’s state.

Accepts an action and returns a tuple (observation, reward, done, info).

Parameters

action (object) – an action provided by the agent

Returns

agent’s observation of the current environment reward (float) : amount of reward returned after previous action done (bool): whether the episode has ended, in which case further step() calls will return undefined results info (dict): contains auxiliary diagnostic information (helpful for debugging, and sometimes learning)

Return type

observation (object)