Your Model.
In The Game.

Acron's game loop is ordinary CPython 3.14, so the libraries you already use import into the same process as the renderer and physics — no subprocess, no bridge, no export step to get a model into the game on the desktop.

Runtime CPython 3.14 · C++ core · headless capable
Get Acron Read the Docs

ML Libraries
Are Just Imports

In many engines, running a PyTorch model means an external server, an ONNX export or a plugin. In Acron your game logic and your model share one Python process: import torch and call it.

  • ▪No round-trips — no inter-process communication or serialisation between game and model
  • ▪Your Python libraries — PyTorch, JAX, scikit-learn, Hugging Face, NumPy, installed into the project's environment
  • ▪NumPy ↔ GPU — acron.gpu moves arrays into textures and vertex buffers with the row and channel order handled
  • ▪Deterministic stepping — a fixed-step loop you can advance by hand, and integer-hashed noise for reproducible worlds
  • ▪C++ where you need it — drop to C++ for performance-critical non-ML code
policy_npc.py
import torch
from acron import CharacterBody3D

policy = torch.jit.load('models/guard_policy.pt').eval()

class Guard(CharacterBody3D):
    def _physics_process(self, dt):
        # Observation straight from the scene graph
        to_player = player.np.get_pos(self.np)
        obs = torch.tensor([to_player.x, to_player.y,
                            float(self.is_on_floor())])

        # Call the model in-process — no subprocess
        with torch.no_grad():
            vx, vy = policy(obs).tolist()

        self.velocity.x, self.velocity.y = vx, vy
        self.velocity += self.get_gravity() * dt
        self.move_and_slide(dt)

What You Can Build

Learned NPC Behaviour

Run trained policies or small local language models in the game process and feed them the world state directly from the scene graph.

Reinforcement Learning Environments

Wrap a scene in your own Gymnasium-style environment: step the fixed loop by hand, render offscreen, read back observations and rewards in the same process as your training code.

Procedural Content

Generate textures, terrain or meshes in Python and upload them straight to the GPU with acron.gpu and acron.geom — no export/import pipeline.

Behaviour Cloning

Record play sessions as Python data, train with PyTorch, and load the policy back into an NPC — the same language and process end to end.

Synthetic Data for Vision

Render colour and depth to offscreen buffers, vary scenes programmatically, and write the frames to disk or hand them to a model.

Gaussian-Splat Scenes

Load captured .sog or 3DGS .ply scans as environments, with a shader hook to move or reshape the splats.

Build the
Intelligent Game

Your model and your game in one Python process.