Non-FictionInformativeEducational

SARSA Operator

A Coursebook on SARSA Operator

by Watt Cheri

  • English
  • 124 pages
  • 2026
  • SamEnrico

A Coursebook on SARSA Operator

Formats

About this book

A Coursebook on SARSA Operator

Free sample

Chapter 1: The Cliff's Secret--–- The first time I watched a Q-learning agent walk off a cliff, I assumed it was a bug. The agent had learned the optimal policy — the shortest path from start to goal — yet it kept stepping into the void, episode after episode, as if it had forgotten everything it learned. I restarted the simulation, checked the code, verified the rewards. Everything was correct. The agent was behaving exactly as designed.That was the moment I realized something profound: in reinforcement learning, the optimal solution is not always the safest solution, and the algorithm that finds the fastest path may be the worst choice when mistakes have real consequences.This book is about that realization, and about the algorithm that solves it: SARSA.The Day Optimal Became Dangerous Let me tell you about a problem that changed how I think about artificial intelligence.

It's called Cliff Walking, and it's deceptively simple.Imagine a grid. Four rows tall, twelve columns wide. In the bottom-left corner sits an agent — let's call it a robot, though it could just as easily be a self-driving car, a stock-trading algorithm, or a doctor deciding on a treatment plan. In the bottom-right corner lies the goal. Between them, running along the bottom edge of the grid, is a cliff.

Every step onto the cliff costs 100 points — a catastrophic penalty. Every other step costs 1 point. Reaching the goal earns 0 points and ends the episode.The task: get from start to goal while losing as few points as possible.Seems straightforward, right? The shortest path runs directly along the edge of the cliff, hugging the precipice for ten steps before reaching the goal. The safe path runs one row above the cliff, adding two extra steps to the journey but staying entirely away from danger.Here's what happens when you train two different algorithms on this problem.Q-learning, one of the most famous algorithms in reinforcement learning, learns the optimal policy.

It finds that shortest path along the cliff edge. And during training, it falls off that cliff approximately 47 times per million steps…

This is the end of the free sample. Get the eBook to keep going. Buy now

Read a sample →

Contents

  1. Chapter 1
  2. Chapter 2
  3. Chapter 3
  4. Chapter 4
  5. Chapter 5
  6. Chapter 6
  7. Chapter 7
  8. Chapter 8
  9. Chapter 9
  10. Chapter 10
  11. Chapter 11
  12. Chapter 12

Details

Author
Watt Cheri
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Informative, Educational
Released
2026-06-02
Pages (approx.)
124
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Watt Cheri

See all

You may also like

See all