コンテンツにスキップ

Evaluation Modules

対象: pca.evaluation

Purpose

deck pool に対する head-to-head / tournament evaluation を実行し、win rate だけでなく attack、prize、unfinished、deck-out / pokemon-out などの metrics を集計する。

Modules

Module Role Implementation Details
pca.evaluation.tournament.__main__ module entrypoint python -m pca.evaluation.tournament から CLI を起動する。
pca.evaluation.tournament.impl evaluation core CLI、policy construction、match loop、deck-pool loop、v12/v13 search defaults。
pca.evaluation.tournament.types dataclasses MatchConfig, MatchSummary, DeckEvaluation など。
pca.evaluation.tournament.summaries summary match result aggregation、CSV rows、metrics formatting。
pca.evaluation.tournament.agents policy factory facade evaluation 用 agent/policy construction の re-export。
pca.evaluation.tournament.deck_pool deck-pool facade deck pool evaluation の re-export。
pca.evaluation.tournament.matches match facade match execution helper の re-export。
pca.evaluation.tournament.cli CLI facade parse/main/default helper の re-export。
pca.evaluation.bundle_loader bundle loading submission bundle を local Python で読み込む。
pca.evaluation.bundle_battle bundle battle CLI bundle agent を使って local battle を実行する。

Public API

API Usage
run_head_to_head(...) 2 deck/policy の直接対戦。
run_against_deck_pool(...) own/opponent deck pool の総当たり評価。
summarize_matches(matches) match summary list を集計する。
write_csv_summary(...) summary CSV を保存する。
apply_v12_search_defaults(args) evaluation CLI の search default を補う。

CLI Usage

PYTHONPATH=src uv run python -m pca.evaluation.tournament \
  --own-deck-dir decks/own \
  --opponent-deck-dir decks/opponents/holdout \
  --games 20 \
  --policy search \
  --checkpoint checkpoints/policy_value_best.pt \
  --search-mode ismcts

Notes

  • 評価では self-play よりも holdout deck pool と result reason を重視する。
  • unfinished が多い場合は search depth/candidate cap/max steps を確認する。