Repository navigation
Suit isomorphism: leave a combo without a suit-swapped twin in place - #236
Open
adihebbalae wants to merge 1 commit into
Open
adihebbalae wants to merge 1 commit into
adihebbalae wants to merge 1 commit into
Conversation
exchange_color() looked each combo's twin up in a zero-filled table, so a combo whose twin is not in the range (the twin holds a board card) was swapped with the combo at index 0 of the range. This happens in ordinary solves with plain rank-class ranges: on Kh7d2c the turn Ks makes hearts and spades interchangeable for the river, and every combo holding Ks has its twin holding Kh. Combo 0, a live hand, then lost its river values on the mirrored river cards and a dead combo received them. BestResponse uses the same function, so the printed exploitability is off too. The table now starts at -1 and a combo without a twin keeps its value. test_exchange_color_corrupts_asymmetric_range pinned the old swap; it is renamed test_exchange_color_asymmetric_range and now expects a no-op. test_exchange_color_dealt_card_twin_on_board covers the solver's case. resources/text/repro_iso_mirror_swap.txt: Kh7d2c checked to the river, one 50% river bet. Run it with set_use_isomorphism 1 and 0: after the turn Ks, combo 0 (AdAc) shows 50/50 on every spade river with isomorphism on, the untrained strategy of the dead combo it was swapped with; with the fix both runs agree.
|
这是来自QQ邮箱的假期自动回复邮件。
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
|
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.
What
exchange_color()(include/tools/utils.h) looks up each combo's suit-swapped twin inprivateint2ind, which was zero-filled. A combo whose twin is not in the range was therefore swapped with the combo at index 0. The table now starts at -1, and such a combo keeps its own value.Why
This is not only the exact-combo case from #227. It happens in ordinary solves with plain rank-class ranges. On Kh7d2c the turn Ks makes hearts and spades interchangeable for the river. Every combo holding Ks has its twin holding Kh, a board card, so the twin is not in the range. On each mirrored river card, combo 0 (a live hand) lost its river values, and a dead combo received them. BestResponse.cpp calls the same function, so the printed exploitability is affected too.
How tested
test_exchange_color_corrupts_asymmetric_rangepinned the old swap. It is renamedtest_exchange_color_asymmetric_range, and its second block now expects a no-op. That block fails before the fix and passes after it.test_exchange_color_dealt_card_twin_on_board: the solver's own case (Kh7d2c, hearts <-> spades exchanged, range AK,KQ,QJ,T9s). Each twinless combo keeps its value, and each other combo swaps with its twin.resources/text/repro_iso_mirror_swap.txt. Kh7d2c is checked through to the river, with one 50% river bet. Run it once withset_use_isomorphism 1and once with0(set_dump_rounds 3), then compare OOP's river strategies on the check-check / check-check line. Before this change, combo 0 (AdAc) shows exactly 50/50 after the turn Ks on every spade river with isomorphism on. That is the untrained strategy of the dead combo it was swapped with. With isomorphism off, the same combo checks 0.1% to 14% and bets the rest (actions are [CHECK, BET]). Exploitability does not show this: the best response goes through the same function, and the error cancels.Before (console 02c8021) / after (this branch):
Notes