Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Other Poker > Draw and Other Poker

Notices

Draw and Other Poker Discussion of poker games not covered elsewhere (e.g. badugi, draw, triple-draw, pineapple)

Reply
 
Thread Tools Display Modes
Old 05-13-2008, 04:03 AM   #1
old hand
 
Join Date: Jul 2005
Posts: 1,309
Badugi calculator available

My first pass attempt at a monte carlo simulator for Badugi is done. It is available from here. I promise it isn't a virus.

Behold... TROUTULATOR!


If anyone who is familiar with Badugi math notices any dodgy results coming out of this thing, please let me know, it is very easy for me to make a small mistake that completely screws up results in some cases. I think it's pretty stable now.

As I mention in the readme, I will be updating this to simulate multiple draws, given some simple criteria for what to keep/discard between draws based on hand strength only. The next update is likely to be a simple hand vs range simulator for stud hi.
RubbishCards is offline   Reply With Quote
Old 05-13-2008, 10:03 AM   #2
Carpal \'Tunnel
 
DeathDonkey's Avatar
 
Join Date: Feb 2004
Location: Scottsdale
Posts: 10,545
Re: Badugi calculator available

Badugi sim, 1000000 trials:
Dead cards: none

Hand 0: Ah 2c 3d -- : EV 20.0% - WIN/LOSE/TIE %: total 20.0/80.0/0.0 - badugi 20.0/0.0/0.0 - 3 cards 0.0/80.0/0.0 - 2 or 1 card 0.0/0.0/0.0
Hand 1: Kc Qs Jd Th : EV 80.0% - WIN/LOSE/TIE %: total 80.0/20.0/0.0 - badugi 80.0/20.0/0.0 - 3 cards 0.0/0.0/0.0 - 2 or 1 card 0.0/0.0/0.0

These hands should be close to 50/50, its clearly wrong in some way. The problem with a badugi equity calculator is we have to agree on drawing assumptions, which isn't easy. For instance in my example here, the A23 is about even money vs the worst badugi with 3 draws to go if we assume he keeps any badugi. If he throws a jack or worse and keeps drawing he is a much more substrantial dog (this is maybe how your code works and would explain the resulting equity). Subtle variations of this problem make a calculator like this impossible.

-DeathDonkey
DeathDonkey is offline   Reply With Quote
Old 05-13-2008, 10:17 AM   #3
enthusiast
 
Join Date: May 2007
Posts: 63
Re: Badugi calculator available

DeathDonkey: As far as I understood the post the calculator only calculates equity for a single draw. While a horrible pat badugi is around 50:50 to a one card draw before the first draw IIRC it surely isn't if you only consider a single draw to come, in which case the 20% equity is totally spot on (there are precisely 9 spades that make the best hand and 45 unseen cards).
LLCoolDave is offline   Reply With Quote
Old 05-13-2008, 02:52 PM   #4
old hand
 
Join Date: Jul 2005
Posts: 1,309
Re: Badugi calculator available

Yes, this is based on one draw right now, I will be updating it to support multiple draws eventually. This will work by allowing you to specify the highest card rank you will keep, e.g. if drawing 1, what is the worst badugi you will stand on. If drawing 2, what is the worst 3 card hand AND what is the worst badugi you will keep? You will be able to set these separately for the 2nd and 3rd draw.
RubbishCards is offline   Reply With Quote
Old 05-13-2008, 08:12 PM   #5
schoolmarm
 
Join Date: Sep 2002
Location: Los Angeles, California
Posts: 13,990
Re: Badugi calculator available

Quote:
Originally Posted by DeathDonkey View Post
Badugi sim, 1000000 trials:
Dead cards: none

Hand 0: Ah 2c 3d -- : EV 20.0% - WIN/LOSE/TIE %: total 20.0/80.0/0.0 - badugi 20.0/0.0/0.0 - 3 cards 0.0/80.0/0.0 - 2 or 1 card 0.0/0.0/0.0
Hand 1: Kc Qs Jd Th : EV 80.0% - WIN/LOSE/TIE %: total 80.0/20.0/0.0 - badugi 80.0/20.0/0.0 - 3 cards 0.0/0.0/0.0 - 2 or 1 card 0.0/0.0/0.0

These hands should be close to 50/50,
Indeed they should:
1-35/44*34/43*33/42 =
1-0.49418605 = 0.50581395.
Assuming the Kc Qs Jd Th hand stands pat, the Ah 2c 3d nb hand has to draw. ("nb" is any non-badugi card). There's about a 50.6% probability the
A,2,3,nb hand will make a badugi in three draws.
Quote:
its clearly wrong in some way.
Agreed.

badooooogi!

Buzz
Buzz is offline   Reply With Quote
Old 05-13-2008, 08:13 PM   #6
schoolmarm
 
Join Date: Sep 2002
Location: Los Angeles, California
Posts: 13,990
Re: Badugi calculator available

Quote:
Originally Posted by LLCoolDave View Post
DeathDonkey: As far as I understood the post the calculator only calculates equity for a single draw. While a horrible pat badugi is around 50:50 to a one card draw before the first draw IIRC it surely isn't if you only consider a single draw to come, in which case the 20% equity is totally spot on (there are precisely 9 spades that make the best hand and 44 unknown cards).
fixed your post.
Buzz is offline   Reply With Quote
Old 05-13-2008, 08:17 PM   #7
schoolmarm
 
Join Date: Sep 2002
Location: Los Angeles, California
Posts: 13,990
Re: Badugi calculator available

Quote:
Originally Posted by RubbishCards View Post
Yes, this is based on one draw right now, I will be updating it to support multiple draws eventually. This will work by allowing you to specify the highest card rank you will keep, e.g. if drawing 1, what is the worst badugi you will stand on. If drawing 2, what is the worst 3 card hand AND what is the worst badugi you will keep? You will be able to set these separately for the 2nd and 3rd draw.
I think it's neat that you're trying to do this.

Death Donkey thinks it's impossible, and he's usually correct.

I don't know if there's some way around the dilemma or not. Seems at least very difficult to me.

Good luck.

Buzz

badooooogi
Buzz is offline   Reply With Quote
Old 05-13-2008, 08:26 PM   #8
old hand
 
Join Date: Jul 2005
Posts: 1,309
Re: Badugi calculator available

Surely the twodimes sim for 2-7 draw is only doing 1 draw also? Otherwise how does it know what you're going to keep between draws?

Either way, it's useful for me even only doing 1 draw right now. I am terrible at doing all the math by hand and I don't yet have a feel for the equity values when it comes to things like 2 card draws vs 1 card draw, or multiway hands, which I imagine must be a real pig to figure out manually.
RubbishCards is offline   Reply With Quote
Old 05-13-2008, 09:00 PM   #9
schoolmarm
 
Join Date: Sep 2002
Location: Los Angeles, California
Posts: 13,990
Re: Badugi calculator available

Quote:
Originally Posted by RubbishCards View Post
Surely the twodimes sim for 2-7 draw is only doing 1 draw also? Otherwise how does it know what you're going to keep between draws?

Either way, it's useful for me even only doing 1 draw right now. I am terrible at doing all the math by hand and I don't yet have a feel for the equity values when it comes to things like 2 card draws vs 1 card draw, or multiway hands, which I imagine must be a real pig to figure out manually.
The problem is, when you start with
A,2,3,nb, you're more or less planning on making three draws (assuming you miss on the first two).

You can maybe get an approximation that would be useful by assuming Hero will draw three cards, only needing one of them to be one of the nine non-pairing spades not held by Villain (assuming Villain has a badugi).

I'm not sure how you could do that and come close to the true 50.6% probability, or even to 51%.

But you have to somehow account for three draws for the badugi calculator to be very useful.

Note that 1-0.80*0.80*0.80 = 0.488. In other words, if you take the 80% result for Villain and cube it (because there are three draws), you're just a couple of per cents off the true value.

I don't know if you can do something with that, perhaps refine it in some way, or not.

Buzz
Buzz is offline   Reply With Quote
Old 05-13-2008, 09:27 PM   #10
Pooh-Bah
 
Join Date: Sep 2002
Location: People's Republic of Texas
Posts: 4,327
Re: Badugi calculator available

Quote:
Originally Posted by Buzz View Post
Death Donkey thinks it's impossible, and he's usually correct.
It's not impossible; in fact, it's fairly straightforward. All that is needed is to assign each of the sim's agents (players) a value for what they will draw to, and stand on, for each round. The sim will already come close to doing this when it selects its discard(s).
Phat Mack is offline   Reply With Quote
Old 05-13-2008, 10:07 PM   #11
old hand
 
Join Date: Jul 2005
Posts: 1,309
Re: Badugi calculator available

Quote:
But you have to somehow account for three draws for the badugi calculator to be very useful.
Well right now it's like a holdem calculator that only handles equity on the turn. Obviously it will be better if it does preflop and flop, but it's not like you ONLY care about preflop.

I would think it would be most useful when you can do the sim over 2 draws, for cases after the first draw when you have a lot more information for putting people on hand ranges. On the first draw, you're making your betting decision based on betting action only, you don't actually know for sure if anyone is pat until the next round.

Quote:
It's not impossible; in fact, it's fairly straightforward. All that is needed is to assign each of the sim's agents (players) a value for what they will draw to, and stand on, for each round. The sim will already come close to doing this when it selects its discard(s).
Yes that is exactly what I intend to make it do. It's going to be a little bit trickier than just comparing hands and seeing who wins because deciding which card to discard gets a little bit dicey in cases where a hand contains 1 or more pairs and a mish-mash of different suits. It's very easy to make a small mistake here and screw up the results.
RubbishCards is offline   Reply With Quote
Old 05-13-2008, 10:29 PM   #12
Carpal \'Tunnel
 
DeathDonkey's Avatar
 
Join Date: Feb 2004
Location: Scottsdale
Posts: 10,545
Re: Badugi calculator available

My bad I downloaded it this morning before going to sleep and didn't read carefully or understand I guess. It would be very cool to have a simulator that functionally works for all 3 draws, but off to a good start!

-DeathDonkey
DeathDonkey is offline   Reply With Quote
Old 05-14-2008, 12:40 AM   #13
enthusiast
 
Join Date: May 2007
Posts: 63
Re: Badugi calculator available

Quote:
Originally Posted by Buzz View Post
fixed your post.
Except you didn't. There were no discards or dead cards selected in the example so there are 45 unknown cards. Maybe the poor guy was only dealt 3 cards, or maybe he just blindly discarded his 4th card when looking down on A23? Who knows? We obviously don't.
LLCoolDave is offline   Reply With Quote
Old 05-14-2008, 08:43 AM   #14
schoolmarm
 
Join Date: Sep 2002
Location: Los Angeles, California
Posts: 13,990
Re: Badugi calculator available

Quote:
Originally Posted by LLCoolDave View Post
Except you didn't. There were no discards or dead cards selected in the example so there are 45 unknown cards.
Hi Dave - I understand. However, Hero has to have been dealt four cards.

He's only keeping three of them, but there has to be that fourth card he's discarding.

Anything else is illogical.
Quote:
Maybe the poor guy was only dealt 3 cards,
Not logical.
Quote:
or maybe he just blindly discarded his 4th card when looking down on A23? Who knows? We obviously don't.
Since we can see four cards in hand A and three cards in the hand B, obviously a fourth card in hand B must have been discarded.

Nothing else makes sense. (Think about it).

And although we don't know specifically what the discarded card is, it doesn't really matter. We presume it's not one of the nine non-pairing spades that are still unseen. (Otherwise, why would Hero be drawing - and if it is one the the nine non-pairing spades, then Hero is drawing for one of eight cards).

Buzz
Buzz is offline   Reply With Quote
Old 05-14-2008, 10:43 AM   #15
enthusiast
 
Join Date: May 2007
Posts: 63
Re: Badugi calculator available

Quote:
Originally Posted by Buzz View Post
Hi Dave - I understand. However, Hero has to have been dealt four cards.

He's only keeping three of them, but there has to be that fourth card he's discarding.

Anything else is illogical. Not logical.
Since we can see four cards in hand A and three cards in the hand B, obviously a fourth card in hand B must have been discarded.

Nothing else makes sense. (Think about it).

And although we don't know specifically what the discarded card is, it doesn't really matter. We presume it's not one of the nine non-pairing spades that are still unseen. (Otherwise, why would Hero be drawing - and if it is one the the nine non-pairing spades, then Hero is drawing for one of eight cards).

Buzz
Nothing else makes sense within the logic of the game, yes, that's true. However it is the responsibility of the calculator user to specify dead and discarded cards as there is no way the calculator can know how many cards have been discarded before that situation came up. Thus it obviously takes all remaining 45 cards as possible outcomes and therefore yields the correct 20% winning chance, even if that figure is bound to be wrong under any actual game situation.
LLCoolDave is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 04:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2008-2010, Two Plus Two Interactive