Search the Blog

Monday, October 6, 2014

Dominating Monopoly!?

No Princesses in jail, either.

Has there ever been a time when playing a board game like Monopoly that requires you to roll the dice, where you wonder "How will my roll change the game"? You might roll poorly and land on an opponent's space. You might roll perfectly, letting you buy the property or space you want. You might even roll poorly, land on a Chance space, then be sent to your original wanted destination!

And we thought that Contra was hard.
These phenomenon, and the probability to land on certain spaces, can be derived by the use of Markov Chains. In programming (and economics, and even statistics) a Markov Chain is a technique that describes the chances to move from one state to another. There is often a predictable pattern, however it also has a chance to not move to the next state and instead remain in the current state. For example, a Markov Chain for a baby might include actions such as sleep, eat, cry, and play. The baby could start in the sleep state and, depending on the weights associated with our chain, will either enter a hungry (eating) state, enter an awake (crying) state, enter a cheerful (playing) state, or remain in the sleep state itself.


So, how can one apply this to a board game like Monopoly? You can create a 40x40 matrix that determines the chances of moving from one space to another, because after all that is what the chain would do itself. Certain cards make probability of moving from squares more likely such as a card that sends you to the nearest Railroad, or directly to jail. Speaking of Jail, it is essentially the "pit" of the game board: More cards and actions are likely to send you to jail than any other spot on the board, making the spaces AFTER jail more likely to be landed on!


Markov chains can be used for a variety of situations, and are nice to use in AI programming when you want your entities to have a somewhat predictable behavior. Just be sure to include a Markov chain for once they are dead, too.

The living dead have a strange affinity for pixel blocks, too!