whatisgithub

What is shadow-rogue-self-play?

avbiswas/shadow-rogue-self-play — explained in plain English

Analysis updated 2026-05-18

9C#Audience · developer

In one sentence

A 2D Unity game where AI characters learn to dodge and shoot by training against past versions of themselves using reinforcement learning.

Mindmap

mindmap
  root((repo))
    What it does
      2D dodge and shoot game
      Self-play trained AI
      Playable in browser
    Tech stack
      C-Sharp
      Unity
      ML-Agents
      PPO algorithm
    Use cases
      Learn self-play RL
      Study game AI
      Play human vs AI
    Audience
      RL learners
      Game developers
    Controls
      Move jump crouch
      Dash and shoot

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Play the dodge-and-shoot game against a trained AI opponent in the browser.

USE CASE 2

Study how a self-play PPO policy is set up and trained in Unity ML-Agents.

USE CASE 3

Train your own reinforcement learning agent using the included config and environment.

What is it built with?

C#UnityML-AgentsPPOONNX

How does it compare?

avbiswas/shadow-rogue-self-playautofac/autofac.extras.fakeiteasyxiu2/stateofdecay2modmanager
Stars9810
LanguageC#C#C#
Last pushed2026-07-092024-01-20
MaintenanceActiveDormant
Setup difficultyeasyeasy
Complexity2/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

So what is it?

Shadow-Rogue Self-Play is a 2D game built in Unity where two players dodge projectiles and shoot at each other. The twist is that the AI opponents are trained through reinforcement learning using a technique called self-play. The AI learns by playing against older versions of itself, gradually improving its ability to dodge, jump, crouch, dash, and shoot across a variety of strategies. The game is playable directly in the browser through itch.io. In human versus AI mode, you control one character using keyboard inputs, A and D to move, space to jump, S to crouch, and K to shoot. Both sides can also run fully as AI. The training uses ML-Agents, Unity's reinforcement learning toolkit, with the PPO algorithm. The AI observes its own position, velocity, crouch and dash state, and surrounding sensors that detect bullets, walls, the ground, and the opponent. From that input it picks one of five discrete actions each step. The trained model is stored as an ONNX file and can be dropped back into Unity to run inference. Training scripts let you run multiple simultaneous game environments for faster learning. This is an educational project aimed at people learning reinforcement learning or game AI in Unity. The tech stack is C# in Unity with ML-Agents. Training requires building the project first, then running the ML-Agents command line tool against the built executable. The creator notes the project predates their other polished work and may contain some leftover experimental files.

Copy-paste prompts

Prompt 1
Explain how self-play reinforcement learning works using avbiswas/shadow-rogue-self-play as an example.
Prompt 2
Walk me through building this Unity project and running the ML-Agents training command from the README.
Prompt 3
Show me how the reward and action space are defined in this repo's ML-Agents environment.

Frequently asked questions

What is shadow-rogue-self-play?

A 2D Unity game where AI characters learn to dodge and shoot by training against past versions of themselves using reinforcement learning.

What language is shadow-rogue-self-play written in?

Mainly C#. The stack also includes C#, Unity, ML-Agents.

Who is shadow-rogue-self-play for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.