December 2019
Intermediate to advanced
368 pages
11h 10m
English
In the following code, at first, we initialize the random number generator seed with the current system time. After that, we create the appropriate substrate configuration for the discriminator ANN that is able to operate over the dimensionality of the experiment's visual field. Next, we create the CPPN genome using the created substrate configuration:
# random seed seed = int(time.time()) # Create substrate substrate = create_substrate(num_dimensions) # Create CPPN genome and population g = NEAT.Genome(0, substrate.GetMinCPPNInputs(), 0, substrate.GetMinCPPNOutputs(), False, NEAT.ActivationFunction.UNSIGNED_SIGMOID, NEAT.ActivationFunction.UNSIGNED_SIGMOID, 0, params, 0) pop = NEAT.Population(g, ...
Read now
Unlock full access