You are on page 1of 6

ARTIEJCIAL INTELLIGENCE

ASSIGNMENT- |

Name : Shi Vignesh S


IT-¢
Reg No : 12782 2TUTT 22|
GAME SEARCH ALGORITHM

AS314NMENT- I

important doman Al Gamus


Game payg nued
much knowledge, ondy know hedge
we
don suquwu
moves ond he condidions
to psovidu

he game. Bo th pays y to win


inning
to mahe te b t move
the game So both them y
ppssible tan Jeanchinq tchnique lite BFS(rea dth

Fiwt Se avch this


biencaing
will take a lot ime.
jactu veny hig. eonhimg
ud amotn arch precolu that improve
we

moves are
-[o that only oad gerenata
Genena pecde
Tt poud. So that he bet Can Jae ex ploeol

ft
most sarch tchnique in game
the com mOn
plagng
minimax

wnd foA
fon gomes ches

toe.

Minimax algon ithn wes hoo tunctions -

|. Mov E GEN

STATIC EVALUATION
Minimax Alaoni thm :

Minimay dund backtnackwng algoi ta n


hat denien
moing theony do
fönd thu oplimal move payn auming hat

yown oppo hunt ao Mays optimaly. T# is widely


tunn band gams uch TiC - Tac - Toe Buchgammon
micen

ete. Thu ae calid viimaxi, and


Mancala Chn

minimi2.

Th marimizen tien to wcore while

minjmi ZUr tia to ce the oyosite nd yt the Jowest SLore


possisle.
Minimax Algaaith nm kjame thcony:
Covicn which lhas 4 funal ttes and paths
to uah state nd
a

pgect in ang
ma

May - &

min

al
Sine t s is a

possible move, then


back
inacking
bactn s
bascd algeni thm
amol makes a deesin.
min vaues
A! nom ever 3. And

then at (evel chee valn tom mewiows


Jwel
Now the e oka ike:
max (2,3) 3

mìn
(3.5) min |2,4): 9

This i the way houw te Aemyletd cnd Since ut

hch nods has duga tim complesity.


MinmaxX Algoaith m
Ps eude

fnction mi nimax (nod, depth, maxi mi zing Playn )


i3 dapth tumina node

the heute vale


Jtn

$ maximizing Play
b t Vale ingjnity
tor eac child nole

vale : minnmax Cehild, dep th-folse)


bestrale - max (htvoe, vaue )

Jwn ost Vaue

btVue
+ininity
fon each chila node
vae = minimax Cehild, depth -t, tue )
bestVcle e Ymìn lbet Vale, vale )

Jutun n bot a l e

tunetion t Bert Move (lboouc)


best Move
but vaw
each possible move boar
Ymavke thu Move On a at lboncl

value minimax (lb0ard. dap th, alse )


Undo tte move

vale > best vale

bet Value alue

t Moy e the move


Jtun best Move

Procs Chekrs
Algunith m:
) JridËai zatsn - Set up the ini ial board stat State
ii) Move gemunaton Generate al possible ugal moves
evaakion
i0) Moye - Èyaate to detenmine ibs dei na bility
Seanch Algonith m- Use minimax alganithm to explone possible states
Heistc Functies - Dengn hewustic tunctien hat anign a value
vi) Decnien makng and Iteratiwe 2movem ent
vi)
Itenali ve Deeening . This ollows moae accunae evaluaien
Minimak tre

MAX ( white% tun)

Min b3a4) Min(bg C4 ) Min l by -C4)

MAX MAX C (3lacks tmn)

Thes ciag nepuents dhe possi ble Moves


ton white (MAx )
level. Each bnanch wpenmts possible move by whit Then
hawe possi ble pons y Black CMIN) and so on
Lus bay i a wht tun :

2 3 5 6

b .

2
b
3

Thu duagram illustates dis proes mig look ile a tree


otuetwe with each level
alternating bt white Ome Blhs move.

Prspunti os
The mìnimaX goithm puye ms a womplete dapth- fust ex plo
Natien gamne 4e.

Comylete
Oykimal opti mal opponemt
Time Complexity: olb)

Spaa com plenity olbm) Cdapth fwt aenplnabton )


Algaitkm genuates all actiemn at once.

You might also like