pluto README

The project's README from github.com/tscmoo/pluto. As one markdown file: README.md.

Pluto

Pluto is a StarCraft: Brood War AI. A single neural network, trained by self-play reinforcement learning, plays the whole game — macro and micro, all three races; there is no scripted play. It plays 1v1 melee through BWAPI (https://bwapi.github.io/).

Status: binary releases. This repo hosts binary releases of Pluto. The current one is the model that played the CoG 2026 StarCraft AI Competition (md07x02_cog2026_2578600_int8mv), with CPU inference — no GPU needed. Grab it from the Releases page.

Requirements

Install

Unpack the release zip into your StarCraft folder's bwapi-data/AI/ (the usual place for bots), so the files land like this:

bwapi-data/AI/pluto.dll                 32-bit BWAPI module
bwapi-data/AI/pluto/pluto_infer.exe     64-bit CPU inference engine
bwapi-data/AI/pluto/pluto_weights.bin   network weights (int8)

Point bwapi.ini at the DLL as usual: ai = bwapi-data/AI/pluto.dll

Register the bot as Zerg, Terran, Protoss, or Random — it plays all of them. It announces itself in chat on game start: "Pluto online (md07x02_cog2026_2578600_int8mv). gl hf!"

The binaries are unsigned, so Windows SmartScreen or antivirus software may warn on first run.

How it runs

On game start, pluto.dll launches pluto_infer.exe (found next to the DLL) and talks to it over shared memory. No network connections are made and no files outside the StarCraft folder are touched. The engine process exits with the game.

The model takes one step every 6 game frames. The DLL gives the engine up to 40 ms in the frame it observed and, if the answer isn't in by then, waits for it at the next frame — so every decision is acted on exactly when the model was trained to expect it. On a slow CPU the game runs slower; the bot does not play worse. A step takes ~20 ms on a current desktop CPU and ~60 ms on a 2021 6-core (i5-12500T) with 200 units on the map, up to ~3x that in big late-game fights. When the stalls stay long for a sustained stretch, Pluto says so once in chat ("Pluto: this machine can't keep up ... sorry about the pace") and notes it in its game record.

If the engine cannot start (missing files, unsupported CPU) or dies mid-game, the bot reports the reason in game chat and in the logs ("Pluto: quitting in 10 seconds"), then exits the StarCraft process. This looks like a crash, and is meant to: it is an error, not a game. Check pluto.log and pluto_infer.log in the StarCraft folder.

Files written

pluto.log          DLL log     (StarCraft folder)
pluto_infer.log    engine log  (StarCraft folder)
bwapi-data/write/pluto_bandit_<opponent>.txt
                   per-opponent build-order stats and the running
                   record against that opponent

The bot picks its opening with a bandit over the per-opponent win/loss counts; every build is listed with its mask and name, so you can edit the numbers to steer it. The file is re-read every game (from write/ or read/, whichever is newer, so the usual write/ -> read/ copy between games works too); if you edit it, bump the seq line so your copy wins and keep the closing end line. Below the stats, the file keeps one JSON line per game: a start record (opponent, map, chosen build), an end record (result, frame timing, the model's win-probability trajectory) and any error or resign events.

Notes

pluto (tscmoo/pluto)

Searching Database…

265 ·GitHub
这是什么?Pluto 是《星际争霸:母巢之战》(StarCraft: Brood War)的 AI 机器人——一个通过自我对弈强化学习端到端训练出来的单一神经网络,能用全部三个种族进行宏观运营和微观操作,没有任何脚本逻辑。
这是可训练的框架,还是开箱即用的机器人?这个仓库只发布已训练模型的二进制版本(就是参加 CoG 2026 竞赛的那一个);它是开箱即跑的机器人,不是训练代码。
怎么安装并运行它?把发行版 zip 解压到 StarCraft 文件夹的 bwapi-data/AI/,让 pluto.dll、pluto/plutoinfer.exe 和 pluto/plutoweights.bin 各就各位,然后把 bwapi.ini 的 ai= 行指向 pluto.dll,并把机器人注册为 Zerg、Terran、Protoss 或 Random。
除了机器人本身还需要什么?你需要《星际争霸:母巢之战》1.16.1 加 BWAPI 4.4.0、64 位 Windows 或 Wine,以及一颗支持 AVX2 的 x86-64 CPU(AVX-VNNI 大约能翻倍提速);推理在 CPU 上运行,不需要 GPU。
运行时可能出什么问题?二进制文件未签名,首次运行时 SmartScreen 或杀毒软件可能会标记它们;如果推理引擎无法启动或在对局中途挂掉,机器人会故意让 StarCraft 进程崩溃,而不是体面地认输——可以查看 pluto.log 和 plutoinfer.log。
它必须用 Windows 吗?它可以在 64 位 Windows 上原生运行,或在 Linux 上通过 Wine 运行;32 位游戏进程和 64 位推理引擎作为独立进程分别运行。
它会偷偷联网或动其他文件吗?不会——推理引擎只通过共享内存与 DLL 通信,不建立任何网络连接,也不触碰 StarCraft 文件夹以外的文件。
Pluto 怎么决定开局用哪种建造顺序?它使用老虎机算法,基于文本文件(plutobandit)中按对手记录的胜负统计来挑选开局建造顺序,依据是对该特定对手的历史战绩;你可以手动编辑这些统计来引导它。
如果 Pluto 觉得自己要输了会怎样?当它自己的胜率估计持续约 10 秒钉在败势时,它会在聊天中打出“gg”并退出对局;这与对局中途引擎崩溃不同,后者会被当作错误处理,而不是认输。
能针对我的机器加速推理吗?可以——运行一次 plutoinfer.exe --bench(大约 2-4 分钟)会在你的硬件上基准测试不同线程数,并把最佳设置保存到 plutoconfig.json。
对局中能实时看到模型的置信度吗?可以——设置环境变量 BWRLDRAW=1 后,对局过程中会在屏幕上绘制模型的胜率曲线图。
Creator
tscmoo
Size
<0.1 MB
Stars
265
Age
3mo
Commits · 90 Days