Ark223 / BGA

Bridge Gameplay Analysis
MIT License
0 stars 2 forks source link

Same trick added twice #2

Open ThorvaldAagaard opened 7 months ago

ThorvaldAagaard commented 7 months ago

Perhaps I am misunderstanding but I assumed that Playouts was like possible combinations, so I was surprised seeing a card play more than Playout.

Here the Card is added twice image

so I assume it is safe to delete line 176

Ark223 commented 7 months ago

Hi. The playouts define how many game states have been observed so far by the program. The maximum number of playouts is calculated using the theory of combinations without repetition (N = number of cards that defenders hold, K = number of cards that either left or right defender holds). Regarding the cards being added twice to the output, this is an intended action and it was required to handle the "strategy fusion" problem (see the code block starting from line 182). The final calculation of average numbers of tricks and/or winning probability is not affected.

ThorvaldAagaard commented 7 months ago

So you switch the EW-hands and recalculate if 3 or more cards left, but only if it is pimc to lead and both east and west has at least one card in the suit being considered. But what if constraints are violated ?

Ark223 commented 7 months ago

In this case we don't have to check for validity of constraints cause we already verified that each defender's hand contains at least 1 card in the suit that declarer is about to lead.

ThorvaldAagaard commented 7 months ago

I have been looking closer at this, and assume an opponent did not follow in another suit, the switching of hands would be clearly wrong, even when requiring a card in the suit to be played.

And it could be interesting with an explanation of this mix strategy :-)