pg.evolution.neat¶
Accessible via pg.evolution.neat
.
- neat(mutator=Uniform(where=None, seed=None), population_size=100, disjoint_coefficient=1.0, matching_coefficient=3.0, compatibility_threshold=0.4, remaining_ratio=0.6, seed=None)[source]¶
NEAT Algorithm.
See http://nn.cs.utexas.edu/downloads/papers/stanley.cec02.pdf for the original paper.
NOTE(daiyip): PyGlove supports search spaces that do not change during exploration. Therefore we do not grow the program (e.g. Neural Architecture in the paper) from a minimal program. Also, crossover can take place on any two individuals due to a fixed program structure, which will be implemented later. This algorithm illustrates how speciation is expressed in the compositional evolution framework.
- Return type:
- Parameters:
mutator – Mutator to use.
population_size – Population size for each generation.
disjoint_coefficient – Coefficient for DNA disjointness. Used for distance computations.
matching_coefficient – Coefficient for DNA matching. Used for distance computations.
compatibility_threshold – Threshold for max distances between two DNA in the same species.
remaining_ratio – Ratio of best individuals in a species to remain.
seed – Random seed. If None, use the current system time.
- Returns:
An Evolution object that represents the NEAT algorithm.