Go To Jail

Jail-DebtsThe simulator has been improved to model the mechanics of Monopoly Jail. The Player  class has a method that sends player objects to jail and, on their next turn, selects a strategy to leave jail (paying $50, rolling doubles, or playing a “Get Out of Jail Free” card). The game flow has been improved accordingly to allow players who are in jail to spend several turns there, where they must roll and wait for doubles (if they so choose).

Human Players

Human players select a strategy to leave jail (pay, roll, or card) by considering the state of the game. If most properties are unowned, then players opt to leave jail quickly to buy properties. In this situation, most players pay (or use a card, if liquidity is an issue).

In contrast, human players choose to roll the die and idle in jail for as long as they can if most of the other players have monopolies. In this circumstance, jail provides a temporary respite from expensive visits to these properties.

The Simulator

Currently, the simulator uses a simple logic to get a player out of jail. A “Get Out of Jail Free” card is played, if available. Otherwise, the player pays the $50 fee as soon as possible. Players who cannot afford the fee roll the die until they can leave jail.

This fixed strategy is not ideal because it is agnostic to the state of the game. Unlike human players, the simulated players do take into account the dangers of moving around the board when they choose how quickly to leave jail.

Simulated players lack a method that allows them to examine the board, considering whether the current layout of monopolies and unowned properties makes it advantageous to leave jail expeditiously. (This method will also be useful for other types of strategizing, like deciding whether or not to purchase a specific property.)

A future improvement to the simulator will involve the creation of such a method, making the decision to get out of jail a rational response to the state of the game.

Python Monopoly

Many years ago, a friend and I were discussing Monopoly strategy (as one does, of course) when we came to a disagreement. He believed that the best players are risk-seeking: they buy as many properties as quickly as possible, always teetering on the edge of bankruptcy. I believed (and I still do) that the best players are risk-averse: they buy cautiously, saving their money to buy superior properties and make all their payments.

I don’t know who is right (though my money is on me), but I know that the way to find out is to collect data. Ideally, we would have risk-seeking players and risk-averse players compete in thousands of games and see which type of player does better than the other. Unfortunately, a Monopoly game lasts about 1,000 hours (not really, but doesn’t it feel like it sometimes?) so this little experiment would take a very long time to conduct.

Thankfully, computers can give us the next best thing. A computer program could simulate a Monopoly game between risk-seeking and risk-averse players thousands, if not millions, of times and determine which type of player does best. Such a program does not currently exist, but I am in the process of writing one in Python to figure it out. I’m not a software engineer so this program may be beyond my ability, but I’m going to give it a shot.

This blog will document my attempt to build this simulator (the code for which is hosted on GitHub). Part of it will deal with the technical hurdles, but most of it will discuss my thought process as I grapple with how to capture the complex human psychology involved in a game of Monopoly in a few lines of code. So should we seek or avoid risk to be the best Monopoly players? Let’s find out.