Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Other Topics > Programming

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 08-02-2012, 11:15 AM   #1
old hand
 
quux's Avatar
 
Join Date: Feb 2010
Location: limp/stabbing nits to death
Posts: 1,499
Batch/Command Line Hand vs. Range on Flop Equities?

I received some excellent replies in a thread I made looking for hand vs. hand preflop equities, which lead to this fast prototype:

http://www.pho7o.com/poker/equitutor/

Now I'm leading toward changing things a bit, implementing the same basic idea in that thread but instead of hand vs. hand I wanted to do hand vs. ranges and eventually hand vs. hand ranges OTF.

The program pokenum.exe, which I used for the first project, does a good job of doing things like hand vs. hand on the command line but are there any command line/batch tools that can handle this?

My intention is ...instead of having my code generate a scenario and monte carlo the calculation to evaluate the student's answer, I'm merely going to come up with like 3-4,000 of the most common scenarios, run the calcs, output the results to a flat file and access it randomly.

Again, thanks much in advance!
quux is offline   Reply With Quote
Old 08-02-2012, 02:08 PM   #2
adept
 
Join Date: Apr 2010
Location: Deep end of the player pool
Posts: 733
Re: Batch/Command Line Hand vs. Range on Flop Equities?

check out coding the wheel if its still up. lots of good info on how to build calculators there. Some info on some not so good stuff too, but just ignore that
myNameIsInga is offline   Reply With Quote
Old 08-02-2012, 07:34 PM   #3
old hand
 
quux's Avatar
 
Join Date: Feb 2010
Location: limp/stabbing nits to death
Posts: 1,499
Re: Batch/Command Line Hand vs. Range on Flop Equities?

That looks to be all libraries and things I can plug into other code. Useful, if I've got no other choice, but does anyone know of anything that's stand-alone, an executable for PC or an app for Mac, where coding knowledge is not necessary?

I mean, I could likely figure this all out, I do have some coding experience, it's just a lot of time I'd rather not spend if I can avoid it.
quux is offline   Reply With Quote
Old 08-04-2012, 04:28 AM   #4
veteran
 
█████'s Avatar
 
Join Date: Mar 2008
Location: █████
Posts: 3,114
Re: Batch/Command Line Hand vs. Range on Flop Equities?

See http://forumserver.twoplustwo.com/45...luation-65605/. PokerStove sells/sold a command-line program for this, and you can/could use HoldemRanger with an AHK script. Don't know if any of these options are still availble.
█████ is offline   Reply With Quote
Old 08-04-2012, 06:31 AM   #5
adept
 
Join Date: Apr 2010
Location: Deep end of the player pool
Posts: 733
Re: Batch/Command Line Hand vs. Range on Flop Equities?

I think propokertools has a commandline alternative as well, thats not open source though
myNameIsInga is offline   Reply With Quote
Old 08-04-2012, 06:20 PM   #6
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK
Posts: 9,155
Re: Batch/Command Line Hand vs. Range on Flop Equities?

As I said in the other thread, I AHK'ed Holdem Ranger for this. It is however unnecessary, you already have all the information you need
_dave_ is offline   Reply With Quote
Old 08-05-2012, 10:13 PM   #7
old hand
 
quux's Avatar
 
Join Date: Feb 2010
Location: limp/stabbing nits to death
Posts: 1,499
Re: Batch/Command Line Hand vs. Range on Flop Equities?

Quote:
Originally Posted by _dave_ View Post
As I said in the other thread, I AHK'ed Holdem Ranger for this.
Unfortunately it looks like HR is no longer available. Looked in a few spots I suspect it would be in, no luck.

Quote:
Originally Posted by _dave_ View Post
It is however unnecessary, you already have all the information you need
I'm not sure what you mean by this. My apologies in advance; what I know, I know well but the things I don't know, I have a real steep learning curve, the point where I might not even know where to start, or what is being implied.

I guess what I'm saying is that I'm not being obtuse, I'm just not entirely clear what you're suggesting.

Having said that, I've been giving it some thought...

As near as I can tell, all the existing calculators are bits of code that need to have wrappers put around them to be used. The first iteration of this software is going to be web-based (thin client) to work out the kinks and UI, done with PHP and there seems to be no libraries to accomplish this in PHP. Therefore, my only option here is to write one msyelf.

Upside: Dynamic, infinite problem set
Downside: Lots of work

So I started thinking about if I could flat file a few thousand examples and work off that (as I mentioned in OP). Using your advice, I could probably learn AHK and run it over Pokerstove, tho it would require learning the AHK scripting.

Upside: Not much
Downside: Not inconsiderable learning, finite problem set

So THEN I started thinking if there was a way to use my hand vs. hand flat file to calculate equity vs. ranges and I may or may not have come up with a solution, albeit with a margin of error.

Let's take the example of AJ vs. a couple of different hands.

vs. AA = 9.01%
vs. TT = 43.68%
vs. 22 = 48.67%
vs. 92 = 67.55%

But without whipping out an equity calculator like PS or Equilab, how can we evaluate our odds vs. a range consisting of all of these hands?

If we weight each of the odds by the number of hands which can exist (ie, since we hold AJ, there's only 3 ways to make AA), we find:

( (9.01 * 3) + (43.68 * 6) + (48.67 * 6) + (68.49 * 16) ) / ( 3 + 6 + 6 + 16 ) = 54.0958

...which is awful close to the correct answer of 53.61%, off by 0.49%.

Upside: I know how to code this now
Downside: Infinite problem set

Since what I have in mind is a tutor, and accuracy within 3-4% is quite acceptable, I have two questions:
  • Is my method sound and
  • is a 0.5% or even 1% error acceptable for this task?
Thanks much in advance.
quux is offline   Reply With Quote
Old 08-05-2012, 10:21 PM   #8
old hand
 
quux's Avatar
 
Join Date: Feb 2010
Location: limp/stabbing nits to death
Posts: 1,499
Re: Batch/Command Line Hand vs. Range on Flop Equities?

After writing all this, I realized that my solution will help with hand vs. range pre but obviously not be useful for hand vs. range OTF, which is the ultimate goal.

Today has been full of fail.
quux is offline   Reply With Quote
Old 08-06-2012, 01:05 AM   #9
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK
Posts: 9,155
Re: Batch/Command Line Hand vs. Range on Flop Equities?

The last option is what I was getting at. I think you likely introduced the 0.5% error yourself, probably by combining suited and offsuit but I haven't checked your math, just a guess. I got very accurate results using that method.

However, if you're wanting to do stuff on the flop, yes you're buggered with this method. similarly for using suitedness approximations o and s, since h/c/d/s become important on a flop too - unless you were going to do As7x on Tx9s8s type things.

What you need for such calculations is a proper evaluator. I can't remember specifically since this is spread out across a few threads - but I would first see if it's feasible to have a "RayW /2+2 evaluator" run on an android, if not look at one of the others.
_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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 01:59 AM.


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