Repository navigation
Add the hand-value riichi response candidate (#384) - #385
Merged
Merged
Conversation
Replace the dora count of the #377 candidate with an estimate of the ron value after reaching tenpai (yaku, fu and dora; riichi for closed hands, zero for open hands without yaku; dealer points converted to non-dealer points), and split the push threshold between closed and open hands. Adds the fixed search space v2 (8 candidates). The Champion and the dora candidate are unchanged. Refs #384 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GJ2X5PJT8MPabUgHSnFDr5
…tests Refs #384 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GJ2X5PJT8MPabUgHSnFDr5
Owner
Author
|
Self-review(Claude Code): head
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
#384(承認済み)の実装。他家リーチ下・1向聴の押し引きで、#377の候補が使うdora枚数の代わりに役を含む打点推定を使い、押し返しの閾値を門前と副露で分ける候補を追加する。評価(東1局の対比較)はこのPRの対象外で、merge後に#384で行う。
変更
src/lisjong/policies/riichi_response_hand_value.py(新規)estimate_one_shanten_hand_value: 打牌後1向聴の各打牌について、聴牌した場合のロン点(evaluate_win)を見えない残り枚数で加重平均し、その最大値を返す。門前はリーチ込み・裏ドラ除外、副露は役がなければ0、親は2/3で子換算。Fractionで返す。1向聴にならない入力はHandValueEstimateErrorRiichiResponseHandValueParameters(値から生成するidentity)、RiichiResponseHandValuePlacementAwareSpeedCallPolicy、探索空間v2(8候補、固定順)_without_opponent_riichi、_minimum_danger_actions)を再利用し、複製しない。点数計算の赤の扱いはriichi_dama_branch.winning_tile_forを再利用src/lisjong/policies/__init__.py: export追加tests/test_riichi_response_hand_value.py(新規、22 tests): 門前のリーチ込みの値(2,000 / 3,900)、親の換算、副露の役(白1,000 / 2,000)、副露の役なし0点、1向聴でない入力の拒否、他家リーチに依存しないこと、門前・副露それぞれの押し返し閾値、残り山、降りの閾値、役なし副露の降り、ゲート外でChampionと同じこと、パラメータ検証・identity・探索空間docs/riichi-response-hand-value-candidate.md(新規)、docs/policy-status.mdに1行Championと#377の候補の挙動は変えない。
情報境界
入力は
PolicyInputの公開情報(自分の手牌・副露、見えている牌、ドラ表示牌、風、親)だけ。他家の手牌・山・裏ドラは使わない。instanceに状態を持たない。確認
python -m unittest discover -s tests -p "test_riichi_response*.py": 38 tests OK(新規22 + 既存RR 16)python -m ruff format --check ./python -m ruff check .: PASSRefs #384
Generated by Claude Code