AlphaMon
AlphaMon is a transformer-based battle policy model for Pokemon Showdown doubles formats, trained on large-scale replay logs and used with a Monte Carlo rollout search layer for decision support.
Current repository: https://github.com/davidemodolo/alphamon
Model summary
AlphaMon is a decoder-only transformer trained on tokenized Showdown battle logs.
It predicts:
- Next token (policy head)
- Win probability (value head)
At inference time, model outputs are combined with structured rollout search to produce ranked battle actions.
What is currently released
This model repo includes:
- Pretrained checkpoint:
- checkpoints/alphamon_pretrained_best.pt
- Finetuned on
gen9vgc2026regfcheckpoint:- checkpoints/alphamon_finetuned_best.pt
- Training replay list used for dataset construction:
- release/training_games_list.txt
Finetuned checkpoints are still in progress and may be added later.
Architecture
Main model config (current defaults from training code):
- Context length: 2048
- Hidden size: 512
- Attention heads: 8
- Layers: 6
- Dropout: 0.1
Training objective:
- Cross-entropy loss for policy tokens
- MSE loss for value prediction
- Combined loss: policy + 0.5 * value
Data
Training data is derived from publicly available Pokemon Showdown replay logs, harvested by format and filtered/cleaned before tokenization.
Data pipeline includes:
- Replay harvesting from Showdown search endpoint
- Metadata extraction (winner, ratings, format)
- Quality and format filtering
- Tokenization and mmap cache construction
Intended use
AlphaMon is intended for:
- Research and experimentation in game AI
- Decision support for Pokemon Showdown doubles battle states
- Study of sequence modeling + search-based action selection
It is not intended for:
- Fully autonomous ladder abuse or platform policy violations
- Safety-critical applications
- Legal advice or compliance decisions
Limitations
- Strongly domain-specific to Showdown-style tokenized logs
- Quality depends on training replay distribution and filtering
- Not guaranteed to choose legal-optimal actions in all edge cases
- Performance can degrade on unseen formats or mechanics
Inference notes
In the main project, inference uses:
- Monte Carlo rollout search for TURN, TEAM_PREVIEW, and FAINT objectives
- Optional team-aware logit bias to nudge generation toward known:
- species tokens
- move tokens
- item tokens
- tera type tokens
This bias is additive and does not hard-force outputs.
How to use with the project
- Clone the main repo:
- Download checkpoint from this HF model repo into:
- checkpoints/alphamon_finetuned_best.pt
- Run server inference from the repo:
- python server/server.py
License and third-party content
This repository is currently marked AGPL-3.0.
Important note:
Pokemon-related names, mechanics, and source replay content may be subject to their own rights and terms by their respective owners/platforms.
This model card and repository license apply to the released project assets to the extent permitted.
Citation
If you use AlphaMon in research, please cite:
Modolo, Davide. AlphaMon: Transformer-based Showdown Battle Policy Model.
You can also cite the GitHub repository: https://github.com/davidemodolo/alphamon
Contact
Maintainer: Davide Modolo
HF: https://huggingface.co/davidemodolo
GitHub: https://github.com/davidemodolo