How Softmax works, in plain words
Softmax runs online games where the players are programs, not people. You write a small program (a "bot") that looks at the game and picks a move every turn. You upload it, Softmax plays it against everyone else's bots around the clock, and a leaderboard shows whose bot wins most.
You never play a match by hand. Your job is to make the bot a little smarter, upload the new version, and see whether it climbs.
The words you'll see
- Coworld
- A game packaged for Softmax: the rules, how bots talk to it, and the replays it records. generals.io is one Coworld; Sugarscape is another.
- Player, policy
- Your bot. Softmax calls the uploaded program a policy. Some games take a single BASIC file (
.bas); others take a Docker container. - Policy version
- One frozen upload, named like
pathfinder-webdip:v3. Each upload gets the next number, so old versions never change. - League
- An ongoing competition for one game mode, such as generals.io FFA or Classic 1v1. A game can have several.
- Division
- A group inside a league. Your bot is placed in one and plays the others there.
- Round
- A batch of matches Softmax schedules for a division. On generals.io a round starts about every 30 minutes.
- Episode
- One game from start to finish. It leaves a score, a replay you can watch, and logs.
- MMR
- A skill rating that rises when you beat bots rated above you. Some leagues show an average game score instead.
- Experience request
- A private practice batch (
xp-request). You choose the opponents and it doesn't count toward the league. It costs XP credits, which is the "usage" on the overview.
Entering, step by step
- Install the tools once. You need
uv(a Python tool runner). Then add the Coworld package and sign in:uv add "coworld[auth]" SOFTMAX_CONFIG_DIR=.softmax uv run softmax login SOFTMAX_CONFIG_DIR=.softmax uv run softmax status
If no browser can open, runsoftmax get-login-url, open the link, and paste the code back withsoftmax exchange-code '<code>'. The sign-in lives in.softmax/, which the repo never commits. - Download the game. This gives you the rules and a starter bot called
baseline.uv run coworld download cow_cba82314-5d9e-4779-a45b-125788c98a70
- Copy the starter into the repo as
games/generals/bots/v000-baseline/player.bas. That's the bar every later version has to beat. - Upload it. Each upload becomes a new version.
uv run coworld upload-policy --file games/generals/bots/v000-baseline/player.bas \ --name generals-io-player --title "baseline" --description "Softmax starter, unchanged"
- Test it privately against random opponents before reading anything into it:
uv run coworld xp-request create games/generals/xp-request.json --title "baseline" uv run coworld xp-request get <xreq_id> --json
- Submit it to the league once it beats the last version:
uv run coworld submit generals-io-player:v2 --league <league-id>
- Check where you stand.
uv run coworld results <division-id> --json
- Improve and repeat. Copy the best version, change one thing, test it, and log it in the game's
journal.md. It then shows up under What we tried.
How you get ranked (generals.io)
- Free-for-all (3 to 8 bots): first place gets +1. Everyone else gets −(place − 1) ÷ (players − 1), so last place gets −1. Bots that took out someone rank ahead of bots that didn't; after that, surviving longer ranks higher.
- 1v1 leagues (Classic and Build): a win is +1, a loss −1, a draw 0.
- Missed turns count as passes. In 1v1, 20 misses in a row forfeits the game, so a slow bot loses even with good ideas.
How to actually get better
- Change one thing at a time. If you change two, you won't know which one helped.
- Don't trust one game. Softmax's own guide calls one good episode a debugging milestone, not proof. Run a batch and compare averages.
- Watch the replays.
uv run coworld replay-open <ereq_id> --hostedopens one in the browser. Losses tell you what to fix next. - Name exact versions (
name:v3), not just the bot's name, so a comparison doesn't quietly pick up a newer upload. - A win that crashes more isn't a win. Check errors and timeouts as well as score.
Limits that trip people up
- generals.io BASIC bots: source up to 256 KiB, upload up to 16 MiB compressed, and 2,000,000 instructions per move.
- Container bots must be built for
linux/amd64. On an Apple Silicon Mac, pass--platform linux/amd64to Docker. - Run
coworld player unsetbefore uploading if you switched to a player identity earlier.
Read more
- Softmax start page, with every game and this week's Game of the Week
- What a Coworld is
- Leagues, rounds and episodes
- Improving a bot
- Debugging hosted games
- generals.io FFA onboarding