Modular AI for Rocket League
Complete2025-01 → 2025-05
- Role
- solo, 221 and 19 commits across two repositories
My bachelor's thesis, graded 5/5: independent competency networks weighted at runtime by a learned selector, driving a car in a physics game through a C++ plugin injected into the running process.
The argument.
The thesis opens by noting that training runs for the largest models take three to four months and grow with each generation, and argues that general-purpose capability is often unnecessary — producing weights with no meaningful influence on the result. The contribution is software for decomposing large neural networks into smaller modules: shallow networks, output-analysis methods, reinforcement learning and gradient descent applied to complex dynamic systems. The problems addressed are the impossibility of training a network partially without loading all of it, the difficulty of training large models, and the difficulty of adapting networks to complex systems.
Two processes, two languages, one control loop.
A C++ plugin injected into the game reads game state, writes controller output, exposes an in-game panel and speaks a schema-defined binary protocol over a socket. A Python client on the other end holds the networks, the reward library and the training harness, with generated type stubs for the protocol so both sides stay honest.
Rewards as a library, not a constant.
Ball shot speed, car velocity, closing distance, constant distance and velocity — each an independent composable reward with a documented template for writing more. Custom in-game training scenarios are driven from Python, and the interface plots loss live while training.
Highlights
- 88 pages plus six appendices, another 48 pages
- A cross-language, cross-process real-time control loop over a schema-defined binary protocol
- A composable reward library with a documented extension template
- Dual CUDA and CPU torch indexes declared per platform
Stack
PythonPyTorchCap'n ProtoPySimpleGUIC++MSVCImGuiDirectX 11BakkesMod SDK