Texas Hold-Em AI
Hi,
I've just finished a poker game it went fairly well.
I am wanting to now write a Texas Hold-Em game where the player can choose 1-4 opponents(computer).
I was wondering if anyone had some tips for the AI part of this game figuring out the opponents hand should not be a problem, but making them "think" about what they and whether to raise/bid/fold leaves some to be desired.
I thought about googling texas hold-em winning odds, and trying to base some of the AI off that.
But any other suggestions are welcome.
Thanks
I wrote up a proposal on this for a company a few years back.
There is a chart out there where some researchers ran millions of hands of TH'em and calculated the base winning odds of the first two cards. Obviously you have a 13x13 grid x2 for suited or unsuited. You should use that as your starting spot so the AI can decide whether to bother staying in after the first deal or not. For example, if he is dealt a 2,9 unsuited, he needs to bail.
After that, you may want to dip into some Bayesian math so each player can hold a belief about what the player is holding and how to deal with it. Even just having a continual indicator of whether or not you think the player's hand is strong or weak based on what's on the board and how the player acts will give you a start.
Anyway, if you want to do it right (i.e. realistic AI), Texas Hold'em... or any type of poker... is a bitch.
There is a chart out there where some researchers ran millions of hands of TH'em and calculated the base winning odds of the first two cards. Obviously you have a 13x13 grid x2 for suited or unsuited. You should use that as your starting spot so the AI can decide whether to bother staying in after the first deal or not. For example, if he is dealt a 2,9 unsuited, he needs to bail.
After that, you may want to dip into some Bayesian math so each player can hold a belief about what the player is holding and how to deal with it. Even just having a continual indicator of whether or not you think the player's hand is strong or weak based on what's on the board and how the player acts will give you a start.
Anyway, if you want to do it right (i.e. realistic AI), Texas Hold'em... or any type of poker... is a bitch.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
/Me googles Bayesian math
O.K. this is going to be way out of my league, my math skills are not very good to begin with.
I think it would be simpler to make a multiplayer(real person) version heh.
Thanks
O.K. this is going to be way out of my league, my math skills are not very good to begin with.
I think it would be simpler to make a multiplayer(real person) version heh.
Thanks
Quote: Original post by loachmanDon't give up so easily. Use a simple AI to start with, and then you can do some research and keep replacing your AI with better versions.
/Me googles Bayesian math
O.K. this is going to be way out of my league, my math skills are not very good to begin with.
I think it would be simpler to make a multiplayer(real person) version heh.
Thanks
this is really odd, because my friends and I just started playing poker and I just started thinking about writing an AI for it. I have a few ideas, but it seems like it will be non trivial. Right now im just writing little calculators, for instance a rational betting checker, which will tell me what the likelihood of someones bets are based off their cards vs bluffing. but again there is not reason they cannot "bluff the bluff."
I will posit this. If you know how the poker program works, then their is probably a way to gain an advantage from it.
I will posit this. If you know how the poker program works, then their is probably a way to gain an advantage from it.
Interesting FunkyMunky will def look into it more.
Ibebrett that would be great.
Thanks
Ibebrett that would be great.
Thanks
If you want it very simple, you can just have each player count the number of "out" to make a good hand and generate pot odds which forms the basis of further betting. If a player has a 20% odds of making his hand (i.e. 1 in 5), any betting where he stands to win more then than, he will play.
Confusing? Probably but use this link :) http://www.flopturnriver.com/start_pot_odds.html
-Sturla
Confusing? Probably but use this link :) http://www.flopturnriver.com/start_pot_odds.html
-Sturla
I'm a bit crazy over the stuff and it might be a lot more complicated than what you need here, but why not write a neural network to learn when to fold and when to play?
It is a perfect place to use them.
Inputs would be the cards dealt, the bets the other player makes, the cards on that are being shown, what the other player's cards end up being. Outputs would be how much to bet and if it should play. The fitness on this one is easy, how much did it lose or how much did it win.
Have the computer play itself for a few days and you'll have a super smart poker player.
It is a perfect place to use them.
Inputs would be the cards dealt, the bets the other player makes, the cards on that are being shown, what the other player's cards end up being. Outputs would be how much to bet and if it should play. The fitness on this one is easy, how much did it lose or how much did it win.
Have the computer play itself for a few days and you'll have a super smart poker player.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement