coopihc.policy.WrapAsPolicy.WrapAsPolicy
- class WrapAsPolicy(action_bundle, action_state, *args, **kwargs)[source]
Bases:
coopihc.policy.BasePolicy.BasePolicy
,abc.ABC
Wrap a bundle as a policy.
- Parameters
action_bundle (Bundle<coopihc.bundle>) – bundle to wrap
action_state (State<coopihc.base.State.State>) – which bundle game state should serve as action state
Methods
Apply this decorator to use bundle.game_state as default value to observe if game_state = None
Reset the policy
sample
step
Attributes
Return the last action.
action_keys
game_state
Return the last observation.
parameters
state
unwrapped
- property action
Return the last action.
- Returns
last action
- Return type
State<coopihc.base.StateElement.StateElement>
- default_value()
Apply this decorator to use bundle.game_state as default value to observe if game_state = None
- property observation
Return the last observation.
- Returns
last observation
- Return type
State<coopihc.base.State.State>