Add SO-ISMCTS mini trainer

Implements a proof-of-concept single-observer IS-MCTS trainer with AlphaZero-style policy/value network, determinization, replay, self-play, CLI configs, and focused tests. Mini acceptance run reaches positive random eval while keeping play_action_rate above the Deep CFR trap threshold.

Tests: uv run python -m pytest tests/games/classic/ismcts/ -x; uv run python -m pytest tests/games/classic/test_deep_cfr_trainer.py -x; uv run lost-cities-ismcts train --config configs/ismcts/mini.yaml
This commit is contained in:
2026-05-10 22:46:22 +09:00
parent 5acda3f272
commit e69f3165b6
15 changed files with 1205 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
run:
experiment_name: ismcts-default
max_iterations: 100
seed: 1
device: auto
rules:
n_colors: 5
n_ranks: 9
min_rank: 2
n_handshakes: 3
hand_size: 8
expedition_penalty: -20
bonus_threshold: 8
bonus_amount: 20
encoding:
derived_playability: true
slot_aware_playability: true
network:
kind: mlp
hidden_size: 512
num_layers: 3
activation: relu
mcts:
n_simulations: 50
c_puct: 1.5
max_depth: 200
temperature:
training: 1.0
eval: 0.0
training:
games_per_iter: 10
gradient_steps_per_iter: 10
batch_size: 128
replay_capacity: 100000
optimization:
learning_rate: 0.0003
grad_clip: 5.0
checkpoint:
save_every: 10
save_latest: true
evaluation:
eval_every: 10
games: 20
opponents: [random, discard-only, heuristic-cautious]
max_steps: 10000
num_workers: 1
+46
View File
@@ -0,0 +1,46 @@
run:
experiment_name: ismcts-mini
max_iterations: 50
seed: 1
device: cpu
rules:
n_colors: 3
n_ranks: 5
min_rank: 2
n_handshakes: 1
hand_size: 4
expedition_penalty: -20
bonus_threshold: 4
bonus_amount: 20
encoding:
derived_playability: true
slot_aware_playability: true
network:
kind: mlp
hidden_size: 128
num_layers: 2
activation: relu
mcts:
n_simulations: 50
c_puct: 1.5
max_depth: 100
temperature:
training: 1.0
eval: 0.0
training:
games_per_iter: 10
gradient_steps_per_iter: 10
batch_size: 128
replay_capacity: 50000
optimization:
learning_rate: 0.001
grad_clip: 5.0
checkpoint:
save_every: 0
save_latest: true
evaluation:
eval_every: 5
games: 20
opponents: [random, discard-only, heuristic-cautious]
max_steps: 300
num_workers: 1