WillFlame14 / hanabi-bot

A bot that plays on the hanab.live interface.
GNU General Public License v3.0
15 stars 9 forks source link

Bluffs should be discounted during a rewind #247

Closed flackr closed 2 months ago

flackr commented 4 months ago

Version (PM the bot with /version): v1.4.5 Convention settings: /setall 12 Steps to reproduce or replay link: https://hanab.live/shared-replay/1175044#17 Additional information: Since bluffs must resolve immediately, they should never be considered as an alternate possibility when rewinding after an expected play doesn't happen.

turn 13, the b2 in botbot1's hand was finessed turn 15: botbot1 fails to play the card

However, at this point robot2 decides that the correct interpretation of the blue clue is a bluff:

Turn 14: botbot1 plays r4 
waiting for connecting b2 18 as b2 (botbot1) for inference b3 10 
botbot1 didn't play into finesse, removing inference b3 
Rewinding to insert {"type":"ignore","conn_index":0,"order":18,"inference":{"suitIndex":3,"rank":3}} 
------- STARTING REWIND ------- 
Turn 12: flackr clues 3 to robot1 
severity 1
found connections: [ -> y2?] 
found connections: [ -> g1?] 
found connections: [ -> b2?] 
found connections: [ -> p1?] 
focus possible: [] 
card b3 order 10 doesn't match any inferences! currently y3,g3,b3,p3 
found connections: [20 b2 bluff (robot2) -> b3?] 
selecting inferences [ 'b3' ]
symmetric connections [ '[1 y2 prompt (robot2) -> y3?]', '[20 b2 bluff (robot2) -> b3?]' ]
final inference on focused card y3,b3 
checking tccm: old score [ 4, 1, 0, 1, 0 ] Set(0) {} new score [ 4, 1, 0, 1, 0 ] Set(1) { 20 }
caused finesse, not tccm 
waiting for connecting (unknown) 20 as b2 (robot2) for inference b3 10 
waiting for connecting (unknown) 1 as y2 (robot2) for inference y3 10 
Turn 13: robot2 clues 5 to robot1 
severity 1
found connections: [21 r4 known (botbot1) -> r5?] 
found connections: [ -> y2?] 
found connections: [ -> g1?] 
found connections: [ -> b2?] 
found connections: [ -> p1?] 
focus possible: [ 'r5 (save)', 'y5 (save)', 'g5 (save)', 'b5 (save)', 'p5 (save)' ]
final inference on focused card r5,y5,g5,b5,p5 
checking tccm: old score [ 4, 1, 0, 1, 0 ] Set(1) { 20 } new score [ 4, 1, 0, 1, 0 ] Set(1) { 20 }
touched at least 1 new card, not tccm 
waiting for connecting (unknown) 20 as b2 (robot2) for inference b3 10 
robot2 didn't play into finesse, removing inference b3 
not removing ambiguous finesse with connections: [ '20 b2 bluff (robot2)' ]
waiting for connecting (unknown) 1 as y2 (robot2) for inference y3 10 
allowing robot2 to defer a prompt by giving a clue 
Turn 14: botbot1 plays r4 
------- REWIND COMPLETE ------- 
waiting for connecting (unknown) 1 as y2 (robot2) for inference y3 10 

turn 16 robot1 misplays (expected) turn 17 flackr clues blue to botbot1. This should "fix" the coming misplay by robot2 by good touch. turn 18 robot2 misplays (assuming an intended bluff)

WillFlame14 commented 3 months ago

This is related to Bob's Truth Principle: robot2 should assume that they have b2 when interpreting the 3 clue, so that flackr's clue correctly eliminates the inference on turn 17. This will be fixed in the next update.