Skip to content

BaseRayEnv

Full path: schola.rllib.env.BaseRayEnv

Abstract base class for Schola RLlib environments.

BaseRayEnv(protocol, simulator, verbosity = 0)

Parameters

  • protocol (BaseRLProtocol)

  • simulator (BaseSimulator)

  • verbosity (int)

Methods

init

__init__(protocol, simulator, verbosity = 0)

Initialize protocol, simulator, and shared environment infrastructure.

Parameters

  • protocol (BaseRLProtocol)

  • simulator (BaseSimulator)

  • verbosity (int)


close_extras

close_extras(**kwargs)

Close protocol and stop simulator.


make_policy_mapping_fn

make_policy_mapping_fn()

Build RLlib’s agent-to-policy mapping from Schola AgentType metadata.

Returns

Return type: Callable


reset

reset(**kwargs)

Reset environment(s).


step

step(actions)

Step environment(s) with actions.

Attributes

action_space

action_space

Action space (Dict of agent spaces).


agent_types

agent_types

Dict mapping agent IDs to optional policy grouping types.


max_num_agents

max_num_agents

Maximum number of agents that can exist.


num_agents

num_agents

Total number of possible agents (ever seen).


observation_space

observation_space

Observation space (Dict of agent spaces).


single_action_space

single_action_space

Single-agent action space.


single_action_spaces

single_action_spaces

Dict mapping agent IDs to action spaces.


single_observation_space

single_observation_space

Single-agent observation space.


single_observation_spaces

single_observation_spaces

Dict mapping agent IDs to observation spaces.