October 2019
Intermediate to advanced
340 pages
8h 39m
English
We have solved the CartPole problem using the FA algorithm with neural networks in this recipe. Note that the environment has a four dimensional observation space, which is double that of the Mountain Car, so we intuitively double up the number of features we use, and the size of the hidden layer accordingly. Feel free to experiment with SARSA with neural networks, or Q-learning with experience replay, and see whether either of them perform better.
In Step 6, we plot the episode lengths over time, which will result in the following plot:

You can see that the total rewards in most episodes after the first 300 episodes are the ...
Read now
Unlock full access