Top Banner
Ant Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant Professor, Computer Science University of New Mexico
29

Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Mar 16, 2018

Download

Documents

phunghanh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

AntColonyOptimization

April82009CS591:ComplexAdaptiveSystems

MelanieMoses,AssistantProfessor,ComputerScienceUniversityofNewMexico

Page 2: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

KeyConceptsFromDorigo’sACO•  Antalgorithmsuse‘self‐organizingprinciples’tocoordinateagents

tosolvecomputationalproblems•  Stigmergy:indirectcommunicationandcoordinationthrough

signalsthatmodifytheenvironmentandstimulateotheragents•  Pheromones:achemicalsignalthattriggersaresponseinanother

agent–  Pheromoneconcentrationincreasestheprobabilitythatanantwill

followapath–  Evaporation–  Backwardsvsforwards

•  ShortestPaths&Doublebridges•  Chapter1walksthroughaseriesofprogressivelymore‘useful’ant‐

inspiredalgorithims–  Dorigo’sinitialevaluationofeachalgorithmdependsonhowfastit

convergesonasolution

Page 3: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Gossetalantexperiments: Pheromoneslaidonreturntrip Accumulatesfasteronshorterbranch Evaporationontoolongatimescaletoaffectexperiments

Page 4: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

RealAntsareunabletofindtheshorterpathintheseexperiments

Page 5: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

DeneubougandGossstochasticmodel

Inthismodel:Nopheromoneevaporation,antsdepositpheromoneinbothdirectionswithoutbidirectionalpheromonedepositions,antsdonotchoosetheshortestbranchconfirmedbyexperiments?

pis:Theprobabilityofanantselectingtheshortbranchts:timetotraversetheshortbranchPhiis:pheromoneontheshortbranch=numberofantsthathavealreadychosenshortalpha:determinedbyfittingtoexperimentaldata

Probabilityis(roughly)~theproportionoftotalpheromoneontheshortbranchpil:iscalculatedsimilarly

Page 6: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Theratesofchangeofproportionofantsselectingeachbranch

iandjaredecisionpoints:

Page 7: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

ResultsofMonteCarloSimulation

Page 8: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

ADiscretetimemodelgivessimilarresults

Page 9: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Simple‐ACO

•  S‐ACOmodificationsofpreviousmodels– Antsremembertheirpaths

– Onlybackwardpheromonedeposition– Deterministicbackwardpath– Pheromoneevaporation

– Pheromonedepositionratedependsonqualityofsolution(antsdepositmorepheromoneonshorterpaths)

– Loopavoidance

Page 10: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Forwardmovement•  Alledges(taui,j)initializedwithequalpheromone

•  Neighborhoodincludesadjacentnodes,excludingpreviousnode

Page 11: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Backwardmovement

•  Eachantretracesitsstepsbacktothenest

•  Depositsanamountofpheromoneoneachlink–  Amountofpheromonedepositedisafunctionofpathlength

•  Pheromoneevaporatesatratepaftereachantstep

Page 12: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Experiments

ConvergenceTradeoff

Experimentalconvergence:PheromonewashigheronlongerpathlessoftenwithmoreantsandwithpheromoneDepositioninverselyproportionaltopathlength

Page 13: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

IncreasingevaporationreducesconvergencetimeConvergencetopathlength5withp=0.01(optimal)Convergencetopathlength6withp=0.1(suboptimal)

Page 14: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

SummaryofS‐ACOexperiments

•  Convergencetimeandpathlengthsareshorterwhenpheromonedepositionisinverselyproportionaltopathlength

•  Convergenceisfasterwith–  higherp(pheromoneevaporationrate)

–  Higheralpha(selectionbiasbypheromoneconcentration)

•  Whenpandalphaaretoohigh,convergencetosuboptimalpathsismorelikely

Page 15: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Avoidingloopsandgettinghome

FIGURE1.PheromonetrailnetworksofPharaoh'santsonasmokedglasssurface.FromTrailgeometrygivespolaritytoantforagingnetworksDuncanE.Jackson,MikeHolcombeandFrancisL.W.RatnieksNature432,907‐909(16December2004)doi:10.1038/nature03105

Page 16: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

•  AntSystemforTSP,DorigoACOchapter3

•  Kartiktodiscuss–  parameterselection–  Dorigo1996–  HisACOcode

•  ACOtorouteinterconnectonmicroprocessors•  ReadingforMonday:AntHocNetDiCaroetal2004

Page 17: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

TravelingSalesmanProblem

TSPisanNPhardoptimizationproblem•  Findtheshortesttourthroughasetofcitiesbackhome,

visitingeachcityexactlyonce.G=(N,A)NnodesandAarcs(oredges)Eacharchaslengthdij.Findπ,apermutationofthenodeindicesthatminimizesf(π)

e.g.π={5,7,3,8,2,1}

(i, j)∈ A

f (π ) = dπ ( i)+π (i+1)i=1

n−1

∑ + dπ (n )π ( i)

Page 18: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

TSP

Page 19: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

AntSystem

PheromoneisstoredinamatrixHeuristicinformation(distancesbetweennodes)isstoredinanothermatrixAntsrememberwherethey’vebeenonagiventour

InitializePheromoneConstructAntSolutions Foreachant, chooseastartcity, constructatour,biasingstepsbypheromone,optionallyevaporatingpheromone, returnhomeUpdatePheromoneRepeat

Variations:elitist,rankbased,max‐min:alterpheromonedepositionandupdate

Page 20: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

AntSystem•  Antcycle:pheromonedepositisdeterminedglobally(notveryantlike)basedonthelength

ofthetour•  Initialization:

Initializepheromoneand m=#ants,Cnn=lengthofnearest neighbortour

heuristicinformationforalli,j: di,j=distancefromitoj

•  Tourconstructionformula

•  Whatdoalphaandbeta

represent?

τ i, j =mCnn

ηi, j =1di, j

Page 21: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

•  Pheromoneupdate

•  Pheromoneevaporation

•  ASparametersettings:–  Alpha=1

–  Beta=2to5

–  Rho=.5

–  m=n(numberofants=numberofcities)

–  Tau0initialization=m/Cnn

•  AntCycle:pheromoneupdatedependsontourlength,

Soitisupdatedonlyafteracompletedtour

•  ElististAS:ReinforceTbs(bestsofartour)

Δτi , j

k =1Ck

CkistourlengthofkthantIf(i,j)areonthetourofthekthant0otherwise

τi , j

= τi , j

+ Δτi , j

k + eΔτi , j

bs

k=1

m

Δτi , j

bs =1Cbs

Page 22: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

Dorigo1996

Page 23: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant

•  Thecomplexityoftheant‐cyclealgorithmisO(NC*n2*m)–  NC=NumberofCycles–  n=numberofcities–  m=numberofants

•  ExperimentallyASworksbestwhenm=n•  ComplexityisO(NC*n3)•  Note:globalcommunicationinAntCyclerestrictsparallelization

–  LamarkianpheromonesvsDarwinianpheromones•  Whydoesitwork?

–  Reducesthesizeofthesearchspace(focusthesearch)–  Howquicklydotoursconvergeorstagnate?

•  Lambdaisthenumberofarcspernodelikelytobechosen

•  Pheromonebiasvspheromoneevaporation(Alphavsrho)?

Page 24: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant
Page 25: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant
Page 26: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant
Page 27: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant
Page 28: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant
Page 29: Ant Colony Optimization - University of New Mexicomelaniem/courses/CAS09_files/ACO.pdfAnt Colony Optimization April 8 2009 CS 591: Complex Adaptive Systems Melanie Moses, Assistant