Is my euchre program any good?

Ask questions, discuss and debate your strategies, euchre polls and more
Post Reply
raydog
Posts: 238
Joined: Thu Sep 16, 2021 6:56 pm

Is my euchre program any good?

Unread post by raydog » Fri Oct 08, 2021 5:15 pm

I coded a euchre program a few years ago and spent several hundred hours tweaking and improving it. Lacking any skill at GUI coding, I haven't made it into a playable game (well, I did, but it's glitchy and crashes and I can't put it in a package easily shareable with others), so I use it to simulate hands and determine the best play under various circumstances. Mostly, best bidding decision and best card to lead. I run monte carlo simulations on 10,000 or 100,000 hands to see which choices give the best EV.
But my results are, of course, only as good as my underlying program. I recently had it play 1,000,000 random hands and compiled various stats; I'm curious whether the more knowledgeable and experienced players on this forum can tell me how these stats compare to other good euchre-playing AI programs, or their own play. That would give me some idea of how worthwhile it is (I'm sure it plays better than the AI players on 3D Euchre and Trickster Cards, but not as good as an expert player).
Here are some sample stats:

1st round bids: 70.6%
all-pass: 0.1% [I don't play STD]
pts. per hand: 1.54 [I suppose expert play yields closer to 1.65?]
lone calls: 30%
(successful: 30.2%; euchred: 6.1%; net EV: 1.72)
euchres: 16.4% [seems a bit high to me]
dealing partnership earns pts.: 67.1%

Any thoughts / feedback?



User avatar
LeftyK
Posts: 261
Joined: Wed Jun 10, 2020 9:45 am
Location: North Carolina

Unread post by LeftyK » Sat Oct 09, 2021 12:09 pm

looks like not calling aggressive enough based on the low euchred 16% stat. lone makes looks decent. but the main stat is W/L :) --- not sure about your PPH or 1.54 ....one app I use shows PPH has 0.46 for me (which leads all other seats) with a call result of .250. the tricks per hand is 1.4 for me, not sure if you can extract those stats from your numbers.

RedDuke
Posts: 473
Joined: Sun Dec 02, 2018 2:22 am

Unread post by RedDuke » Sun Oct 10, 2021 4:01 am

lone calls: 30%
(successful: 30.2%; euchred: 6.1%; net EV: 1.72)
That seems pretty low. My personal number is about 34% and even that is low compared to what people like Lefty or Wes do.

I agree, it seems like your AI is playing too conservatively.

raydog
Posts: 238
Joined: Thu Sep 16, 2021 6:56 pm

Unread post by raydog » Sun Oct 10, 2021 5:12 pm

I appreciate the feedback. But I'm somewhat surprised to see euchre rates as high as 34%!

I've tried extracting the euchre rates a bit differently, looking only at hands declared with partner (I hope you would agree that one shouldn't be euchred too often when declaring alone, so maybe the 6.1% figure for those instances looks reasonable). Viewed this way, the euchre rates vary from 8.9% (2nd seat, round 1) to 33.9% (1st seat, round 1), with an overall average of 26.3%. Since the instance of all players passing both rounds is only 1 in 1,000 hands, the only way to be more aggressive in bidding is for players to bid more in the early seats, or round 1 rather than round 2. However, the figure of 26.3% presented here is an average, so bidding a bit more often on the margin will require marginal euchre rates (on those extra hands) of over 40%, which will definitely result in a negative EV.

I realize a negative EV is not necessarily bad in and of itself; passing to avoid a negative EV may result in an even worse EV when an opponent is allowed to bid, and may even cost the game [hence the concept of donating].* But I don't see those minority of cases affecting the euchre percentage so much that is surpasses, say, 30%.

As for PPH, I calculated 1.54 by counting "points earned per hand" (by any team), so euchres count as +2. If I instead look at the N/S and E/W partnerships separately, and calculate "points earned per declaration" (euchres count as -2 in this case), I arrive at values of 0.96 for N/S and 0.69 for E/W. With the dealing partnership declaring 71% of the time, the blended average is 0.88.

A note about optimizing this program:
It's a recursive process, since determining how to bid requires proper play of the hand, and proper play of the hand requires proper bidding. The way I approached it was to determine an initial set of basic rules, then I tweaked the bidding rules by looking at thousands of possible hands and comparing the EV if bid or passed. Then I played hands in a way I felt was proper, and when the program opted for a different play I tested which play gave the best result on average, modifying the program when it was playing sub-optimally. Then I repeated the process. So I've looked quite exhaustively at bidding scenarios, but there probably remains lots of optimization to be done on the play of the hand, examining very specific scenarios and testing which lead or play is better. The scenarios presented in this forum are very helpful in that regard!

Now I ask myself, if my program doesn't play the correct card 5-10% of the time, and this actually changes the outcome of that hand, say, in 25% of those instances, AND the "error" is just as likely to be on offense as on defense, is that lack of optimization truly impairing the usefulness of my program as a predictive tool? Comparing an EV of +0.25 to one of +0.30 is surely not significant, but I think comparing +0.20 to -0.20 is significant.

One last important note: when I try to determine the best bid for, say, the dealer, given a certain hand, I lock in those 5 cards + the turn card, and run 100,000 scenarios with the other cards randomized. BUT I only consider cases where the bidding actually came around to the dealer, which may eliminate 20-25% of possible card distributions. This is important, especially when considering 2nd round bids, as failure to do so can massively skew the results.
________________________

* one of my favorite cases of accepting a negative EV is when dealer declares and ends up with Q-10-9 of trump and 2 off-suit 9's. I find that the dealer will be euchred 58% of the time, for an EV of -0.73 (ouch!) BUT, if the dealer passes, the opponents will score points 84% of the time, for an EV of 1.24. So it's a matter of accepting a lousy expectation in return for avoiding a truly dreadful expected outcome.

User avatar
LeftyK
Posts: 261
Joined: Wed Jun 10, 2020 9:45 am
Location: North Carolina

Unread post by LeftyK » Mon Oct 11, 2021 5:09 pm

RedDuke wrote:
Sun Oct 10, 2021 4:01 am
lone calls: 30%
(successful: 30.2%; euchred: 6.1%; net EV: 1.72)
That seems pretty low. My personal number is about 34% and even that is low compared to what people like Lefty or Wes do.

I agree, it seems like your AI is playing too conservatively.
idk "batting" 0.302 seems decent. I "bat between 0.279 and 0.345 depending on the app and competition

raydog
Posts: 238
Joined: Thu Sep 16, 2021 6:56 pm

Unread post by raydog » Tue Oct 12, 2021 3:18 pm

I apologize, I misread the initial response by RedDuke. Thought they were referring to euchre rate, not lone rate. Good to see I'm in the right ballpark, I'll keep optimizing.

Richardb02
Posts: 746
Joined: Mon Dec 10, 2018 8:57 pm
Location: Florida

Unread post by Richardb02 » Tue Oct 12, 2021 9:32 pm

The terms we use, trip everyone up on the forum! I try to go “generic” to avoid the confusion.

What you called “Loner Rate,” was identified by posters as “Loner Success Rate” or “4 Pt Rate.” A 30% Loner Success Rate is a reasonable success rate for a “Above the Average Player.” So posters and most readers assumed 30% as the “Loner Success Rate.” I also measure my “Euchre Order Rate” at a 9% average.

Now, if my “Euchred Order Rate” is 20%, we can calculate an estimated personal “PPH” or Points per hand rate:
9%*(30%x4+65%x1-5%x2)= 9%*(1.2+.65-.1)=.9*1.75=1.575 points per “Euchre Order Hand”
91%*(65%x1+15%*2-20%x2)= .91*.55=.501 per “Order Hand, No Loner Orders”
Add the 2 together, 1.575+.501=2.076 points per “Ordered Hand.”

I can’t control my partner. So I have never calculated the “Team EV (Estimated Value).” We can continue with an assumption that I play at a 60% level and Partner at a 40% level and an equal split of hands (not likely)”
50%x2.076+50%40%x2.076=1.038+..4152=1.45 PPH
If I assume the better player orders more, say 60% of the time, I derive 1.58 PPH Team, validating your 1.54 PPH Team, but I have no confidence, since that is built on many assumptions.

BTW, I use “Save draft” to save an unfinished post and then “Load Draft” and “Preview” to proof read my post, as others will see it, before I post.




Post Reply