Skip to main content

SpigotPlex RL

Reinforcement learning AI agents trained inside Minecraft

  • Java
  • Java
  • Python
  • PyTorch
  • OpenAI Gym
  • Spigot API
  • Javalin
  • WebSocket
Screenshot of SpigotPlex RL

SpigotPlex RL trains AI agents inside Minecraft servers using deep reinforcement learning. The Java side is a Spigot 1.8.8 plugin that spawns and controls NPC entities. It embeds a Javalin HTTP/WebSocket server on port 8755 with /step, /reset, and /state endpoints.

The Python side wraps the HTTP communication in an OpenAI Gym environment, so training code looks like any standard Gym loop. The agent is a DQN implemented in PyTorch with a 100k transition replay buffer and a target network that syncs every 1000 steps.

It ships with three training environments: Beam Walking (narrow bridge over a void), Parkour Course (platforms at different heights requiring jump timing), and Landmark Navigation (open area where the agent finds a target using spatial cues).

There's PS4 controller support for manual NPC control, which is useful for collecting demonstration data and for getting a physical sense of what the controls feel like when debugging agent behavior.