Saturday, May 9, 2009

Dice Wars

I was almost completely unaware of the phenomenon of Flash Games until late last year when a friend of mine started working at a company that makes ads for them. I recently discovered the Dice Wars game which is a typical example of the genre. It is simple yet addictive. The basic premise is similar to the classic board game Risk. Unlike the board game however, the board is smaller, you can not transit armies, army placement is random, and games are much much quicker.

Although the dice layout is completely random, it is addicting because much of the game involved strategy of placement. New armies are awarded after each turned based on the largest connected set of game territories your armies control. As with Risk, you roll one die for each army and the sum of the faces for all N attacking dice is compared to the sum of the faces for all M defending dice with defenders winning the tie. Some quick R code can be used to compute the probabilities of winning a given attack given N attacking armies and M defending armies. The left column represents the number of attacking dice and the first row represents the number of defending dice. Each cell represents the probability of a successful attack given M vs N fair dice.






Dice123456
1.4167.0926.0116.00082e-050
2.8380.4437.1520.0358.0061.0077
3.9730.7786.4536.1917.0607.0149
4.9973.9392.7427.4595.2204.0834
5.9998.9879.9093.7181.4637.2424
6.999997.9982.97530.884.6996.4667

No comments:

Post a Comment