Picture a puppy learning to sit. You say “sit,” it sits, you give a treat. Next time it sits faster. It is not memorising a rule book — it is learning which actions bring the best rewards. That is the heart of reinforcement learning (RL). In this chapter we build the core ideas that let a computer program learn to make good decisions purely by trying things and seeing what happens.