April 2019
Intermediate to advanced
212 pages
5h 34m
English
We can manually set the state of the environment by changing the state variable. Note that you should not set the state manually when running this task; this is bad practice and is not encouraged by OpenAI Gym. We are demonstrating it here for illustration purposes only:
env.env.s = 20env.render()
The following is the result for the preceding code:

Generally, in a game loop, we will be sent to the state that results from taking an action selected by the Q-learning algorithm and will not need to set the state manually. In this demonstration, it can be useful to verify for yourself that each value corresponds to a fixed ...
Read now
Unlock full access