CJC Chess RL Research Platform

Deterministic Reinforcement Learning | SplitMix64 RNG | Manual REINFORCE Gradients
Overview
Training Curves
Win Rate
ELO Ratings
Game Replay
Architecture
Episodes Trained
0
Win Rate vs Random
--
Peak ELO
1500
Models Trained
0
Training Overview
Recent Games
Total Episodes
0
Avg Reward (last 10)
--
Avg Loss (last 10)
--
Avg Steps (last 10)
--
Episode Reward
Training Loss
Game Length (Steps)
Win Rate vs Random (Evaluation Checkpoints)
Win / Draw / Loss Distribution
ELO Rating Progression
League Standings
Rank Model ELO W D L Win%

Board State

Ply 0

Policy Decision

Move History

System Architecture
CJC Chess RL Research Platform
==============================

Pipeline:
  CJC Source -> Lexer -> Parser -> AST -> HIR -> MIR -> MirExecutor

Chess Environment (345 LOC CJC):
  init_board() -> 64-int flat array
  generate_pseudo_legal(board, side) -> [from0,to0, from1,to1, ...]
  legal_moves(board, side) -> filtered legal moves
  terminal_status(board, side) -> 0/2/3 (active/checkmate/stalemate)
  encode_board(board, side) -> [1,64] normalized Tensor

RL Agent (154 LOC CJC):
  init_weights() -> [W1[66,16], b1[1,16], W2[16,1]]
  forward_move(W1,b1,W2, features, from, to) -> [score]
  select_action(W1,b1,W2, features, moves) -> [action_idx, log_prob, num_moves]
  reinforce_update(...) -> [new_W1, new_b1, new_W2]

Training (165 LOC CJC):
  play_episode(W1,b1,W2, max_moves) -> [reward, num_moves]
  train_episode(W1,b1,W2, lr,gamma,baseline, max_moves) -> [reward,loss,steps]
  play_episode_random(W1,b1,W2, max_moves, agent_side) -> reward

Advanced Extensions:
  train_multi_episodes() -> per-episode metrics + final weights
  eval_win_rate() -> wins/draws/losses against random
  selfplay_episode() -> two-agent game
  eval_agents() -> round-robin evaluation

Determinism Guarantees:
  - SplitMix64 RNG (seeded, platform-independent)
  - Kahan summation for floating-point reductions
  - BTreeMap everywhere (no HashMap iteration-order dependence)
  - No SIMD FMA (preserves bit-identical results)
  - Same seed = bit-identical output across runs
        
Test Coverage
Chess RL Project Tests:     49 tests (7 suites)
Chess RL Hardening Tests:   88 + 12 property + 5 fuzz = 105 tests
Chess RL Advanced Tests:    86 tests (11 suites)
Total Chess RL Tests:       ~240 tests

Full Workspace:             ~3,500+ tests, 0 failures