January 2020
Intermediate to advanced
346 pages
9h 8m
English
To interact with the CartPole environment and solve it using a genetic algorithm, we've created the Python program, 02-solve-cart-pole.py, which is located at https://github.com/PacktPublishing/Hands-On-Genetic-Algorithms-with-Python/blob/master/Chapter10/02-solve-cart-pole.py.
Since we are using a list of floats to represent a solution—the network's weights and biases—this program is very similar to the function optimization programs we looked at in Chapter 6, Optimizing Continuous Functions, such as the one we used for the Eggholder function's optimization.
The following steps describe the main parts of this program:
Read now
Unlock full access