amaze.simu.robot

Classes

Robot(data)

The virtual robot

class amaze.simu.robot.Robot(data: BuildData)[source]

The virtual robot

class BuildData(
inputs: InputType = InputType.DISCRETE,
outputs: OutputType = OutputType.DISCRETE,
vision: int | None = 15,
)[source]

Structure describing the agent’s parameters

classmethod from_string(
robot: str,
overrides: BuildData | None = None,
)[source]

Parses a string into input/output types and, optionally, vision size

Format is: IO[V] or S[V]

where the input character I is taken from InputType and be either D (DISCRETE) or C (CONTINUOUS). Similarly, the output character O is taken from OutputType and can also either be C or D. Shorthands (S) are also available with D, H, and C corresponding to DD, CD, and CC, respectively. In case of continuous inputs, V provides the size of agent’s retina as an odd integer

Raises:
  • TypeError – if passing invalid parameters

  • ValueError – if requesting DC mode or if the retina size is even

classmethod from_controller(controller: BaseController) Robot.BuildData[source]

Create a robot build data from an existing controller

to_string()[source]

Generates a string for the input/output types and, if relevant, vision size