Fish, coral heads and learned value bars
Learned vs exact values; error history

Temporal-Difference Learning on a Reef Corridor: Learned vs Exact Values (2D)

Watch a damselfish learn the value of every coral head on a corridor between a predator grotto and a feeding anemone using only temporal-difference updates after each hop. Set the current, number of heads, discount, hop cost and learning rate; compare the learned values with the exact Bellman solution and the gambler's-ruin closed form, and follow the RMS error. A Blender-built reef with checks against value iteration, Monte Carlo returns and decaying-rate TD.

Made with 🟠 Blender