CS581-Algos-Demo / agents.py
Andrei Cozma
Updates
6ee82fe
raw
history blame
382 Bytes
# All supported agents
from MCAgent import MCAgent
from DPAgent import DPAgent
AGENTS_MAP = {"MCAgent": MCAgent, "DPAgent": DPAgent}
def load_agent(agent_name, **kwargs):
if agent_name not in AGENTS_MAP:
raise ValueError(
f"ERROR: Agent '{agent_name}' not valid. Must be one of: {AGENTS_MAP.keys()}"
)
return AGENTS_MAP[agent_name](**kwargs)