Tic tac toe using Ant colony optimization
-
Upload
utkarsh-sharma -
Category
Documents
-
view
227 -
download
0
Transcript of Tic tac toe using Ant colony optimization
-
8/9/2019 Tic tac toe using Ant colony optimization
1/20
-
8/9/2019 Tic tac toe using Ant colony optimization
2/20
ContentsContents
+ntroduction,eed o classicationMaze -roblemsEisting solution a--roachesClassication scheme
Pro-osed algorithmsCom-arati/e anal!sisConclusion
-
8/9/2019 Tic tac toe using Ant colony optimization
3/20
+ntroduction+ntroduction
Maze -roblems "# Commonl! kno0n as boardgames
Maze -roblems "# concerned b! both scientic
communit! and non technical users.
1ell suited to test heuristic and metaheuristica--roaches.
PSO based a--roaches are no0ada!s beinga--lied on to /arious -roblem domains.
-
8/9/2019 Tic tac toe using Ant colony optimization
4/20
,eed o classication,eed o classication
Classication o an! -roblem domain makes thetask o nding the solution more eas! andefcient.
Maze -roblems constitutes a 0ide -roblemdomain 0ith a large number o -roblems l!ing init.
Most o the maze -roblems are similar in some
characteristics 0ith a e0 modications.
,o -ro-er taonom! -resent or the maze-roblems.
-
8/9/2019 Tic tac toe using Ant colony optimization
5/20
Maze -roblemsMaze -roblems
%) 2night tour
3) ic ac oe
') ,#4ueen
() Sudoku
5) 6ight 7u-
8) 9at in a Maze
:) ,# -uzzle
;) Slither# link
-
8/9/2019 Tic tac toe using Ant colony optimization
6/20
Classication schemeClassication scheme
%. =ased u-on 0inning condition "#%. >ied
3. ?!namic
3. =ased u-on initial boardconguration "#%. Em-t!
3. >illed
'. =ased u-on state o board $b@0solution)
%. >ied
3. ?!namic
-
8/9/2019 Tic tac toe using Ant colony optimization
7/20
ClassicationClassication
SchemeScheme$$Contd..Contd..)) =ased u-on the abo/e classicationscheme total o ; classes are ormedbut not all the ; classes eists at-resent. he a--licable classes are "#
%. Class A$em-t! ed ed)
3. Class =$lled ed d!namic)
'. Class C$lled d!namic d!namic)
(. Class ?$lled d!namic ed)
-
8/9/2019 Tic tac toe using Ant colony optimization
8/20
Eisting a--roachesEisting a--roaches
Ant colony based algorithm for Knights tour
+nitialize the chessboard 0ith a small amount o-heromone on each cell in our e-eriment it is
ro0colkB%.
>or each c!cle E/a-orate -heromones
>or each starting s4uare start an ant
Select net mo/e based on -robabilit! calculation. he-robabilit! is calculated as ProbkB $ro0 col k )@D$ro0colk)
the cell 0ith highest -robabilit! is calculated.
Mo/e to ne0 s4uare i tour com-lete sa/e it else go toste- (.
U-date the -heromone matri based u-on the tourormed.
-
8/9/2019 Tic tac toe using Ant colony optimization
9/20
ContdFContdF
Backtracking based algorithm for Knightstour
Select the start s4uare
Make the start s4uare as the current s4uare9e-eat ste-s ( to 8 until current B destination
Create a list o all -ossible mo/es rom thiss4uare.
Select the net s4uare b! the 0arndoGHsheuristic.
Make it current s4uare
-
8/9/2019 Tic tac toe using Ant colony optimization
10/20
Genetic algorithm based algorithm for lightup.
%) Ienerate initial -o-ulation
3) E/aluate the tness o each indi/idual in the-o-ulation
') Select best#ranking indi/iduals to re-roduce.
() Create ne0 generation through crosso/er and
mutation e/aluate the indi/idual tness.5) Until $terminating condition) re-eat ste- $ii) to
$i/)
8) 9eturn best chromosome
-
8/9/2019 Tic tac toe using Ant colony optimization
11/20
Ant colon! based algorithm or light u-
%) >or iteration rom % to maJiteration re-eat ste-s 3 to
-
8/9/2019 Tic tac toe using Ant colony optimization
12/20
Algorithms Pro-osedAlgorithms Pro-osed
1-Ant based Algorithm for Tic Tac Toe1) Initialization of Goal matrix, adjacency graph. Distribute some
initial pheromone on each node e.g. 0.1 and maing the status as
unused.
!) "ae the first random mo#e.
$) %ccording to opponent&s mo#e the ant tae a tour of length $.
') (rom the tours found deposit pheromone on each edge of those
tours hich lies in the inning set.
*) +he next mo#e by the algorithm ill be on the node ha#ing the
highest pheromone #alue.) -epeat the steps $* until the game ins or dra.
-
8/9/2019 Tic tac toe using Ant colony optimization
13/20
Algorithm -ro-osed$Algorithm -ro-osed$contdF)contdF)
ACO based Algorithm for Rat in a Mae%) >irst the adacenc! matri is constructed or the gra-h ?ene
source and destination.
3) +nitialize the ant mo/ement rom the start node 0ith number oants let n the destination or the ants is not ed the! 0ill sto-their tour 0hen their 0ill be no -ossible mo/e rom their -osition.
') +nitialize the -heromone matri.
() Calculate the -robabilit! matri b! the gi/en ormulae"
ProbLL! BPheroLL!Q$%@adLL!)@ D niB% $-heroLiLQadLiL)
5) he -aths o all n ants are stored and the -ath 0ith the endnode as the destination node 0ith the shortest node countis considered as the result.
8) he edges o the resultant -ath 0ill recei/e the -heromone/alue and as -heromone increases the -robabilit! oselecting this -ath 0ill also increase.
-
8/9/2019 Tic tac toe using Ant colony optimization
14/20
Com-arison >or 2nightHsCom-arison >or 2nightHs
tourtourOrder/Technique Execution time for
Backtracking (sec)
Execution time for
AO (sec)
/ x / 0.0$ approx. 0.0$1 approx.
1 x 1 !./ approx. 1. sec approx
!' x !' $.1 approx. 1.* approx.
-
8/9/2019 Tic tac toe using Ant colony optimization
15/20
Com-arison or 9at in aCom-arison or 9at in a
mazemaze BacktrackingEas! (in "sec) #ifficult(in "sec)
AO
Eas! (in "sec) #ifficult(in "sec)
$ x $ $02approx) $2approx) $02approx) $!2approx)
1% x 1% '02approx) '2approx) $2approx) $/2approx)
&' x &' **2approx) '2approx) *02approx) *12approx)
-
8/9/2019 Tic tac toe using Ant colony optimization
16/20
Com-arison or 6ight u-Com-arison or 6ight u--roblem-roblem
ie Time taken b! AO(in sec)
Time taken b!*enetic algorithm (in
sec)
10 x 10 0.0* approx. approx.
1* x 1* *.! approx. !0 approx.
!* x !* !0. approx. 1!0 approx.
-
8/9/2019 Tic tac toe using Ant colony optimization
17/20
Com-arati/e anal!sis or icCom-arati/e anal!sis or icac oeac oeAlgo.
!e"el
#ecision $ree Based#ra%&'(
)in&'(
ACO Based#ra%&'(
)in&'(
Eas! 3& ;& 5
-
8/9/2019 Tic tac toe using Ant colony optimization
18/20
Com-arison or SudokuCom-arison or Sudoku
Technique Accurac! A+g, Time(in sec)
imulated Annealing 0.' '0.!0
*enetic algorithm 0.1$ *.*
!brid 0.' .
-
8/9/2019 Tic tac toe using Ant colony optimization
19/20
Com-arison or ,#4ueenCom-arison or ,#4ueenL3&L3&
* A"erage number of +tness function&in ,-runs( A $GA
; (
-
8/9/2019 Tic tac toe using Ant colony optimization
20/20
ConclusionConclusion
Ater classication the -roblems 0hich comeunder class RA are sim-le routing related-roblems.
the com-arati/e anal!sis -ro/es that the antcolon! a--roach or s0arm based a--roachescan -erorm better or class RA -roblems.
=acktracking a--roaches are not the suitablea--roach or the class R= -roblems.