Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

Bridger writes "Poker software called Polaris will play a rematch against human players during the 2008 World Series of Poker in Las Vegas.
Developed by an artificial intelligence group at the University of Alberta in Canada, Polaris will be pitted against several professionals at the Rio Hotel between July 3rd and 6th. 'It's possible, given enough computing power, for computers to play "perfectly," where over a long enough match, the program cannot lose money,"' said associate professor Michael Bowling.'"

Any comp sci grad can write a "perfect" poker program that plays "optimally" with your definition of optimality and perfectionism, ie, ignoring bluffing. The trick to Poker, the reason why it is so appealing as an Artificial Intelligence benchmark is because it requires the AI to learn a particular players loosness/agressivness when they are likely bluffing etc. This is not only to try to determine what the other players have, but also to try to bluff to the other players what the AI has.

The truly optimum poker player will learn what the opponents have by observing their betting patterns over the course of many hands and learning their particular tendencies.

Pros may have an advantage against other humans (that they could read) but they wouldn't have any information advantage against an ideal computer player.

You have to understand: the ideal computer would not be predictable - it wouldn't always be choosing some "optimal" move in each situation. Rather, it would choose strategies probabilistically such that there is no strategy that would win against it over many hands.

Poker is complicated, but it can still be solved as a zero sum game [wikipedia.org] treating every possible

No. You are assuming that an optimal strategy would be deterministic. In fact it will be a mixed (probabilistic) strategy. The random mixing prevents the other side from determining your cards and style of play with high enough odds to beat you.

People who play mathematically optimum poker lose, because they are ignoring the information that is important: What cards does the opponent have?

Who says they're ignoring their opponents' cards? There's more to making optimal decisions than your own cards. I think the general idea is that while you cannot know exactly what your opponent is holding, you can put them on ranges of hands with certain probabilities and then factor that into your calculations. You could say for example that your opponent has a high pocket pair with 40% probability, a drawing hand with 25%, trips with 5%, and garbage with 30%. From there, it's a relatively straight-for

This is a very ignorant view of what optimal play means. The standard example is Rock-Paper-Scissors (RoShamBo). If I play perfectly randomly, and I tell you that I am going to play perfectly randomly, there is exactly nothing you can do to beat me in the long run.
This concept can be extended to poker (and all two player zero-sum games). For a computer to play truely optimal means that it can give you its exact strategy before the match and you still won't be able to beat it. A mathematically optimal play is still the same regardless of what the opponent has. Truely optimal play hides the true nature of the hidden cards from being able to be predicted by the opponent.
If, by "mathematically optimum poker", you mean immediate pot odds, then you are right. Its easily beatable, however that is certainly not what mathematically optimal poker is. I suggest reading "The Mathematics of Poker" (http://www.amazon.com/Mathematics-Poker-Bill-Chen/dp/1886070253), it will absolutely change your mind into how mathematics can be used.

One intelligent comment on this thread. We can model that with a Poisson distribution.

What was your tell? Translating "mathematically optimum poker" to "immediate pot odds". Optimum? Which optimum? You mean there's more than one? I fold.

OK, what you say is right, but it applies to two-person, zero-sum games. In multi-player games, no strategy is immune to collusion.

Let's refer to optimum play from the conventional game-theoretic context as the unbeatable strategy. Such a two person, zero-sum game such a strategy exists.

It's not necessarily an easy computation. It's a randomized strategy which can be computed before-hand. The U of A people are better are performing this computation.

Even so, they had to simplify the betting structure to make the problem tractable. This is the reason they chose Limit Hold'em. Fewer betting states, smaller game tree, exponentially faster solution time.

There is no particular challenge to No Limit, if the number of allowable betting states were similarly constricted. I think it would be hard to sufficiently constrict this, because strategy would vary as a function of chip stack for both competitors. Maybe it could be roughly interpolated.

As far as randomized play is concerned, the unbeatable strategy tends to be far more randomized than most humans. One expert who played against the U of A system a while back said that his first session was a nightmare until he learned that he couldn't bluff the computer out. The computer had a tendency to call aggressive betting. It expected highly randomized bids based on its own bidding structure, so didn't make a strong inference of strength when confronted by the behaviour.

What few seem to understand is that the unbeatable solution is entirely unlike poker. The unbeatable solution rarely wins. The unbeatable solution will often draw against strategies with glaring weaknesses. It won't ever be beaten, but it also won't maximize advantage of opponent's weaknesses.

Why not? Because it's impossible to take advantage of the weakness in an opponent without exposing yourself to a counter-measure where you would lose (you must stray from the unbeatable path). When you take advantage of a weak opponent, you do it on faith that the opponent is too dumb to spring the optimal counter-measure to your strategic adaptation.

The theory that U of A employs has far less to say about exploiting the weaknesses of your adversary. To do so requires exposing a weakness in your own strategy. How does the algorithm judge whether the exposed weakness is acceptable? Even poor human players can spot certain kinds of weaknesses quickly. There are other weaknesses an expert might not immediately spot. How does the program know which weaknesses are a risk against which players? It doesn't fall out of game theory, it's a matter of human cognition and psychology, and our model for this is far from complete.

One thing we need to include in this model is the incredible difficulty in explaining to most humans that winning in poker and not losing in poker are entirely different enterprises, with entirely different theoretical foundations. Commander Data has trouble assimilating that fact. 100 trillion brain cells and most of us can't reliably multiply a pair of two digit numbers. If computers had invented humans as part of a BI program (biological intelligence), humans would have been tossed aside as barely having achieved perfect game play at Tic-Tac-Toe. What use is 100 trillion brain cells that can't reliably compute a 15% tip after a heavy lunch? Many computers would like to know.

As computers became better at chess, chess as a human enterprise was somewhat devalued. Few of us wish to put the work into it that the modern theory requires.

I fear the same will soon happen with poker. As the elements of the unbeatable strategy become better known, the relatively inexperienced players can hunker down and not lose much money. They won't be able to win, either, because t

The optimal strategy in Rock/Paper/Scissors for head to head play is a guaranteed losing strategy in most multiplayer tournament. Randomly, uniformly distributed choices has an expected win percentage of 50% - no one expects to beat it and no one expects to lose to it in the long term. However, since humans can and do have patterns in their answers, some human players will detect and exploit these patterns to gain an advantage over their human opponents. As an extreme case, suppose that a player entered the

A more limited form of this is blackjack - although a machine doesn't know exactly what cards are going to come up, and doesn't know exactly what cards its opponents has, by using probabilities over the long-term, it can still beat the house.

Also, as cards in the deck are used up & the machine learns more about what cards have been used, it can make more precise calculations about what cards other people have or what might be coming up in the dra

actually, Java has been playing "perfect" poker (all variants) for years now. It's the clever new "Just-In-Time" virtual machines that make it possible, compiling and optimizing the program in real time."Poker face"? No problem with the latest Java 3d facial animation libraries.The end result is perfect play and code that runs (at least) 10 times as fast as that from a modern C++ compiler.Even the very best hand crafted assembler poker games can't reach a quarter of the speed of Java.

As I'm sure you know, the language (be it assembly, Java, C, etc.) doesn't matter. What matters is how well the compiler optimizes, since everything gets turned into assembly anyway.

By your comment and the context you are claiming that writing a program in hand-coded assembly is faster than writing the same program in Java and that this is true for all programs. That, sir, is one of the most asinine things I've ever heard. Hardly ever does even an expert assembly programmer do better th

Hehe, looking at all the posters replying to this, I guess they missed the joke. Java was slow at the beginning, but now it has spead up tremendously, sometimes even beating C++ at certain things. Parent has projected the "Java is slower than C++" that used to be so prevailent, and moved the bar up to "Java is slower than assembly"... making a joke that Java will never stop beating the languages that people say are faster than it.

Oh, yes, whatever. BTW, Common Lisp compilers have been able to compile code generated at run-time into native machine code for the past two decades.

The end result is perfect play and code that runs (at least) 10 times as fast as that from a modern C++ compiler.
Even the very best hand crafted assembler poker games can't reach a quarter of the speed of Java.

You need to take off those pink Java glasses. Unless you are truly trying to benefit from JIT optimization, e.g., by generating a genetic algorithm and

I think the point is that two of them facing off would end up with just as much money as they started with over the long run.

Of course if the pool of money is not unlimited, then in the short term one will pull ahead of the other, and can "win" through sheer random chance. This isn't really that hard of a concept, the idea is that if another player is playing slightly suboptimally, then against this computer and both with a limitless pool of money and playing forever, the computer will slowly but surely pull ahead of the flawed opponent. It does not mean the computer will win against the human players in Vegas for several reasons:

The pool of money is limited (and fairly small)

The playtime is finite and also fairly small

Human players can walk away from the table if they get a short term advantage (quit while you are ahead), I'm guessing the computer program doesn't do that

This reminds me of an old mathematician joke:

One day this guy is finally fed up with his middle-class existence and
decides to do something about it. He calls up his best friend, who is a
mathematical genius. "Look," he says, "do you suppose you could find some
way mathematically of guaranteeing winning at the race track? We could
make a lot of money and retire and enjoy life." The mathematician thinks
this over a bit and walks away mumbling to himself.

A week later his friend drops by to ask the genius if he's had any
success. The genius, looking a little bleary-eyed, replies, "Well, yes,
actually I do have an idea, and I'm reasonably sure that it will work, but
there a number of details to be figured out.

After the second week the mathematician appears at his friend's house,
looking quite a bit rumpled, and announces, "I think I've got it! I still have
some of the theory to work out, but now I'm certain that I'm on the right
track."

At the end of the third week the mathematician wakes his friend by
pounding on his door at three in the morning. He has dark circles under his
eyes. His hair hasn't been combed for many days. He appears to be wearing
the same clothes as the last time. He has several pencils sticking out from
behind his ears and an almost maniacal expression on his face. "WE CAN DO
IT! WE CAN DO IT!!" he shrieks. "I have discovered the perfect solution!!
And it's so EASY! First, we assume that horses are perfect spheres in simple
harmonic motion..."

Pit two of these 'perfect' players against each other, and one of them will lose money.

Over the long term, both would stay fairly close to even. Or, to put it another way, play is perfect if taking no different move is to your benefit. When both players play perfectly, it is a Nash equilibrium.

An interesting note, even though they are of equal skill, one will likely be in the lead for the vast majority of the time.

The summary is poor in that it says it is impossible for a perfect player to lose. Given ba

I would expect it's more because the first hand has to go someone's way, and then even if it went back the opposite way next hand, the other player was still in the lead for a while. But if one player has a couple of good hands and then they both keep winning one at a time then one of the players will still be 'ahead' that whole time. In perfect play in a limits game, I don't think the amount of money that a player has would make a difference..

professional poker is a psychological game. Unless the computer has the feeling of anxiety it will have an edge.

Well some might say that at a high enough level anxiety and tells just don't come into it, and professional poker isn't psychological at all. I don't think Brunson/Greenstein/etc get many nervous twitches (and I don't think you need to get to nearly that high a level before you reach that point)

professional poker is a psychological game. Unless the computer has the feeling of anxiety it will have an edge.

Poke is almost entirely a game of skill, not chance, at professional levels. The average dufus at his weekend poker game will play for luck. Professionals play the other players. A computer has no tells, and can't read them in a human player. The computer therefore has a distince edge against the amateur, and a distinct disadvantage against the pro.

What I find impressive is the fact it lost in the past. It would also be interesting to see what it can do with some sort of lie detector software.

The only lie detector that has any hope of working - as you should know, if you read/. - is a professional poker player.

I'm not sure you're entirely correct. Poker is a game of skill, yes, but so is chess. The difference is that poker is based on incomplete information whereas chess is not. That just means you have to play probabilities though.

The whole tells topic is important in professional poker for increasing your odds against flawed human players. That can give you an edge over the basic statistics. However, if you're playing a computer that doesn't have any tells, my intuition says that the game reduces to basic probability.

That means the computer, given enough computational resources to play a perfect game, can wipe the floor with amateurs, and will be more closely matched (but never at a disadvantage) with the best players.

That doesn't mean that the computer would be unbeatable. Since the game is based on probability, you could still beat the computer, but in the limit you could only expect to win as many games as you lost.

The computer would also be at a disadvantage if it were playing a game with multiple human players. A good psychological poker player could use his advantage over the other humans at the table to take a chip lead, which would be an advantage over the computer.

The whole tells topic is important in professional poker for increasing your odds against flawed human players. That can give you an edge over the basic statistics. However, if you're playing a computer that doesn't have any tells, my intuition says that the game reduces to basic probability.

The assumption here is that the computer has no tells. That is not a safe assumption. Most tells aren't about whether or not the guy licks the oreo on a bluff (Reference: Rounders), heart rate (a really good tell), pupil diameter, or galvanic skin response. They are about how an opponent plays in a particular situation. After a few rounds you get a feel for the types of starting hands a player will play, and their betting patterns. Unless the software opponent has each and every one of these actions randomized to a good extent, it will be read and played. "Perfect" poker software is not impossible, but it is a harder problem than it looks.

It's certainly a hard problem. Computers are VERY good at randomization though, and they can not only calculate the exact effect of a modified bet but they can also track precisely their opponent's betting history.

Yes, "perfect" play means something different in probabilistic games. A perfect chess player can't be beaten (unless there's a flaw in the initial conditions, like playing black). In a game like poker "perfect" means the computer can't be beaten in the long term, once all the statistical fluctuations even out.

No limit and multiple opponents might make the problem harder, even MUCH harder, but I don't see that either one introduces a factor into the game that would give a person an advantage over an arbitr

You don't seem to be getting it. A good poker player won't always play the same hand the same way, so he can easily fool a computer that is judging everything by what has happened so far. And the AI also has to be able to bluff and do slow play effectively otherwise the professional can just fold every time the computer raises. Poker is not a 'simple' game. The maths involved in calculating pot odds isn't that spectacular as all the pros can do it in their heads, so it obviously isn't just about that.

Software is actually at a disadvantage when it comes to playing poker at the professional level. A person can infer when another player has a read on her and adjust play to neutralize or take advantage of the opponent's confidence. This all becomes quite fuzzy and recursive when you try to emulate it in software. Sort of like the princess bride. "I know that you know that I know that you know that **TTL EXPIRED IN TRANSIT"

At the cheaper blinds though a software application could easily make money. I am

We're not so sure about that, though. Poker is a very complicated game incorporating not only mathematical betting and statistical odds but also the important skills of expectation, observation and learning, psychology and deception, intimidation and subterfuge.

So to break it down:

Expectation - This is a "statistical odds" issue.

Observation and Learning - Yes, and this is a program designed by the Machine Learning group at UoA.

Psychology and Deception - Deception is simply varying your play by making it pr

I'm not sure why anyone thinks this is such a feat. In LIMIT hold'em, bluffing, psychological aspects, and implied odds are diminished to the point of meaning next to nothing. It is almost a purely computational game. So, yes, a computer can play technically "perfect".

There are already poker "bots" out there that will play pretty much perfectly when it comes to Limit Hold'em. I'm not sure why this is so different.

I want to see this team of academics write some code that will beat a human at *No-Limit* Hold'em. Or maybe *Pot-Limit* Omaha. NEVER going to happen.

I don't care how well such a program is coded... it will absolutely buckle under the pressure of a professional who constantly bets half his stack on nothing. The machine would turn into a professional folding station that only plays AA, KK, or AK. Guess what? That strategy isn't winning any games or any period of time in a no-limit or pot-limit world.

I want to see this team of academics write some code that will beat a human at *No-Limit* Hold'em. Or maybe *Pot-Limit* Omaha. NEVER going to happen.

I don't care how well such a program is coded... it will absolutely buckle under the pressure of a professional who constantly bets half his stack on nothing. The machine would turn into a professional folding station that only plays AA, KK, or AK. Guess what? That strategy isn't winning any games or any period of time in a no-limit or pot-limit world.

This team of academics has written poker bots that play no limit and pot limit poker, and the bots are fairly decent at it. Doing a half stack bet frequently will most likely end up with the professional being busted out.

The same techniques would work for pot limit omaha. The only difference being that pot limit omaha is a bit more combinatorially complex.

I'm not sure why anyone thinks this is such a feat. In LIMIT hold'em, bluffing, psychological aspects, and implied odds are diminished to the point of meaning next to nothing. It is almost a purely computational game. So, yes, a computer can play technically "perfect".

There still exists a psychological aspect to a limit hold'em game, particularly at higher stakes.

But even at a 3-6 or a 4-8 table, I find a chance for a bluff oh, about once every four or five hours. It's not a big aspect of the game, but it's

'It's possible, given enough computing power, for computers to play "perfectly," where over a long enough match, the program cannot lose money," said associate professor Michael Bowling.'"
I don't think this statment is accurate. In poker there is no such thing as playing perfectly, you are in the end always left to chance to some extent. How could the above statement be true if it were pitted against several copies of itself? There is no way they could all play perfectly, if one is in the lead it means al

I play good enough Poker that I can take down money off of regulars at online poker sites(I've trained for thousands of hours), and I've toyed with programming poker bots. Even with a program that plays "perfect" Poker, it isn't guaranteed to even finish in the money. Look at this obvious situation: Poker bot gets "AA" in the beginning of the tournament, Joe Blow gets "KK", they both raise and re-raise each other until they're both all in. The pokerbot made the right play, and Joe Blow can't be faulted m

Make that hundreds of hours, not thousands. You know what I concluded from playing a lot of Poker? It is a waste of time even if you make money. You haven't helped the world out by doing anything. You just took the right to use more resources.

However you need to get some perspective. Do musicians, professional athletes, artists and moviestars for example really help the world or could we live without them?
And who needs the telephone booth cleaners anyway?

And if you leak your source code, anyone who knows they're playing against your bot will have a huge advantage.

No. Knowing the source code of an ideal poker program would do you no good. You can't win against an agent following the Nash equilibrium for a game. He's going to be choosing from a library of strategies such that for every complete game, whatever strategy you choose, the expected value of the game is zero.

Naturally such an ideal program is hard to write, but conceptually it's very simple - p

If I was playing a computer on the first hand I would go ALL in (and do it blind)....program would hopefully calculate my SIZE_OF_BALLS() variable as an out of bounds condition and give up. If that didn't work at least I'd be done and could go back to drinkin' in the casino bar.

I was hoping this wouldn't have to be said, but playing Poker isn't gambling if you play it properly. The house takes a small cut from each hand which reduces your winnings by a proportionally small amount, but otherwise it's like anything else requiring skill - over time, the best player will always win more money, and the worst player (skill-wise) will lose the most money.

For people who play professionally, or even amateurs who play often over several years, the chance aspect of the game disappears as the card distribution converges, and skill is all that is left to decide the winnings.

Over a career playing poker, there's just about the same chance/skill ratio as there is in chess.

the chance aspect of the game disappears as the card distribution converges, and skill is all that is left to decide the winnings.

Most poker players "play the man", and this element has a rock-paper-scissors aspect to it: "I know my opponent plays a certain way, I will take advantage of it". "I know that my opponent knows I play a certain way, I will take advantage of this." "I know that my opponent knows that I know..."

That makes the idea of skill as a measurable quality very slippery. I don't think you could accurately pinpoint "the greatest player" as you could for somebody like Kasparov in the chess world. There are certainly

I think the point the parent was trying to make was that Poker has variance, where Chess does not. Play poker for long enough and its purely a skill game (i.e. that bad beat you got early on will be evened out by a bad beat for your opponent later). However, in practice, few people have the many years to devote to poker to get to this point.
So any single game is a matter of luck, with lots of variance. Given a sufficient amount of time, the better player will win.

The online poker sites are already filled with "bots" that play statistically perfect poker. Or at least perfect enough to earn a profit over time.

It's not a terribly difficult calculation to know if a bet has sufficient pot odds [wikipedia.org]. Playing against imperfect players a bot is virtually garaunteed to make money.

Against professionals though it might have trouble winning, since pros also calculate pot odds more or less perfectly, but can change their play to throw off the computer. It's sort of akin to how a chess master might beat a computer.

You could be right, it depends on the poker AI. In chess everything is known so all possible moves can be calculated. But a chess player can disguise a strategy, causing a computer to calculate probable moves incorrectly. If it's done well the computer will makes moves to defend an attack that never comes. That's sort of a bluff.

I would think that the best poker AI does not try to anticipate what's in the player's hand based on what he does, but stays strictly with math based on known cards. The minute

Poker sites are not full of bots. The one I play at is full of terrible players who enjoy throwing their money away.

No bot plays perfect poker. I'm sure that no bot will be perfect for a very, very long time (way beyond my lifetime). The mathematics behind poker is incredibly complex. A good book about it is the mathematics of poker by Bill Chen and Jerrod Ankenman. From reading your post it seems to me that you have a very little idea about the problems with solving poker and even how to play poker. You can't just call when you have the odds and fold when you don't. It just doesn't work that way - that strategy is easily exploited. I'm also not sure why you were modded +5 Insightful... I guess there aren't many poker players here at/.

No offense, but you obviously don't understand poker very well. For example, unless the betting structure is very restrictive (e.g. heads up game with 2x BB stacks) a bot could not possibly play "statistically perfect poker" (an erroneous statement in itself) because it's a game of incomplete information. Perfect poker is only possible when you can see everyone's hole cards. Computers do not have any intrinsic edge in this regard.

But if I was running an online poker game I would make the house win like 50% of the time and a "player" which was another bot win 25% of the time leaving the other players to fight over the extra 25%. Also, if you control what comes out of the deck and who it goes to, it is not that hard to win

You obviously never play poker. There is no house player. The house doesn't have a hand. Only real people do. The house makes its money by a rake- they take a small percentage of every pot. So it doesn't matter who wins to them, so long as money is being bet.

Because Chess is a game of complete information, and is largely a matter of brute forcing out the best move from tons of choices.
Poker is a game of incomplete information (You do not know your opponents hand), as the decisions your opponent will make influence what the "correct" decision for you to make is.
Chess was a matter of computing power, whereas poker is a matter of implementing game theory abilities in the AI.

Because as they've said at their page [ualberta.ca] poker has a lot more applications to the real world later. this is all about making intelligent decisions with imperfect information. Chess can simply be brute forced eventually, just like checkers was.

Most 100%+ slots I've seen, in Vegas, stipulate that you only get 100% of your money back, "with perfect play". Which would mean the majority of people would still loose plenty of money. Besides, even if you did double your money on a 106% slot you'd probably blow it all on craps five seconds later anyway.

If the machine "loses" (assuming 100% utilization) less than $4/hour on average, they almost certainly come out ahead on amenities/drinks; family members and friends playing other games; people getting bored of the low-payoff slots and losing money on other games; etc. Slots are there partly to keep "non-gamblers" busy pulling a lever, while their acquaintances piss away larger sums.

Once the machine gives away around minimum wage or higher, you might start getting crazies and obsessives working it.

100%+ "pure" slot games aren't exactly common (because as you say, they will invariably lose you money). What is very common is 100%+ return poker machines or games with similar levels of user input, where the machines pay out more than 100% if you play 'perfectly', forever. Of course perfect play is often unintuitive and involves things like taking the safe bet rather than higher payout options - not something most people in Vegas are renowned for.

Actually, video poker machines with +100% payout are harder to come by than they used to be. There are actually websites out there where people track which machines have the best payouts. These are professionals who make their living (or a good portion of it) gaming the system.

Some of you are probably asking, "Why the FSCK would they make machines that payout more than they take in???"
It's mostly what the parent said. Most people don't play perfectly and therefore lose money playing. They make the payou

Of course perfect play is often unintuitive and involves things like taking the safe bet rather than higher payout options - not something most people in Vegas are renowned for.

its actually completely the opposite for most video poker games, such as throwing away a made flush (already a winner) that is almost a straight/royal flush --an example would be like KQJT2 all of clubs, the correct play is to give up the guaranteed win of a flush, and draw for the jackpot hands (royal and straight flush)

You are fundamentally mis-understanding the importance of variance. Try to think of it in the REALLY big picture of the long term. If I offer you a game you spin a wheel where the bet is $1000, and 999 out of 1000 times you will lose everything, and 1 time out of 1000 you will get paid $100,001 dollars, my game is now paying out OVER 100%. Now this is a simplified example, but almost NOBODY is willing to take those swings of variance for such a ridiculously small edge. The casino has almost unlimited amount