Cellular Automata Tutorial.docx
《Cellular Automata Tutorial.docx》由会员分享,可在线阅读,更多相关《Cellular Automata Tutorial.docx(26页珍藏版)》请在冰豆网上搜索。
CellularAutomataTutorial
CellularAutomataTutorial
1.Introduction
Fromthetheoreticalpointofview,CellularAutomata(CA)wereintroducedinthelate1940'sbyJohnvonNeumann(vonNeumann,1966;Toffoli,1987)andStanislawUlam.Fromthemorepracticalpointofviewitwasmorelessinthelate1960'swhenJohnHortonConwaydevelopedtheGameofLife(Gardner,1970;Dewdney,1989;Dewdney,1990).
CA'sarediscretedynamicalsystemsandareoftendescribedasacounterparttopartialdifferentialequations,whichhavethecapabilitytodescribecontinuousdynamicalsystems.Themeaningofdiscreteis,thatspace,timeandpropertiesoftheautomatoncanhaveonlyafinite,countablenumberofstates.Thebasicideaisnottotrytodescribeacomplexsystemfrom"above"-todescribeitusingdifficultequations,butsimulatingthissystembyinteractionofcellsfollowingeasyrules.Inotherwords:
Nottodescribeacomplexsystemwithcomplexequations,butletthecomplexityemergebyinteractionofsimpleindividualsfollowingsimplerules.
HencetheessentialpropertiesofaCAare
∙aregularn-dimensionallattice(nisinmostcasesofoneortwodimensions),whereeachcellofthislatticehasadiscretestate,
∙adynamicalbehaviour,describedbysocalledrules.Theserulesdescribethestateofacellforthenexttimestep,dependingonthestatesofthecellsintheneighbourhoodofthecell.
Thefirstsystemextensivelycalculatedoncomputersis-asmentionedabove-theGameofLife.Thisgamebecamethatpopular,thatascientificmagazinepublishedregularlyarticlesaboutthe"behaviour"ofthisgame.Contestswereorganizedtoprovecertainproblems.Inthelate1980'stheinterestonCA'sarisedagain,aspowerfulcomputersbecamewidelyavailable.Todayasetofacceptedapplicationsinsimulationofdynamicalsystemsareavailable.
top
2.AGlanceatDynamicalSystemsandChaosor"AnewSciencenamedComplexity"
NatureandNature'sLawlayhidinnight,
Godsaid,letNewtonbe!
andallwaslight!
ThisproposedepitaphfromAlexanderPopeforIsaacNewtonsgraveshowsthementalattitudeofthe19thcentury.Sincethebeginningofthe20thcenturythescientificcommunityhadtodismiss(withaheavyheart)theideaofthecapabilitytocalculatethefuturestateofaphysicalsystemexactlyifthecurrentstateofthesystemisknownwithahighprecision.
ThisideaiscalledinamorephilosophicalterminologytheLaplacianDemon,referingtoanidealdemon,knowingpreciselythecurrentstateofasystem,mustbeabletoforeseetheexactdevelopmentofthissystem.Inthebackofthemindwasthebelieve,thatsmallerrorsinanalysationofthecurrentsystemwillcausesmallerrorsinextrapolationoffuturedevelopmentofthesystem.)
Iwanttopointoutthattheseideashadtofallregardingafewselectedmilestones,thatshowthenecessityforthechangeoftheparadigm:
∙HenriPoincareandthe"solution"ofthe3-bodyproblem
∙EdwardLorenzproblemofweatherforecast
∙WernerHeisenbergandtheuncertaintyrelation
OscarIItheSwedishking,whowasveryinterestedinmathematicsfoundedapricewonbyPoincareproofing,thatthereisnoclosedformmathematicalsolutionforthisproblem.(Besides:
ThearticleofPoincarewasthatchaotic,thataprintedandpartiallysoldcirculationhastobereprinted,asthelastchangesfromPoincarearrivedthatlate.ThisreprinthastobepaidbyPoincare,sothatthesumhereceivedfromOscarIIwasmorethanspent.
ThecontactofLorenztochaoticsystemsoccurredindoingweatherforecasts.Totellitinfewwords:
tryingdifferentmodels(andtryingtospeedupthecalculations)Lorenzreducedtheprecisionofoneparameter,thinking,thatthiswillleadinlittlereducedaccuracyintheresultofthecalculation.Theastonishingoutcomewasacompletelydifferentresult!
Aconsequencebothmendrawis,thatcomplexdynamicalsystemsoftenshowhugeeffectsonsmallchangesinthestartingconditions.
WernerHeisenbergsupplementsthefinding,thatitisimpossibletomeasurethepositionandspeedofaparticlewithhighprecisionatthesametime.Thiscognitionisoneofthebasisbricksofthequantumtheory.PuttingtheresultsofLorenzandPoincaretogetherwiththeuncertaintyrelationHeisenberg'sonecanseeclearly,thattheLaplacianDemonhaslostit'srighttoexist.Thiswasashockformostofthescientists.Newattemptstotheunderstandingofcomplexdynamicalsystemswerenecessary.WiththeworkofBenoitMandelbrotthenewscienceoffractal(broken)dimensionsandchaosstarted,recentlyamoreunifiedapproachcalledthescienceofcomplexityemerged.
Tryingtogiveadefinitionofcomplexityshowsthedifficultsituationthisnewbranchstucksin.ThephysicistSethLloydfromtheMITfoundthatmorethan30differentdefinitionsofComplexityexist.
NeverthelessadefinitionfromChristopherLangtonfromSantaFeInstituteseemstobeessential,describingComplexityasthesciencetryingtodescribethestatesontheedgeofchaos.Inotherwords,heassumes,thatorderemergesfromsystemsontheedgeofchaos.Inmoregeneraltermsonecanposethequestion:
"Howarisesorderfromchaos?
".
Astherearealotofdifferentstreamsinchaosandcomplexityresearch,itisnotthespaceheretodiscusstheseinterestingdevelopmentsindetail.Ijustfeltthenecessitytogetintotouchwiththeseitems.FormoreseriousintroductionsIcanrecommendMcCauley(1993)andOtt(1994).
top
3.BuildingCellularAutomata
3.1TheCell
ThebasicelementofaCAisthecell.Acellisakindofamemoryelementandstores-tosayitwitheasywords-states.Inthesimplestcase,eachcellcanhavethebinarystates1or0.Inmorecomplexsimulationthecellscanhavemoredifferentstates.(Itiseventhinkable,thateachcellhasmorethanonepropertyorattributeandeachofthesepropertiesorattributescanhavetwoormorestates.)
3.2TheLattice
Thesecellsarearrangedinaspatialweb-alattice.Thesimplestoneistheonedimensional"lattice",meaningthatallcellsarearrangedinalinelikeastringofperls.ThemostcommonCA'sarebuiltinoneortwodimensions.WhereastheonedimensionalCAhasthebigadvantage,thatitisveryeasytovisualize.Thestatesofonetimestepareplottedinonedimension,andthedynamicdevelopmentcanbeshownintheseconddimension.AflatplotofaonedimensionalCAhenceshowsthestatesfromtimestep0totimestepn.ConsideratwodimensionalCA:
atwodimensionalplotcanevidentlyshowonlythestateofonetimestep.Sovisualizingthedynamicofa2DCAisbythatreasonmoredifficult.
Bythatreasonsandbecause1DCA'saregenerallymoreeasytohandle(thereisamuchsmallersetofpossiblerules,comparedto2DCA's,aswillbeexplainedinthenextsection)firstofalltheonedimensionalCA'shavebeenexploitedbetheoreticians.Mosttheoreticalpapersavailabledealwithpropertiesof1DCA's.
3.3Neighbourhoods
Uptonow,thesecellsarrangedinalatticerepresentastaticstate.Tointroducedynamicintothesystem,wehavetoaddrules.The"job"oftheserulesistodefinethestateofthecellsforthenexttimestep.Incellularautomataaruledefinesthestateofacellindependenceoftheneighbourhoodofthecell.
Differentdefinitionofneighbourhoodsarepossible.Consideringatwodimensionallatticethefollowingdefinitionsarecommon:
vonNeumannNeighbourhood
fourcells,thecellaboveandbelow,rightandleftfromeachcellarecalledthevonNeumannneighbourhoodofthiscell.Theradiusofthisdefinitionis1,asonlythenextlayerisconsidered.
MooreNeighbourhood
theMooreneighbourhoodisanenlargementofthevonNeumannneighbourhoodcontainingthediagonalcellstoo.Inthiscase,theradiusr=1too.
ExtendedMooreNeighbourhood
equivalenttodescriptionofMooreneighbourhoodabove,butneighbourhoodreachesoverthedistanceofthenextadjacentcells.Hencether=2(orlarger).
MargolusNeighbourhood
acompletelydifferentapproach:
considers2x2cellsofalatticeatonce.formoredetailstakealookattheApplications
vonNeumannNeighbourhood
MooreNeighbourhood
ExtendendMooreNeighbourhood
Theredcellisthecentercell,thebluecellsaretheneighbourhoodcells.Thestatesofthesecellsareusedtocalculatethenextstateofthe(red)centercellaccordingtothedefinedrule.
Asthenumberofacellsinalatticehastobefinite(bypracticalpurposes)oneproblemoccursconsideringtheproposedneighbourhoodsdescribedabove:
Whattodowithcellsatborders?
Theinfluencedependsonthesizeofthelattice.Togiveanexample:
Ina10x10latticeabout40%ofthecellsarebordercells,ina100x100latticeonlyabout4%ofthecellsareofthatkind.Anyway,thisproblemmustbesolved.Twosolutionsofthisproblemarecommon:
1.Oppositebordersofthelatticeare"stickedtogether".Aonedimensional"line"becomesfollowingthatwayacircle,atwodimensionallatticebecomesatorus.
2.thebordercellsaremirrored:
theconsequencearesymmetricborderproperties.
Themoreusualmethodisthepossibility1.
3.4ApplyingRules
Anexampleof"macroscopic"dynamicresultingfromlocalinteractionis"thewave"ina-saysoccer-stadium.Eachpersonreactsonlyonthe"state"ofhisneighbour(s).Iftheystandup,hewillstanduptoo,andafterashortwhile,hesitsdownagain.Localinteractionleadstoglobaldynamic.Onecanarrangetherulesintwo(three)classes:
1.everygroupofstatesoftheneighbourhoodcellsisrelatedastateofthecorecell.E.g.consideraone-dimensionalCA:
arulecouldbe"011->x0x",whatmeansthatthecorecellbecomesa0