basicgym.envs.simulator.base#

Abstract Base Class for Simulation.

Classes

BaseRewardFunction

Base class to define the expected immediate reward function.

BaseStateTransitionFunction

Base class to define the state transition function.

class basicgym.envs.simulator.base.BaseStateTransitionFunction[source]#

Base class to define the state transition function.

Imported as: basicgym.BaseStateTransitionFunction

Methods

step(state, action)

Update the state based on the presented action.

abstract 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, )

class basicgym.envs.simulator.base.BaseRewardFunction[source]#

Base class to define the expected immediate reward function.

Imported as: basicgym.BaseRewardFunction

Methods

mean_reward_function(state, action)

Expected immediate reward function

sample_reward(state, action)

Sample reward.

abstract mean_reward_function(state, action)[source]#

Expected immediate reward function

Parameters:
  • state (array-like of shape (state_dim, )) – State in the RL environment.

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

Returns:

mean_reward_function – Expected immediate reward function conditioned on the state and action.

Return type:

float

sample_reward(state, action)[source]#

Sample reward.