chapter ten

10 Reinforcement learning with Q-learning

 

This chapter covers

  • Understanding the inspiration for reinforcement learning
  • Identifying problems to solve with reinforcement learning
  • Designing and implementing a reinforcement learning algorithm
  • Understanding reinforcement learning approaches

10.1  What is reinforcement learning?

Reinforcement Learning (RL) is an area of machine learning inspired by behavioral psychology. The concept of reinforcement learning is based on cumulative rewards or penalties for the actions that are taken by an agent in a dynamic environment. Think about a young dog growing up. The dog is the agent in an environment that is our home. When we want the dog to sit, we usually say, “Sit.” The dog doesn’t understand English, so we might nudge it by lightly pushing down on its hindquarters. After it sits, we usually pet the dog or give it a treat. This process will need to be repeated several times, but after some time, we have positively reinforced the idea of sitting. The trigger in the environment is saying “Sit”; the behavior learned is sitting; and the reward is pets or treats.

10.1.1    The inspiration for reinforcement learning

10.2  Problems applicable to reinforcement learning

10.3  The life cycle of reinforcement learning

10.3.1    Simulation and data: Make the environment come alive

10.3.2    Training with the simulation using Q-learning

10.3.3    Testing with the simulation and Q-table

10.3.4    Measuring the performance of training

10.3.5    Model-free and model-based learning

10.4  Deep learning approaches to reinforcement learning

10.5  Use cases for reinforcement learning

10.5.1    Robotics

10.5.2    Recommendation engines

10.5.3    Financial trading

10.5.4    Game playing