Loki-2 can decide what action to take either using PTs or selective sampling simulations. This section discusses the use of the PT generation function as the betting strategy of the program. Selective sampling simulations are discussed in Chapter 5.
Every time Loki-2 has to act in a game, it calls the PT generation function and selects its action based on the PT returned. The choice is made by generating a random number in the range 0.0 - 1.0. For example, assume our hand and the current information about the state of the game is given to the PT function and it returns the triple [0.1, 0.65, 0.25]; if the random number is less than 0.1 Loki-2 folds, if it is less than 0.75 Loki-2 calls, otherwise Loki-2 raises. A single random number is generated at the beginning of each hand and used every time it is necessary to select an action in the game. The random number is kept constant, because it defines Loki-2's level of aggressiveness in that game. If the random number is high then Loki-2's probability of betting or raising in the game increases and thus Loki-2's playing style is more aggressive. Loki-2's aggressiveness should be consistent throughout a hand, because it is not a good idea to bet strongly early in the game only to give up later. A good player does not normally invest a lot in a hand and then fold easily in the next round. Using a single random number keeps Loki-2's style fixed in a game. However, varying the random number from game to game makes it more difficult for the opponents to create an accurate model of Loki-2 over a session.
The use of the PT generation function as Loki-2's betting strategy adds unpredictability to Loki's play. Unpredictability is a requirement to play strong poker, because if the opponents recognize a playing pattern then they are able to make better informed decisions. For example, if an opponent realizes that Loki will bet just with a very good hand ( ) then the opponent will fold when faced with a bet by Loki. The result is that Loki's winnings will be smaller. Using PTs to randomly select a betting action allows the program to vary its play over time, even in identical situations, making it difficult for opponents to predict the behavior of Loki-2 and to exploit its weaknesses.