How to register Your Artificial Gladiator

A step-by-step guide to joining your Artificial Gladiator Champion (AG Champion) to the Artificial Gladiator League (AGL) platform — from bringing to life your AG Champion to let him gladiate in games and tournaments.

Quick start

The shortest path from nothing to a working, registered model. Details for every step are further down this page.

  1. 1 Copy the example model. Open the example account linked below and duplicate one of its repos into your own Hugging Face account.
  2. 2 Make your copy Gated. In your repo's Settings, enable Access Requests. The platform rejects a public model repo.
  3. 3 Approve ArtificialGladiatorLeague. In the Access settings of your repo, approve that account (on the Gladiator tab the yellow button Open Access Settings takes you there).
  4. 4 Enter the repo. Open the Gladiator tab on your Profile, type or paste your model repo, and click the gold button Save and verify.
  5. 5 Add AGL_VERIFY.txt. Put it at the root of your model repo (and of your data repo too, if you use one) with the code shown on the Gladiator tab, then click Verify Ownership.
  6. 6 Run Diagnostics. Open the Diagnostics tab and click Run diagnostics. Fix what it reports and run it again until it says RESULT: your model works correctly.

Start from a working example

The easiest way to get a model that passes every platform check is to copy one that already does:

  1. Open https://huggingface.co/chaim-duchovny and open a repo.
  2. Use Duplicate this repo to copy it into your own account.
  3. Make your copy Gated (Settings, Access Requests).
  4. Edit the files to build your own Artificial Gladiator.
1

Write your model

Your AG Champion is Python code that receives a board position and returns a legal move string. The logic inside is entirely up to you — Monte Carlo Vector Search (MCVS), random play, minimax, MCTS, a neural network, or anything else. Your code is downloaded to the platform and executed inside an isolated Docker sandbox on the platform's own servers — no external hosting or always-on server required on your end.

The contract: load(ctx) and get_move(state, fen, player)

Your entry-point module must define both functions. There is no other interface.

  • state = load(ctx) is called once when your model is loaded. Open your weights, opening books and other files here and return whatever you want to keep; it is passed back to you as state.
  • ctx.model_dir and ctx.data_dir are real, read-only folders (pathlib.Path) holding your model repo files and your data repo files. ctx.data_dir is None when no data files are available. The platform never opens your data files for you; read them yourself inside load().
  • move = get_move(state, fen, player) is called for every move. fen is the position, player is "w" or "b" (the side to move). Return the move as a plain string.
# chess_mcvs.py - at the root of your model repo
import random

import chess


def load(ctx):
    # Called once. ctx.data_dir is None if no data files are available.
    state = {"opening_book": None}
    if ctx.data_dir is not None:
        book = ctx.data_dir / "opening_book.txt"
        if book.exists():
            state["opening_book"] = book.read_text(encoding="utf-8").splitlines()
    return state


def get_move(state, fen, player):
    # Return one legal move in UCI notation, for example "e2e4".
    board = chess.Board(fen)
    legal = list(board.legal_moves)
    if not legal:
        return ""
    # ---- replace this with your real model ----
    return random.choice(legal).uci()

By default the platform imports <game>_mcvs.py (chess_mcvs.py for Chess, breakthrough_mcvs.py for Breakthrough). Use entrypoint in config_model.json to name a different file.

Move format

  • Chess: UCI notation, for example e2e4, or e7e8q for a promotion. Not SAN such as Nf3.
  • Breakthrough: exactly four characters, the square you move from followed by the square you move to, for example a2a3 or b2c3. The position is a FEN-like string with rank 8 first, W for white pieces, B for black pieces, digits for empty squares and the side to move at the end; the start position is BBBBBBBB/BBBBBBBB/8/8/8/8/WWWWWWWW/WWWWWWWW w. A piece moves one square forward, straight (only onto an empty square) or diagonally (onto an empty square or an enemy piece). White moves toward rank 8, black toward rank 1.
# breakthrough_mcvs.py - minimal skeleton
def load(ctx):
    return {}


def get_move(state, fen, player):
    # fen example: "BBBBBBBB/BBBBBBBB/8/8/8/8/WWWWWWWW/WWWWWWWW w"
    # Return "from-square" + "to-square", for example "a2a3".
    return "a2a3"
  • -No web server, Space, or hosted endpoint to run. Your model repo stays Gated; the platform only needs the read access you approve.
  • -The sandbox has no network access, a read-only filesystem (only a small temporary folder, /tmp, is writable) and strict CPU, memory and time limits. Calls such as requests or urllib will fail.
  • -The sandbox image is fixed and nothing is installed at match time. The project's sandbox image definition installs numpy, python-chess and torch (CPU only); do not depend on other third-party packages.
  • -Save your files as UTF-8. The platform also tolerates common Windows encodings (cp1255, cp1252) and reports a warning when it has to fall back.
Any algorithm is welcome. Monte Carlo Vector Search (MCVS), Minimax, alpha-beta pruning, MCTS, policy networks, value networks, reinforcement learning, opening books, endgame tablebases, hybrid approaches — if it returns a legal move string within the time limit, it qualifies.

The config files

Two small JSON files describe your repos. Add both: the sandbox only needs config_model.json fields it recognises, but the Repo File Status panel on the Gladiator tab and the Diagnostics tab also read files from config_model.json (model repo) and config_data.json (data repo) and report a problem when they cannot be read.

config_model.json (root of the model repo)

{
  "schema_version": 1,
  "entrypoint": "chess_mcvs.py",
  "data_files": ["opening_book.txt"],
  "requirements": ["numpy", "python-chess"],
  "files": ["chess_mcvs.py"]
}
  • schema_version (integer, optional): manifest format version. Use 1.
  • entrypoint (string, optional): the .py file to import. Default: <game>_mcvs.py. If that file does not exist either, every .py file in the repo is imported.
  • modules (list of strings, optional): an older alternative to entrypoint. Every listed file is imported and the last one wins.
  • data_files (list of strings, optional): files your model expects to find in your data repo. The model check fails if one of them is missing.
  • requirements (list of strings, optional): informational only. Nothing is installed.
  • files (list of strings): the files that must exist in the model repo. Used by the Repo File Status panel and by Diagnostics; the sandbox does not use it.

The file must be valid JSON (no comments, no trailing commas). A listed entrypoint or modules file that does not exist is reported as a problem.

config_data.json (root of the data repo)

{
  "files": ["opening_book.txt"]
}

files lists every file that must exist in the data repo. It is read from the main branch and is used by the Repo File Status panel and by Diagnostics. Keep it consistent with data_files in config_model.json.

2

Create Your Hugging Face Repositories

You need a model repo, and optionally a data repo. Each has its own visibility requirement, explained below.

Repo 1 — Model Repository (HF Model repo, required)

Contains your Artificial Gladiator code and config_model.json. Put the files on the main branch.

Required: Gated (Access Requests). When you save a repo, the platform checks that it exists and is Gated, and rejects a public repo. Go to your repo's Settings and enable Access Requests.

Also required: approve the platform's Hugging Face account ArtificialGladiatorLeague in the repo's Access settings (the yellow button Open Access Settings on the Gladiator tab opens that page). The platform uses that account to read your repo for the ownership check and to download it. Without the approval, saving, ownership checks and inference all fail.
Suggested layout:
your-username/my-bot/
|-- config_model.json (see above)
|-- chess_mcvs.py (your AI code: load / get_move)
|-- utils.py (optional helper modules)
|-- requirements.txt (optional, for your own reference; not installed by the platform)
`-- AGL_VERIFY.txt (added in Step 3)

Repo 2 — Data Repository (HF Dataset repo, optional)

Needed if your Artificial Gladiator uses runtime data files — opening books, precomputed tables, trained weights, etc. The platform copies it next to your model and your code reads it from ctx.data_dir.

Warning: the data repo must be Public. When you save it, the platform checks it anonymously, without any token. A private or gated data repo is rejected.
Example layout:
your-username/my-bot-data/
|-- config_data.json (see above)
|-- opening_book.txt (any data files your load() reads)
`-- AGL_VERIFY.txt (added in Step 3)

If you leave the data repo field empty, the platform looks for your-username/<game>-data (for example your-username/chess-data) when it checks your files. On the Gladiator tab the Chess data repo field is pre-filled that way when your model repo has an owner; you can edit it.

3

Prove Ownership & SHA Pinning

Before your AG can gladiate, you must prove you own the repositories. The platform also pins the commit SHA to detect any changes during tournaments.

Ownership Verification

  1. 1 Save your repo on the Gladiator tab of your Profile. The platform generates a unique 32-character verification code and shows it there (with Copy file name and Copy code buttons).
  2. 2 Create a file named AGL_VERIFY.txt at the root of your model repo (main branch) containing exactly the verification code. If you also set a data repo, add the same file with the same code to the root of the data repo. Surrounding whitespace or a trailing newline is ignored.
  3. 3 Click Verify Ownership (shown as Re-check Ownership once verified). The platform account reads the file from each repo. When the model repo and the data repo (if set) both match, you are verified. The platform then immediately runs the model check and, if it passes, pins the commit as your approved version.
Note: the platform does not ask you for a Hugging Face token. It reads your Gated model repo with its own account, ArtificialGladiatorLeague, which is why you must approve that account. The data repo must be Public.

SHA Pinning (ongoing)

  • -At tournament registration — the exact commit SHA of your model repo is recorded.
  • -Before and during tournament games — the SHA is checked again. Any commit since registration triggers automatic disqualification.
Warning: do not push changes to your AG Champion repo after joining a tournament. SHA mismatch = automatic disqualification.
4

Register Your AG Champion in the Platform

Open the Gladiator tab on your Profile. Each game (Chess, Breakthrough) has its own card with numbered steps (Enter repo, Approve platform account, Add AGL_VERIFY.txt, Verify), and a line at the top of the tab tells you the next step.

Fields per game
  • -Hugging Face Model Repo — username/my-AG. You may paste a full huggingface.co link; it is converted to username/my-AG. A Space URL (*.hf.space or huggingface.co/spaces/...) is rejected.
  • -Hugging Face Data Repo — username/my-AG-data. Leave blank if you do not use one.
Buttons
  • -Save and verify (gold): saves the repo and, if saving succeeded, immediately runs the same ownership check as Verify Ownership.
  • -Connect Repo / Update Repo & Re-issue Code: saves the repo and issues a verification code (unless the repo is unchanged and already verified).
  • -Verify Ownership / Re-check Ownership: checks AGL_VERIFY.txt and runs the model check.
Warning: after registering, you need 30 rated games with your AG Champion before you can enter tournaments. Changing your model repo ID resets this counter.
5

Run Diagnostics

The Diagnostics tab on your Profile checks a registered model from start to finish and tells you in plain language what to fix. Pick the game, click Run diagnostics and read the report. It can take a few minutes, because the last step runs your model in the sandbox.

The 7 steps
  1. Registration — a model repo is registered for this game.
  2. Model repo access — the repo exists, is Gated, and the platform account has access.
  3. Ownership proof — the model repo (and the data repo, if set) are ownership-verified.
  4. Repository files — the files listed in config_model.json and config_data.json are present.
  5. Version and integrity — approved and current SHAs, the repo-change cooldown and your rated-games count.
  6. Stored contract result — whether the model check last stored active, pending or failed.
  7. Live contract test — runs your load() and get_move() in the sandbox on three sample positions and checks that every move is legal.
Diagnostics is read-only: it never changes your model, your repos or your verification state. Repeat it until the report ends with RESULT: your model works correctly.
6

Compete in Games & Tournaments

Quick Matches

Head to the Lobby, challenge another player. Your AG Champion plays automatically in real time. Results update your Elo.

Tournaments

Browse open tournaments, register, play 30 rated games to qualify, mark yourself Ready. The system schedules and runs all matches automatically.

How a move is generated
Board FEN sent > Your get_move runs in the sandbox > Move validated > Game state updated
  • Your model stays loaded in a sandbox container between moves, so load() runs once and each move only pays for get_move(). Opening the Lobby or a game page starts it ahead of time.
  • Each move has a time limit set by the server (30 seconds by default). If your model exceeds it, returns nothing, raises an error or returns an illegal move, the platform plays a random legal move for you (captures preferred) instead.
  • Exception: if your model's last model check failed, no random move is played and you forfeit the game.
  • The time your model spends thinking also counts against your game clock.

See How it works for the full picture.

Best Practices

Load everything in load()

Load models, weights and opening books inside load(ctx), which runs once. Never read files inside get_move — that time is spent on every move and counts against your clock and the move timeout.

Respect the time limit

The platform enforces a per-move timeout (30 seconds by default). Budget your search depth or inference time well under it. A model that is too slow gets random moves played for it.

Keep it lightweight

The sandbox has fixed CPU and memory limits (1 CPU and 512 MB by default) and no network access. Keep your dependencies minimal and avoid anything that expects internet connectivity.

Stick to the installed libraries

Nothing is pip-installed at match time. Use only what the sandbox image provides (numpy, python-chess, torch CPU). If you like, note the versions you tested with in your repo's requirements.txt for your own reference.

Validate move format

Always return a legal move as a plain string. Chess uses UCI notation (e.g. e2e4) and Breakthrough uses four characters, from-square then to-square (e.g. a2a3). Anything else is treated as no move.

Test before tournaments

Run Diagnostics, then play several quick matches in the Lobby to confirm your AG Champion responds correctly at game speed before entering a tournament. The 30-game qualification window is the ideal calibration period.

Troubleshooting

Move timed out / random moves are being played for my AG
  • A move that takes longer than the server's move timeout (30 seconds by default) is cancelled, the sandbox container is restarted, and a random legal move is played for that turn. Reduce search depth, use a lighter model, or pre-compute in load().
  • Your code raised an exception, returned nothing or returned an illegal move: the platform plays a random legal move instead. Run Diagnostics to see the exact error.
  • If your model's last model check failed, no random move is played and you forfeit the game. Fix the problem and click Verify Ownership again.
Ownership verification failed
  • Ensure AGL_VERIFY.txt is at the root of your model repo on the main branch — not inside a subfolder.
  • If you set a data repo, it needs its own AGL_VERIFY.txt with the same code.
  • The file must contain exactly the code shown on the Gladiator tab. If you re-saved a changed repo, a new code was issued: use the new one.
  • The model repo must be Gated and you must have approved ArtificialGladiatorLeague in its Access settings. The data repo must be Public.
Diagnostics says the model or data files are not on the server yet
  • Log out and log in again, then run Diagnostics again. Logging in lands you on the Lobby, which loads your model and downloads your data repo files to the server in the background. Give it a minute before you re-run.
  • If it keeps saying the same thing, check the Repo File Status panel on the Gladiator tab for missing files.
Diagnostics says the sandbox is unavailable
  • This is a platform issue, not a problem with your model. Try again later.
Model check failed
  • The Gladiator tab shows the reason. Typical causes: a syntax error, a missing load(ctx), invalid config_model.json, a file listed in data_files that is missing from the data repo, or a move that is not legal for one of the three sample positions.
  • Fix the repo, then click Verify Ownership (or Save and verify) again.
Repo ID rejected
  • Enter the repo as username/repo-name. A huggingface.co model or dataset link is converted automatically; a Space URL is rejected.
  • A public model repo is rejected: set it to Gated first. The data repo is the opposite: it must be Public.
Disqualified — SHA mismatch
  • You pushed a commit to your AG Champion repo after registering for the tournament.
  • Even trivial changes (README edits, whitespace) produce a new SHA. Freeze the repo once registered.
Invalid move returned
  • Confirm your move string matches the expected format for the game — UCI for Chess (e.g. e2e4) or four characters from-square then to-square for Breakthrough (e.g. a2a3).
  • Make sure you return a plain string — not a list, not a JSON object, not {"move": "..."}.
Data files not loading
  • Confirm your data repo is Public on Hugging Face.
  • Check that filenames in config_data.json and in data_files of config_model.json match exactly (case-sensitive) the filenames in your repo, and that your load() reads them from ctx.data_dir.

Frequently Asked Questions

Can I use PyTorch or other libraries?

Only what the sandbox image contains. The project's sandbox image installs numpy, python-chess and torch (CPU). The sandbox has no network access, so packages can't be installed at match time; develop and test locally against the same libraries.

What game types are supported?

Currently Chess and Breakthrough. Each game is registered independently, so you can enter different AG Champions for each.

Do I need a Hugging Face account?

Yes — to create your model repo (and optional data repo). The platform does not ask you for an API token. It reads your Gated model repo with its own account, ArtificialGladiatorLeague, which you approve in the repo's Access settings.

Can I update my AG Champion between games (outside tournaments)?

Yes, you can update your AG Champion or change your repository links outside of tournaments. However, changing your model repo ID resets your rated games counter. You will need to play another 30 rated games before you can enter tournaments again.

Does my AG Champion's model repo have to be Gated?

Yes. When you save the repo the platform rejects a public model repo. Gating also protects your code from being copied by other visitors. You must approve the ArtificialGladiatorLeague Hugging Face account so the platform can verify and download it; without this, saving, ownership verification and inference fail.

Why must the data repo be Public?

The platform checks it anonymously, without a token, when you save it, and rejects a data repo that is not public.

Why do I need 30 rated games before entering tournaments?

It establishes a meaningful Elo rating and confirms your AG Champion is stable and reliably responsive before entering structured competition.

How strict is the per-move time limit?

Each move has a server-side limit (30 seconds by default). Exceeding it does not forfeit the game: a random legal move is played for that turn (unless your model's last model check failed, which forfeits). Your thinking time is also deducted from your game clock. Always keep get_move fast.

What is "AI thinking time" and is it guaranteed?

"Thinking time" (configured when creating or joining a game) is a target pace for AI moves, not a hard guarantee. Actual move latency depends on your model's inference speed inside the Docker sandbox — heavier models or deep searches take longer. If a move arrives faster than the target, the platform waits to reach the target before showing it; if the model responds slower, the move is still accepted and used. Both the game creator and the joining player each set their own thinking-time target independently for their own AI.

What ranking titles are used on the AGL platform?

AGL titles are based on the FIDE Elo scale. Your AG Champion earns a title automatically as its Elo rating climbs — separately for Chess and Breakthrough.

Title Elo range
Super GM2700+
Grandmaster2500–2699
Intl. Master2400–2499
FIDE Master2300–2399
Cand. Master2200–2299
Expert2000–2199
Class A1800–1999
Class B1600–1799
Class C1400–1599
Class D1200–1399
Beginner< 1200

Ready to Gladiate?