Artifacts Catalog¶
更新日: 2026-07-05
生成物の保存場所、作成者、読み手、代表 field をまとめる。
Summary¶
| Artifact | Typical Path | Producer | Consumer | Notes |
|---|---|---|---|---|
| self-play JSONL | data/selfplay/*.jsonl |
pca.training.selfplay |
training.train, belief_train, analysis scripts |
1 line = 1 decision point。 |
| agent summary CSV | *.agent-summary.csv |
self-play CLI | spreadsheet/analysis | rule-agent 別 result summary。 |
| agent matchup CSV | *.agent-matchup.csv |
self-play CLI | spreadsheet/analysis | rule-agent matchup summary。 |
| deck summary CSV | *.deck-summary.csv |
self-play/evaluation CLI | spreadsheet/analysis | deck 別 win/loss/prize/attack summary。 |
| evaluation JSON | data/eval/*.json |
pca.evaluation.tournament |
analysis/reporting | match summaries の詳細。 |
| evaluation CSV | data/eval/*.csv |
pca.evaluation.tournament |
spreadsheet/analysis | aggregate summary。 |
| policy/value checkpoint | checkpoints/policy_value*.pt |
pca.training.train |
self-play/eval/submission/server | model state + model config + metadata。 |
| latest policy/value alias | checkpoints/policy_value_latest*.pt |
scripts/run_selfplay_train.sh |
next self-play/train/eval | 最新 run の checkpoint への symlink。 |
| latest checkpoint manifest | checkpoints/policy_value_latest.yaml |
scripts/run_selfplay_train.sh |
humans/automation | latest alias が指す run/config/path。 |
| belief checkpoint | checkpoints/belief*.pt |
pca.training.belief_train |
ISMCTS belief prior | BeliefNet state + vocab/config。 |
| metadata cache | *.unified-metadata-cache.json |
policy_value.metadata |
training reruns | JSONL scan の高速化。 |
| submission bundle | submission*.tar.gz or bundle dir |
pca.submission.build_bundle |
Kaggle runtime | src/pca, checkpoint, configs, decks。 |
| replay HTML | data/replays/*.html |
scripts / CABT tooling | manual inspection | game behavior debugging。 |
Self-Play JSONL¶
Producer:
src/pca/training/selfplay/battle.pyrecords.pyrecord_targets.pyrecord_metadata.pyrecord_io.py
Consumer:
src/pca/training/data/records.pysrc/pca/training/policy_value/data.pysrc/pca/training/belief/data.py
Top-level schema:
| Field | Description |
|---|---|
search |
SearchTrainingTarget。policy/value training の中心。 |
belief |
optional BeliefTrainingTarget。full observation target がある時だけ使う。 |
aux |
optional AuxPrizeTrainingTarget。サイド取得補助 target。 |
meta |
game id、step index、result、deck/agent metadata、teacher weight。 |
Compatibility:
- 古い JSONL では
belief/aux/ metadata field が欠けることがある。 - dataclass field を追加する場合は default を付ける。
- loader は欠損 field を補って読む。
Summary CSV¶
Producer:
training/selfplay/summary_csv.pyevaluation/tournament/summaries.py
Common columns:
| Column Type | Meaning |
|---|---|
| game counts | games / wins / losses / unfinished。 |
| result reason | pokemon-out / deck-out / other。 |
| prize stats | prizes taken / final prize counts。 |
| action stats | attack counts / attack-ready counts。 |
| identity | deck name / agent id / matchup pair。 |
Notes:
- CSV は analysis 向けで、学習の入力にはしない。
- 新 metric を足す場合は JSON output と CSV output の両方を確認する。
Checkpoint .pt¶
Policy/value checkpoint producer:
training/train.pytraining/policy_value/checkpointing.py
Policy/value checkpoint consumers:
decision.policytraining.selfplay.policiesevaluation.tournament.implserving.policy_serversubmission.main
Important metadata:
| Key | Meaning |
|---|---|
model_class |
legacy / unified model selection。 |
model_config |
model construction parameters。 |
vocab / feature metadata |
token/static feature compatibility。 |
| training config | loss weights, profiles, data settings。 |
Belief checkpoint producer:
training/belief/runner.pytraining/belief/checkpointing.py
Belief checkpoint consumer:
search.belief.belief_prior_from_modeltraining.selfplay.policiestraining.selfplay.policy_factory
Latest Aliases¶
pca selfplay-train / scripts/run_selfplay_train.sh は train stage 完了後、次サイクルで指定しやすい stable path を更新する。
| Path | Meaning |
|---|---|
checkpoints/policy_value_latest_best.pt |
最後に完了した policy/value 学習 run の best checkpoint。 |
checkpoints/policy_value_latest_final.pt |
最後に完了した policy/value 学習 run の final checkpoint。 |
checkpoints/policy_value_<run_name>_latest_best.pt |
同じ --run-name 内で最後に完了した best checkpoint。 |
checkpoints/policy_value_<run_name>_latest_final.pt |
同じ --run-name 内で最後に完了した final checkpoint。 |
checkpoints/policy_value_latest.yaml |
global latest alias の実体、run_name、run_id、config。 |
次の self-play / train / eval で「最新」を使いたい場合は --checkpoint checkpoints/policy_value_latest_best.pt を指定する。実験系列を分けたい場合は run-name scoped alias を使う。
Metadata Cache¶
Producer:
training/policy_value/metadata.py
Purpose:
- Large JSONL から card/attack metadata table を毎回 scan しないための cache。
Invalidation:
- input JSONL が変わる場合は cache path / mtime / metadata consistency を確認する。
- static metadata schema を変えた場合は cache を作り直す。
Submission Bundle¶
Producer:
pca.submission.build_bundle
Contains:
src/pca/- selected checkpoint(s)
- deck files
- optional configs / metadata
Consumer:
- Kaggle runtime via
pca.submission.main
Notes:
src/pca/はsample/, local scripts, notebooks に依存しないこと。- bundle size と checkpoint load path を evaluation 前に確認する。