DRAMA at the PettingZoo
Dynamically Restricted Action Spaces for
Multi-Agent Reinforcement Learning Frameworks
DRAMA is a framework to extend the PettingZoo agent-environment cycle with complex, dynamic, and potentially self-learning action space restrictions. DRAMA contains a wrapper implementing a new agent-restrictor-environment cycle, restrictions as Gymnasium Spaces, classes for restriction learning agents, and helpful utilities:
from drama.restrictors import Restrictor
from drama.wrapper import RestrictionWrapper
env = ...
restrictor = Restrictor(...)
wrapper = RestrictionWrapper(env, restrictor)
policies = {...}
wrapper.reset()
for agent in wrapper.agent_iter():
observation, reward, termination, truncation, info = wrapper.last()
action = policies[agent](observation)
wrapper.step(action)
Note
Further documentation is in development …