An introduction to Reinforcement Learning: Snake Your Way out of a Paper Bag

By Frances Buontempo

When people talk about AI they tend to mean LLMs, so this talk will to remind us of other approaches to AI. Reinforcement learning (RL) is a type of machine learning, so part of AI. An "agent" takes actions in a dynamic environment. Better outcomes are rewarded and worse outcomes are penalised. RL can be used for targeted marketing, infrastructure optimisation or making financial decisions. RL has also been used to learn to play Go and PacMan. We won’t have time for these, so we will implement Snake instead and see if the machine can learn to play the game. We’ll see some code, and come away with an understanding of machine learning in general and RL in particular. This is a fun opportunity to learn and revise some C++, tracking better outcomes and probabilistically choosing moves (think using random numbers). We will start with a std::vector and progress from there. Come along and practice some C++ and learn some AI on the way. I’ll look at vanilla Q-learning, which just uses a table of data. You can extend this to deep Q-learning, using a neural network, which I probably won’t have time to cover. Implementing something yourself is a great way to learn, both your chosen language and the thing you are implementing.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.