Marcus Lion / Quantitative AI Labs

Reinforcement Learning Laboratory

Train a small tabular Q-learning agent on a reproducible inventory-control task.

← All laboratories

Research demonstration: synthetic, simplified educational models. No live prices, broker connectivity, investment recommendation or validated trading performance.

Simulation output

Train to begin.

Greedy policy by state

InventorySignal −1Signal 0Signal +1

Evaluation episode

StepSignalActionInventoryReward

Toy inventory-control MDP, not a trading strategy. Inventory is bounded between −2 and +2; actions adjust inventory by −1, 0 or +1. The next signal is drawn independently from three equally likely values. Reward = inventory × next signal − 0.1 × absolute executed adjustment − penalty × inventory² / 10. Training uses epsilon-greedy Q-learning; evaluation uses a separate seeded greedy trajectory. Chart shows training reward, not returns.

All calculations run locally in your browser.