Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: headsonpikes
I can understand the random distribution of cards, but how does one account for betting strategies in such a program?

I just started. Right now I am thinking about making it multi player first (peer 2 peer). As for computer player, I didn't think about that yet, but I would imagine that it would work something like this.. (keep in mind that I am not a poker expert, but I do have a a holdem book somewhere laying around that I haven't read). I would have a function which would analyze the hand (look for pairs, 3 of a kind, straights, etc) So.. 1) Player gets 2 cards. They get analyzed for a pair, if no pair then the highest card, or for the same suit or for a potential straight, etc. Each of those possibilites would carry some kind of a score. So if you devise a point system you can figure out the computer's next action - ie, if the score is below, let's say 50 then check, if its 50 - 100 check, and if its 100 and up - let the computer raise. 2) 3 community cards are laid out. Now our hand is 5 cards. Using the same function we now analyze the 5 card hand and come up with a score. Once again, the computer's next action will depend on the hand's score. And so on. I don't know if that cleared things up for you a bit, but I admit that I am just brainstorming :). Ofcourse once there are 5 community cards and the player has 2, then you need to figure out the combinations of 5 cards out of 7. I think its 21, though I am not sure if I am remembering the formula correctly (it has been 3 years since I took discrete math). Then you gotta analyze all 21 hands and use the one that has the highest score. etc.

40 posted on 05/21/2003 9:23:46 AM PDT by BrooklynGOP
[ Post Reply | Private Reply | To 34 | View Replies ]


To: BrooklynGOP
It's 21. ;^)

"So if you devise a point system you can figure out the computer's next action..."

Multi-player doesn't have this problem, but a computer that plays and bets strictly according to the rules won't be much of a challenge. Hold 'em is a game of betting tactics and strategy - the cards are a means only. ;^)

In my experience, betting figures larger than probability in determining who wins - both hand by hand, and over the course of a session.

Good luck!
51 posted on 05/21/2003 9:49:36 AM PDT by headsonpikes
[ Post Reply | Private Reply | To 40 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson