June 2018
Intermediate to advanced
546 pages
13h 30m
English
In our final example in this chapter, we'll implement the parallelized deep GA on the HalfCheetah environment. The complete code is in Chapter16/04_cheetah_ga.py. The architecture is very close to the parallel ES version, with one master process and several workers. The goal of every worker is to evaluate the batch of networks and return the result to the master, which merges partial results into the complete population, ranks the individuals according to the obtained reward and generates the next population to be evaluated by the workers.
Every individual is encoded by a list of random seeds used to initialize the initial network weights and all subsequent mutations. This representation allows very compact encoding of the network, ...