coopihc.observation.CascadedObservationEngine.CascadedObservationEngine
- class CascadedObservationEngine(engine_list, *args, **kwargs)[source]
Bases:
coopihc.observation.BaseObservationEngine.BaseObservationEngine
Cascades (serially) several observation engines.
Gamestate –> Engine1 –> Engine2 –> … –> EngineN –> Observation
- Parameters
engine_list (list(
Observation Engine
)) – list of observation engines
Methods
Apply this decorator to use bundle.game_state as default value to observe if game_state = None
Serial observations (i.e.
observe_from_substates
reset _summary_
Attributes
returns the last action
bundle
returns the last observation
unwrapped
- static default_value(func)
Apply this decorator to use bundle.game_state as default value to observe if game_state = None
- observe(game_state)[source]
Serial observations (i.e. output of an engine becomes input of the next one)
- Parameters
game_state (State<coopihc.base.State.State) – game state
- Returns
(observation, obs reward)
- Return type
tuple(State<coopihc.base.State.State, float)
- reset(random=True)
reset _summary_
Empty by default.
- Parameters
random (bool, optional) – whether states internal to the observation engine are reset randomly, defaults to True. Useful in case of subclassing the Observation Engine.