Bardo.Examples.Applications.Flatland.FlatlandActuator (Bardo v0.1.0)

View Source

Actuator implementation for the Flatland simulation.

This module provides actuators that agents can use to interact with the Flatland environment, primarily for movement control.

Summary

Functions

Handle a list of incoming signals from the neural network.

Initialize a new actuator for Flatland.

Create a two-wheel actuator configuration.

Functions

actuate(actuator_type, arg)

Handle a list of incoming signals from the neural network.

This function:

  1. Activates the actuator with signals from the neural network
  2. Sends commands to the scape (simulated world)
  3. Processes responses (fitness, etc.)

handle(signals, state)

init(params)

Initialize a new actuator for Flatland.

Parameters:

  • id: Actuator ID
  • actuator_type: :two_wheels
  • fanin: Number of input elements
  • cortex_pid: PID of the cortex process
  • scape_pid: PID of the scape process
  • agent_id: ID of the agent

init(id, actuator_type, fanin, cortex_pid, scape_pid, agent_id)

two_wheels(id, fanin, cortex_id, scape_name)

@spec two_wheels(integer(), integer(), atom(), atom()) :: map()

Create a two-wheel actuator configuration.

Parameters:

  • id: Actuator ID
  • fanin: Number of input elements from the neural network
  • cortex_id: ID of the cortex
  • scape_name: Name of the scape

Returns an actuator specification map.