Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Poker Game AI

Author
Message
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Mar 2009 17:21
I have no idea how to make one, ne ideas? btw its texas hold-em if it matters
Code eater
18
Years of Service
User Offline
Joined: 17th Feb 2008
Location: Behind You!
Posted: 16th Mar 2009 20:16
hey,,,

well,,, if I were you, I would start off with a simpler card game such as fish, uno, that kinda thing. Texas hold'em is a very complicated game.

Thanks,,,

Codeeater
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 16th Mar 2009 21:00
i think the dot your looking for is a period ..... lol


and i agree that is a very complicated game (not to crush your idea )

New Site! Check it out \/
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Mar 2009 23:27
i realize its complicated, but i had a system worked out in my head for (i thought) everything, but i started coding and i realized i didnt think of one yet

ive kinda got an idea worked out but its long and drawn out so i wont type it. I would still love to get some suggestions tho
Caleb1994
17
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 16th Mar 2009 23:48
ok

well i have never done a poker game but in my head it sounds like you would need to check against all the variables of the game, like how much money you need to bet to stay in, how much is already bet, what hand do you have (if any), how much money you have left. and off of that you would make your disition (like a human lol) first of all like if you don't have enough money you fold that kinda stuff is easy. not sure how to code the actions though

New Site! Check it out \/
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 17th Mar 2009 00:10
i was thinking compare how good of a hand you have against the chance of some1 else beating you and turn it into a percent chance then do something similar to this:



this may seem confusing, especially if you arent experienced in texas hold-em, but basically if they dont fold it figures out if they should call (move# if less than half the requirred amount) or they bet (a ratio is figured between half the requirred amount and move# and they bet this amount times the call)
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Mar 2009 00:23
@That1Smart Guy

Maybe to start, knock out the mechanics that always apply. For example:
Is it a new game or an active game?
Can/should the deck be shuffled?
How many players are active at any given time?
Are there any computer opponents?
How do you deal the cards?
Who's turn is it?

If you can get the program to run through the ability of dealing out cards to who should get them, and any other card placement rules, then start thinking about what declares a win. Not talking about bluffing, but what hands win over other hands. Make a ranking of the lowest to the highest hands. Assign a point value to each hand. Maybe three of a kind is worth 10 points and 2 of a kind is worth 8 etc. Also rank according to the actual face value. Maybe start with that. The face value has the first set of rankings and then add the additional points based on hand combinations. Say the face ranking was 1 to 13. Then the combination of hands starts at 14 and up. So if 2s were worth 1 point, and a pair is worth 14 points, then the total score for a pair of 2s is 14+1+1 = 16 and the total for a pair of aces would be 14+13+13 = 40 . The highest set of points for a hand wins. And the computer players can calculate their hand strength as more cards are layed out.

After setting up the ranking, then turn to the strategy based on betting. Mechanics out of the way first:
How much money to enter a game?
Does the player have enough money?
How much money does the player have?
Minimum bet amounts?
What actions can be made?
When is another card dealt?
Is the game over?

Strategy:
Based on what is visible and what a computer player has in it's hand, what is the probability of winning? After that calculation, decide the logic of a computer player. If it has a 40% chance or higher of winning, does it bet heavy, or check, or what? Will it always throw in the towel if it has less than a 50% chance of winning? If it decides to stay in the game based on a percentage of chance of winning, compare the players that are betting with the amount of their bets and how much money they have and how close the game is to over. If you want to get fancy, then you can create tables of how the players bet, how often they fold, how often they win and lose, and create statisitical analysis to figure out the likelyhood of them playing a certain way based on the current situtation. But that could be later... for now, get the mechanics and the ranking down and some general betting based on the percentage probability of winning.

Enjoy your day.
That1Smart Guy
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 17th Mar 2009 00:30
very nice latch, although u must have alot of free time to type long messages like that.

that is one route i hadnt thot of, taking the chance of winning and using that directly to determine wat they should do.

I was trying to take the chance of winning and making that the chance of them playing at all

Login to post a reply

Server time is: 2026-07-22 00:40:30
Your offset time is: 2026-07-22 00:40:30