Tag Archives: probability

Mathematics Behind Battleship

Yesterday we looked into the mathematics behind board games and this inspired me to look into a game I used to play a lot as a child. At first I was unsure whether there is any mathematics involved in the game Battleships but after doing some research into this game, I came across some very interesting mathematical strategies to maximise ones chances of winning at Battleships.

For this investigations, let’s assume we play on a a 10 x 10 grid and there are five different ships. The ships have the lengths 5, 4, 3, 3 and 2. This means that the total number of squares covered by ships in the 100 square grid will be 5 + 4 + 3 + 3 + 2 = 17. Initially I thought there would be equal chances of getting a hit on each square. This would mean that the chances of a hit would be (17 / 100) x 100 = 17%. However after looking into the mathematics behind battleships, I discovered this not to be the case.

allAlemi (2011) presented his linear theory of battleships, stating that there is a greater chance of getting a hit closer to the centre of the 10 x 10 gird. He also stated that chances of getting a hit in the corners is least likely. The probabilities of getting a hit are shown on the diagram to the left. The darker the colour, the less likely a hit is and the lighter the colour the more likely a hit is. Chances of getting a hit in the centre is 20%, while there is only an 8% chance of getting a hit in the corners (Swanson, 2015).

I started to wonder why there is a greater chance of getting a hit in the centre of the grid. According to Alemi (2011) the reason for the differences in chances of getting a hit is due to the ways in which the ships can be laid out. In the corners the any ship can only be laid out in two different ways, while in the centre there are ten ways. This means that chances of getting a hit are much greater in the centre.

p1

When looking into strategies to win at Battleship further, I came across Nick Barry’s research. He uses a different technique to maximise chances of winning at battleships. By analysing the grid in terms of a checkerboard (left) he could increase chances of a hit. By only firing at either blue or white squares chances of getting a hit are maximised (Barry, 2011). This is because even the smallest ship has to cover two squares.

 

 

Future Practice

It would be very interesting to investigate which one of these two approaches, would result in the highest chance of winning at Battleships. This could be applied to my future practice, as students could carry out investigations and draw their own conclusions. Battleship is a game most children know and could create a relevant context for their learning.  Furthermore, this links to the fundamental concept of chance and probability. Therefore, Battleship could be used to reinforce these concepts.

References 

Alemi (2011) ‘The Linear Theory of Battleship’, The Physics Viruosi, 3 October. Available at: http://thephysicsvirtuosi.com/posts/the-linear-theory-of-battleship.html (Accessed: 1 December 2015)

Barry, N. (2011) ‘Algorithm for Playing Battleship’, DataGenetics, December. Available at: http://www.datagenetics.com/blog/december32011/ (Accessed: 1 December 2015)

Swanson, A. (2015) ‘The mathematically proven winning strategy for 14 of the most popular games’, The Washington Post, 8 May. Available at: https://www.washingtonpost.com/news/wonk/wp/2015/05/08/how-to-win-any-popular-game-according-to-data-scientists/ (Accessed: 1 December 2015)

Slot Machine Mathematics

In one of our lectures we looked at the fundamental concept of chance and probability. Applications of probability can be seen in many different areas, not just in mathematics. One example that came up during the input was the link of probability to gambling. Gambling is a widespread, popular and recreational activity (Fabiansson, 2010, p.1). This was something that I found particularly interesting and therefore, decided to find out more about the applications of mathematics in gambling by analysing slot machines.

While there are various different slot machines, I have decided to focus on the three slot machine with six different symbols in each piece. The symbols I have chosen (see below) are banana, orange, cherry, mellon, grapes and seven.

Screen Shot 2015-11-29 at 17.24.10

Before we look at the chances of specific combinations using these symbols, it is important to find the total number of different combinations. As there are three slots with six symbols in each, there must be a total of 216 combinations. This is because 6 x 6 x 6 = 216.

The payouts of this particular three slot machine is as follows:

Screen Shot 2015-11-29 at 17.02.43

 

Three sevens pays 30 coins.

 

Any three of the same fruit pays 10 coins.

 

Two sevens pays 4 coins.

 

One seven pays 1 coin (break even).

 

While there are 216 different combinations, not all of them are winning combinations. To calculate the number of winning combinations, Shore (2014) states that we must consider the following:

  • Three sevens is a winning combination and there is only one possible figuration for this.
  • Any three of the same fruit are winning combinations and as there are five different fruit. This means that there are five different winning combinations.
  • Two sevens is also a winning combination. This means that one slot will have fruit. Therefore the winning combination for this configuration is calculated by (1 x 1 x 5) + (1 x 5 x 1) + (5 x 1 x 1) = 15
  • One seven is also a winning combination. This means that the two other slots will have fruit. Therefore the winning combination for this configuration is calculated by (1 x 5 x 5) + (5 x 1 x 5) + (5 x 5 x 1) = 75

To find out the total number of winning combinations we must add 1 + 5 + 15 + 75 = 96

This shows that in this three slot machine there are 96 possible combinations which are winning ones.

Using this information it is possible to calculate the payoff percentage. This can be defined as the amount of money a slot machine should return to player over a period of time (Casinomanuel, 2015).  To calculate the payoff percentage of this particular three slot machine we must multiply the each winning combination with the corresponding about of coins it gives. Adding all these winning amounts together and dividing this by the total number of combinations will give the payoff percentage (Shore, 2014). This is shown by the following calculation:

((1 x 30) + (5 x 10) + (15 x 4) + (75 x 1)) / (6 x 6 x 6) = 0.995 (3 significant figures)

0.995 x 100 = 99.5 %

This shows that the payout percentage is 99.5% which is very high.

Future Practice

Finding out about probability and its uses in society will be useful for my future practice as a primary school teacher. Slot machines offer visual representation of probability. The use of this particular example needs to be carefully considered as gambling may be a rather controversial concept to use in the primary school setting. I really enjoyed finding out about the mathematics behind slot machines and think that visual representation are a great way to bring concepts such as probability closer to the students.

References

Casinomanual (2015) Percentage Payout. Available at:http://www.casinomanual.co.uk/online-casino-games/guide-to-slots/payout-percentage/ (Accessed: 29 November 2015)

Fabiansson, A. (2010) Pathways to Excessive Gambling : A Societal Perspective on Youth and Adult Gambling Pursuits. Surrey: Ashgate Publishing Limided.

Image 1. Photograph. Available at: http://www.modern-canvas-art.com/ekmps/shops/robboweb1/images/slot-machine-symbols-pop-art-canvas-print-4252-p.jpg (Accessed: 29 November 2015)

Image 2. Photograph. Available at: http://www.appcelerator.com.s3.amazonaws.com/blog/dev/platinoslot/mask.png (Accessed: 29 November 2015)

Shore, E. (2014) ‘Probability: Odds of Winning at Slot Machines’, Eddie’s Math and Calculator Blog, 7 January. Available at: http://edspi31415.blogspot.co.uk/2014/01/probability-odds-of-winning-at-slot.html (Accessed: 29 November 2015)