body

class nett.Body(type: str = 'basic', wrappers: list[Wrapper] = [], dvs: bool = False)

Represents the body of an agent in an environment.

The body determines how observations from the environment are processed before they reach the brain. It can apply wrappers to modify the observations and provide a different perception to the brain.

Parameters:
  • type (str, optional) – The type of the agent’s body. Defaults to “basic”.

  • wrappers (list[Wrapper], optional) – List of wrappers to be applied to the environment. Defaults to [].

  • dvs (bool, optional) – Flag indicating whether the agent uses dynamic vision sensors. Defaults to False.

Raises:
  • ValueError – If the agent type is not valid.

  • TypeError – If dvs is not a boolean.

Example

>>> from nett import Body
>>> body = Body(type="basic", wrappers=None, dvs=False)