Pitfalls
The mistakes that show up most often — avoid these and you're ahead of most uploaders.
A short list of the things that bite people. None of them are obvious if you haven't hit them.
Softmax inside the network
What goes wrong: you add a softmax at the end of your policy head because that's what makes "probabilities",
export it, upload — and your agent plays uniform-random.
Why: the server applies softmax itself to the raw scores. If your weights already produce probabilities, applying
softmax again pushes everything close to uniform. The export tool's export() strips any final activation, so use it
rather than saving your torch model by hand.
Fix: last layer outputs raw logits. If you trained with torch.nn.functional.log_softmax in the loss, your
network head is already raw logits — don't add a softmax before exporting.
Illegal-button masking in the weights
What goes wrong: during training you mask by zeroing out illegal buttons in the forward pass, upload, and your agent's distribution during live play doesn't match what the training loop saw.
Why: the server masks by subtracting inf from illegal buttons before softmax. Zeroing isn't the same thing.
Training converges to a policy that's optimal under one masking rule and plays under another.
Fix: train with the kit's examples/export_npz.masked_logits helper, which matches the server's masking exactly.
Normalizing observations outside the file
What goes wrong: you scale your observations in the training loop ("subtract mean, divide by std" done in NumPy
before the network), export a file with obs_mean = 0, obs_std = 1, and the agent on the server sees very different
numbers.
Why: the only normalization the server applies at inference is the triple baked into the file (obs_mean,
obs_std, obs_clip). Your training loop's scaling is invisible to the server.
Fix: collect the mean/std over your training observations and save them as obs_mean / obs_std in the file.
Use agent_file.safe_std so zero-variance features don't crash the server's divide.
Training only against CallingStation
What goes wrong: you beat the calling station by +2000 bb/100 and feel great. You upload. Real opponents eat you alive.
Why: never-folding is trivially exploitable. An agent tuned for it bets way too much against anything that folds.
And because CallingStation never raises, your agent also never learns to defend against raises.
Fix: keep a mixed pool of opponents during training. examples/03_selfplay_ppo.py and
04_parallel_train.py already do this — bots + frozen snapshots of yourself.
Judging a build by one short match
What goes wrong: you run evaluate.py --deals 200, see +150 bb/100, conclude the new build is better.
Why: at 200 deals the standard error is ~±150 bb/100. A 150 lead is one standard deviation of noise. You can't tell this build from the old one.
Fix: use thousands of deals, read the ± column, trust differences only when |X| > Y:
python tools/evaluate.py new.npz --vs old.npz --deals 5000 --jobs 8
The ladder has the same noise floor per match. That's why it converges over dozens of matches, not one.
Overfitting to the local evaluator
What goes wrong: you tune hyperparameters until evaluate.py against the baseline is maximal. You upload. Ladder
rating barely moves.
Why: the baseline is one specific agent. Beating it hard often means specializing against it. The real ladder has dozens of agents with different styles.
Fix: evaluate against a set of opponents: the baseline, EquityBot, CallingStation, and some frozen
snapshots of your own earlier runs. A build that wins the aggregate is more likely to climb the ladder.
Assuming the observation remembers past hands
What goes wrong: you expect your agent to adapt to the opponent across the match (fold less against an aggressor, etc.).
Why: the observation has no memory. Every decision is made from the 180 numbers for the current spot. Nothing in there tells you how the opponent has played earlier hands.
Fix: this is a platform limit, not a bug. Any adaptation has to come from the current spot's features (pot odds, SPR, the opponent's current-hand actions in the history segment). If you want cross-hand memory, this environment doesn't support it — wait for a future one that does, or accept the limit.
Tweaking the kit's proxypoker/ code
What goes wrong: you change something in proxypoker/engine.py locally to "fix a quirk". Now your local results
don't match the server.
Why: the server runs its own copy of the kit. Your edit only affects your local play. Worse, if your edit changes how observations are built, your agent will be trained on one distribution and deployed on another.
Fix: treat proxypoker/ as read-only. If something there looks wrong, open an issue with the platform — don't
patch it locally.