## 4 January 2012

### Markov analysis of Beetle

Having young kids, we seem to have a lot of games around the house at the moment. The geek in me starts looking at them as maths challenges. Beetle, by Milton Bradley, is a variant on the classic dice game. I was curious to use Markov chains to figure out the average game length, and which positions were closer to victory.

Basic rules:

• Take turns spinning the spinner to build a piece of the beetle
• 1/6 chance of getting the body
• 1/6 chance of getting the head
• 1/6 chance of getting one of two eyes
• 1/6 chance of getting one of two antenna
• 2/6 chance of getting one of six legs
• Must get the body before getting anything else
• Must get the head before the antenna or eyes

This allows for 71 states as depicted in the diagram below:

The 71x71 matrix is basically formed from the above diagram. There are three regions:

• no body
• body, but no head
• body and head

Within each region there are various combinations of legs or other pieces, as permitted. E.g. state 'A' has no pieces; state 'B' has a body, no head, and five legs; state C has a head and body, one antenna, two eyes and one leg; state 'D' is a completed beetle. Each successful spin moves either to the right or down (or 'out') to an adjacent state.

Result: 31.498 spins on average.

The following table shows the average number of moves remaining to victory from each position, sorted by moves remaining (hopefully the notation is self explanatory):

CombinationAverage turns to victory
b h e2 a2 l60.00000
b h e2 a2 l53.00000
b h e1 a2 l66.00000
b h e2 a1 l66.00000
b h e2 a2 l46.00000
b h e1 a2 l57.00000
b h e2 a1 l57.00000
b h e1 a2 l48.66667
b h e2 a1 l48.66667
b h e1 a1 l69.00000
b h e2 a2 l39.00000
b h e1 a1 l59.50000
b h e1 a1 l410.58333
b h e1 a2 l310.77778
b h e2 a1 l310.77778
b h a2 l612.00000
b h e2 l612.00000
b h e2 a2 l212.00000
b h e1 a1 l312.18056
b h a2 l512.33333
b h e2 l512.33333
b h a2 l413.11111
b h e2 l413.11111
b h e1 a2 l213.18519
b h e2 a1 l213.18519
b h a1 l613.50000
b h e1 l613.50000
b h a1 l513.70833
b h e1 l513.70833
b h e1 a1 l214.18287
b h a1 l414.27778
b h e1 l414.27778
b h a2 l314.33333
b h e2 l314.33333
b h e2 a2 l115.00000
b h a1 l315.26736
b h e1 l315.26736
b h e1 a2 l115.79012
b h e2 a1 l115.79012
b h a2 l215.95062
b h e2 l215.95062
b h e1 a1 l116.48650
b h l616.50000
b h l516.60417
b h a1 l216.66705
b h e1 l216.66705
b h l416.94097
b h l317.60417
b h a2 l117.89712
b h e2 l117.89712
b h e2 a218.00000
b h a1 l118.42943
b h e1 l118.42943
b h e1 a218.52675
b h e2 a118.52675
b h l218.63561
b h e1 a119.00662
b h l120.03252
b h a220.10700
b h e220.10700
b h a120.49312
b h e120.49312
b h21.76282
b l622.50000
b l522.53472
b l422.67014
b l322.98148
b l223.53286
b l124.36608
b25.49833
empty31.49833