Back to projects

Hytale RL – Self-Play Sword-Duel Agents

Self-play RL agents that 1v1 with swords, axes, maces, daggers, bows and crossbows inside the real Hytale game server. An early agent beat Hytale's built-in combat AI 128-0, and in the first human playtest the agent beat me 8-4.

Python · PyTorch · PPO self-play · Java (Hytale server plugin) · CUDA

Video coming soon

The final self-play agent (r9t, update 90,750) against a copy of itself: sword vs daggers, KO at 13.7 s. Fight 2 puts it against a scripted archer on a box. Rebuilt in 3D from the game server's per-tick trace.

Hytale RL trains reinforcement-learning agents to fight each other in melee and ranged 1v1 duels inside the real, headless Hytale game server, not a simplified clone.

  • A Java server plugin bridges the game to Python, where agents train with PPO league self-play on a GPU at around 3,000 environment steps per second.
  • Weapons: swords, axes, maces, daggers, bows and crossbows.
  • An early agent beat Hytale’s built-in NPC combat AI 128-0; in the first human playtest I lost 4-8 to the agent.
  • A live watch mode lets you spectate the agents from the game client.

The project isn’t public yet; a video is coming soon.