mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-07 01:51:35 +02:00
Comments, small bugfixes removed legacy elements
This commit is contained in:
marl_factory_grid
@ -26,12 +26,24 @@ class Agents(Collection):
|
||||
|
||||
@property
|
||||
def action_space(self):
|
||||
"""
|
||||
TODO
|
||||
|
||||
|
||||
:return:
|
||||
"""
|
||||
from gymnasium import spaces
|
||||
space = spaces.Tuple([spaces.Discrete(len(x.actions)) for x in self])
|
||||
return space
|
||||
|
||||
@property
|
||||
def named_action_space(self):
|
||||
def named_action_space(self) -> dict[str, dict[str, list[int]]]:
|
||||
"""
|
||||
TODO
|
||||
|
||||
|
||||
:return:
|
||||
"""
|
||||
named_space = dict()
|
||||
for agent in self:
|
||||
named_space[agent.name] = {action.name: idx for idx, action in enumerate(agent.actions)}
|
||||
|
Reference in New Issue
Block a user