API Reference Bardo v#0.1.0

View Source

Modules

A minimal replacement for the :shards library for testing. Uses ETS tables for storage with matching functions.

Bardo is a powerful neuroevolution library for Elixir.

A simplified API layer for Bardo, providing beginner-friendly functions for common tasks while abstracting away implementation complexity.

Agent Manager module for the Bardo system.

Defines generic actuator behavior.

Client module for interacting with the Agent Manager.

The AgentWorker is responsible for spawning the Exoself process (genotype) which in turn spawns the Cortex, Sensors, Neurons, Actuator (phenotype) and maybe the private scape.

Dynamic supervisor for agent workers.

The Cortex is the central coordination element of a neural network agent.

The Exoself is responsible for reading a genotype, spawning the corresponding phenotype, and then shutting itself down. The phenotype consists of a Cortex, Sensors, Actuators and Neurons.

The neuron is a signal processing element.

Struct representing the internal state of a neuron.

Defines generic private scape behavior.

Defines generic sensor behavior.

The SignalAggregator module contains various aggregation functions.

Substrate is the module responsible for managing the connectivity between neurodes in a neural network. It enables patterns of connectivity to be established based on geometric coordinates of neurodes, allowing complex neural architectures to be developed.

The substrate polls the substrate_cpps (Substrate Coordinate PreProcessor), and then waits for the signals from the substrate_ceps (Substrate Connectivity Expression Producer) process, which tells it what the synaptic weight is between the two neurodes with which the substrate_cpps were called with, and whether the connection between these neurodes is expressed or not.

The substrate polls the substrate_cpps (Substrate Coordinate PreProcessor), and then waits for the signals from the substrate_ceps (Substrate Connectivity Expression Producer) process, which tells it what the synaptic weight is between the two neurodes with which the substrate_cpps were called with, and whether the connection between these neurodes is expressed or not.

Supervisor for the AgentManager subsystem.

The TuningDuration module contains all the tuning duration functions, functions which calculate how long the tuning phase must run. The tuning duration function sets the max_attempts value, with the function format being as follows: - Input: Neuron_Ids, AgentGeneration - Output: Max_Attempts. The tuning duration function can output a constant, which is what we used thus far. It can output a value that is proportional to the number of neurons composing the NN, or it can produce a value based on the number of all neurons in the population.

The TuningSelection module contains all the tuning selection functions, which accept as input four parameters

Configuration management for the Bardo application.

Bardo top level application.

Core API for Bardo neuroevolution library.

A simple, efficient database for the Bardo neuroevolution system.

ETS-based implementation of the DB module for testing. This replaces the RocksDB-based implementation with a simple in-memory ETS table.

Database interface for Bardo.

Mock implementation of the DB module for testing.

Main setup module for the Flatland experiment.

Flatland simulation environment.

Represents an entity in the Flatland world

Actuator implementation for the Flatland simulation.

Sensor implementation for the Flatland simulation.

Utility functions for the Flatland simulation.

Predator morphology for the Flatland simulation.

Prey morphology for the Flatland simulation.

Main setup module for the Forex (FX) trading experiment.

Forex (FX) trading simulation environment.

Technical data struct for price information

Actuator implementation for the Forex (FX) trading application.

Morphology for the Forex (FX) trading application.

Sensor implementation for the Forex (FX) trading application.

Double Pole Balancing (DPB) benchmark for neuroevolution algorithms.

Base sector module for the Double Pole Balancing task.

Actuator implementation for the Double Pole Balancing (DPB) benchmark.

Sensor implementation for the Double Pole Balancing (DPB) benchmark.

Double Pole Balancing with Damping.

Double Pole Balancing without Damping.

Helper module for running Bardo examples more reliably.

A simple example demonstrating how to evolve a neural network to solve the XOR problem.

ExperimentManager for the Bardo system.

The ExperimentManager is responsible for orchestrating neuroevolution experiments.

Client module for interacting with the ExperimentManager.

Supervisor for the ExperimentManager subsystem.

The Functions module contains the activation functions used by the neuron, and other mathematical functions used by the system. Through the Functions module, the activation functions are fully decoupled from the neurons using them. A neuron can use any activation function, no matter its form, as long as it returns a properly formatted value.

A logging module for the Bardo system. This is a simplified implementation for testing.

Custom logging functionality for the Bardo system.

Models for evolutionary computation data structures.

A module for creating and manipulating champion models.

Morphology module for the Bardo neuroevolution system.

Core persistence module for Bardo.

Contains plasticity functions for neural network learning.

The PolisManager process represents an interfacing point with the neuroevolutionary platform infrastructure. The module contains the functions that perform general, global tasks. Because there should be only a single polis_manager per node, representing a single neuroevolutionary platform per node.

Supervisor for the Polis systems.

Interface module for Polis Manager operations.

Defines an extended morphology behavior that builds on the basic Morphology behavior by adding additional callbacks needed for complex examples.

The genome_mutator is responsible for mutating genotypes. It uses various mutation operators to modify a genotype, and return a mutant of the genotype. Specifically, the mutation operators include both topological and parametric mutations. The topological mutations mutate the structure of a genotype by adding, or removing, neurons, connections, sensors, and actuators. The parametric mutations mutate the parameters of the genotype, such as the weights and the plasticity parameters. In a multi-objective optimization, bias mutation is performed on the bias parameters of the neural network, thus changing the biasing of the NN from one objective to another, while preserving overall proficiency.

The Genotype module encapsulates the genetic representation of neural networks.

Defines generic morphology behavior. The list of morphologies defines the list of sensors and actuators available to the NNs in a population. Since the morphology defines the sensors and actuators of the NN system, this list effectively defines the problem or simulation to which the evolving population of NN systems will be applied, and for what purpose the agents will be evolved. The sensors/actuators/scape are a separate part from the NN itself, all specified through the morphology module.

The population_manager is a process that spawns a population of neural network systems, monitors their performance, applies a selection algorithm to the NNs in the population, and generates the mutant offspring from the fit NNs, while removing the unfit. The population_manager module is the one responsible for mapping the genotypes to their phenotypes.

Client module for interacting with the PopulationManager.

Dynamic supervisor for population manager workers.

The PopulationManagerWorker is responsible for spawning the population_manager process.

The SelectionAlgorithm module provides different strategies for selecting agents for reproduction.

The specie_identifier module is a container for the specie_identifier functions. By keeping all the identifier functions in this module, it makes it easier for us to later add new ones, and then simply reference them by their name.

Supervisor for the PopulationManager system.

Since there are many ways to calculate TotMutations, we create the tot_topological_mutations module, which can store the different functions which can calculate this value.

Bardo's Ecto repository for database access.

Scapes are self-contained simulated worlds or virtual environments.

The ScapeManager is responsible for starting and stopping scapes.

Client module for interacting with the ScapeManager and Scape processes.

Supervisor for Scape processes.

Sectors are the subcomponents/processes that make up a Scape.

Supervisor for Sector processes.

Top-level supervisor for the ScapeManager subsystem.

Functions for creating and extracting tarballs.

Utility functions for the Bardo system.

Mix Tasks

Mix task to run complex neuroevolution examples with improved user experience.

Runs Bardo examples and benchmarks with small parameters for testing.

Runs Bardo examples and benchmarks with an improved organization structure.

Runs the Bardo XOR example with configurable parameters.