Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   programming question: I'm writing a simple odds-calculator... (http://archives1.twoplustwo.com/showthread.php?t=550771)

WutRUTryin2Hit 11-20-2007 05:10 PM

programming question: I\'m writing a simple odds-calculator...
 
Hi guys,

I want to program a simple odds-calculator program, largely because I am learning a new language and this seems like a decent little test project to learn the basics. I was just wondering, how do most of these work, I used to assume they just went through every possible outcome (of what cards come on the board) and came up with the percentage, but it seems like pokerstove maybe does it differently and just does a zillion random tests. What's the best way to do this, what's the standard?

TheCutter 11-20-2007 05:15 PM

Re: programming question: I\'m writing a simple odds-calculator...
 
Pokerstove mostly uses the enumerate-option that goes through all. There are libraries that can do this for you.

WutRUTryin2Hit 11-20-2007 05:29 PM

Re: programming question: I\'m writing a simple odds-calculator...
 
Ah ok. Libraries sound cool, but I'm doing this in php so probably there aren't I'd assume.

Adrian20XX 11-20-2007 05:43 PM

Re: programming question: I\'m writing a simple odds-calculator...
 
Enumeration is used in the normal scenarios, and Monte Carlo (simulation) is mostly used when there are multiple players with random cards.

Check this thread, you'll find plenty of code and ideas.

http://forumserver.twoplustwo.com/showfl...part=1&vc=1

Regards ...


All times are GMT -4. The time now is 02:10 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.