NullG

Reinforcement Learning

An anti-gravity racer built on a custom C++20/Vulkan engine, with native simulation, learned pilots, split-screen and network multiplayer.

NullG's learned pilots train in the game's native simulation and run through a C++ policy evaluator inside an ordinary race. They encounter the same physics, pickups and weapons as other racers, with control over driving and the use of weapons or Turbo.

Training a pilot

Training uses Gymnasium, Stable-Baselines3 PPO and PyTorch, with races running in isolated native workers. The training environment uses the game's handling and combat code.

The trained policy is exported as a .ngpolicy package. It contains the weights, observation definitions, physical scaling and model identity, which the game validates before a race. Once loaded, inference runs inside the game loop.

The pilot gets information about its motion and health, the road ahead, nearby racers, pickups, projectiles and its inventory. Road guidance includes heading, curvature and clearance, so it has something to work with before arriving at a corner.

It uses the same throttle, analog steering, airbrakes, pitch and weapon controls available to a player. Decisions happen at 30 Hz inside the 60 Hz race session. The engine still handles timing and the physics for the selected game.

Driving first, then combat

The driving work covers navigation, traffic, pickups, naturally earned Turbo and complete races. The XL development rotation includes Talon's Reach, Sagarmatha, Gare d'Europa and Odessa Keys.

The driving experiments compare what information the pilot gets and what it is rewarded for, then look at how those changes affect its steering. Saved native states let a short steering problem be repeated without driving the whole approach again. Full-race and Turbo checks follow those shorter trials.

For combat, the learned driving parameters stay fixed while weapon choices are trained. That lets the experiment focus on using weapons without relearning all the driving at the same time. Race placement remains the priority, with limited rewards for effective attacks and useful pickups.

Full races alternate with short practice windows at weapon opportunities reached during normal driving. The opponents include the original AI, a retained learned challenger and mixed fields, so the pilot gets practice against more than one style of racing.

Evaluation

Candidates run under matched conditions across multiple seeds. Evaluation compares completion, pace, wins, damage, steering and effective attacks, with settings and checkpoint identities recorded alongside results. Replays help explain behaviour that a score alone doesn't capture.

The training approach draws on Gran Turismo Sophy's training regimen, TMRL's real-time racing framework, CAPS smooth-control research and NeuralKart's search-and-learn approach.

Training checkpoints

The video below follows five checkpoints from driving practice into combat racing, ending with a complete Odessa Keys race.

Earlier checkpoints and full races are in the training playlist.