Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

It's a toc tac toe game in which mathmatics algorithms are used it's basically a two, Schemes and Mind Maps of Mathematics

It's a toc tac toe game in which mathmatics algorithms are used it's basically a two player game. In this game 3*3 grid is used. This game is made for entertainment purpose . It's goal is to save paper and play online games . This is basically a ppt of tic tac toe game in this ppt topics like introduction, purpose of the system, requirements of the system, dfd , use case diagram and some screenshots of that game is given if you want source code if this game. there are many websites which provides different different codes in different different language you can download it form there . And documentation of this game is also available online this game can be used for making mini projects in colleges for final year students. The grid of this game can be n*n but we used 3*3 grid . You can add music and manipulate online codes to make it your own way . Different types of background can also be added. Thank you.

Typology: Schemes and Mind Maps

2022/2023

Uploaded on 05/05/2023

pallavi-singh-12
pallavi-singh-12 🇮🇳

1 document

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Game Playing (Tic-Tac-Toe),
ANDOR graph
By
Chinmaya , Hanoosh ,Rajkumar
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download It's a toc tac toe game in which mathmatics algorithms are used it's basically a two and more Schemes and Mind Maps Mathematics in PDF only on Docsity!

Game Playing (Tic-Tac-Toe),

ANDOR graph

By Chinmaya , Hanoosh ,Rajkumar

Outline of the Talk

Game Playing

Tic-Tac-Toe

Minimax Algorithm

 Alpha Beta Prunning

AndOr graph and AO* Algorithm

Summary

References

Game Playing Strategy

Maximize winning possibility assuming that

opponent will try to minimize (Minimax

Algorithm)

 Ignore the unwanted portion of the search

tree (Alpha Beta Pruning)

Evaluation(Utility) Function

 A measure of winning possibility of the player

Tic-Tac-Toe

e(p) = 6 - 5 = 1

 Initial State : Board position of 3x3 matrix with 0 and

X.

 Operators: Putting 0’s or X’s in vacant positions

alternatively

 Terminal test: Which determines game is over

 Utility function :

e(p) = (No. of complete rows, columns or diagonals

are still open for player ) – (No. of complete rows,

columns or diagonals are still open for opponent )

X O

Game tree for Tic-Tac-Toe

Courtesy : Artificial Intelligence and Soft Computing. Behavioural and Cognitive Modelling of the Human Brain

Courtesy : Principles of Artificial Intelligence , Nilsson

Observation

Minimax algorithm, presented above, requires

expanding the entire state-space.

Severe limitation, especially for problems with

a large state-space.

Some nodes in the search can be proven to be

irrelevant to the outcome of the search

Alpha-Beta Strategy

Maintain two bounds:

Alpha (α): a lower bound on best that the

player to move can achieve

Beta (β): an upper bound on what the

opponent can achieve

Search, maintaining α and β

Whenever α ≥ βhigher, or β ≤ αhigher further

search at this node is irrelevant

Example

Tic-Tac-Toe

(MAX) Start X : MAX player 0 : MIN player e(p) = (rows + cols + diagonals open to ‘X’) – (Same to ‘0’) e(p) = 0 X X X e = 8 – 4 = 4 e = 8 – 5 = 3 e = 8 – 6 = 2 e = 5 – 4 = 1 e = 5 – 3 = 2 X X 0 0 X’s Turn 0’s Turn Courtesy : CS621-Artificial Intelligence , 2007, Prof. Pushpak Bhatacharya

Alpha-Beta Analysis

 Pruning does not affect the final result.

 Assume a fixed branching factor and a fixed depth

 Best case: bd/2 + b(d/2)-

Approximate as bd/

 Impact?

Minmax: 10^9 = 1,000,000,

Alpha-beta: 10^5 + 10^4 = 110,

 But best-case analysis depends on choosing the

best move first at cut nodes (not always possible)

 The worst case : No cut-offs, and Alpha-Beta

degrades to Minmax

AND OR GRAPH

How to explore

Expand nodes

Propagate values to ancestors

 Futility

 If the estimated cost of a solution becomes

greater than futility then abandon the search

 A threshold such that any solution with higher cost

is too expensive to be practical

AO* (high level view)

  1. Given the Goal node, find its possible off-springs.
  2. Estimate the h values at the leaves. The cost of the parent of the leaf (leaves) is the minimum of the cost of the OR clauses plus one or the cost of the AND clauses plus the number of AND clauses. After the children with minimum h are estimated, a pointer is attached to point from the parent node to its promising children.
  3. One of the unexpanded OR clauses / the set of unexpanded AND clauses, where the pointer points from its parent, is now expanded and the h of the newly generated children are estimated. The effect of this h has to be propagated up to the root by re-calculating the f of the parent or the parent of the parents of the newly created child /children clauses through a least cost path. Thus the pointers may be modified depending on the revised cost of the existing clauses.