Bardo.Examples.Applications.Flatland (Bardo v0.1.0)
View SourceMain setup module for the Flatland experiment.
This module provides functions to configure and run Flatland simulations with evolving predator and prey agents.
Summary
Functions
Configure a basic Flatland experiment with predator and prey.
Run a Flatland experiment with the given configuration.
Load and visualize the best agents from a completed Flatland experiment.
Functions
@spec configure( atom(), pos_integer(), pos_integer(), pos_integer(), pos_integer(), pos_integer() ) :: map()
Configure a basic Flatland experiment with predator and prey.
Parameters:
- experiment_id: Unique identifier for the experiment
- predator_population_size: Number of predator agents
- prey_population_size: Number of prey agents
- plant_quantity: Number of plants in the environment
- simulation_steps: Number of simulation steps per evaluation
- generations: Number of generations to evolve (defaults to 50)
Returns the experiment configuration map.
@spec run( atom(), pos_integer(), pos_integer(), pos_integer(), pos_integer(), pos_integer() ) :: :ok | {:error, any()}
Run a Flatland experiment with the given configuration.
Parameters:
- experiment_id: Unique identifier for the experiment
- predator_population_size: Number of predator agents (default: 20)
- prey_population_size: Number of prey agents (default: 20)
- plant_quantity: Number of plants in the environment (default: 40)
- simulation_steps: Number of simulation steps per evaluation (default: 1000)
- generations: Number of generations to evolve (default: 50)
Returns :ok if the experiment was started successfully.
Load and visualize the best agents from a completed Flatland experiment.
Parameters:
- experiment_id: ID of the completed experiment
Returns :ok if visualization was started successfully.