Built a RL Toy Games Repo (3 Games Trained + 2 In Progress)

Built a RL Toy Games Repo (3 Games Trained + 2 In Progress)

Hey!👋

I’ve got a little RL toybox repo I’ve been messing with on and off and figured I’d finally share it:

https://github.com/bzznrc/rl-toybox

I first tried this stuff a few years ago following this tutorial on building a LinearQNet-controlled Snake game.
Then I tried applying the same to a tiny top-down shooter (“Bang”) and got immediately stuck on issues with the I/O and rewards.

Recently I came back to it (thanks Codex) and managed to land an IO + reward structure that actually trains.

I then decided I want to curate a small library of RL-controlled games and added a racing one (“Vroom”), and now I’m working on a football (soccer) one (“Kick”) with PPO controlling a full 11-player team (shared policy).

Current lineup:

  • Snake — QLearn, obs: 12 floats, actions: 3, net: [32]
  • Vroom — vanilla DQN, obs: 20 floats, actions: 6, net: [48, 48]
  • Bang — DQN (double + dueling + prioritized replay), obs: 24 floats, actions: 8, net: [64, 64]
  • Kick — PPO (shared policy, multi-agent), obs: 36 floats per player, actions: 12, net: [96, 96]

Bang AI (the green player is controlled by a DQN)

It pretty much is a way for me to understand a bit more of RL and I am in no way expert in any of this, but I’ll say looking at the agents tiny simulated brains actually start to make sense of the world and do useful stuff feels great!

If anyone wants to poke around, run training, or give feedback on the env/reward design, I’d appreciate it! 😊

submitted by /u/ScazzaMage
[link] [comments]

Liked Liked