December 2019
Intermediate to advanced
368 pages
11h 10m
English
The genotype encoding the phenotype of the objective function candidates must produce phenotype configurations that have at least one input node and two output nodes, as discussed previously. We implement the population creation in the create_objective_fun function as follows:
params = create_objective_fun_params() # Genome has one input (0.5) and two outputs (a and b) genome = NEAT.Genome(0, 1, 1, 2, False, NEAT.ActivationFunction.TANH, # hidden layer activation NEAT.ActivationFunction.UNSIGNED_SIGMOID, # output layer activation 1, params, 0) pop = NEAT.Population(genome, params, True, 1.0, seed) pop.RNG.Seed(seed) obj_archive = archive.NoveltyArchive( metric=maze.maze_novelty_metric_euclidean) ...
Read now
Unlock full access