Meowtin
← Back to Portfolio

Machine Learning

Machine Learning Casino Simulator

Casino operator — under NDA100 neural networks training in parallel
PyTorchDeep Q-NetworksMachine LearningReact 19TypeScriptFastifyWebSocketAWS
A machine learning environment disguised as a casino. The client operated several real casinos, and the simulator is fed by their real operating data — the game is arranging a casino floor to make the most money, and the simulation plays it out.

The learning system is the point. A distributed network of 100 PyTorch Deep Q-Network agents trains in parallel, each exploring different floor and play strategies, and their results compile into a master consensus network that then plays the live game in real time. Because the whole thing is API-first — a Fastify server with the rendering client sitting on top rather than baked in — the models can train headlessly against the same interfaces a human plays through.

The visible half runs a live floor of 100+ concurrent AI players across 50+ tables at 60 FPS (poker, blackjack, roulette, craps, baccarat), with 13 distinct behavior types and 2,000 pre-generated players who behave consistently over time. Rendering is Phaser with a PixiJS fallback path, using object pooling and spatial indexing to hold frame rate; state syncs over WebSocket, and financial math runs on exact decimal arithmetic rather than floats, because a simulation that quietly loses fractions of a cent isn't a simulation of a casino.

Built and deployed solo to AWS — containerized, with S3 holding trained models and SQS pushing updates so the running system picks up new training results without downtime.

Screenshots

ML Casino Simulator — screenshot 1
← All Projects