Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 03-07-2017, 02:27 PM   #1
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Help with counting outs app

I want to build an app to help people practice counting outs. I need help with the algorithm. The algorithm will calculate the number of outs.

This is how the application will work. It will deal a pair of cards for two players, and then it will generate a flop. The user will be prompted to enter the number of outs. Then the application will tell the user if they are correct, but if they are incorrect the application will provide the correct number of outs.

I tried searching on 2+2, and PokerAI. Can anyone provide me with an algorithm in java, or in pseudocode to count the outs? Thanks.
%eax is offline   Reply With Quote
Old 03-07-2017, 03:50 PM   #2
just_grindin
Pooh-Bah
 
Join Date: Dec 2007
Posts: 4,308
Re: Help with counting outs app

Do you want an equity calculator or? How are we defining "outs" exactly?

Sent from my SM-G900R4 using Tapatalk
just_grindin is online now   Reply With Quote
Old 03-07-2017, 03:57 PM   #3
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by just_grindin View Post
Do you want an equity calculator or? How are we defining "outs" exactly?

Sent from my SM-G900R4 using Tapatalk
An out is a card that can come on a future street(s) that can give you the best hand. This includes backdoor outs, hidden outs and chopping outs.
%eax is offline   Reply With Quote
Old 03-07-2017, 04:00 PM   #4
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Definition of a hidden out:

Hero: AQ
Villian: 55

Flop: JJT
Turn: 7

If the River is a Ten, that would be a hidden out, because you would have the better kicker and win the hand.
%eax is offline   Reply With Quote
Old 03-07-2017, 04:00 PM   #5
just_grindin
Pooh-Bah
 
Join Date: Dec 2007
Posts: 4,308
Re: Help with counting outs app

Quote:
Originally Posted by %eax View Post
An out is a card that can come on a future street(s) that can give you the best hand. This includes backdoor outs, hidden outs and chopping outs.
I'm familiar with the definition of an out in its various forms but you'll have to be more specific when dealing with computers.

So what do you want to return? A number?

What if 30 cards in the deck result in a chop? What if we're currently tied and all cards result in a chop?

How are you representing back door outs if they rely on the previous card to hit? Say an 8 is only an out for me if a 7 hits on the turn?
just_grindin is online now   Reply With Quote
Old 03-07-2017, 10:45 PM   #6
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by just_grindin View Post
So what do you want to return? A number?
Yes, I would like an int.

Quote:
Originally Posted by just_grindin View Post
What if 30 cards in the deck result in a chop? What if we're currently tied and all cards result in a chop?
Then I think the program should say that there are zero outs.

Quote:
Originally Posted by just_grindin View Post
How are you representing back door outs if they rely on the previous card to hit? Say an 8 is only an out for me if a 7 hits on the turn?
Yeah, this one is tricky. In Owen Gaines book he says that if you're going to see both the turn and river (we can make this assumption), you can add an extra out for every backdoor draw. It's also possible to have multiple backdoor draws, so you can add one out for each backdoor draw.

I am not that good at counting outs. I am reading Owen Gaines book Poker Math that Matters, and that is where I got the idea for this project. I am basically a jr-mid level web developer, and a micro donk so let me know if I am saying something incorrect. I am open to any suggestions that would make this app better. Thanks.
%eax is offline   Reply With Quote
Old 03-08-2017, 02:37 AM   #7
DarkMagus
Carpal \'Tunnel
 
DarkMagus's Avatar
 
Join Date: Jul 2007
Location: Vancouver, BC
Posts: 8,136
Re: Help with counting outs app

Why not just have users try to guess their equity? That's more important than some vaguely defined concept of "outs", and there are already libraries to calculate equity.
DarkMagus is offline   Reply With Quote
Old 03-08-2017, 08:18 AM   #8
just_grindin
Pooh-Bah
 
Join Date: Dec 2007
Posts: 4,308
Re: Help with counting outs app

Quote:
Originally Posted by DarkMagus View Post
Why not just have users try to guess their equity? That's more important than some vaguely defined concept of "outs", and there are already libraries to calculate equity.
Yeah this was at the heart of my questions.
just_grindin is online now   Reply With Quote
Old 03-08-2017, 08:32 AM   #9
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by DarkMagus View Post
Why not just have users try to guess their equity? That's more important than some vaguely defined concept of "outs", and there are already libraries to calculate equity.
You are right. I might try that. Thanks!
%eax is offline   Reply With Quote
Old 03-08-2017, 09:58 AM   #10
leavesofliberty
Pooh-Bah
 
Join Date: Jul 2010
Posts: 5,786
Re: Help with counting outs app

It doesn't sound like a very compelling app tbh.
leavesofliberty is offline   Reply With Quote
Old 03-08-2017, 10:26 AM   #11
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by leavesofliberty View Post
It doesn't sound like a very compelling app tbh.
i am not doing it to make money. I am primarily doing this to practice, jaxrs, javascript, angular 2, bootstrap, hibernate, and software architecture. I am hoping this will help me with poker as a side benefit.

Last edited by %eax; 03-08-2017 at 10:32 AM.
%eax is offline   Reply With Quote
Old 03-08-2017, 10:46 AM   #12
leavesofliberty
Pooh-Bah
 
Join Date: Jul 2010
Posts: 5,786
Re: Help with counting outs app

Quote:
Originally Posted by %eax View Post
i am not doing it to make money. I am primarily doing this to practice, jaxrs, javascript, angular 2, bootstrap, hibernate, and software architecture. I am hoping this will help me with poker as a side benefit.
Still, nobody cares what kind of engine a car has if it doesn't have a good body to look at. I'd think of a better idea for an app. Maybe a bargaining game if you still want to wow them with the mathz.
leavesofliberty is offline   Reply With Quote
Old 03-08-2017, 11:15 AM   #13
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by leavesofliberty View Post
Still, nobody cares what kind of engine a car has if it doesn't have a good body to look at. I'd think of a better idea for an app. Maybe a bargaining game if you still want to wow them with the mathz.
What do you mean by a bargaining game? I am open to suggestions.

My goal is to build my first database driven website implemented completely by myself using a cutting edge java based stack. This app will allow me to do that, and I will also be able to use it to practice learning how to calculate poker equity. I will build out my suite of poker apps as I learn more about poker. The website will become more technical, and more visually appealing after the first iteration.

I plan on building websites for businesses (hopefully i can parlay that into a side business), and using some machine learning algorithms for poker and solving enterprise problems. Big data, data science, and AI are my primary interests right now. I think I want to get into Hadoop after I feel like I have mastered web development.
%eax is offline   Reply With Quote
Old 03-08-2017, 12:36 PM   #14
leavesofliberty
Pooh-Bah
 
Join Date: Jul 2010
Posts: 5,786
Re: Help with counting outs app

Quote:
Originally Posted by %eax View Post
What do you mean by a bargaining game? I am open to suggestions.

My goal is to build my first database driven website implemented completely by myself using a cutting edge java based stack. This app will allow me to do that, and I will also be able to use it to practice learning how to calculate poker equity. I will build out my suite of poker apps as I learn more about poker. The website will become more technical, and more visually appealing after the first iteration.

I plan on building websites for businesses (hopefully i can parlay that into a side business), and using some machine learning algorithms for poker and solving enterprise problems. Big data, data science, and AI are my primary interests right now. I think I want to get into Hadoop after I feel like I have mastered web development.
Meh, I think it's a decent idea. I take it back. There's also a lot of personal benefit to going down the poker/compsci rabbit hole. My other idea was something like a "Let's Make a Deal" spin-off or something marketable in the phone game industry.
leavesofliberty is offline   Reply With Quote
Old 03-10-2017, 04:30 PM   #15
DarkMagus
Carpal \'Tunnel
 
DarkMagus's Avatar
 
Join Date: Jul 2007
Location: Vancouver, BC
Posts: 8,136
Re: Help with counting outs app

I think it's a good idea for an app. It's not really different than any other kind of flash card app someone might make for studying stuff like math, history, music etc.
DarkMagus is offline   Reply With Quote
Old 03-14-2017, 10:16 AM   #16
Xsaa
newbie
 
Join Date: Mar 2017
Posts: 29
Re: Help with counting outs app

You deal two random hands A, B and a flop.
Then determine which hand is the favorite on flop, let's say A > B.
Then iterate through all other cards left in the deck and increment counter whenever B > A when accounting for 4 cards board.

Things to consider: You have to keep doing the first and second steps in case when it's a tie from flop onward or if some hand flop the other one dead.

Hope that helps.
Xsaa is offline   Reply With Quote
Old 03-14-2017, 11:23 AM   #17
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by Xsaa View Post
You deal two random hands A, B and a flop.
Then determine which hand is the favorite on flop, let's say A > B.
Then iterate through all other cards left in the deck and increment counter whenever B > A when accounting for 4 cards board.

Things to consider: You have to keep doing the first and second steps in case when it's a tie from flop onward or if some hand flop the other one dead.

Hope that helps.
Thanks. That would work, but I was looking for a more efficient algorithm. I think I might build a different app.
%eax is offline   Reply With Quote
Old 03-14-2017, 11:52 AM   #18
Xsaa
newbie
 
Join Date: Mar 2017
Posts: 29
Re: Help with counting outs app

You're welcome. What I suggested is actually called "enumerate all" poker evaluation algorithm which is as efficient as you can get when evaluating single hand vs hand.
Xsaa is offline   Reply With Quote
Old 03-16-2017, 10:58 AM   #19
leavesofliberty
Pooh-Bah
 
Join Date: Jul 2010
Posts: 5,786
Re: Help with counting outs app

poker-eval library is your friend.
leavesofliberty is offline   Reply With Quote
Old 03-20-2017, 05:13 PM   #20
Pahvak
centurion
 
Pahvak's Avatar
 
Join Date: Dec 2008
Posts: 135
Re: Help with counting outs app

I have made a similar app that let's you guess equities: https://play.google.com/store/apps/d...okerquiz&hl=en

It's not flashcard based as it actually generates the hands and calculates equities. You can specify ranges too.
Pahvak is offline   Reply With Quote
Old 03-20-2017, 07:57 PM   #21
%eax
newbie
 
Join Date: Jan 2013
Location: NoVA
Posts: 33
Re: Help with counting outs app

Quote:
Originally Posted by Pahvak View Post
I have made a similar app that let's you guess equities: https://play.google.com/store/apps/d...okerquiz&hl=en

It's not flashcard based as it actually generates the hands and calculates equities. You can specify ranges too.
That's nice. I would install it if there was one for the Iphone.

Quote:
Originally Posted by leavesofliberty View Post
poker-eval library is your friend.
That's in C. Thanks, but I'm not fluent with C. I want to do something with Java. I don't think I'll continue with this idea. I have another idea to improve my coding skills. It won't be poker related for now.
%eax is offline   Reply With Quote
Old 03-20-2017, 08:23 PM   #22
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,295
Re: Help with counting outs app

poker-eval has a Java interface
_dave_ 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


Forum Jump


All times are GMT -4. The time now is 11:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2008-2010, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online