evolearn.controllers module

class evolearn.controllers.controller_simple.SimpleAgent(world_size)[source]

Simple agent object for interacting with Simple Wrapping Environments.

cyclical_heading(heading)[source]

Heading conversion. Prevents requests for heading indices that do not exist ( range(4) possible ).

Parameters:heading – original agent.heading
Returns:converted (cyclical) agent.heading
define_fov(world)[source]

Defines the agent’s field-of-vision.

Parameters:world – current environment
Returns:observation
define_fov_heading()[source]

Defines the structure of an agent’s field-of-vision

Returns:FOV_heading
enforce_wrapping(position)[source]

Location conversion. Prevents requests for locations that are not accessible in the current environment.

Parameters:position – world positionX or world positionY
Returns:new world positionX or world positionY
heading_row_calc(r, th, t, l)[source]

Calculates location indices for individual cells in a row of an agent’s field-of-view.

Todo:
  • Flush out input parameters definitions.
  • Rename input parameters to more readable ones.
Return output:
reset()[source]

Reset agent location and heading in environment to initial values.