January 2020
Intermediate to advanced
346 pages
9h 8m
English
Since MountainCar is controlled by a sequence of actions, each with a value of 0 (push left), 1 (no push), or 2 (push right), and there can be up to 200 actions in a single episode, one obvious way to represent a candidate solution is by using a list of length 200, containing values of 0, 1, or 2. An example of this is as follows:
[0, 1, 2, 0, 0, 1, 2, 2, 1, ... , 0, 2, 1, 1]
The values in the list will be used as actions for controlling the car and hopefully driving it to the flag. If the car made it to the flag in less than 200 steps, the last few items in the list will not be used.
Next, we need to determine how to evaluate a given solution of this form.
Read now
Unlock full access