Multiple Uses

There are more games of chess than there are atoms in the universe. That statement made me consider whether there was more than one way to apply a chess set than as normally prescribed, specifically in regards to determining whether a chess set could replace another board game for a mathematically equivalent experience.

The first board game my thoughts chose to challenge me with was Monopoly, and so I began embarking on a quest to first determine if it was even possible for every possible combination of a monopoly game board to be represented on a chess set. To maintain the integrity of my rationale, I decided to test out the conditions for a two player game of monopoly, as it could be argued that if this was possible, then a monopoly game of more people could than be represented by the corresponding version of chess that encompasses that number of people. For example, a four player monopoly game could theoretically be represented by a 4 player version of chess given that a two player game of monopoly can be represented using a standard chess set.

To calculate how many monopoly positions there are, I decided to do some math, and my thought process was applied as follows. If you would like to skip this process shown in {} the gist was multiplying all the different number of possibilities for each sub component of monopoly (position, money, chance and community chest card, and property ownership).

{

Total Permutations = ( p1Pos) * (p2Pos) * (p1$) * (p2$) * (chanceCards) * (communityCards) * (propertyOwn)

p1Pos = 40 possible states corresponding to 40 possible spaces

p2Pos = 40 as well

p1$ = I said 10,000 possible states since in no monopoly game I have played has anyone reached near this amount

p2$ = 10,000 as well

chanceCards = 16 cards

communityCards = 16 cards

propertyOwn = …

This was definitely the hardest variable for me to calculate. what makes it so weird is that there are 7 possible property levels (ranging from unowned to zero houses to three houses to a hotel) for 22 of the properties, and there are 6 other properties that have 2 levels of either owned or unowned (the railroads and utilities). In addition to this, I had to account for whether a property was owned by the first player or the second player.

Doing some slightly dubious mathematics I came up with a number of permutations of property ownership states of (13)22 * (3)6.

A quick reiteration of the above expression: 22 properties have 13 possible states and 6 properties have 3 possible states. The list below shows each of those states.

Normal Property

  1. Unowned       ————-          ————
  2. Player 1          0 houses          0 hotels
  3. Player 1          1 houses          0 hotels
  4. Player 1          2 houses          0 hotels
  5. Player 1          3 houses          0 hotels
  6. Player 1          4 houses          0 hotels
  7. Player 1          0 houses          1 hotels
  8. Player 1          0 houses          0 hotels
  9. Player 1          1 houses          0 hotels
  10. Player 1          2 houses          0 hotels
  11. Player 1          3 houses          0 hotels
  12. Player 1          4 houses          0 hotels
  13. Player 1          0 houses          1 hotels

Railroad or Utility

  1. Unowned
  2. Owned by Player 1
  3. Owned by Player 2

So, plugging in all of these values we come back to the original equation with:

Total = 40 * 40 * 10,000 * 10,000 * 16 * 16 * 36 * 1322

Therefore,

Total = 9.59049950015115 * 1040

}

With a very conservative estimate of the total number of chess positions being greater than 1050, I determined that it was theoretically possible to represent any game of monopoly through a chess board.

That being said, I had just cracked the surface of how I could use a chess set to represent something else. Up until now I had been only considering classically legal positions, and so I ran into a problem trying to construct a way to have the players roll dice in some analogous way using a chess set.

This issue plagued me, for as I began to see its impossibility, I realized the great number of games that used dice, and I began to believe perhaps my efforts would be unwritten.

By a great amount of luck however, I was inspired by the way computers generate random numbers, and I realized if I broke out of the mold of using chess pieces as they were intended, I could unlock the roll of a die.

So, I thought of tossing two pawns of differing colors into the air, and having whichever pawn landed the most right represent a digit in the binary system. If it was a black pawn, it would be a zero, and a white pawn would be a one. Now, using a representation scheme where a person would toss up the pawns say ten times, we could treat that as a decimal between zero and one with 10 binary “decimal” places. Once a sufficiently precise decimal is created, then I could utilize a simple random number generation algorithm of multiplying this decimal by the range of numbers I needed (from 2 to 12 is a range of 10) and adding two so that my random number started from two instead of zero.

Phrasing that last paragraph in the context of an example is critical, I feel, to properly demonstrating the possibility of this method. So, lets just say that after tossing up the pawns 10 times, a player got the following results

Pawn on the right : Black, White, Black, Black, Black, White, Black, White, White, Black

This would translate to .10111010012

Which in decimal would be 1/2 + 1/8 + 1/16 + 1/32 + 1/128 + 1/1024 = .7275390625

Multiplying this by 10, the corresponding number would be 7.275390625

Adding two to this would give 9.275390625

Rounding this to the nearest whole number would result in the player having artificially rolled a 9 on a dice.

In my calculations, I found that it was technically only necessary to have 5 tosses to be able to reach 12 (11.6875 rounded up), but to maintain a distribution more similar to what an actual dice roll provides, I feel that 10 tosses is a good number.

The interesting thing I found about this method however is that it does not properly achieve the distribution of dice rolls I had hoped would be possible. For that reason, I took a little bit more inspiration, this time from a technique called rejection sampling, and now the calculation of a dice roll is much simpler, and provides for a more dice consistent rolling as follows:

Use the same tossing method prescribed above, and come up with a binary number. If that number is within the desired range, then that is the equivalent roll, if it is outside the range, then restart the process. This would be done three times to simulate each die, meaning that this method requires six tosses at the least, and takes out much of the need for having a calculator. Some context:

Pawn on the right for toss set 1: Black, White, White

Translates to 1002

Which in decimal is four, so the player would have artificially rolled a four for the first dice.

The player would then proceed to repeat this process for the second dice.

The only case where some “complexity” arises is in a case out of the range, so for example:

Pawn on the right: Black, Black, Black

Translates to 1112

Which in decimal is 7, so the player would need to do a re-roll and restart the pawn tosses.

This method provides a more authentic game. Those of you who are a bit too interested in the methods I described above might have noticed that if I implemented some parts of the second method into the first, I could have created another artificial dice rolling method that would have the same percent chance of landing on a specific number as a real dice, but I decided not to do this due to the fact that the second method is simply much easier to implement during game play. If interested, code I used to simulate these two dice rolling methods is accessible by clicking here.

Now that I was much more open to configuring pieces in ways other than intended, I quickly moved through representing each component of the game I discussed towards the beginning.

I could create a distinguishable base 10 system using a piece (where pieces could lie down pointing to a certain direction) as follows:

  1. No piece                     = 0
  2. Piece pointing NE    = 1
  3. Piece pointing E       = 2
  4. Piece pointing SE     = 3
  5. Piece pointing S       = 4
  6. Piece pointing SW   = 5
  7. Piece pointing W     = 6
  8. Piece pointing NW  = 7
  9. Piece pointing N      = 8
  10. Piece standing up    = 9

The players positions could be represented by two pieces each, with the number corresponding to a square on the board, and 60 of the possible permutations not being used.

Using this system, money could be represented using four pieces for each player different colors to symbolize the different players.

For chance and community cards I had to stray from the game’s methodology of cycling cards in the same order over and over, and chose to have only two pawns represent both the chance and community cards. Each number (0-95) would correspond to a specific card (the last 4 numbers wouldn’t be used), and every time a player landed on a chance or community card space, the two dice would be shuffled to a random number between one and a hundred using the second method of dice rolling described above, adapted to fit 100 cases (essentially rolling a 100 sided die by using 7 tosses). If a player obtained a get out of jail free card, they could take possession of the queen of their corresponding color, and a similar permutation method as I have already mentioned could be used to represent multiple get out of jail free cards being owned.

And so I believed I was almost done, that too only having used 18 pieces.

But I struggled to come up with a way to represent 28 properties ownership using 14 pieces. Although this is theoretically easily achievable, for the board to maintain some sort of resemblance to monopoly, I didn’t want to simply say that every single possible permutation of board states could be modeled using the base ten piece system I described above by a direct mapping of a number to a game state.

So, I decided to group properties together, with every two consecutive properties now being an amalgamation of one distinct object. This object would then, at most, have the 13 possible states described above for a single property, times the 13 possible states its partner property would also have. So, I needed to find a way to have a single piece represent 169 distinct permutations. The 14 remaining pieces would be these super-descriptive pieces.

From there, only one more creative aspect was required, I used the chess board as a sort of counter, and used pieces whose direction could be noted standing up (these pieces are the knight (X2) , bishop (X2) , and king (X1) , totaling 5 of these pieces for each side). These pieces have 17 easily distinguishable orientations (8 while standing up, 8 while laying down, and 1 more while lying down oriented to face a different direction), and using the 8 rows of a chess board as well as counting one row off for each side, it is easy to code 170 possible orientations for 10 of these double-property objects. Three of the last four can be represented using three rooks either being upright or upside down on the eight chess board rows plus the two outside board rows to make 20 permutations which is more than enough to represent the nine possible permutations a railroad-utility object could have. The last pair object could be represented using a rook that takes up two columns of the board. This rook would have 19 possible rows to be on (by splitting each chess board row into two distinct parts and adding two rows for the pawn being off of either side of the board), 3 orientations (one standing up, one laying down, and one upside down), and 3 places laterally (on the left square, in the middle, and on the right square), and would represent the last property pair by having 171 representations.

This new take on monopoly has thus been created, and all that each player needs is knowledge of how to play, which, along with property prices, a run-down for how to role the “dice”, and any other needed information, can be found in the rule books. As I mentioned earlier, it would have been easier to simply state that each position of chess would correspond directly to a possible orientation of monopoly, but such a claim, although well-founded, wouldn’t have the same meaning as a version which two people could feasibly play without need to store positions in a dictionary with over 1050 entries.

Once I found out that monopoly could be implemented in a way that a person could interpret, it seemed irresponsible to go out and codify every game I could think of in such a manner, as the “proof” it is possible was enough to satisfy my curiosity. A simple list of all the games I think could be represented in a similar fashion include: Sorry, Checkers, Clue (piece color wouldn’t have meaning), Battleship (if players hid their pieces behind themselves), Connect 4 (using a pairing method),  Yahtzee, Chutes and Ladders (a “rule book” would define where the chutes and ladders are), and Life.

Some example positions in case you would like to try to play (not recommended).

Starting position:

z38cPgIASS2Xs7QZuJh8IA_thumb_584.jpg
From left to right, the pieces represent these property pairs: Mediterranean Avenue and Baltic Avenue, Reading Railroad and Electric Company, Oriental Avenue and Vermont Avenue, Connecticut Avenue and St. Charles Place, States Avenue and Virginia Avenue, Pennsylvania Railroad and B. & O. Railroad, St. James Place and Tennessee Avenue, New York Avenue and Kentucky Avenue, Indiana Avenue and Illinois Avenue, Atlantic Avenue and Ventnor Avenue, Water Works and Short Line, Marvin Gardens and Pacific Avenue, North Carolina Avenue and Pennsylvania Avenue, and Park Place and Boardwalk. The pawns are as follows: first two = P1 position, next 4  = P1 money, next 2 = chance and community chest cards (the queens are the get out of jail indicators), next 4 = P2 money, last 2 = P2 position. Take notice that to represent a zero, the pawns are kept out of line of the chance cards. It is not necessary to have the chance cards be 0 at the start of the game because they will be randomized every time they are used anyways. The two pawns that are interlocked in the center of the two rows will serve as the dice. Additionally, in the starting position both player 1 and 2 have $1500.

Some close up shots of the set up.

3Sm8bFK+TiOQy4gdp%ag9w_thumb_57f.jpg

nSSH19WfQH2+KD9uyQh%Jw_thumb_581.jpg

TXlLjFXWRwu0oh7dYouPxw_thumb_597.jpg

To get a better idea of the orientation of the super-descriptive pieces, I have attached some examples below.

VWLSxHIKR6qx%6jK3hvYLA_thumb_582.jpg

BJZi+JudSLGWJ4buVNAYIA_thumb_598.jpg

V0WQGMXLTPepHiGDzsF7Bg_thumb_57b.jpg

+PYct4rQQzy8M0M2FkPsTA_thumb_599.jpg

zNWWJIQsTQ6EjfLL3dHl5Q_thumb_580.jpg

zz5n3Ut3Q6a4DDwNOPDNMA_thumb_583.jpg

Now I will run through 1 turn of a game to give a little bit more context.

EkYPk92ETf+wVDFDYLwhkA_thumb_586.jpg
Here P1’s position is shown to be 7, which means that the dice roll could have been Black, White, White for the first toss and White, Black, Black for the second toss. Because position 7 is a chance space, P1 would take a chance card.
3ikJwT+sRk23vDQ%FpdC0Q_thumb_57d.jpg
The chance card was randomized to be above. For this game, the number depicted (13) was chosen to represent a get out of jail free card if the player was on a chance space.
9JQf+HGgTMeRRzuXnV+W6Q_thumb_579.jpg
Because P1 obtained a get out of jail free card, the corresponding color queen was relocated from next to chance deck to being to the left of the position marker, and the queen was oriented such that it represented a 1 (the number of get out of jail free cards P1 now has).
N8alcJISRYGZnni+WO9tqQ_thumb_585.jpg
Here, P2 is shown to have a position of 5, which means the dice roll could have been White, White, Black for the first toss and Black, White, White for the second.
uZNZ8%gPQzK8k5C2XrZUmw_thumb_57e.jpg
Since P2 landed on Reading Railroad and chose to purchase it, the money of P2 is decreased to 1300 as shown.
RhL0SJbIQ%yVsfdk7uhzGA_thumb_578.jpg
To represent the new property ownership level, the Reading Railroad and Electric Company conglomerate piece is moved to its 7th possible position, which if you create a probability tree for this property type using the structuring described previously, corresponds to Reading Railroad being owned by P2 and Electric Company being unowned. One important thing to note is that as long as the relative order of a piece to its duplicate is kept, then the piece can be translated anywhere on the field laterally, which is why I can move the rook right next to the board.

Some code I used to verify the dice rolling methods is below. The first set corresponds to the first method I described.

import java.math.RoundingMode;
import java.text.DecimalFormat;

public class BinaryToDice {

	public static void main(String[] args) {
		DecimalFormat df = new DecimalFormat("##.##");
		df.setRoundingMode(RoundingMode.DOWN);
		
		int numOfRolls = 100000;
		int numOfTosses = 10;
		
		int[] rolls = new int[numOfRolls]; //array of all the rolls that are generated from the binary dice
		
		for (int counter = 0; counter < numOfRolls; counter++){
			double biDi = 0;
			for(int i = 0; i < numOfTosses; i++) {
				biDi += (Math.round(Math.random()))/Math.pow(2, i + 1);
			}
			rolls[counter] = (int) Math.round(biDi * 10 + 2); // assigns the simulated roll to its corresponding slot in array
			//System.out.println(rolls[counter]);
		}
		
		// outputs how many of each type of roll was achieved by the analogous toss dice
		for(int compare = 2; compare <= 12; compare++) {
			int total = 0;
			for(int j = 0; j < numOfRolls; j++) {
				if(compare == rolls[j]) {
					total++;
				}
			}
			double percentage = ((total+0.0)/numOfRolls) * 100;
			String percent = df.format(percentage);
			System.out.println(total + "\t(" + percent + "%)\t\tis the number of the rolls that were a " + compare);
		}
		
	}

}

And the second method.

import java.math.RoundingMode;
import java.text.DecimalFormat;

public class BinaryToDiceImproved {
	
	static int numOfTosses = 3;
	
	public static void main(String[] args) {
		
		DecimalFormat df = new DecimalFormat("##.##");
		df.setRoundingMode(RoundingMode.DOWN);
		
		int trialSize = 1000000;
		int[] rolls = new int[11];
		
		for(int i = 0; i < trialSize; i++) {
		
			int rollSum = 0; 
			for(int j = 0; j < 2; j++) {
				int roll = tossUp();
				while(roll < 1 || roll > 6) {
					roll = tossUp();
				}
				rollSum+=roll;
			}
			rolls[rollSum - 2]++;
		}
		
		for(int i = 0; i < rolls.length; i++) {
			double percentage = (rolls[i] + 0.0)/trialSize * 100;
			String percent = df.format(percentage);
			System.out.println(rolls[i] + "\t(" + percent + "%)\t\tis the number of the rolls that were a " + i + 2);
		}
	
	}
	
	public static int tossUp() {
		int sum = 0;
		for(int i = 0; i < numOfTosses; i++) {
			int random = (int) Math.round(Math.random());
			sum+=(int) (random * Math.pow(2, i));
		}
		return sum;
	}
	
}

Leave a comment