Skip to main content

MapElitesEvolution

Struct MapElitesEvolution 

Source
pub struct MapElitesEvolution<G, F>
where G: Genome, F: Fitness<G>,
{ /* private fields */ }
Expand description

MAP-Elites evolution engine.

Unlike traditional evolution, MAP-Elites maintains a grid of cells where each cell can hold at most one individual. Individuals compete for cells based on their behavior descriptor, and only the fittest individual in each cell survives.

Implementations§

Source§

impl<G, F> MapElitesEvolution<G, F>
where G: Genome, F: Fitness<G>,

Source

pub fn new( archive: MapElitesArchive<G>, fitness: F, config: MapElitesConfig, ) -> Self

Create a new MAP-Elites evolution instance.

Source

pub fn initialize(&mut self)

Seed the archive with random individuals.

Source

pub fn run(&mut self, generations: usize) -> MapElitesResult<G>

Run MAP-Elites for a number of generations.

Source

pub fn step(&mut self)

Run a single generation step.

Source

pub fn archive(&self) -> &MapElitesArchive<G>

Get a reference to the current archive.

Source

pub fn total_evaluations(&self) -> usize

Get the total number of evaluations performed.

Source

pub fn coverage(&self) -> ArchiveCoverage

Get coverage statistics.

Auto Trait Implementations§

§

impl<G, F> Freeze for MapElitesEvolution<G, F>
where F: Freeze,

§

impl<G, F> RefUnwindSafe for MapElitesEvolution<G, F>

§

impl<G, F> Send for MapElitesEvolution<G, F>

§

impl<G, F> Sync for MapElitesEvolution<G, F>

§

impl<G, F> Unpin for MapElitesEvolution<G, F>
where F: Unpin, G: Unpin,

§

impl<G, F> UnsafeUnpin for MapElitesEvolution<G, F>
where F: UnsafeUnpin,

§

impl<G, F> UnwindSafe for MapElitesEvolution<G, F>
where F: UnwindSafe, G: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V