Genex v1.0.1-beta Genex.Support.HallOfFame View Source

Keeps track of the strongest individual of a generation in an ETS table.

The hall of fame makes it easy to track the strongest individual between generations. It's a simple ETS table with the Key-Value pair of {Generation, Chromosome}.

The hall of fame can be accessed at anytime as an ETS named table with name :hall_of_fame.

Link to this section Summary

Functions

Add a generation to Hall of Fame.

Exports the named table to a file.

Create a new Hall of Fame.

Link to this section Functions

Add a generation to Hall of Fame.

This will add the current generation and strongest chromosome for a generation.

Returns :ok.

Parameters

  • population: %Population{} to add.

Exports the named table to a file.

This function is kind of broken.

Returns {:ok, fname}.

Parameters

  • path: Path to save to. Defaults to current directory.

Create a new Hall of Fame.

This will create an ETS named table called, :hall_of_fame.

Returns :ok.