# Punto Banco - 1

In August 2012, Phil Ivey, one of the world's most respected and hugely successful poker players, played a game called Punto Banco at a casino in London. He won about £8 million over two days. He noticed some flaws in the printing on the back of the cards that were dealt and used this to his advantage. The casino found out about this and refused to pay. Phil Ivey says he did nothing wrong and the casino must pay out. The argument went to court and in the end, the casino did not have to pay out the money!

All gambling games in casinos favour the casino. That means that in the long run, a casino should always make money from the players. Punto Banco, the preferred game of James Bond, is one such game and makes an ideal choice for modelling. We are going to investigate this game and try to predict how well a casino will do over the long term by getting the computer to play thousands of hands for us. If we can model Punto Banco, there's nothing stopping us looking at all kinds of other games, such as roulette.

How do you play Punto Banco?
We can't model anything unless we are crystal clear how it works. Punto Banco is a game of chance. There are only two players, and they are called the Bank and the Player. Gamblers like Phil Ivey have to decide which one of these two players they think will win, or if they think a draw will happen. The game is very mechanical. There are no choices to be made by people as cards are dealt to a strict formula, as we will see. It's also worth noting that these rules do vary slightly from casino to casino but these are the rules we will follow.

* The aim of the game is to get a total of 9.
* A casino will typically shuffle six packs of cards and put them in a dealing device called a 'shoe'.

* The Player and the Bank both get two cards each (Player first, then the Bank, then the Player again and the last card goes to the Bank), which are dealt face up, so everyone can see the cards.
* You add up the cards for both the Player and the Bank to get their totals.
* 10 and picture cards count as 0. An ace counts as 1.
* You only count the last digit of the total.

Examples
3 + 5 = 8
Jack + 4 = 4
5 + 7 = 2 (The total is 12, but remember, you only count the last digit.)
King + Jack = 0
10 + 6 = 6 (The total is 16, but remember, you only count the last digit.)
6 + 9 = 5 (The total is 15, but remember, you only count the last digit.)
Queen + 9 = 9 (A total of 9 is the top hand in Punto Banco and is also called a 'natural'.)
2 + 6 = 8 (This is the second-best hand and is also called a 'natural'.)

* Next, a third card might be dealt to the Player. This is done strictly in accordance with the following table.

 Player Player has a total of: 0, 1, 2, 3, 4, 5 Player must take another card 6, 7, 8, 9 Player must stick with the cards they have.

* Next, a third card might be dealt to the Bank. This is done strictly in accordance with the following table.

 Bank Bank has a total of: 0, 1, 2 Bank takes another card regardless of what the Player has. 3 Bank must take another card if the Player has any total except 8. 4 Bank must take another card only if the Player has a total of 2, 3, 4, 5, 6 or 7 5 Bank must take another card only if the Player has a total of 4, 5, 6 or 7 6 Bank must take another card only if the Player has a total of 6 or 7 7, 8, 9 The Bank must stick with what they have.

The winner of a hand is the one whose final total is closest to 9. If both hands have the same total then it is a draw.

Payout
After a hand, the gamblers who bet on whether the Bank or Player or a draw would happen are paid:

* If you bet on the Player winning, you get your bet doubled. So if you bet £100 on the Player winning and they won, you would get £200 back.
* If you bet on the Bank winning, you get your bet back plus you win 95% of what you bet. So if you bet £100 on the Bank winning and they won, you would get £100 + £95 = £195 back.
* If you bet on a draw, you get your bet back plus you win 8 times what you bet. So if you bet £100 on a draw, you would get £900 back.

It might seem complicated to start with, but it's very mechanical and after a few games and following the tables above, it soon becomes clear how to play. If you are still a little unclear, watch some YouTube videos of the game being played, but as mentioned before, remember that the rules can change very slightly from casino to casino, although the main thrust of the game doesn't.

What we are going to do
We are going to model Punto Banco. Then we are going to see if we can win against the bank and how well the bank will do, how long it might take the bank to win all of our money and what we might change to put the odds more in our favour.