Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-12-2007, 01:44 PM   PM User | #1
UrBluffingme
New to the CF scene

 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
UrBluffingme is an unknown quantity at this point
Need a Poker Odds Calculator for My Site

Hey Guys,
I have a few questions regarding writing the code for a Poker Odds Calculator in Actionscript. I know a lot of people take slack for coming in here with questions like, "How do I write the code for....." If you think this falls in that category, ignore me. I can take a hint.

I want a standard interface where a user can choose how many players are involved in the hand, what their cards are, and the ability to calculate odds for preflop, then for a specific flop, turn and river. First, is it even a viable option for a novice programmer with limited experience (but a solid fundamental understanding) of PHP and Actionscript to undertake this type of project?

Second, where do I start?

Last, are there programmers here who would be able to do this and if so, can you PM me to discuss?

Sorry, for the total newb question that I know completely sounds like "homework." But I swear it's not.
UrBluffingme is offline   Reply With Quote
Old 03-12-2007, 08:22 PM   PM User | #2
phoenixshade
Regular Coder

 
Join Date: Feb 2007
Location: near Washington, DC
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
phoenixshade is on a distinguished road
Well, it's not completely unreasonable from a programming standpoint, but you'd better also understand the complexities of probablility, and be ready to deal with a lot of factorals and powers. I assume by "odds" you mean odds of winning the hand... not just odds of getting a specific hand (which is far easier... fewer variables). This can get very complicated in terms of reducing it to an algorithm, especially when you have like four or six players in the hand. Gets even worse if you want to include more than one type of game.

I believe you that it's not homework. No programming instructor would by so diabolical as to assign something this mathematically complex...

If you don't know the math, I'm sure there are places on the internet where you can find it broken down. I could do it, but it would literally take me all day (or maybe two) to turn it into a general algorithm that a program could be based on.

Best of luck. Just wanted to let you know what you're in for. Beware of people with misconceptions that this is an easy task.
__________________
— Wilford Nusser
Validate Your Code: (X)HTML CSS
An HTML Email is NOT a Web Page: HTML Email Guide (1.2Mb pdf) Webmail CSS Support
REGEX: Brought to you by Psychotic Crack-Smoking Monkeys
phoenixshade is offline   Reply With Quote
Old 03-19-2007, 01:44 PM   PM User | #3
rodericj
New to the CF scene

 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rodericj is an unknown quantity at this point
Macintosh

I'm also looking for a similar solution. I've written a brute force technique but for those who don't know Hold'em, its a 5 level for loop and for 4 people is in the ballpark of 44!/39! * 4 or about 521 million hand calculations. Its not exactly accessible in any reasonable time.

I really feel like you need to intelligently find the hands that will help you out, i.e. what are the odds that the person pulls a flush when the other guys don't, or something like that.

First off, I'm doing this in Java, I don't know much about actionscript in terms of threading, but one option I'm exploring is doing the process in a separate with a random sampling of cards instead of the for loop idea, this will avoid local maxima (i.e. if 3 suited cards are on the flop) and I can update the percentage display with a more up to date prediction while the players are betting.

Well, like I said, I'm implementing this now, so I'll check back on this thread when I'm done to see what type of comments people have posted.
rodericj is offline   Reply With Quote
Old 03-20-2007, 01:33 PM   PM User | #4
rodericj
New to the CF scene

 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rodericj is an unknown quantity at this point
Done. I think its best to get an estimation of the odds for the hands unless you know some other way. I'm wondering if on TV they render the odds AFTER the game has been played. Anyway, an estimation should be good enough for most cases I would think.
rodericj is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 02:45 AM.


Advertisement
Log in to turn off these ads.