lorserker / ben

a game engine for bridge
GNU General Public License v3.0
40 stars 30 forks source link

Very interesting problem #89

Open ThorvaldAagaard opened 9 months ago

ThorvaldAagaard commented 9 months ago

image

A very standard 4H.

But WBridge5 could preempt with just a 5-card spadesuit.

After diamond to the Ace and two round of trumps ending in North we had this situation image

Playing teams it could be OK to just take the 10 top-tricks, but taking the diamond ruff first seems right. But can it go wrong?

Well not according to the simulations: image

But when CA was ruffed BEN went down.

There are two problems as BEN can't play safe, but is just following the odds. That is OK as it wont have to explain to partner why it went down .-)

The real problem here is that BEN should just play trump, but the neural network recommends CA as common in this situation, and that would be right if there was no outstanding trumps.

One idea I have is that when we have multiple cards with same score we should have some logic, where trump take priority if opponents have any left.

lorserker commented 9 months ago

yes, this is very annoying. this is a situation in which we could claim. it doesn't matter how the opponents' cards are. unfortunately we don't have a good claiming logic implemented.

we could also say that if everything is equal and there are trumps outside then we prefer to play trumps.

or we could also shuffle the samples completely randomly hoping to catch a defavorable one. the problem is that the sampler got misled and thinks the actual layout is impossible

ThorvaldAagaard commented 9 months ago

I have split the neural network for leads into one for suit and another for nt. That did improve the leads, as far as I can see. I am thinking about doing the same for the play neural networks, as it then might be more obvious to the neural network to draw trump. About the sampler problem I will try to describe that in another issue, as that is a real problem.

For now I will add the calculation of percent for making during play, so any 100% line will take higher priority, but I still think we need to train BEN about drawing trump as a high priority task.

ThePokerDude commented 6 months ago

I see two topics here 1) heart is superior to Ac but has the same expected trick value, so it's equal to BEN 2) Somehow BEN also does not take east's first pass into account. The first pass basically excludes most of east's hands (9/10 of the samples) which BEN thinks are possible

What exactly does iscore value show?

ThorvaldAagaard commented 6 months ago

All bid and play get a score from the neural network (iscore) - the value for all bids/cards adds to 1, so an iscore of 0.8 is sort of 80% certainty for that bid/card.

Why did East not open 2S? It is hard to figure out, and if you see the number last on each sample-line it is how certain BEN is that the hand matches the bidding.

Currently we use the same model for bidding and sampling, I think we should have different models, so when sampling we are more like "could it be a possible bid"?

Playing CA could also be fine if playing NT, so another reason for trying to have two nn for this

ThePokerDude commented 6 months ago

Thanks, ow I understand. Playing CA could also be fine if playing NT, so another reason for trying to have two nn for this yes, deinitely the iscore for H4 would be higher in a pure suit contract NN