Latest Update (v0.4.0): Unity Cup strategy, PAL policy, ADB mode, preset groups, and smarter training/race handling.
Previous updates: v0.3.3 bugfixes, v0.3.2 skill memory + data scraper, v0.3.1 remote template matching fixes.
This project is an AI bot for Umamusume: Pretty Derby that automates training, races, and skill management. It helps you farm fans, clear goals, and optimize stats without grinding manually.
It works on:
- Steam (PC), check a full run in: https://www.youtube.com/watch?v=smNZnwD1QI4
- Android (via scrcpy), check a full run in https://www.youtube.com/watch?v=sD9CjXORIUM (inside Virtual Machine)
It is using a mix of YOLO object detection, machine learning, OCR, and custom logic to play like a human.
Whether you want to auto race G1s, plan a training schedule, or run 24/7 farming, this tool provides a flexible and safe way to streamline your Umamusume career runs.
It’s based on and improved from:
Wanna drop a quick thought, idea, or just hang out? Come say hi either in Issues section or in discord:
Use this bot at your own risk. I take no responsibility for bans, issues, or account losses that may result from using it.
- Smart Training – Chooses the best option using a point system (rainbows, director, hints, etc.).
- Human-like Input – Random clicks, delays, and jitters to stay natural.
- Full Tracking – Monitors mood, stats, skills, goals, and energy.
- Health & Energy – Rests or uses the infirmary automatically.
- Events – Event option selector and character-specific overrides.
- Races – Schedule in advance and auto-pick optimal races.
- Skills – Buys and prioritizes selected skills automatically.
- Goals & Styles – Handles special goals and lets you set racing style.
- Cross-Platform – Works on PC (Steam) and Android (scrcpy/Bluestacks); resolution independent but OCR works better on bigger resolutions.
- Claw Machine – Supports the claw mini-game.
- Hints – Prioritize skill hints when enabled, with automatic de-prioritization when the skill is already learned.
- Skill Memory – Tracks purchased skills per run to prevent double-buying single-circle variants and coordinate hint scoring.
- Web UI – Manage presets (stats, races, events), adjust advanced settings, switch modes, and update directly from GitHub.
- Auto Team Trials – Automatically plays Team Trials with F7 hotkey, handles shop purchases, session resume, and respects your banner preference (1-3). You need to be in the race screen where the team trials, room match, daily races are.
- Auto Daily Races – Automates daily races with F8 hotkey, manages shop purchases and session resume. You need to be in the race screen where the team trials, room match, daily races are.
- Auto Roulette / Prize Derby – Automatically spins the Roulette/Prize Derby (F9 hotkey) with smart button state detection.
- URA and Unity Cup Supported!
Make sure you meet these conditions:
- Disable all in-game confirmation pop-ups in settings.
- Start from the career lobby screen (the one with the Tazuna hint icon).
- Set in Umamusume config Center Stage (Race recommendations)
- It works on the primary display only, don't move the game to second screen.
- GPU optimization is described in another README file, it is only available for NVIDIA GPU cards
-
Install Git (for downloading and updating the bot)
- Download from: git-scm.com
- Run the installer with all default settings
-
Install Anaconda (required for Python environment)
- Download Anaconda: anaconda.com/download
- Choose the 64-bit Windows Installer
- During installation:
- Check "Add Anaconda to my PATH environment variable"
- Select "Register Anaconda as my default Python"
- Complete the installation
-
Open Command Prompt
- Press
Windows + Xand select "Windows Terminal" or "Command Prompt"
- Press
-
Clone the Repository Copy and paste these commands one by one, pressing Enter after each:
git clone https://github.com/Magody/Umaplay.git cd Umaplay -
Set Up Python Environment
conda create -n env_uma python==3.10 conda activate env_uma python -m pip install -r requirements.txt
- Type
yand press Enter if prompted to proceed - This may take several minutes to complete
- Type
After everything is installed, you should see (env_uma) at the beginning of your command prompt line, indicating the environment is active.
💡 Troubleshooting: If you get a "conda is not recognized" error, close and reopen your command prompt, then try again. If you get some error with library version, try to remove all versions from requirements.txt and run
pip install -r requirements.txtagain. So you get the latest versions for python 3.12 or 3.13. I recommend you to use 3.10.
If you face OCR errors, reinstall paddle and paddleocr:
pip uninstall -y paddlepaddle paddlex paddleocr
python -m pip install paddlepaddle
python -m pip install "paddleocr[all]"
python -m pip install paddlex- Open Command Prompt and navigate to the Umaplay folder
- Run these commands:
conda activate env_uma python main.py
- Press F2 to start/stop the bot during gameplay (YOU MUST BE on career lobby screen (the one with the Tazuna hint icon)). Or F7, F8, F9 depending on your configs.
I regularly push new updates and bug fixes. To update:
Option 1: Using Web UI (Easiest)
- Use the Pull from GitHub button in the Web UI
- There's also a Force Update button if needed
- Restart the bot after updating. Close all terminals / IDEs and do a fresh start
Option 2: Manual Update Open Command Prompt in the Umaplay folder and run:
conda activate env_uma
git reset --hard
git pull
pip install -r requirements.txtThen Restart the bot after updating. Close all terminals / IDEs and do a fresh start
⚠️ Note:git reset --hardwill discard any local changes you made to files.
I'm trying to precompile everything in a Windows executable, but I still recommend you to use the first option with python and Conda; this will allow you to easily have the last version.
(Because I'm not able to reduce the size of this exe yet; specially for 'torch')
Scrcpy is a tool to 'mirror' your Android screen, and emulate 'touchs' over it and it requires developer mode.
- Download Scrcpy Official Repo scrcpy.
- You need developer mode (usually you get this by tapping multiple times the android version in the phone settings).
- You MUST enable the USB debugging (Security Settings), so the program can emulate the input; making this solution 99.9% undetectable by any anti-cheat (Although I also set a kind of human behaviour when clicking). Then you need to connect the phone through USB to the PC or VM.
- In general, follow the instructions in scrcpy readme to properly setup this.
Once it is installed, you only need to set 'scrcpy' option and save config in http://127.0.0.1:8000/ (read WEB UI section) Important: Don't forget to set the window title, in my case for Redmi 13 Pro the title is '23117RA68G'
I created a version for Bluestacks, you only need to set 'bluestacks' option and save config in http://127.0.0.1:8000/ (read WEB UI section). But I didn't tested enough here, I recommend you to use Scrcpy is lighter and more "native".
You can change the configuration at http://127.0.0.1:8000/

Unity Cup scenario is fully supported, with dedicated strategy controls:

Important: Don't forget to press 'Save Config' button
⚠️ Critical Setup Reminder: For reliable runs, always set all of the following in the Web UI before starting the bot:
- Deck preset (select the support deck you actually loaded in-game)
- Scenario preset (e.g., Grand Masters, Aoharu, Make a New Track)
- Trainee preset (the exact character you are training this run)
Mismatched deck/scenario/trainee selections cause portrait matching, skill memory, and event overrides to fail, so double-check these three fields each time you swap accounts, decks, or seasonal alts.
You can set:
- General configurations (window title, modes, fast mode, advanced settings)
- Presets (target stats, priority stats, moods, skills, race scheduler)
- Responsive layout: left = General, right = Presets (collapsible)
- Save config: persists changes to
config.jsonin the repo root (via backend API). - Events selector: Like in Gametora, to can select the card but also you can 'tweak' the event option (it is still experimental, but it worked for me):

I tested it in Laptop without GPU and only 8GB RAM and worked, but a little bit slower. Hardware shouldn't be a problem though; of course it works better if you have a GPU. Nevertheless I found some problems when:
- Choosing a character very different from my training dataset (It will be solved later retraining YOLO model with more data)
- Using a slow internet connection: specially in RACES; if internet is very slow the sleep counter will break all the syncronization
- Gold Ship restricted training may not work yet.
Ideal for running on other machines that may be slow or outdated (such as my laptop and my Vitual Machine in Virtual Box).
The server\main_inference.py file is designed to offload all graphical processing. This means that whether you’re using an older laptop or running from a virtual machine, you can simply run the following command on your main (powerful) machine:
uvicorn server.main_inference:app --host 0.0.0.0 --port 8001Then, from your laptop or virtual machine (on the same network), you just need to enable the Use external processor option in the Web UI (set it to True) and provide your host URL (e.g., http://192.168.1.5:8001).
On the client side, you only need the dependencies listed in requirements_client_only.txt—no need to install heavy libraries like Torch or YOLO—because all processing is redirected to the server.main_inference:app backend running on a separate machine.
This feature is still experimental, but in my experience, it works quite well.
Follow the instructions in README.gpu.md
When running inside a virtual machine (in the background so you can still use your mouse on the host), it is recommended to limit resources for smoother performance.
Follow the instructions in README.virtual_machine.md
The bot uses multiple AI components to make decisions:
-
YOLO Object Detection Recognizes 40+ in-game objects (buttons, support cards, stats, badges, etc.). Trained on +300 labeled screenshots.
-
Logistic Regression Classifier Detects whether buttons are active or inactive.
-
OCR (PaddleOCR) Reads numbers, goals, and text with fallback logic.
-
Scoring System Evaluates training tiles based on support cards, rainbows, hints, and risk.
-
Label Studio Dataset All models trained with high-quality labels across multiple resolutions.
- Unity Cup upgrades
- Uses a heavier YOLO model for better Unity Cup detection.
- New Unity Cup "Advanced" preset settings (combo scores, spirit multipliers, allowed burst stats, late-season burst prioritization, per-race opponent selection).
- ADB controller mode
- New ADB-based controller path for BlueStacks/Android without hijacking the local mouse. (CC: @C)
- Training & races
- Per-scenario "weak turn SV" threshold (separate defaults for URA vs Unity Cup) to decide when a turn is skippable.
- Optional junior-only minimal mood and tweaks so the bot doesn't over-recreate at full energy.
- Tentative scheduled races: when marked tentative, the bot can prefer a strong training tile over that race. (CC: @Rosetta)
- PAL policy
- Tracks the special "Recreation PAL" icon in lobby and uses PAL dates as a smarter replacement for REST/RECREATION when they give energy or advance chains.
- Better handling for Tazuna / Riko chains and blue TAP bonuses, especially in Junior. (CC: @Rosetta)
- Web UI & UX
- Presets can be grouped, reordered via drag-and-drop, and filtered by group chips; arrow buttons for moving presets were removed. (CC: @Rosetta)
- Unity Cup now starts with a default preset; Event Setup scenario auto-syncs with the active scenario.
- General layout margins adjusted per feedback. (CC: @Chat Ja)
- Data & infra
- Automatic scraping pipeline for in-game data (skills/races/events) integrated into the main flow. (CC: @Only)
- Ongoing model fixes
✨ Umaplay v0.3.2 — Parents Quality of Life Update
- Disambiguation tokens: Better OCR separation for pairs like non-standard vs. standard and taking vs. keeping the lead, contributed by @Rosetta and @Hibiki.
- UI polish: Cleanup courtesy of @exaltedone8267.
- Single-circle guard: Prevents re-purchasing one-circle skills once acquired.
- Conditional hint scoring: Automatically downranks hints for skills that are already bought, highlighting remaining targets. Thanks @sando.
- Energy rotation: User-configurable energy management, implemented with feedback from @Rosetta.
- Expanded trainee/support datasets with a new scraping pipeline (Python CLI documented under
#data-contribution). Special thanks to @EO1.
- Portrait matcher: More reliable trainee event disambiguation.
- Team Trials: Correctly detects all four opponents.
- Acupuncturist: Confirmation phase auto-selects accept instead of looping on “reconsider.”
- Event chains: Blue-tone validation stops gray UI elements from miscounting chain steps.
- YOLO + geometry: Better mapping between hints and support cards to reduce false matches.
- Preset overlay: Displays the active preset when the bot boots (and enhanced visibility in the Web UI).
- CLI:
python main.py --port <value>now supported; thanks @ephargy.
⚠️ If you encounter critical regressions, roll back temporarily:git checkout 59a5340f2c014a6d616c63b554bc0fe791513cef
🐛 Umaplay v0.3.1 — Bugfix Release
- Disambiguation tokens: Better OCR separation for pairs like non-standard vs. standard and taking vs. keeping the lead, contributed by @Rosetta and @Hibiki.
- UI polish: Cleanup courtesy of @exaltedone8267.
- Single-circle guard: Prevents re-purchasing one-circle skills once acquired.
- Conditional hint scoring: Automatically downranks hints for skills that are already bought, highlighting remaining targets. Thanks @sando.
- Energy rotation: User-configurable energy management, implemented with feedback from @Rosetta.
- Expanded trainee/support datasets with a new scraping pipeline (Python CLI documented under
#data-contribution). Special thanks to @EO1.
- Portrait matcher: More reliable trainee event disambiguation.
- Team Trials: Correctly detects all four opponents.
- Acupuncturist: Confirmation phase auto-selects accept instead of looping on “reconsider.”
- Event chains: Blue-tone validation stops gray UI elements from miscounting chain steps.
- YOLO + geometry: Better mapping between hints and support cards to reduce false matches.
- Preset overlay: Displays the active preset when the bot boots (and enhanced visibility in the Web UI).
- CLI:
python main.py --port <value>now supported; thanks @ephargy.
⚠️ If you encounter critical regressions, roll back temporarily:git checkout 59a5340f2c014a6d616c63b554bc0fe791513cef
- Found a bug? Open an issue.
- Want to improve? Fork the repo, create a branch, and open a Pull Request into the dev branch.
All contributions are welcome!
If you find this project helpful and would like to support its development, consider making a donation. Your support motivates further improvements! Also let me know on discord if you have a very specific requirement.
Every contribution, no matter how small, is greatly appreciated! Thank you for your support! ❤️
Umamusume Auto Train, Umamusume Pretty Derby bot, Uma Musume automation, auto-training AI bot, Umamusume race bot, YOLO OCR bot for Umamusume, AI game automation, scrcpy Umamusume bot, Steam Umamusume auto trainer, Python Umamusume AI project, open source Umamusume bot, Umamusume AI automation tool, AI-powered gacha game assistant, race farming bot, skill farming automation, Umamusume AI trainer, auto play Umamusume.













