7. Opponent Modeling

In strategic games like chess, it is acceptable to assume that the opponent is perfect because that assumption does not result in a significant loss in performance for the algorithm against weaker players. Opponent modeling has been attempted in two-player games as a generalization of minimax but with limited success [5] [9]. In contrast, not only does opponent modeling have tremendous value in poker, it can be the primary distinguishing feature between players at different skill levels. If a set of players all have a comparable knowledge of poker fundamentals, the ability to alter decisions based on an accurate model of the opponent may have a greater impact on success than any other strategic principle.

Having argued that some form of opponent modeling is indispensable, the actual method of gathering information and using it for betting decisions is a complex and interesting problem. Not only is it difficult to make appropriate inferences from certain observations and then apply them in practice, it is not even clear how statistics should be collected or categorized.

This chapter describes opponent modeling in * Loki*. Using the
betting history of the opponents, it determines a likely
probability distribution for their hidden
cards which is used by the hand evaluation system. A minimal
system might use a single fixed model for all opponents in a given hand,
based on the cards played to the flop by typical players.
The system in place in * Loki* generates a model for each opponent and
maintains information between games. It is a simplistic first
approximation that takes specific observed information and transforms
it to a more useful form. However, this is sufficient to demonstrate
a significant performance improvement using only a simple analysis of context.

The first section discusses the representation of the model: the action frequencies for select decision categories and the weight array for all the possible two card holdings. The second section explains the learning system (how the weight array is determined and how the action frequencies are used for this). The final section discusses how the weight array is used in hand evaluation, in particular how the field array is calculated.