A physics-based tank arena where every enemy is a reinforcement-learning agent that sees the world through its own camera.
Play · Train · How it works · Docs
- 🎮 Playable game — drive a tank in a battle royale against trained agents (16 enemies by default, configurable), keyboard or gamepad, fully remappable controls.
- 👁️ Pixels in, actions out — each agent sees only what its tank sees: a 256×128 canon camera and a 360° panorama, rendered offscreen with Vulkan.
- ⚙️ Real physics — Jolt Physics for terrain, tracks, turret and ballistic shells.
- 🧠 From-scratch RL in C++ — PPO, PPO with a liquid time-constant (LTC) recurrent core, and PPG, written on LibTorch; no Python in the training loop.
- 📈 Self-play curriculum — 32 tanks driven by the same agent; the arena grows from 250 m to 1000 m as they learn to hit each other.
- 📦 Bundled agents — pretrained
ppo,ppo_liquidandppgcheckpoints ship with the game.
flowchart LR
J["Jolt physics<br/>tanks · shells · terrain"] --> R["Vulkan offscreen renderer<br/>canon camera + panorama"]
J --> S["Proprioception<br/>state vector"]
R --> A["Agent (LibTorch)<br/>CNN encoders + MLP / LTC trunk"]
S --> A
A -->|"move · aim · fire · zoom"| J
J -->|"reward: damage, kills, shell cost"| T["PPO / PPG update"]
T -.-> A
Each tank outputs four continuous actions (chassis and canon joysticks, tanh-squashed Gaussian) and two discrete ones (fire, zoom, Bernoulli). Network details: docs/neural_architecture.md.
Download the archive for your platform from the latest release (Linux x86-64 / arm64, Windows, macOS arm64 — experimental).
macOS: the app is not signed
Unzip the archive, then in the folder containing ArenAI.app:
xattr -dr com.apple.quarantine ArenAI.appLinux, with dependencies and LibTorch installed (docs/BUILD.md):
git clone https://github.com/Ipsedo/ArenAI.git
cd ArenAI
./build_linux.sh
./build/arenai_desktop/arenai_desktopWindows (Visual Studio 2022, C++ workload), in PowerShell:
.\install_dependencies.ps1
.\build_windows.ps1./build/arenai_agent/arenai_agent_train \
--output_folder outputs/train_001_ppo \
--resources_folder resources \
--cuda ppo| agent | trunk | memory |
|---|---|---|
ppo |
MLP | none |
ppo_liquid |
LTC cell (128 neurons) | recurrent, TBPTT |
ppg |
MLP | none, auxiliary value phase |
Then load save_K/actor.pt from the game menu, or judge it under the game rules with arenai_agent_match. All options and defaults: docs/USAGE.md.
| BUILD.md | dependencies, build per platform, CMake options, tests, golden images |
| USAGE.md | play, train, evaluate, Python tooling, every CLI option |
| ARCHITECTURE.md | modules, class diagrams, frame and training sequences |
| neural_architecture.md | inputs, encoders, trunks, heads |
arenai_utils caches, file reading, logging
arenai_controller input handling
arenai_view Vulkan renderer (window + offscreen agent vision)
arenai_model Jolt physics, tanks, shells, items
arenai_core environment, enemy handling, thread pool
arenai_agent PPO / PPO liquid / PPG / SAC, training & evaluation executables
arenai_desktop the playable game (RmlUi menus, HUD)
Periodic freezes on GNOME
The system-monitor GNOME Shell extension stalls the game periodically. Disable it while playing:
gnome-extensions disable system-monitor@gnome-shell-extensions.gcampax.github.comBug reports, build failures and ideas are welcome — open an issue. Code style is enforced with pre-commit (clang-format); see docs/BUILD.md.