Back to Home

SnakeAI: Reinforcement Learning Meets Real-Time Multiplayer

Thesis project combining a Go multiplayer game server, Svelte frontend, and reinforcement learning agents for competitive Snake gameplay.

GoSvelteKitPythonGymnasiumDeep RL

Overview

SnakeAI is a full-stack RL thesis project where trained agents compete in a live multiplayer Snake environment served in real time over WebSockets.

What was built

  • A Go game server for deterministic multiplayer simulation and low-latency client sync.
  • A browser-based Svelte interface with live rendering and spectator-friendly state updates.
  • A Python training stack for DQN, PPO, and A2C agents using a custom environment.
  • Reward shaping and observation-space tuning for more stable learning dynamics.

Impact

  • Achieved 2.5x faster training convergence over 200k iterations after observation-space optimization.
  • Kept online gameplay interactions below 50ms server response in the multiplayer loop.
  • Trained agents that performed >350% better than baseline bots.

Demos

Recognition

Awarded the Endress+Hauser Award for thesis excellence.

Links