action
The action module decides what action the agent should perform.
ActionData = ActionRequest | TakeAction
module-attribute
ActionEvent = Event[ActionData]
module-attribute
Action
Bases: Component
Component for determining which action to take.
Source code in roc/action.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
action_bus_conn = self.connect_bus(self.bus)
instance-attribute
bus = EventBus[ActionData]('action', cache_depth=10)
class-attribute
instance-attribute
__init__()
Source code in roc/action.py
33 34 35 36 |
|
action_request(e)
Source code in roc/action.py
41 42 43 44 |
|
event_filter(e)
Source code in roc/action.py
38 39 |
|
ActionRequest
dataclass
Communicates that the Gym is waiting for the agent to take an action.
Source code in roc/action.py
12 13 14 |
|
__init__()
DefaultActionPass
Bases: DefaultActionExpMod
Source code in roc/action.py
47 48 49 50 51 |
|
get_action()
Default action for Nethack that passes (the .
character in the game)
Source code in roc/action.py
49 50 51 |
|
TakeAction
Bases: Node
Communicates back to the Gym which cation to take.
Source code in roc/action.py
17 18 19 20 |
|