Pexels Photo 247819

Reinforcement Learning in Scala by Chris Birchall

Pexels Photo 247819

How can you implement reinforcement learning in Scala? What is reinforcement learning? These are questions Principal Software Developer Chris Birchall answered for us in his talk at Scala eXchange. He helped us to know what kind of problems reinforcement learning solves as well as sharing its core concepts, processes and policies. 


Reinforcement Learning in Scala

Reinforcement learning (RL) is a powerful machine learning paradigm that has been successfully applied to a wide class of problems, from steering helicopters to predicting stock prices. During this talk you will find out what RL is all about and how to implement it in Scala. Chris will introduce RL, providing use cases and intuition about what kind of problems it can solve. He'll also share some of its core concepts, including Markov Decision Processes, policies and action values, prediction and control, exploitation vs exploration and bootstrapping.

Next you'll implement some of these concepts in Scala, starting from scratch and working step by step towards an implementation of 'Q-learning' – a popular RL technique for learning policies. You'll structure your code using type classes to separate the generic Q-learning framework from the specifics of any particular problem we want to model.

You will also learn how to train an agent using your Q-learning implementation, and finally Chris will demonstrate the result of the training: the computer successfully playing a simple game.


About Chris Birchall

Chris is a principal software developer at OVO Energy, where he looks after authentication and personal data as a member of the Identity team. He is the author of the ScalaCache library. He has been using Scala for work and play since 2010.


You can view the source code for all demos on GitHub here.