Monopyly

A Python framework to allow AI algorithms to compete at playing Monopoly

This project is maintained by richard-shepherd

Sequence of Events in a Turn

Standard events

A turn has the events below. For each event, the Monopyly framework will call into methods defined in PlayerAIBase. You can override any of these methods in your AI to provide your own custom handling of them.

Buying properties and auctioning

When you land on an unowned property, you are given the option to buy it via the landed_on_unowned_property() method. If you choose to buy it, the money will be taken from you and you get the property.

If you choose not to buy the property, it is put up for auction. Auctioning is done by getting 'sealed bids' from each player via the property_offered_for_auction() method. The highest bidding player gets the property, and pays £1 more than the second-highest bid (like an eBay auction).

Events when money is taken from a player

Whenever money needs to be taken from you, the sequence of events below is followed. This happens, for example, if you need to pay a fine or when you are buying properties or houses.

Note that when buying properties, you do not get to mortgage properties during the landed_on_unowned_property() method itself. Instead, if you choose to buy the property, the sequence of events above will then take place, and you get to mortgage at that point.