Tuesday, July 6, 2010

Quixo - An Analysis

PICTURES UNDER CONSTRUCTION

Introduction
Abstract
Quixo is a combinatory game played on a 5 x 5 tile board with cubes with face marked with either an X or an O. Before gameplay, all tiles are blank at first, and up to four players can play this game. However, we will be examining and investigating a 2-player scenario.

How Quixo is played
One player chooses the sign "X" and the other chooses "O".

Whichever player who gets five of his/her tiles in a row, whether horizontally, vertically, or diagonally, wins the game.




Figure 1 above displays a typical game of Quixo, where the player using X has won as he has 5 of his cubes along a diagonal of the board.

Each player takes turns taking any tile that is blank or his/her own that is on the edges of the game board. He then takes the tile out, and puts that tile in from the side, along either its original column or row.




Figure 3 above denotes how one can transfer and place his flipped cube from the side along the original column or row. The cubes marked n and k are arbitrary cubes which are pushed along with the cubes X and O.

Literature Review
The literature is derived from the following websites:
1) http://www.educationallearninggames.com/how-to-play-quixo-game-rules.asp
and
2) http://www.math.uaa.alaska.edu/~afkjm/ai_games/quixo/quixo.html

a) Quixo, however, is actually pretty unfair, for the first player has an advantage through having one extra cube assuming that all players flip open cubes before moving them.

This means that for example, if X moves first under these conditions, he will have 13 cubes whilst O will have 12 cubes.

Having an extra 1 cube makes a very large difference, for it can be used in many situations for one’s advantage For example, he can use it to block his opponent’s move. He can also use it to or complete a column or row of 5 cubes of his kind.

Quixo is therefore unfair.

b) In Quixo, there is a certain factor that we can use to our advantage – the occupying of certain parts of the board, which are mainly the centre and the corners. The corners are the gateways to making a row of your cubes, and the centre is the gateway to your victory.
Motivation
From our doubts that sprung from what the Literature Review states, our research questions are:

 To verify if Quixo is really unfair and why it is so

 To discover what are the tactics and advantages of certain situations so as to win as well as to counter the unfairness (if it were to be unfair in the first place)
 To find the mathematics behind the fairness, tactics and advantages as well as what never to do which would cause one to lose

Throughout our research, we are mainly trying to research understand more about the concept of combinatory games, to show how mathematics can be applied frequently to daily life, and of course to boost our learning of mathematics.

Methodology
==== How we will carry out our research ====
We plan to research from books, websites, etc to achieve our motives, which are mainly:
- Mathematics behind the game
- Specific strategies/tactics which provide an advantage for the player
- Known modifications to the game

==== Analysis ====
We plan to analyse the way Quixo works and how mathematics affects gameplay. We are currently planning to use probability to support our findings.

==== Timeline ====

To-do Completion Date
Understanding and experimenting with the game End-February (Complete)
Analysis of gameplay Mid-March (Complete)
Production of prelims powerpoint 25th March (Complete)
Half of the project to be done June Holidays (Complete)
Semi-finals powerpoint End of June Holidays (Complete)

Research and analysis Ongoing till 3 weeks before finals
Completion and refining of product 1-2 weeks before the finals
Touch up projects to completion 1 week before grand finals


Dos and Don’ts in Quixo – Strategies and what one should never do

NB: Based on the assumption that the Literature Review is true.

Dos – The Strategies
1) It is indeed more advantageous for one to keep on flipping cubes up and moving them instead of just moving them.

2) It is also more advantageous to flip cubes in the corners because of more ways to win, also very advantaged to have a flipped cube in the centre.

3) It is best for one to have multiple cubes in a row AND a column instead of cubes spread apart due to the fact that the crucial cubes will not be affected in a single move.


Figure 4 shows that it is best for one to have multiple cubes in a row AND a column instead of cubes spread apart due to the fact that the crucial cubes will not be affected in a single move. The centre cube cannot be moved in a single turn and the even so, the moves can be reversed almost immediately, which means that x has a higher chance of winning, albeit the chance of winning is not exactly accurate, just that having the centre cube puts one at a heavy advantage.

4) Lastly, it is better to take control of the centre and corners than sides because sides can only contribute to victory in four ways and they can only be moved by 6 ways while centre can contribute in 4 ways but can be moved in over 10 ways.

All in all, the most important lesson learnt is that for a higher chance of winning, crucial planning must be done to have at least one cube to occupy the centre.

Don’ts – Never do these
NEVER choose the same corner as your opponent as you leave the other player advantageous in having 2 corners and a direct route to the centre. It is best one for one to pick another corner instead.

As you can see here, O has just given X access to the most crucial areas of the board.

Mathematics behind Quixo
Quixo is a sequential game, where both players have some knowledge of the other player’s move, and is done in a turn based series. Quixo is also a combinatory game, and thus focuses on the movement of the blocks. It also allows for moving of your opponent’s tile, thus adding further complication, which is why we chose to analyse it on a 3x3 board.

Chances of winning on a 3 by 3 Quixo board in 3 turns while controlling the centre

NB: based on randomised positioning

X's chances of winning


Diagram 1 (X is occupying the centre)


Diagram 2


Diagram 3

Firstly, since pushing out the middle block would make it unable to win the game in 3 turns (please refer to Diagram 2), there is a = chance of not pushing it out. It is the opponent's turn, and there are 7 positions left, in which 5 placements would make it possible for X to win in 3 moves. Pushing the middle block an undesired way is shown in Diagram 3. There would only be one winning move, so, based on randomized placements, it would be a chance that the X is placed correctly. Therefore the chances of X winning in 3 turns would be
× × = = 5.952%

O's chances of winning


Diagram 4


Diagram 5a

Firstly, there is a = chance of getting a corner square on the first move for O. (Please refer to Diagram 4). There is a chance that the opponent blocks with an edge (Please refer to Diagram 5a). There would then only be 2 places O can place his cube, bottom right or bottom middle (the cube cannot be placed in the middle of the middle as is inapplicable due to game rules), so the chances are . Then, there is a = chance that the opponent does not block. Then the winning move remains, which is a chance. The total would be
× × × × =

Diagram 5b

Then again, there is also a chance that the opponent blocks with a corner (Please refer to Diagram 5b). Then, the two positions O can place its cube to win would be the bottom right and bottom middle, which is therefore = . Also, there is a chance that the opponent does not block, and a chance that O places the cube correctly. Therefore the total chance is
× × × × =
Of course, there is also the chance of not blocking O at all. Then O could place a cube at 4 "winning" locations, which is a = chance). Then there is the chance the opponent doesn't block and the chance of the winning move. Therefore the total is
× × × × =


Diagram 6


Diagram 7

After talking about occupying corners, there is also a = chance that O places a cube on the side (Diagram 6). There is then a chance that the opponent does not block (Diagram 7 shows an example of a block). Then there would be a = chance of placing a cube correctly, and a consequently chance that the opponent does not place the cube such that he blocks O. A chance would be the chance that O makes the winning move. Therefore the total chance is

× × × × =

Thus, the total chance of winning would be

+ + + = = 2.024%

Since

5.952% > 2.024%

Therefore X has an advantage over O when occupying the centre.

Therefore, we can conclude that occupying the centre gives us an advantage over our opponent.

Chances of winning a Quixo game while controlling 2 or 3 corners
Since it was previously established that the centre is the most important, we will first analyse a few more cases:


Diagram 8

In diagram 8, the O controls 3 corners, while the X controls the centre, automatically guaranteeing a 5.952% = chance of winning. Additionally, X has 1 way to win out of 6 moves, meaning a chance of winning. O has 9 ways to move, but like X, it also has only 1 way to win, which a chance of winning. By this observation, it is obvious that having the corners limits the opponent’s movements, and thus will inevitably reduce chances of winning.


Diagram 9

In this diagram, O controls 2 corners while X controls the centre and another corner. X can move in 7 ways, but only has a chance of making a winning move. O, however, can move in 9 ways, and can win in 2 ways, meaning a . Thus, by this observation, it is evident how putting a tile that is yours adjacent to a corner increases the chance of winning, rather than putting a tile adjacent to the centre, which does nothing.

Also, it is also important to put the tile at the right place, shown where the tile belonging to O at the top left corner manages to block X from moving in the first (from left) vertical row, even if X moves its own tile from the bottom right up as shown in Diagram 10.


Diagram 10

Diagram 10 shows what happens if X had been moved up. It is evident in the diagram that nothing much has changed, but however there is no way for O to win. This thus proves that having a tile at the top corner and a tile at the opposite bottom corner does not benefit a player at all because the only way to win is by a diagonal, and that to get a tile in the centre, 2 turns are required unless there are tiles adjacent to the centre that can be moved in prior to the player’s turn.

Through the comparisons shown above, it can be concluded that the more corners, the better. Having a corner allows for 3 ways to win (horizontal, vertical and diagonal), and every other corner increases the chance to win.


Bibliography
 EducationalLearningGames.com, a division of Next Generation Training, Inc. 2003-2010.
How to Play Quixo Game* strategy board games, strategy games for kids, wooden games [Online]. http://www.educationallearninggames.com/how-to-play-quixo-game-rules.asp (Accessed 10 March 2010)

 University of Alaska Anchorage, Department of Mathematical Sciences. 2006
Quixo (R) [Online] .http://www.math.uaa.alaska.edu/~afkjm/ai_games/quixo/quixo.html (Accessed 20 March 2010)