Computers are very fast and always getting faster. Instead of simulating 1,000,000 jai alai games, why not simulate 10,000,000 or more for greater accuracy? Even better, why not simulate all possible games?
In fact, there are only a finite number of possible ways that jai alai matches can unfold. Inherent in the Spectacular Seven scoring system is a tree of possibilities, the first few levels of which are shown here. The root of the tree represents the first point of any match, player 1 versus player 2.
Each node in the tree represents a possible game situation. The left branch of each node means the lower-numbered player wins the point, whereas the right branch of each node means that the higher-numbered player wins the point. The leaves of this tree correspond to the end of possible games, marking when the winning player has just accumulated his seventh point.
The top of the tree representing all possible outcomes of the first four points.
In such a tree, each path from the root to a leaf represents the sequence of events in a particularjai alai game. Forexample, the leftmost path down the tree denotes the outcome in which player 1 wins the first seven points to claim the match. Afterappropriately weighting the probability of each path (short paths are more likely to occur than long ones) and adding these paths up, we can compute the exact probability for each of the possible outcomes.
In fact, I once got e-mail from a fellow at Digital Equipment Corporation (DEC) who had built such an exact search program. His program built
the complete tree and analyzed all the possible outcomes in only a few seconds! Compaq, the leading personal computer manufacturer, recently bought out DEC in a multibillion dollardeal – presumably to get hold of this proprietary jai alai technology.. . .
Why is the program so fast to play all possible jai alai matches? Be-cause there are not so many possibilities. Moser built a program similar to that of the DEC guy and found that this game tree had only 422,384 leaves, ordifferent possible sequences of events, even when factoring in the complicated tiebreakerrules. The number422,384 is small in a world of computers that can process billions of instructions per second. A typi-cal run of our Monte Carlo simulation played one million random games.
This meant that we were playing many possible sequences more than once and presumably missing a few others. The net result is more work for the simulation.
So if brute-force evaluation is faster and more accurate than Monte Carlo simulation, why didn’t we use it? The primary reason was laziness.
Getting the brute force program to work efficiently and correctly would have required more time and intellectual effort that the naive simula-tion. We would have to reimplement all of those messy tiebreaking rules, which didn’t seem like fun. Further, we would have to be careful to do our probability computations correctly, which requires more intricacy than the simple accumulations of the Monte Carlo simulation.
The reason we could get away with this laziness is that the Monte Carlo simulation is accurate enough forourpurposes. It measures the probability
A portion of the tic-tac-toe game tree, establishing that x has a win from the position at the root of the tree.
of each betting outcome to within a fraction of a percent of its actual value.
Forexample, ouroriginal simulation results agreed with Moser’s complete evaluation to within 0.05% on each win-place-show entry. Any betting system that required finer tolerance than this would not be in a position to make much money in the real world, and there is no reason to lull ourselves into a false sense of security by overoptimizing one aspect of our system.
I’ve always intended to build a brute-force evaluator, but our time always seemed betterspent putting in more effort into the statistical analysis and modeling.
The idea of constructing a tree of all possible sequences of moves is the foundation of programs that play games of strategy such as chess. To evaluate which of the current moves is the best choice, the program builds a tree consisting of all possible sequences of play to a depth of several moves.
It then makes a guess of the value of each leaf position and percolates this information back up to the top of the tree to identify the best move.
If such a program could build the complete tree of possibilities for a given game, as Moserdid with jai alai, that program would always play as perfectly as possible. The game tree for tic-tac-toe is small enough to be easily constructed; indeed, a portion of this tree proving x has a win from a given position fits on a page of this book. On the otherhand, the game tree forchess is clearly too large everto fit in any imaginable computer.
Even though the computerDeep Blue recently beat the human champion Gary Kasparov in a match, it is by no means unbeatable. The game of Go has a game tree that is vastly bigger than that of chess – enough so that the best computerprograms are no match fora competent human.
When playing games, it is always important to pick on somebody your own size.