My AI learns to play Snake (python code available)
Q-learning is a very simple but powerful algorithm to train an agent's interaction with an environment. The fundamental idea is to learn for a given observation/state the expected reward for each of the possible actions. My implementation is in python and all the math is almost completely done in numpy. I hope you can use it as a starting point together with the pygame-environment to experiment around and immediately see the effects of your changes. Github-link: https://github.com/giaco91/Q-learning-for-snake
Q-learning is a very simple but powerful algorithm to train an agent's interaction with an environment. The fundamental idea is to learn for a given observation/state the expected reward for each of the possible actions. My implementation is in python and all the math is almost completely done in numpy. I hope you can use it as a starting point together with the pygame-environment to experiment around and immediately see the effects of your changes. Github-link: https://github.com/giaco91/Q-learning-for-snake