AI-written example code complementing the lecture notes "Reinforcement Learning for Economists", available at https://benjaminmoll.com/lectures/.
sarsa_rbc.ipynb— solves the standard real business cycle (stochastic neoclassical growth) model with the Sarsa algorithm from Lecture 3, and compares the solution to Howard policy iteration (Lecture 1). The Sarsa loop is compiled with Numba (~10 million updates per second on one core).
Python with numpy, scipy, matplotlib, numba (all included in Anaconda; also runs on Google Colab).