steps-to-catch (learning curve)
Predator (Q-learning)
Prey (evasive)
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
This simulation explores reinforcement learning by putting a tabular Q-learning agent to work on a concrete task: hunting a moving target on an 8×8 grid. The predator has no built-in strategy — it starts with an empty Q-table and discovers a pursuit policy purely from trial, error, and the Bellman update, while an evasive (non-learning) prey tries to stay away. A live heatmap projects the agent's current value estimates onto the grid floor, a learning-curve sparkline tracks steps-to-catch across episodes, and adjustable learning rate, discount factor, exploration rate and an ε-decay toggle let you watch the exploration/exploitation trade-off shape how fast — and how well — the policy converges.