ethicalgardeners.main.run_simulation¶
- ethicalgardeners.main.run_simulation(env, agent_algorithms=None, deterministic=None, needs_action_mask=None, **kwargs)[source]¶
Run the simulation loop for the environment.
This function iterates through the agents in the environment, collects observations, rewards, and flags for termination or truncation and steps the environment with an action for each agent.
- Parameters:
env (GardenersEnv) – The environment to run the simulation in.
agent_algorithms (list, optional) – List of agent algorithms to use. Defaults to None, which means random actions will be taken.
needs_action_mask (list, optional) – List of booleans indicating whether each agent algorithm requires an action mask. Defaults to None.