Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

An Assignment of CSE Department

on Artificial Intelligence
CO401

Gobang Game using Game Playing


Guided By : Dr. Sobhanjana Kalita(Asst. Prof. CSE Department)
Presented By : Roop Basant (CSB19054)
Prasanjit Dutta (CSB19057)
Introduction to Gobang game

❖ Game theory is the study of mathematical models of strategic interactions among


rational agents
❖ Gobang game is known as Gomoku, originated from china, go means five and
moku means line up
❖ Board Game
❖ Play using 19x19, or 13x13, or 9x9 board with 371, or 169, or 81 intersections.
❖ Has black and white stones
❖ Game kicks of with a empty board, participants takes various turns to place the
stones on empty board
❖ Black stones play first by placing one stone on any intersections of lines
❖ Once stones placed on board, cannot move until and unless game ends
Rules
❖ Two players are involved
❖ Players get the chance to play alternatively
❖ The first one to place 5 in a row, column or
diagonal manner wins the game
❖ For example, here black has won the game
Algorithms to decide optimal path

❖ Minimax algorithm
➢ Represents every game as a tree of moves, current game position as the
root of the tree
➢ Kind of backtracking algorithm for decision making in games
➢ It assumes that opponent have also played optimally
➢ Widely used in turn-based game
➢ Players in minimax are maximizer and minimizer
➢ Every board has a value associated, upper hand for maximizer or minimizer
will decide positive and negative value.
➢ Value for the board is calculated heuristically and unique for every game
To decide the optimal step to take in order to win game
➢ It is a decision rule formulated for zero sum two player game
➢ Calculation is usually limited to a fixed depth
Algorithms to decide optimal path
➢ In order to make the decision for the next move efficiently we set depth limit
➢ Reduce the branch factor by limiting the evaluation of squares to those
which are adjacent to the square which have been played
➢ At the leaf node either a game over or a board needs to be evaluated in
order to decide who has won the game.
Algorithms to decide optimal path
User’s turn
❖ Alpha Beta Pruning
➢ Optimization technique for minimax AI’s
algorithm turn
➢ Without checking all nodes of tree to
compute correct minimax decision
➢ Alpha beta are two threshold value so
alpha beta pruning
➢ In the given scenario, right side branch
should be pruned
➢ In order to maximize the possibility of
win AI will go for the left as, it has two
more possibility for winning AI.
Implementation Specifications

❖ Class based implementation


❖ CPP language
THANKS

You might also like