MapElitesProblem

Trait MapElitesProblem 

Source
pub trait MapElitesProblem {
    type Genome: Clone;

    // Required methods
    fn random_genome(&self) -> Self::Genome;
    fn evaluate(&self, genome: &Self::Genome) -> (f64, Vec<f64>);
    fn mutate(&self, genome: &Self::Genome) -> Self::Genome;
    fn feature_dimensions(&self) -> usize;
    fn bins_per_dimension(&self) -> usize;
}
Expand description

Trait that defines the requirements for a problem to be solved using Map-Elites

Required Associated Types§

Source

type Genome: Clone

The type representing a single solution

Required Methods§

Source

fn random_genome(&self) -> Self::Genome

Generate a random solution

Source

fn evaluate(&self, genome: &Self::Genome) -> (f64, Vec<f64>)

Evaluate the fitness and features of a genome Returns (fitness, features) where fitness is a single value and features is a vector

Source

fn mutate(&self, genome: &Self::Genome) -> Self::Genome

Mutate a genome to produce a new one

Source

fn feature_dimensions(&self) -> usize

Get the number of feature dimensions

Source

fn bins_per_dimension(&self) -> usize

Get the number of bins per feature dimension

Implementors§