pymasep.engine.environment_engine

Classes

EnvironmentEngine

Represents the environment of the game (Engine part). This object keeps all dynamic values of the game. This environment handles all controllers for external agents (interface) as ExternalController

Module Contents

class pymasep.engine.environment_engine.EnvironmentEngine(id_env=None, cfg=None)

Bases: pymasep.common.environment.Environment

Represents the environment of the game (Engine part). This object keeps all dynamic values of the game. This environment handles all controllers for external agents (interface) as ExternalController

Parameters:
  • id_env (str) – the id of the environment. If None, a new uuid will be set

  • cfg (omegaconf.DictConfig)

Parm cfg:

the configuration of the environment

get_type_controller(xml_node=None, template=None, control=None)

Get the type of controller according to a template or (exclusive) an XML node.

Parameters:
  • xml_node (Optional[xml.etree.ElementTree.Element]) – XML node used to get the controller type. Use the attribute “controller”.

  • template (Optional[pymasep.common.template.Template]) – The template used to get the controller type.

  • control (Optional[str]) – ‘Interface’ if the agent is controlled by interface (only inside engine, and if template is used)

Returns:

the class of the controller to use. Default is ExternalController

Return type:

Type[pymasep.common.controller.Controller]