## A simplified poker game

This example originates from An introduction to Bayesian Networks

Consider a simplified poker game with the following rules:

Each player receives three cards and is allowed two rounds of changing cards. In the first round you may discard any number of cards from your hand and get replacements from the pack of cards. In the second round you may discard at most two cards.

The various types of hands are classified in the following way (in increasing rank): nothing special, 1 ace, 2 of the same value, 2 aces, flush (3 of a suit), straight (3 of consecutive values), 3 of the same value, straight flush.

The following Bayesian belief network can calculate the propability of you having the best hand after the two ronds of changing, based on the number of cards your opponent has discarded and an assumed strategy of the opponent:

The nodes OH0, OH1 and OH2 represent the opponents hand initially, after the first change (FC) and after the second change (SC) respectively. MH represents my hand before the bidding starts. Note that we have exact knowledge of the state of this node, so the initial distribution is not important.

Of course the propabilities of the various states of OH2 depend on the presumed strategy of the opponent.

In the network enclosed in the installations of HUGIN, the following strategy for the opponent is assumed:

- If nothing special, then change 3.
- If 1 ace, then keep the ace.
- If 2 of consecutive values or 2 of a suit or 2 of the same value, then discard the third card.
- If 2 of a suit and 2 of consecutive values, then keep 2 of a suit.
- If 2 of a suit and 2 of the same value or 2 of consecutive values and 2 of the same value, then keep the 2 of the same value.
- If flush, straight, 3 of the same value or straight flush, then keep it.

Now you can enter the states of FC, SC and MH and get the propability of you having the best hand.

This network has been installed on your computer with the Hugin software. Open the network in Hugin (Note: not all browsers can open Hugin directly). You can find the network in the directory where you installed Hugin (eg. C:/Program Files/Hugin/Hugin Light/Samples).

You can also find the samples at the Hugin download area.

| HUGIN Expert A/S | , 1998

Back