sensor (macula_tweann v0.18.1)
View SourceSensor process for TWEANN networks.
Sensors are the input interface of a neural network. They read data from the environment or problem domain and forward it to connected neurons. Each sensor has a specific function that determines what data it produces.
Sensor Lifecycle
1. Spawned by cortex with configuration 2. Waits for sync signal from cortex 3. Calls sensor function to get input data 4. Forwards data to all connected neurons 5. Repeats from step 2
Sensor Functions
Sensor functions are atoms that map to actual functions in the problem-specific module. Common examples:
- rng - Random number generator (for testing) - xor_input - XOR problem input - pole_input - Pole balancing input
Summary
Functions
Initialize the sensor and enter the main loop.
Start a sensor process.
Options: - id - Unique identifier for this sensor - cortex_pid - PID of the controlling cortex - sensor_name - Atom naming the sensor function - vector_length - Length of output vector - fanout_pids - List of PIDs to forward output to - scape_pid - PID of the scape/environment (optional) - parameters - Additional parameters for sensor function