slim.types.policies module

Useful type definitions for Gym/PettingZoo

Note: Gym uses spaces as an abstraction to perform run-time typechecking. Spaces are _not_ containers but rather container descriptions.

class slim.types.policies.ObservationSpace(*args, **kwargs)

Bases: dict

aggregation: numpy.ndarray
allowed_treatments: int
asked_to_treat: numpy.ndarray
cleaner_fish: numpy.ndarray
current_treatments: numpy.ndarray
fish_population: numpy.ndarray
reported_aggregation: numpy.ndarray
slim.types.policies.agent_to_id(agent_str: str) int
slim.types.policies.get_observation_space_schema(agents: List[str], num_applications: int)
slim.types.policies.no_observation() ObservationSpace

Generate an empty observation.

:returns an empty observation that matches the schema