Views
No views yet
legacyaravind/shannons-gambit)ladder.json) and the Inference Endpoint handler. The full
system lives at
github.com/aravinds-kannappan/Chess-Gambit-RL.| Agent | Where it plays | Method |
|---|---|---|
| MDP | solved endgames (KRvK, KQvK) | exact Bellman value iteration (optimal) |
| PPO | low-material regime | on-policy actor-critic RL |
| Reward (DQN) | low-material regime | off-policy, potential-based shaping |
| Neural | opening / middlegame | this network: AlphaZero-lite self-play + behavioural cloning |
agents/router.py) dispatches each move to the right agent.
The network in this repo is the general full-board player and the bootstrap for
self-play; it also serves the policy/value/WDL/rating predictions.eval/benchmark.py) uses Stockfish only as a calibrated yardstick: it throttles
Stockfish to known Elo bands (UCI_LimitStrength + UCI_Elo, with a Skill Level
fallback below the floor), plays each agent a gauntlet, and fits a calibrated Elo
(Bradley-Terry MLE). It also reports centipawn loss and top-1 agreement. That
rating is the level each agent plays at and climbs as it learns.1{
2 "loss_policy": 0.2169,
3 "loss_value": 0.0305,
4 "loss_wdl": 0.0295,
5 "loss_rating": 0.0312,
6 "policy_acc": 0.966,
7 "wdl_acc": 0.9903,
8 "rating_mae_elo": 21.1,
9 "epoch": 15
10}shannons_gambit/data/encode.py)./move, /predict, /watch-move, /ladder, plus /calibrate (Stockfish-assessed
Elo). New generations are versioned back to this repo so the ladder survives restarts.handler.py here loads model.pt and returns best move,
WDL, value and rating for a FEN.1import requests
2requests.post(
3 "https://<your-endpoint>.endpoints.huggingface.cloud",
4 headers={"Authorization": "Bearer <HF_TOKEN>"},
5 json={"inputs": {"fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"}},
6).json()