basicgym.envs.simulator.function.StateTransitionFunction#

class basicgym.envs.simulator.function.StateTransitionFunction(state_dim, action_dim, random_state=None)[source]#

Class to define the state transition function.

Bases: basicgym.BaseStateTransitionFunction

Imported as: basicgym.envs.simulator.StateTransitionFunction

Tip

Use BaseStateTransitionFunction to define a custom StateTransitionFunction.

Parameters:
  • state_dim (int) – Dimension of the state.

  • action_dim (int) – Dimension of the action (context).

  • random_state (int, default=None (>= 0)) – Random state.

Attributes:
random_state

Methods

step(state, action)

Update the state based on the presented action.

step(state, action)[source]#

Update the state based on the presented action.

Parameters:
  • state (array-like of shape (state_dim, )) – Current state.

  • action (array-like of shape (action_dim, )) – Indicating the action chosen by the agent.

Returns:

state – Next state.

Return type:

array-like of shape (state_dim, )

Methods