basicgym.envs.simulator.base.BaseRewardFunction#

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.

Methods