evolearn.environments module

class evolearn.environments.environment_gym.BalancingPole[source]

FlappyBird test class

Parameters:genome (NaN) – population of cppn networks.
class evolearn.environments.environment_gym.FlappyBird[source]

FlappyBird test class

Parameters:genome (NaN) – population of cppn networks.
class evolearn.environments.environment_simple.Recognition[source]

General image recognition object.

class evolearn.environments.environment_simple.SimpleEnvironment[source]

Simple wrapped callable nutrient environment.

Todo:
  • Allow for the import of txt file for defining maze/track boundaries.
  • Connect imported boundaries to evaluation loop break collision flag.
build_actions()[source]

Builds an accessible dictionary of possible actions to be called with each agent action to provide adjustments for location and heading adjustments.

Returns:environment action dict. Indices define position and heading adjustments for a selected action.
collision_check()[source]

Collision check to potentially break current agent’s evaluation.

Returns:collide Boolean
initialize_environment()[source]

Initialize environment.

Returns:initialized world
make_observation()[source]

Making an observation for a single step through environment.

move_agent(action)[source]

Update agent location based on selected action.

reformat_action(agent_output)[source]

Reformat raw network output into environment-specific (or experiment specified) action/class choice.

Returns:reformatted action/class index
reset()[source]

Complete environment reset.

Returns:intial environment observation
return_reward()[source]

Returns reward for agent’s current location.

Returns:reward/state at agent.location
step(action)[source]

Making a single step through the environment.

Returns:next observation, current reward, collision Boolean.
update(action)[source]

Update environment.world with respect possibly consumed nutrients at agent’s current location.