Tumor: 5 · Toxicity: 0 Action: —

Q-Learning Chemotherapy Dosing Grid (2D)

This simulator trains a tabular Q-learning agent to choose chemotherapy doses for a simulated patient, purely from trial-and-error reward signal — no hand-coded treatment rules. A 2D grid shows every (tumor burden, toxicity) state as a tile whose fill level is the agent's learned value estimate and whose colour is its currently preferred dose; a marker traces the agent's live position and glides between tiles as training plays out in real time. Click any tile to lock a side-by-side inspector on its four dose values, tune the learning rate, exploration decay and toxicity aversion, and watch the learned policy shift between aggressive and conservative dosing, with live episode count, exploration rate, moving-average reward and cure rate.