Week 6: ML with Python #94
Replies: 5 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
The Collab for Reinforcement learning: https://colab.research.google.com/drive/1IlrlS3bB8t1Gd5Pogol4MIwUxlAjhWOQ?usp=sharing |
Beta Was this translation helpful? Give feedback.
-
Y'all may have noticed I haven't really been posting in these discussions, unfortunately the time I was hoping to devote to this cohort ended up being swallowed up so I had to drop out from following along. I'm still excited to learn more about this stuff and I hope to get back to the content someday.. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This took me back a few years to my uni days. I used to love software agents. Give SARSA a go, if you haven't already. I took a look at this tutorial (https://www.datacamp.com/tutorial/introduction-q-learning-beginner-tutorial) and had a play with it. It should be noted that using the OpenAI FrozenLake environment creates extra problems for Q Learning. Since falling into a hole ends the session with no reward at all, every time your agent doesn't reach the goal, it essentially wastes the training episode. This makes it really inefficient to get your agent to learn the environment. So I created a "walled" environment. It is not possible for the agent to step into a hole. If it attempts to, it uses a step and stays where it is. This way, the agent can reach the end (given enough steps for the training episode) and the reward for reaching the end can be distributed across the whole route. It is SO MUCH more efficient to train your agent in this way. Prior to changing this, an 8x8 map with 2 rows with only 1 frozen square in each, was difficult to get the agent learning a route. After the modification to the environment I was able to get a 150x150 environment, with a significant number of holes, to be learnt reasonably quickly. I've attached a GIF of the map and the agent navigating it. Oh, I also added diagonal movement to make it more interesting. You will need to zoom in to see the agent moving. |
Beta Was this translation helpful? Give feedback.
-
Getting Started
The goal this week is to get to "Conclusion" lesson from freeCodeCamp's ML with python and check-in here.
Learning Resources
Check-in
Beta Was this translation helpful? Give feedback.
All reactions