Global AI and Data Science

Global AI & Data Science

Train, tune and distribute models with generative AI and machine learning capabilities

 View Only

Analyzing the Game "Misha"

By Moloy De posted Thu June 03, 2021 09:45 PM

  
Introduction

A variation of Tic-Tac-Toe is studied. Under perfect play the game continues forever. I name this variation following my niece Misha on whose birthday I framed this game as her birthday gift.

I was playing Tic-Tac-Toe with three red coins and three green coins. Players move their coins in turn to any blank cell. One who makes three in a line
(row, column or diagonal) wins. In any turn there are nine possible moves as any of the three own coin can move to any of the three blank spaces.



Analyzing the Moves

There are five distinct first moves for red. They are as below:



Analyzing Board 11

There are three distinct first moves for green that block red forming the third row. They are as below:


In Board 111 and Board 112 green has created a fork and wins. But in  Board 113 there is no fork created by green and the game continues.

Analyzing Board 113

There are two distinct moves for red to avoid losing and they are as follows:


No fork is created.

Analyzing the first two moves

As mentioned earlier there are five distinct first moves. Among them four first moves are bad as they lead to a fork by green.


The only legitimate first two moves are given below and the game continues there after.


Perfect Play

Under perfect play where you know the best move in any situation, the game continues forever. The game finishes with a decision as soon as one does a
mistake.

Broken Diagonal

Along with three rows, three columns and two diagonal if we introduce four broken diagonals (two forward and two backward), as per my analysis so far, the first player loses.
However when playing in a four by four board with four red coins and four green coins considering wins with four rows and four columns, we may introduced four forward diagonals and four backward diagonals (including broken diagonals) to make the game more interesting.

 Algorithm for Computer Play

The possible nine moves in any situations can be given priorities as follows and one may play the highest priority move where ties are a possibility.

Winning Move - Priority 1
Losing move - Priority 10
Creating Double Winning Possibilities (Fork) - Priority 2
Creating Single Winning Possibility - Priority 3
Other Moves - Priority 5

This strategy is working fine for a four by four board with broken diagonals. However, if we consider three by three board, all the first five moves have priority three and cannot be distinguished. But we know except one move others lead to a loss.

To tackle the situation a winning score, varying between -1 to +1 can be calculated. The winning score of a move is the average of the negatives of winning scores of opponents next nine moves. So the winning score of a move can be calculated recursively up to a certain depth and the move with highest winning score can be played. For a winning move, the score is +1.

A combination of the prioritizing strategy and the winning score strategy is working _ne in my computer.

Remarks

I have no clue whether such a game is already designed or not. Any help with reference will be appreciated.

#GlobalAIandDataScience
#GlobalDataScience
1 comment
21 views

Permalink

Comments

Fri April 25, 2025 06:55 AM

Really impressive breakdown of Misha’s game. The use of priority and scoring to guide decisions is a great foundation for AI-based opponents. I’ve seen similar approaches in games featured on this innovative gaming site, which explore simple concepts with deep execution.