ShangtongZhang/reinforcement-learning-an-introduction ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python project that recreates the examples and figures from Sutton and Barto’s Reinforcement Learning book.

I want each chapter to have working code for the main exercises and demos, like the bandit problems, gridworld, blackjack, temporal difference learning, Dyna, function approximation, and control tasks such as mountain car. The scripts should run from the chapter folders and save the same kind of plots shown in the book into an images folder.

Make it easy to install and run, with a simple requirements file and clear instructions in the README. If you need to check current library docs online while wiring up the environment or plotting, go ahead. I also want the code to be organized so each chapter is easy to browse, with sensible names, comments, and reusable helpers where that makes sense.

Please keep it focused on matching the book examples rather than making a fancy app.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab