Record and annotate your own gameplay to train a custom AI player.
Let the trained AI take over your screen with a single keypress to play a game live.
Train across multiple GPUs without changing your configuration.
Watch training and live performance metrics in real time with TensorBoard.
| pzr2508/rl_for_game | 410979729/scope-recall | arahim3/mlx-dspark | |
|---|---|---|---|
| Stars | 33 | 33 | 33 |
| Language | Python | Python | Python |
| Setup difficulty | hard | moderate | easy |
| Complexity | 4/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires recording and annotating your own gameplay footage before training can start.
This project is a Python toolkit that trains an AI to play games on your computer by watching the screen and sending keyboard and mouse inputs. You record footage of yourself playing, annotate which actions you performed, and then feed that data to a neural network that learns to mimic and improve on your behavior. Once trained, the AI can take over your screen in real time, with F5 to let it play and F6 to take back control. The core learning algorithm is called Dueling DQN, a variant of a technique called Q-learning that estimates how good each possible action is at each moment. On top of that, the project layers a Transformer, a type of neural network good at processing sequences, so the AI can reason across multiple frames rather than just reacting to a single snapshot. This combination helps the agent handle situations where what happened a few seconds ago matters as much as the current frame. Several practical features are built in to make training more stable. A Double DQN mode prevents the AI from overestimating how good its choices are. An action-balanced sampler corrects for situations where one action (like doing nothing) shows up far more often than others in training data, which would otherwise skew the model. You can spread training across multiple GPUs without changing your config, and you can preprocess frames into a compact format to speed up disk reading during training. For data collection, the toolkit includes a screen recorder with an annotation dialog. You record a session, mark key moments with a keyboard shortcut, and then select which actions and rewards applied to those moments. All settings, from learning rate to screen resolution to how many Transformer layers to use, live in a single YAML file, and command-line flags override any setting without editing that file. There is also an online learning mode where the AI plays and trains at the same time, updating its own reward model and replay buffer on the fly. This requires a pretrained reward model to start from. A TensorBoard log tracks all training and online metrics so you can watch the AI improve over time.
A Python toolkit that trains an AI to play PC games by imitating recorded gameplay and improving through reinforcement learning.
Mainly Python. The stack also includes Python, TensorBoard, YAML.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.