÷ƒ’À;è TeX output 2000.05.10:1600‹ÿÿÿÿ y ý£ ? þ’‘dJóDÓítG®G®cmr17ºSw•Œqarm›7tb“y˜example:‘¬ó߆µTG® cmtt12»bellŽŸ’È÷óX«Q cmr12¼Ralf‘ê¨StephanŽŽŽŽŽŸfj’È„Ma¬ry–ê¨10,“2000ŽŸ"€‘>ó|{Ycmr8½Cop•ÃŽyrigh“t‘1ÌžÂEcŽŽŽ‘ÕXó¾KÈ cmsy8Ã ŽŽŽ‘ U`½2000–ÕXRalf“Stephanޤ €‘>PšÃŽermission––Lis“gran˜ted“to“cop˜y‘ÿJª,‘Ɖdistribute“and/or“mošthe–¼âGNU‘¼¦F‘ÿJªree“DovÃŽersion",›y%"First–%/V‘ÿJªersion“Thanks",˜"Conclusions“abDoA‘ŒƒcopšÃŽy–Œ•of“the“license“is“included“in“the“section“en˜titled“"GNU‘ŒƒF‘ÿJªree“DoóÂÖN ff cmbx12ÆCon•ŒÌten“tsޤ‘>óò"V cmbx10Ç1Ž‘MAbQÇout–ÕTthe“ rst“v®9ersion’ÐØV2ŽŽ¡‘>2Ž‘MFirst–ÕTV‘ÿ «ersion“Thanks’ÙÒ¦3ŽŽ¡‘>3Ž‘MIn®9troQÇduction’Øú3ŽŽ¦‘MóKñ`y cmr10²3.1Ž‘dImagining–UUthe“situation‘8A‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢3ŽŽ¦‘M3.2Ž‘dMore–UUdetailed:‘qÇthe“ rst“moGdel‘T‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢4ŽŽ¦‘M3.3Ž‘dP¸ãossible‘UUob‘Ž8jects/classes‘»‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢5ŽŽ¡‘>Ç4Ž‘MThe–ÕTBoard“class“and“its“ob‘£Žjects’¥ŽÓ5ŽŽ¦‘M²4.1Ž‘dA–UUclass“sk¸ãeleton‘Æ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢5ŽŽ¦‘M4.2Ž‘dThe–UUbuildOb‘Ž8jects“methoGd‘¸;‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢6ŽŽ¦‘d4.2.1Ž’„Con¸ãtrol‘UUpanel‘xW‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢6ŽŽ¦‘d4.2.2Ž’„Balls–UUand“nails‘”À‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢6ŽŽ¦‘d4.2.3Ž’„The–UURaster“frame‘”»‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢7ŽŽ¦‘d4.2.4Ž’„The–UUw¸ãorld“grid‘ª‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢8ŽŽ¦‘d4.2.5Ž’„Displaš¸ãying–UUthe“w˜orld‘‹‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢8ŽŽ¦‘d4.2.6Ž’„Summary–UUof“buildOb‘Ž8jects‘‹‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¢9ŽŽ¦‘M4.3Ž‘dThe–UUbuildActions“methoGd‘Fs‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡10ŽŽ¦‘M4.4Ž‘dThe‘UUactiv‘ÿqÇateIn:‘qÇmethoGd‘›Ñ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡11ŽŽ¦‘M4.5Ž‘dSummary–UUof“the“Board“class“ les‘°ý‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡12ŽŽ¡‘>Ç5Ž‘MThe–ÕTBalls“class’ó‚ 13ŽŽ¦‘M²5.1Ž‘dóßêÇ6Ž‘MThe–ÕTNails“class’ò°Ù16ŽŽŽŸ’è²1ŽŽŒ‹* y ý£ ? ýä‘>Ç7Ž‘MBall‘ÕTagen®9ts’ц18ŽŽ¤ ‘M²7.1Ž‘dThe–UUstep“methoGd‘ã‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡19ŽŽ¡‘M7.2Ž‘dThe‘UUdra¸ãwSelfOn:‘qÇmethoGd‘"å‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡20ŽŽ¤‘>Ç8Ž‘MNail‘ÕTagen®9ts’ÿ¿20ŽŽ¡‘>9Ž‘MStringRepresenš®9tation–ÕTof“the“initial“w˜orld‘q…D22ŽŽ¡‘>10Ž‘MThe–ÕTP®9osition“class’ã`Ý24ŽŽ¡‘>11Ž‘MThe–ÕT le“main.m’îÉ25ŽŽ¡‘>12Ž‘MThe‘ÕTMak®9e le’ü 25ŽŽ¡‘>13Ž‘MDebugging’̇28ŽŽ¤ ‘d²13.0.1Ž’„Coredump:‘qÇno‘UUcolormap‘)ê‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡28ŽŽ¡‘d13.0.2Ž’„Windo¸ãw–UUtošGo“small:‘qÇzo˜om“factor‘MV‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡29ŽŽ¡‘d13.0.3Ž’„W‘ÿ*ªorld–UUhas“no“nails:‘qÇputOb‘Ž8ject‘? ‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡30ŽŽ¡‘d13.0.4Ž’„Board–UUwidth:‘qÇunkno¸ãwn“cause‘ðî‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡32ŽŽ¡‘d13.0.5Ž’„No–UUgo:‘qÇBall“x,y“not“set[º‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡33ŽŽ¡‘d13.0.6Ž’„Ball‘UUo•¸ãv“er o“w!‘ã‘ü.ŽŽ–Ç‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ“‘ü.ŽŽ‘¡34ŽŽ¤‘>Ç14Ž‘MConclusions–ÕTabQÇout“the“ rst“v®9ersion’ŽÒe35ŽŽ¡‘>15Ž‘MGNU–ÕTF‘ÿ «ree“DoQÇcumen®9tation“License’¯å35ŽŽŸ!Ä‘>Æ1Ž‘VLËAbs3out–ffthe“ rst“vŒÌersionŽŸç‘>²This–m>došGcumen¸ãt“describ˜es“the“dev•¸ãelopmen“t–m>of“the“co˜de“of“the“¹bell“²Ob‘Ž8jectiv¸ãe-Cޤ ‘>óý': cmti10Èswarm‘Œh²demo–Èprogram,‘äHa“toš¸ãy“moGdel“that“sho˜ws“a“bunc˜h“of“balls“hitting“nails“andŽ¡‘>bšGeing– äcollected“in“slots,‘<appro¸ãximating“a“b˜ell“curvš¸ãe.‘›uÈswarmŸü^ÿóÙ“ Rcmr7±1ŽŽ‘ŠW²is“an“Ob‘Ž8jectiv˜e-Ž¡‘>C/Ja•¸ãv‘ÿqÇa›"Óframew“ork˜for˜agen“t-based˜moGdelling˜(ABM),˜but˜not˜restricted˜to˜thisŽ¡‘>use.‘MdY›ÿ*ªou–è-should“bGe“able“to“ nd“a“T˜ransparenš¸ãt“cop˜y“of“this“doGcumen˜t“at“m˜y“w˜ebŽ¡‘>pageŸü^ÿ±2ŽŽ‘ÑȲor–UUthe“sw¸ãarm.org“pages.Ž¡‘MThis–y˜vš¸ãersion“v˜erbGosely“in˜trošGduces“the“original“co˜de“in“Sections“4“(¹Board²)Ž¡‘>through–0"12“(¹Makefile²)“.‘-The“Debugging“Section“13“deals“with“debugging“ofŽ¡‘>this– Âvš¸ãersion“but“shouldn't“pro˜v˜ok˜e“general“in˜terest.‘˜With“few“exceptions,‘:theŽ¡‘>coGde–XAwš¸ãas“written“in“the“order“y˜ou“see“it.‘z‹Disclaimer:‘wŸThe“order“the“stu “isŽ¡‘>presenš¸ãted–UUhere“should“bGe“no“dogma“for“the“reader's“dev˜elopmen˜t“w˜ork.‘ ø¿R.S.,Ž¡‘>April‘UU2000Ž‘>ŸX-‰ff‰ÿvŸ J=‘ "5Ÿý-:ó¹Aa¨cmr6¾1ŽŽŽ‘Lܽh•ÃŽttp://www.sw“arm.orgŽŸ Š>‘ "5Ÿý-:¾2ŽŽŽ‘LܽhÃŽttp://me.in-b•Æ2Ž‘VLËFirst–ffV‘þ¦fersion“ThanksŽŸç‘>²The–K¬idea“for“the“doGcumen¸ãt“ ew“to“me“from“a“StarlogoŸü^ÿ±3ŽŽ–Ȳpro‘Ž8jectŸü^ÿ±4ŽŽ“²with–K¬the“sameޤ ‘>theme.Ž¡‘MT‘ÿ*ªoGols–ežused“for“pictures“and“text“include“but“wš¸ãere“not“limited“to“no˜w˜ebŸü^ÿ±5ŽŽ‘|s²,Ž¡‘>LŸýó5‘üff±AŽŽ›Í‰²T‘þU>Ÿ'EŽ‘ãxX,–UUx g,“The“GimpŸü^ÿ±6ŽŽ‘|s²,“LŸýó5‘üff±AŽŽ˜²T‘þU>Ÿ'EŽ‘ãxX2¹HTML²,“and“Ama•¸ãy“a-2.2Ÿü^ÿ±7ŽŽ‘|s².Ž¡‘MKudos–UUto“all“authors“of“the“soft•¸ãw“are–UUI“needed“for“this.‘±£R.S.,“April“2000ŽŸ!Ä‘>Æ3Ž‘VLËInŒÌtros3ductionŽŸç‘>óÂÖN  cmbx12É3.1Ž‘\ÀImagining–€the“situationŽ †¡ÉŸ(ß’³L×ïYps: currentpoint currentpoint translate 0.31606 0.31606 scale neg exch neg exch translateïXps: gsave currentpoint currentpoint translate -90 neg rotate neg exch neg exch translateï?PSfile="schema.ps.gz" llx=151 lly=247 urx=444 ury=595 rwi=2930 ŽŽ’&Hï ps: currentpoint grestore movetoŽŽŽŽŽïeps: currentpoint currentpoint translate 1 0.31606 div 1 0.31606 div scale neg exch neg exch translateŽŽŸnåZ’ÄQ²Figure‘UU1:‘qÇSc¸ãhemaŽŽŽŸ‘>Picture–same–ºsize,‘à erectly“sticš¸ãking“in“the“ground.‘@éF‘ÿ*ªollo˜wing“that,‘à there“is“a“50-50“c˜hanceŽ¡‘>that–»àit“will“roll“on“doš¸ãwn“either“of“the“t˜w˜o“sides.‘¥gSoGon“it“will“hit“the“next“nailŽ¡‘>cenš¸ãter,–UUwith“the“same“c˜hances“of“mo˜ving“on“to“the“left“or“righ˜t.Ž¡‘MPresume–óßthat“the“nails“are“standing“ev¸ãenly-spaced“in“a“triangular“area,‘]withŽ¡‘>the–‚B rst“nail“the“top“corner“of“the“triangle,‘}and“on“the“symmetry“axis.‘øSo“y¸ãouŽ¡‘>can–UUsee“ro¸ãws“of“1,2,3,4ó  b> cmmi10µ:–ª¨:“:Ž‘ÿü²nails,“all“symmetrical“to“the“same“axis.Ž¡‘MNo•¸ãw,‘Íif›ñy“ou˜let˜enough˜balls˜pass˜this˜parcourt,–Íand˜collect˜them,“whereŽ¡‘>they–›fall,›ìin“tubGes,˜yš¸ãou“w˜ould“get“a“picture“of“the“so-called“gaussianŸü^ÿ±8ŽŽ‘ ‘²curv˜eŽ¡‘>(referring–µto“its“disco•¸ãv“erer)–µor“bšGell“curv¸ãe“(referring“to“its“shap˜e).‘ZçThe“b˜ell“curv¸ãeŽ¡‘>is–°(ubiquitous“in“nature“and/or“is“used“extensiv¸ãely“in“statistics.‘:¸Its“mathematicalŽ¡‘>formš¸ãula–UUis“deriv˜ed“from“the“function“in“Fig.“2.Ž‘>ŸX-‰ff‰ÿvŸ J=‘ "5Ÿý-:¾3ŽŽŽ‘LܽhÃŽttp://el.www.media.mit.edu/groups/el/Proxäjects/starlogo/ޤ Š>‘ "5Ÿý-:¾4ŽŽŽ‘LܽhšÃŽttp://el.www.media.mit.edu/groups/el/Pro•xäjects/starlogo/pro“jects/gaussian.h˜tmlŽ¡‘ "5Ÿý-:¾5ŽŽŽ‘Lܽh•ÃŽttp://www.eecs.harv‡ard.edu/~nr/no“w“eb/Ž¡‘ "5Ÿý-:¾6ŽŽŽ‘LܽhÃŽttp://www.gimp.orgŽ¡‘ "5Ÿý-:¾7ŽŽŽ‘Lܽh•ÃŽttp://www.w3.org/Ama“y“a/Ž¡‘ "5Ÿý-:¾8ŽŽŽ‘Lܽh•ÃŽttp://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Gauss.h“tmlŽŽŸ’è²3ŽŽŒ‹'d y ý£ ? þj ÿoâã’”@ôïYps: currentpoint currentpoint translate 0.23868 0.23868 scale neg exch neg exch translateïXps: gsave currentpoint currentpoint translate -90 neg rotate neg exch neg exch translateïÉ3.2Ž‘\ÀMore–€detailed:‘the“ rst“mo`delŽŸuT‘>²Ideally–æy(Fig.“3),›ü¥the“user“starts“the“program,˜clic¸ãks“on“the“Start“button“and“seesޤ ‘>balls– xpGouring“out“of“a“con¸ãtainer,›6€through“the“nail“area,˜and“inš¸ãto“the“p•Go“c˜k˜ets,Ž¡‘>stopping–‘~when“all“balls“are“still.‘&AThe“start“n•¸ãum“b•Ger/p“ositions–‘~of“balls/nails“areŽ¡‘>stored–UUin“a“2D-string“fashion“for“easy“editing.Ž¡‘MGraphically‘ÿ*ª,‘SSthe–RÒuser“will“see“the“whole“area“as“a“cartesian“plane“with“pixelŽ¡‘>c•¸ãh“unks–Œáreplaced“bš¸ãy“images“for“nicer“loGok.‘kIt“suces“to“ha˜v˜e“balls“and“nails“onŽ¡‘>the–UUbGoard,“other“agen¸ãts“aren't“needed“for“this“demo.Ž ÎåýŸè9‘>ïYps: currentpoint currentpoint translate 0.67493 0.67493 scale neg exch neg exch translateïVps: gsave currentpoint currentpoint translate 0 neg rotate neg exch neg exch translateï?PSfile="sshot2.ps.gz" llx=222 lly=257 urx=390 ury=505 rwi=1680 ŽŽ’¨¡Hï ps: currentpoint grestore movetoŽŽŽŽŽïeps: currentpoint currentpoint translate 1 0.67493 div 1 0.67493 div scale neg exch neg exch translateŽ’Æî\ïYps: currentpoint currentpoint translate 1.10738 1.10738 scale neg exch neg exch translateïVps: gsave currentpoint currentpoint translate 0 neg rotate neg exch neg exch translateï>PSfile="sshot4.ps.gz" llx=274 lly=329 urx=338 ury=433 rwi=640 ŽŽ‘@=pï ps: currentpoint grestore movetoŽŽŽŽŽïeps: currentpoint currentpoint translate 1 1.10738 div 1 1.10738 div scale neg exch neg exch translateŽ’%/æïYps: currentpoint currentpoint translate 0.67493 0.67493 scale neg exch neg exch translateïVps: gsave currentpoint currentpoint translate 0 neg rotate neg exch neg exch translateï?PSfile="sshot3.ps.gz" llx=222 lly=257 urx=390 ury=505 rwi=1680 ŽŽ’¨¡Hï ps: currentpoint grestore movetoŽŽŽŽŽïeps: currentpoint currentpoint translate 1 0.67493 div 1 0.67493 div scale neg exch neg exch translateŽŽŸ’¹˜ßFigure–UU3:‘qÇScreen“shotsŽŽŽŸ‘MAnother–¤0issue“w¸ãould“bšGe“sp˜eed:‘}the“demonstration“should“b˜e“timed“go˜o˜dŽ¡‘>enough–UUto“bGe“realistically“and“visually“pleasing.ŽŽŸ’è4ŽŽŒ‹2~ y ý£ ? ýä‘>É3.3Ž‘\ÀP ossible‘€ob‘Àjects/classesŽŸuT‘>²F‘ÿ*ªrom–zäthe“abGo•¸ãv“e,‘„Hw“e›zäha“v“e˜sev“eral˜candidates˜to˜bGe˜crystallized˜in“to˜classes:‘¼åtheޤ ‘>¹Board²,–UUthe“¹Balls²,“the“¹Nails²,“the“¹Nail²,“the“¹Ball²:ŽŸ鯑WUsually‘ÿ*ª,‘4KÈswarm‘ðk²cošGde–,separates“the“GUI‘+þfrom“the“mo˜del“for“sp˜eed“reasonsŽ¡‘Wwith–ŸRlarge“mošGdels,‘ùbut“this“do˜esn't“apply“to“this“demonstration“|“it“couldŽ¡‘WbGe–added“later“on,‘=‰if“necessary‘ÿ*ª.‘ŸThe“sw¸ãarmapps“use“an“¹ObserverSwarmŽ¡‘W²that–UUcan“bGe“replaced“b¸ãy“a“¹BatchSwarm²,“for“example.ŽŸað‘WSo–$þ¹Board“²handles“the“graphics“as“w¸ãell“as“the“geometry“here,‘.©and“for“that,Ž¡‘Wit–UUcomm¸ãunicates“with“all“other“classes.Ž©Ãà‘W¹Nails–êS²is“the“class“that,›“from“the“¹Board“²viewpGoin•¸ãt,˜con“tains‘êSinformationŽ¡‘WabGout–UUthe“¹Nail“²agen¸ãts.ަ‘W¹Nail–•³²is“an“agen¸ãt“that“došGes“nothing.‘2áThis“means,‘¥Êits“metho˜ds“are“mostlyŽ¡‘Wempt¸ãy‘ÿ*ª.ަ‘W¹Ball–¤i²is“an“agenš¸ãt“that“acts“through“simple“rules“("gra˜vit˜y",‘ø."balance",Ž¡‘W"bGeing–UUstucš¸ãk"“etc.)‘qÇin“the“en˜vironmen˜t.ަ‘WIt–ÿewš¸ãas“soGon“ob˜vious“that“there“is“a“con˜tainer“needed“to“m˜ultiplex“requestsŽ¡‘Wto–©the“balls,–þtošGo.‘[ŽStunningly‘ÿ*ª,“our–©b˜est“name“for“it“is“¹Balls².‘[ŽW‘ÿ*ªe“migh¸ãt“seeŽ¡‘Wother–UUclasses“pGopping“in¸ãto“existence“as“necessary‘ÿ*ª.ŽŸ鯑>The–FClatter“four“classes“commš¸ãunicate“with“¹Board²,‘IFand“to“some“exten˜t“with“eac˜hŽ¡‘>other.ŽŸ ‰©‘>Æ4Ž‘VLËThe–ffBoard“class“and“its“ob‘æfjectsŽŸç‘>²The–Q» rst“ les“to“bšGe“written“are“¹Board.h“²and“¹Board.m²,‘Rsso“the“co˜de“c•¸ãh“unks‘Q»thatŽ¡‘>folloš¸ãw–UUgo“in˜to“these.‘qÇIn“the“last“subsection,“w˜e'll“join“all“the“c˜h˜unks“together.ŽŸv‘>É4.1Ž‘\ÀA–€class“sk eletonŽŸuT‘>²The–úconš¸ãtrol“panel“that“w˜e“need“is“pro˜vided“b˜y“the“Èswarm‘Å]²class“¹GUISwarm“²whic˜hŽ¡‘>itself–¶pis“a“subGclass“of“¹Swarm“²that“represenš¸ãts“a“general“con˜tainer“for“agen˜ts,‘Ö8givingŽ¡‘>them–UUcommon“time“and“memory‘ÿ*ª,“so“w¸ãe“inherit“¹Board“²in“theޤ að‘Ñ”½5aŽ‘>ó$©±Ê cmsy9Ïhó"¼j‘¹ cmti9ÍBo•‡ar“d›NÏhÍImpš‡ort–NŽŸað‘M²The–¸#folloš¸ãwing“coGde“c˜h˜unks“describGe“the“ le“¹Board.m².‘š2A˜t“the“top,‘Ð×the“classŽŸ ‘>header–UU le“is“included“and“the“implemen¸ãtation“started.Ž¡‘ Jx½5cŽ‘>ÏhÍImp•‡ort›NbGe›§in•¸ãv“ok“ed˜b“y˜sending˜a˜message˜to˜the˜class˜itself,‘0|not˜to˜one˜of˜the˜ob‘Ž8jectsŽ¡‘>instan¸ãtiated–^Mfrom“it,‘`Œand“one“of“their“usages“are“factory“methošGds.‘Œ°The“metho˜dŽ¡‘>is–o×implemenš¸ãted“within“¹Board.m“²and“it“simply“in˜v˜ok˜es“the“supGer“class'“¹create:Ž¡‘>²metho•Gd.‘qÇClass›UUmetho“ds˜are˜pre xed˜with˜a˜plus˜c¸ãharacter.Ž©‘Ñ”½6aŽ‘>ÏhÍBo•‡ar“d::cr“e“ate–NÉ4.2Ž‘\ÀThe–€buildOb‘Àjects“metho`dޤuT‘>Ç4.2.1Ž‘a#‚Con®9trol‘ÕTpanelŽ¡‘>²Creation–HJof“the“ob‘Ž8jects“conš¸ãtained“b˜y“¹Board“²happGens“all“in“t˜w˜o“methoGds“namedޤ ‘>¹buildObjects–t£²and“¹buildActions²,–|wrespGectivš¸ãely‘ÿ*ª.‘ϱFirst,“a–t£message“is“sen˜t“to“theŽ¡‘>¹GUISwarm–“%²parenš¸ãt“class“of“¹Board“²to“giv˜e“it“the“oppGortunit˜y“to“build“its“ob‘Ž8jects,Ž¡‘>for–Åyexample“the“¹controlPanel“²whicš¸ãh“is“a“globally“accessible“ob‘Ž8ject.‘Â2Then“w˜eŽ¡‘>wš¸ãait–Þfor“the“user“to“clic˜k“a“button“on“the“con˜trol“panel,‘ )and“quit“if“it's“the“QuitŽ¡‘>button.ަ‘X°½6bŽ‘>ÏhÍHandxäle›NÇ4.2.2Ž‘a#‚Balls–ÕTand“nailsŽŸuT‘>²Aš¸ãt–C¦this“time,‘G0the“user“has“clic˜k˜ed.‘kâ¹Balls“²and“¹Nails“²m˜ust“bGe“instan˜tiated.‘kâIn“aޤ ‘>more– msophisticated“Èswarm‘Îвsimš¸ãulation,‘hone“w˜ould“create“an“ob‘Ž8ject“(for“example,Ž¡‘>a–vó¹ModelSwarm²)“that“separates“the“displaš¸ãy“from“the“sim˜ulated“w˜orld“|“here,Ž¡‘>there–UUis“no“suc¸ãh“ob‘Ž8ject,“so“impšGorts“of“the“resp˜ectiv¸ãe“header“ les“are“necessary‘ÿ*ª.ަ‘ Jx½6cŽ‘>ÏhÍImpš‡ort–NÏhÍnails›N²bGecause–UUit“is“needed“later“when“sc¸ãheduling“is“done.ަ‘ Jx½6eŽ‘>ÏhÍb•‡alxäls›NÏhÍCr•‡e“ate–NÇ4.2.3Ž‘a#‚The–ÕTRaster“frameŽŸuT‘>²Finally‘ÿ*ª,‘ðûgoing–×äon“with“creation“of“GUI‘×Äob‘Ž8jects“is“pšGossible.‘G÷A¸ãt“this“p˜oin¸ãt,‘ðûusuallyޤ ‘>a–$=color“map“is“built,–W÷but,“as–$=all“ob‘Ž8jects“on“the“¹Board“²are“sho¸ãwn“as“pixmaps,Ž¡‘>this–|~step“can“bšGe“skipp˜ed“here“(in“Section“13.0.1,‘†Hw¸ãe'll“see“that“this“is“wrong“soŽ¡‘>expšGect–UUthe“co˜de“to“c¸ãhange“a“bit“later).Ž¡‘MSo,‘X½the–Xnext“thing“to“build“is“a“¹Raster“²ob‘Ž8ject“and“to“dra¸ãw“it.‘yôIt“seems“safeŽ¡‘>to–nÏsaš¸ãy“that“the“¹Raster“²represen˜ts“mainly“the“sim˜ulation“windo˜w“frame“and“itsŽ¡‘>colormap.‘qÇThe–UUhandle“declaration“goGes“in¸ãto“the“header“ le.ަ‘X°½7bŽ‘>ÏhÍworldR•‡aster›N“worldRaster;ŽŸ‘M²The–b@string“represenš¸ãtation“(see“Section“9)“has“the“authorit˜y“for“the“bGoardŽ¡‘>dimensions,‘Ø™only–‹%the“¹worldRaster“²zošGom“factor“is“adapted“exp˜erimen¸ãtally“inŽ¡‘>Section–UU13.0.2.‘qÇThe“rest“of“the“cošGde“should“b˜e“self-explanatory‘ÿ*ª.ަ‘ Jx½7cŽ‘>ÏhÍCr•‡e“ate,–N¹self–ű²is“giv¸ãen“as“the“Zone.‘ÂÛThat“is“pšGossible“b˜ecause“¹Board“²inherits“from“¹ZoneŽ¡‘>²through–UU¹GUISwarm“²through“¹Swarm².Ž¡‘MThe–!Ìmessage“pair“¹createBegin:²/¹createEnd“²is“used“for“creating“ob‘Ž8jectsŽ¡‘>whenevš¸ãer–Ò¼a“distinction“is“necessary“bGet˜w˜een“messages“to“ob‘Ž8jects“'still“not“sc˜hed-Ž¡‘>uled'–ôOand“those“to“ob‘Ž8jects“'in“scš¸ãhedule'.‘N´Messages“in“bGet˜w˜een“suc˜h“pairs“helpŽ¡‘>Èswarm‘ʲwith–,doing“simš¸ãulation“ecien˜tly‘ÿ*ª,‘2band“migh˜t“pro˜vide“the“user“with“im-Ž¡‘>pro•¸ãv“ed–UUmemory“usage“stats“in“the“future.ŽŸþ6‘>Ç4.2.4Ž‘a#‚The–ÕTw®9orld“gridŽŸuT‘>²As–UUsošGon“as“the“frame“is“set,“its“con•¸ãten“t–UUcomes“in¸ãto“fo˜cus.Ž¡‘MIn–÷èother“Èswarm‘¼K²applications,‘ Œthe“grid“conš¸ãtaining“the“agen˜ts,‘ Œas“w˜ell“as“allŽ¡‘>other–îánon-graphical“ob‘Ž8jects“likš¸ãe“v‘ÿqÇalues,‘_is“inside“its“o˜wn“¹Swarm“²to“separate“com-Ž¡‘>putation–UUand“graphics.‘qÇBut,“as“said,“wš¸ãe“put“it“all“in˜to“¹Board“²for“con˜v˜enience.Ž¡‘MW‘ÿ*ªe–1cš¸ãhoGose“a“¹Grid2d“²that“can“con˜tain“arbitrary“in˜t“v‘ÿqÇalues“or“pGoin˜ters.‘eÛNailsŽ¡‘>and–UUballs“are“pšGoin¸ãters“to“the“resp˜ectivš¸ãe“agen˜ts,“and“empt˜y“space“is“0.Ž¡‘MThe–UUdeclaration“is“written“at“the“¹buildObject“²methoGd's“top.Ž©‘Ñ”½8aŽ‘>ÏhÍL•‡o“c“al–N“world;ŽŸ‘M²In–Rneeded–UUbš¸ãy“the“agen˜ts.ަ‘X°½8bŽ‘>ÏhÍCr•‡e“ate–NIts–UUin¸ãterface“should“bšGe“imp˜orted“at“the“¹Board“²class“implemen¸ãtations“top,“to˜o.ަ‘ Jx½8cŽ‘>ÏhÍImp•‡ort›NÇ4.2.5Ž‘a#‚Displaš®9ying–ÕTthe“w˜orldŽŸuT‘>²Noš¸ãw–Öõthat“w˜e“ha˜v˜e“the“windo˜w“frame“and“the“grid,‘ðdisplaš¸ãys–UUthe“agen˜ts“and“put“it“in“a“handle.Ž¡‘MAs–¼çthe“handle“is“used“later“when“ev•¸ãen“ts–¼çare“sc¸ãheduled,‘ÖÌits“declaration“as“aŽ¡‘>priv‘ÿqÇate–¿tmemš¸ãbGer“is“put“in˜to“the“class“header.‘?ÒAccording“to“the“c˜hoice“of“the“grid,Ž¡‘>this–UUwill“bGe“an“¹Object2dDisplay².ަ‘X°½8dŽ‘>ÏhÍb•‡o“ar“dDisplay›N“boardDisplay;ŽŽŸ’è²8ŽŽŒ‹ Z y ý£ ? ýä‘M²The–HLinš¸ãterfaces“of“the“displa˜y“and“grid“classes“reside“in“¹“²so“thisŽŸ ‘>header–UUis“bšGest“imp˜orted“from“the“¹Board“²header,“to˜o.ޤ‘Ñ”½9aŽ‘>ÏhÍImp•‡ort›NŽŸ‘M²Let's–UUcreate“the“displa¸ãy‘ÿ*ª.Ž¡‘X°½9bŽ‘>ÏhÍCr•‡e“ate–Nwill–æ°bGe“senš¸ãt“the“¹drawSelfOn:‘:u²message“to“displa˜y“itself.‘LæAnother“strategy“w˜ouldŽ¡‘>ha•¸ãv“e–UUbšGeen“to“giv¸ãe“the“grid“a“collection“of“to-b˜e-displa•¸ãy“ed‘UUob‘Ž8jects.ŽŸþ6‘>Ç4.2.6Ž‘a#‚Summary–ÕTof“buildOb‘£ŽjectsŽŸuT‘>²Finally‘ÿ*ª,‘Pƒlet's›ONha•¸ãv“e˜a˜loGok˜at˜the˜o“v“erall˜structure˜of˜the˜¹buildObjects˜²methoGd:ŽŸ‘ Jx½9cŽ‘>ÏhÍBo•‡ar“d::buildObje“cts–Nwhic¸ãh–P–is“inherited“from“the“¹Swarm“²supšGerclass.‘c‹It“do˜esn't“seem“a“bad“idea“toŽ¡‘>generally–UU¹return‘?ýself“²so“that“messages“could“bšGe“c¸ãhain“group˜ed.ŽŸþ6‘>É4.3Ž‘\ÀThe–€buildActions“metho`dŽŸuT‘>²In–Ï¥¹buildActions²,‘î9the“main“ev•¸ãen“t–Ï¥loGop“of“the“simš¸ãulation“is“sc˜heduled“and,‘î9forŽ¡‘>that,–UUan“¹ActionGroup“²ob‘Ž8ject“is“needed.Ž¡‘MOne–d*can“saš¸ãy“that“this“is“lik˜e“a“list“of“tasks“to“bGe“w˜ork˜ed“on,‘gàwith“their“o˜wnŽ¡‘>sc•¸ãhedule,‘Ùfe.g.›>$ev“ery–ºjtimestep“of“the“sim¸ãulation.˜It“is“pGossible“to“randomize“tasksŽ¡‘>in–@8an“¹ActionGroup“²bš¸ãy“allo˜wing“them“random“order“within“one“step,‘Dqbut“this“isŽ¡‘>not–Museful“with“the“main“sc¸ãhedule.‘oBut“¹ActionGroup²s“can“bGe“nested,‘N±and“laterŽ¡‘>some–UUagenš¸ãt“sc˜hedules“can“bGe“randomized“if“necessary‘ÿ*ª.Ž¡‘MThe–¿other“ob‘Ž8ject“to“bGe“created“is“the“¹displaySchedule“²itself;‘}sit“needs“toŽ¡‘>knoš¸ãw–UUthe“frequency“it's“running“on,“and“the“¹ActionGroup“²to“sc˜hedule.Ž¡‘MThe–UUhandles“of“bGoth“ob‘Ž8jects“are“declared“in“the“¹Board.h“²header“ le:Ž©‘‘½10aŽ‘>ÏhÍA•‡ction,›Nthe–Â-handle“conforms“to.‘¸NKnoš¸ãwn“messages“to“kno˜wn“ob‘Ž8jects“migh˜t“bGe“handledŽ¡‘>di eren•¸ãtly›)Xb“y˜Èswarm‘í»²than˜those˜to˜unkno“wn˜ones˜but˜there˜doGesn't˜seem˜m“uc“hŽ¡‘>o•¸ãv“erhead.‘‘ A‘_Åside–_Èe ect“of“this“is“that“the“necessary“impšGorts“can“b˜e“k¸ãept“out“ofŽ¡‘>the–UUheader“ le“and“put“on“top“of“the“implemen¸ãtation“ le:ަ‘¬½10bŽ‘>ÏhÍImp•‡ort›NŽŽŸ’åÿ²10ŽŽŒ‹ k¶ y ý£ ? ýä‘M²First,‘›1the–8methošGd“sends“a“message“to“the“sup˜er“class“of“¹Board“²to“build“theޤ ‘>con¸ãtrol–ùÔpanel“and“balls“actions.‘_CThen“it“creates“the“ rst“ob‘Ž8ject“and“adds“theŽ¡‘>memš¸ãbGers–“0of“the“action“list.‘1The“ rst“three“actions“cause“the“con˜ten˜t“of“the“frameŽ¡‘>to–NÍbGe“displa•¸ãy“ed›NÍecien“tly˜|˜no˜actual˜erase˜happ•Gens˜but˜p“ositional˜c¸ãhanges˜ofŽ¡‘>the–UUagen¸ãts“should“bGe“handled.Ž¡‘MThe–( last“action“consists“of“sending“a“message“to“the“Tk“library“to“render“allŽ¡‘>graphical›Äôc•¸ãhanges.‘À£Ob“viously‘ÿ*ª,‘àÛthese˜actions˜ha“v“e˜to˜happGen˜in˜the˜righ“t˜orderŽ¡‘>on–UUev¸ãery“step“so“they“can't“bGe“randomized.Ž¡‘MThe–UUsetting“up“of“the“sc¸ãhedule“ob‘Ž8ject“completes“this“methoGd.Ž©‘‘½11aŽ‘>ÏhÍBo•‡ar“d::buildA“ctions–NÉ4.4Ž‘\ÀThe‘€activ‘ÿ@ateIn:‘metho`dŽŸuT‘>²In–ö„this“methoGd,›Ðthe“already“created“and“set“¹Schedule“²is“activ‘ÿqÇated,˜as“w¸ãell“asޤ ‘>those–’4of“other“ob‘Ž8jects“that“ha•¸ãv“e–’4one,‘álincluding“the“supGer“class.‘(eThe“sw¸ãarmŽ¡‘>conš¸ãtext–Úcomes“from“the“¹main“²function.‘Vó¹Nails“²don't“need“a“sc˜hedule,‘òthey“don'tŽ¡‘>mo•¸ãv“e.ަ‘¬½11bŽ‘>ÏhÍBo•‡ar“d::activateIn–NÉ4.5Ž‘\ÀSummary–€of“the“Board“class“ lesŽŸuT‘>²So,–UUto“put“it“all“together,“there“is“the“implemen¸ãtation“ le:Ž©‘‘½12aŽ‘>ÏhÍBo•‡ar“d.m‘N<½12aÏiŽ‘wB¦¸ޤ ‘HÏhÍImp•‡ort›NÏhÍBo•‡ar“d.h‘N<½12bÏiŽ‘tæ2¸Ž¡‘HÏhÍImpš‡ort–NÆ5Ž‘VLËThe–ffBalls“classŽŸç‘>²This–‘¶class“conš¸ãtains“a“¹List“²of“¹Ball²s,‘ Ïand“activ‘ÿqÇates“their“sc˜heduling.‘&ëIt“handlesޤ ‘>messages–À»from“¹Board“²and“uses“the“¹StringRepresentation“²of“the“moGdel“startŽ¡‘>pšGositions–UUto“set“the“¹Ball“²p˜ositions.ŽŸþ6‘>É5.1Ž‘\Àó&߆µT cmtt12ÑBalls.hŽ©uT‘>²The–UUheader“ le“¹Balls.h“²loGoks“lik¸ãe“this:ŽŸ‘‘½13aŽ‘>ÏhÍBalxäls.h‘N<½13aÏiŽ‘qظޤ ‘HÊ#import‘¹–Ž¡‘H#import‘¹–Ž¡¡‘H@interface–¹–Balls:“SwarmŽ¡‘H{Ž¡‘Qs,id–¹–“theBalls;Ž¡‘Qs,id–¹–ballsActions,“ballsSchedule;Ž¡‘H}Ž¡‘H+–¹–create:“aZone;Ž¡‘H-‘¹–buildObjects;Ž¡‘H-–¹–setWorld:“aWorld;Ž¡‘H-‘¹–buildActions;Ž¡‘H-–¹–activateIn:“swarmContext;Ž¡‘H@end;ŽŸþ6‘>É5.2Ž‘\ÀÑBalls.mަ‘>²The–XJ¹Balls“²implemenš¸ãtation“dra˜ws“resources“from“sev˜eral“other“classes.‘z§The“ leŽŸ ‘>has–UUthe“follo¸ãwing“structureŸü^ÿ±9ŽŽ‘|s²:ŽŸ‘¬½13bŽ‘>ÏhÍBalxäls.m‘N<½13bÏiŽ‘tO¸Ž¡‘HÊ#import‘¹–Ž¡‘H#import‘¹–"Balls.h"Ž¡‘H#import‘¹–"Ball.h"Ž¡‘H#import‘¹–"Position.h"Ž¡‘H#import‘¹–"StringRepresentation.h"Ž¡¡‘H@implementation‘¹–BallsŽ¡¡‘HÏhÍBalxäls::cr•‡e“ate–NŸ(æ·‰ff‰ÿvŸ J=‘ "5Ÿý-:¾9ŽŽŽ‘LܽHere,–ÕXthe“whole“ le“is“presenšÃŽted“ rst,“to“the“con˜trary“with“the“previous“section.ŽŽŸ’åÿ²13ŽŽŒ‹‚b y ý£ ? ýä‘M²Creating– Èthe“ob‘Ž8ject“consists“of“creating“its“supGerclass,‘yda“minimal“createŽ© ‘>methoGd.ŽŸ‘‘½14aŽ‘>ÏhÍBalxäls::cr•‡e“ate–Nformation–?is“readily“a¸ãv‘ÿqÇailable“from“the“¹StringRepresentation“²of“the“initialަ‘>bGoard.ަ‘MAs–Uúthe“¹Position“²ob‘Ž8jects“(see“Section10)“are“nev¸ãer“droppGed“(to“free“theirަ‘>memory–UUetc.)‘qÇelsewhere,“this“has“to“bGe“done“here.ŽŸ‘¬½14bŽ‘>ÏhÍBalxäls::buildObje‡cts–Nreturning–¥sall“¹Position“²ob‘Ž8jects“that“can“bGe“linkš¸ãed“to“the“¹0“²c˜haracter.‘b!It's“alsoަ‘>a–õclass“that“consists“enš¸ãtirely“of“class“methoGds.‘Q On“another“eMail“tip“b˜y“P˜aulަ‘>E‘Johnson,››±the–Ÿ¹List::addFirst“²methoGd“is“used“instead“of“¹addLast²,˜since“theަ‘>order–UUof“balls“in“the“list“doGesn't“matter.ަ‘MThe–÷š¹setWorld“²message“is“receiv¸ãed“from“the“bGoard“when“¹world“²creation“isަ‘> nished.‘žEv¸ãery–4single“ball“needs“a“handle“to“it“bGecause“they“are“assumed“toަ‘>access–:=¹world“²indepGendenš¸ãtly‘ÿ*ª.‘h¿So“w˜e“send“it“with“the“¹setWorld“²message“to“all“ofަ‘>them.ŽŸ‘ t½14cŽ‘>ÏhÍBalxäls::setWorld–NbuiltŸü^ÿ±10ŽŽ‘xæ².ŽŸ‘‘½15aŽ‘>ÏhÍBalxäls::buildA‡ctions–Nactivit¸ãy‘ÿ*ª.ŽŸ‘¬½15bŽ‘>ÏhÍBalxäls::activateIn–N ø/A‰ff‰ÿvŸ J=‘wŽŸý-:¾10ŽŽŽ‘LܽThe–·Ireader“deepÆ6Ž‘VLËThe–ffNails“classŽŸç‘>²This–w5class“con¸ãtains“a“¹List“²of“¹Nail²s,‘£¢and“sets“their“pGositions.‘'½It“handles“messagesޤ ‘>from–ÉC¹Board“²and“uses“the“¹StringRepresentation“²of“the“mošGdel“start“p˜ositionsŽ¡‘>to–UUset“the“¹Nail“²pGositions.Ž¡‘MThe–ÉKdi erence“to“¹Balls“²is“that“nails“are“nevš¸ãer“put“in˜to“the“sim˜ulation“sc˜hed-Ž¡‘>ule–¯since“they“don't“mo•¸ãv“e,‘so–¯there“are“no“¹buildActions“²and“¹activateIn:Ž¡‘>²methoGds–Üneeded.‘pF‘ÿ*ªor“the“same“reason,‘þ[nails“need“not“access“the“w¸ãorld“|“ex-Ž¡‘>cept–ì.for“dra¸ãwing“the“ rst“time“but“then“they“get“it“as“parameter“with“theŽ¡‘>¹drawSelfOn:›qDzmessage–UU|,“and“so“¹setWorld:˜²isn't“needed,“as“w¸ãell.Ž¡‘MThe–UUheader“ le“¹Nails.h“²loGoks“lik¸ãe“this:ŽŸ‘Ñ”½16Ž‘>ÏhÍNails.h‘N<½16ÏiŽ‘mþ¸ޤ ‘HÊ#import‘¹–Ž¡‘H#import‘¹–Ž¡¡‘H@interface–¹–Nails:“SwarmObjectŽ¡‘H{Ž¡‘Qs,id–¹–“theNails;Ž¡‘H}Ž¡‘H+–¹–create:“aZone;Ž¡‘H-‘¹–buildObjects;Ž¡‘H@end;ŽŽŸ’åÿ²16ŽŽŒ‹— y ý£ ? ýä‘M²And–l™the“implemen¸ãtation“ le“can“bšGe“adapted“from“¹Balls.m“²with“the“ab˜o•¸ãv“e-ŽŸ ‘>men•¸ãtioned‘UUc“hanges:ŽŸ‘Ñ”½17Ž‘>ÏhÍNails.m‘N<½17ÏiŽ‘oóV¸ޤ ‘HÊ#import‘¹–"Nails.h"Ž¡‘H#import‘¹–"Nail.h"Ž¡‘H#import‘¹–"Position.h"Ž¡‘H#import‘¹–"StringRepresentation.h"Ž¡¡‘H@implementation‘¹–NailsŽ¡¡‘H+–¹–create:“aZoneŽ¡‘H{Ž¡‘Qs,return–¹–[super“create:“aZone];Ž¡‘H}Ž¡¡‘H-‘¹–buildObjectsŽ¡‘H{Ž¡‘Qs,id‘¹–pos;Ž¡¡‘Qs,theNails–¹–=“[List“create:“[self“getZone]];Ž¡¡‘Qs,[StringRepresentation–¹–resetToChar:“'1'];Ž¡‘Qs,while–¹–((pos“=“[StringRepresentation“getNextPos])“!=“nil)Ž¡‘Qs,{Ž¡‘ZæXid–¹–nail“=“[Nail“create:“[self“getZone]];Ž¡‘ZæX[nail–¹–setX:“[pos“getX]“Y:“[pos“getY]];Ž¡‘ZæX[theNails–¹–addLast:“nail];Ž¡‘ZæX[pos‘¹–drop];Ž¡‘Qs,}Ž¡‘Qs,return‘¹–self;Ž¡‘H}Ž¡‘H@endŽŽŸ’åÿ²17ŽŽŒ‹›˜ y ý£ ? ýä‘>Æ7Ž‘VLËBall‘ffagenŒÌtsŽŸç‘>²Balls–·¶knoš¸ãw“their“pGosition“and“the“w˜orld“grid“where“it“all“happGens.‘˜êAlso,‘ÐNballsŽ© ‘>are–zscš¸ãheduled“to“get“the“¹step“²message“eac˜h“turn.‘Z~So,‘sthe“header“loGoks“lik˜e“this:ŽŸ‘‘½18aŽ‘>ÏhÍBalxäl.h‘N<½18aÏiŽ‘m9¹¸ޤ ‘HÊ#import‘¹–Ž¡‘H#import–¹–‘!//“for“Raster“protocolŽ¡¡‘H@interface–¹–Ball:“SwarmObjectŽ¡‘H{Ž¡‘Qs,unsigned‘¹–x,y;Ž¡‘Qs,id–¹–“world;Ž¡‘H}Ž¡‘H+–¹–create:“aZone;Ž¡‘H-–¹–(void)“setX:“(unsigned)“X“Y:“(unsigned)“Y;Ž¡‘H-–¹–setWorld:“aWorld;Ž¡‘H-–¹–(void)“step;Ž¡‘H-–¹–drawSelfOn:“(id“)“aRaster;Ž¡‘H@end;ŽŸ‘M²The–îˆimplemenš¸ãtation“is“straigh˜tforw˜ard“but“there“is“more“to“sa˜y“abGout“theަ‘>¹step–UU²and“¹drawSelfOn:‘qDzmethoGds.ŽŸ‘¬½18bŽ‘>ÏhÍBalxäl.m‘N<½18bÏiŽ‘p‡õ¸Ž¡‘HÊ#import‘¹–Ž¡‘H#import‘¹–"Ball.h"Ž¡¡‘H@implementation‘¹–BallŽ¡¡‘H+–¹–create:“aZoneŽ¡‘H{Ž¡‘Qs,return–¹–[super“create:“aZone];Ž¡‘H}Ž¡¡‘H-–¹–(void)“setX:“(unsigned)“X“Y:“(unsigned)“YŽ¡‘H{Ž¡‘Qs,x–¹–=“X;Ž¡‘Qs,y–¹–=“Y;Ž¡‘H}Ž¡¡‘H-–¹–setWorld:“aWorldŽ¡‘H{Ž¡‘Qs,world–¹–=“aWorld;Ž¡‘Qs,return‘¹–self;Ž¡‘H}Ž¡¡‘HÏhÍBalxäl::step–NÉ7.1Ž‘\ÀThe–€step“metho`dŽŸuT‘>²In–Öa“certain“w•¸ãa“y‘ÿ*ª,‘ï~an›Öagen“t's˜¹step˜²metho•Gd˜is˜the˜heart˜of˜its˜b“eha¸ãviour.‘GXBalls˜areޤ ‘>presenš¸ãted–Ä with“a“cartesian“w˜orld“consisting“of“other“balls,– rnails,“and‘Ä empt˜yŽ¡‘>space.‘ ¼nThe–n7¹world“²can“(and“should“only)“bGe“queried“and“set“through“theŽ¡‘>¹getObjectAtX:Y:–UU²and“¹putObject:atX:Y:“²methoGds.Ž¡‘MSo–·åhoš¸ãw“to“organize“the“logic“within?‘™xEasy:‘6èget“information,–Љdecide,“mo˜v˜e.Ž¡‘>F‘ÿ*ªor–UUthe“balls,“there“seem“to“bGe“sev¸ãeral“cases:ޤ‘WIf–UUthe“w•¸ãa“y›UU'do“wn'˜is˜clear,˜mo“v“e˜there.Ž¡‘WIf–ý‹the“place“'under'“the“ball“is“ošGccupied,‘c•¸ãhec“k–ý‹if“the“p˜ositions“left/righ¸ãt“ofŽŸ ‘Wthat–UUare“oGccupied.Ž¡‘mIf–UUyš¸ães,“don't“mo˜v˜e.ޤ‘mIf–UUone“is“emptš¸ãy‘ÿ*ª,“mo˜v˜e“there.Ž¡‘mIf–UUbGoth“are“emptš¸ãy‘ÿ*ª,“dra˜w“50-50“lots,“mo˜v˜e.ŽŸ‘MThat's–UUall.‘qÇHere“is“theŽŸ‘Ñ”½19Ž‘>ÏhÍBalxäl::step–NÉ7.2Ž‘\ÀThe‘€dra wSelfOn:‘metho`dŽŸuT‘>²As–¢it“wš¸ãas“planned“to“use“pixmaps“for“the“agen˜ts,‘Åßa“simple“¹drawPoint“²message“toޤ ‘>the–£¶raster“došGesn't“suce.‘6’The“pixmap“has“to“b˜e“loaded“from“a“ le,‘ÇbšGe–,ätak¸ãen“care“that“this“happ˜ens“only“once.‘dLSo,‘4ûthe“static“handle“¹ballPixmap“²isŽ¡‘>used–¦©for“holding“it.‘eÄRemem¸ãbGer,‘ºþall“static“v‘ÿqÇariables“exist“only“once“in“memory‘ÿ*ª,Ž¡‘>and–UUare“initialized“to“0/nil,“so“the“folloš¸ãwing“idiom“w˜orks“nicely‘ÿ*ª.Ž©‘‘½20aŽ‘>ÏhÍBalxäl::dr‡awSelfOn–N)“aRasterŽ¡‘H{Ž¡‘Qs,static–¹–id“ballPixmap;Ž¡¡‘Qs,if–¹–(ballPixmap“==“nil)Ž¡‘Qs,{Ž¡‘ZæXballPixmap–¹–=“[Pixmap“createBegin:“[self“getZone]];Ž¡¡‘ZæX[ballPixmap–¹–setDirectory:“[arguments“getAppDataPath]];Ž¡‘ZæX[ballPixmap–¹–setFile:“"ball.png"];Ž¡‘ZæXballPixmap–¹–=“[ballPixmap“createEnd];Ž¡‘ZæX[ballPixmap–¹–setRaster:“aRaster];Ž¡‘Qs,}Ž¡¡‘Qs,[aRaster–¹–draw:“ballPixmap“X:“x“Y:“y];Ž¡¡‘Qs,return‘¹–self;Ž¡‘H}ŽŸ$Ä‘>Æ8Ž‘VLËNail‘ffagenŒÌtsŽŸç‘>²Nails–­dare“m•¸ãuc“h–­dsimpler“than“balls:‘!æonly“adaptation“of“three“of“¹Ball²s“methoGdsŽŸ ‘>is–UUneeded.‘qÇThis“is“the“header:ަ‘¬½20bŽ‘>ÏhÍNail.h‘N<½20bÏiŽ‘nǸŽ¡‘HÊ#import‘¹–Ž¡¡‘H@interface–¹–Nail:“SwarmObjectŽ¡‘H{Ž¡‘Qs,unsigned‘¹–x,y;Ž¡‘H}Ž¡‘H+–¹–create:“aZone;Ž¡‘H-–¹–(void)“setX:“(unsigned)“x“Y:“(unsigned)“y;Ž¡‘H-–¹–drawSelfOn:“aWorld;Ž¡‘H@end;ŽŽŸ’åÿ²20ŽŽŒ‹¬w y ý£ ? ýä‘M²and–UUhere“goGes“the“implemen¸ãtation:ŽŸ‘Ñ”½21Ž‘>ÏhÍNail.m‘N<½21ÏiŽ‘l,7¸ޤ ‘HÊ#import‘¹–Ž¡‘H#import‘¹–"Nail.h"Ž¡¡‘H@implementation‘¹–NailŽ¡¡‘H+–¹–create:“aZoneŽ¡‘H{Ž¡‘Qs,return–¹–[super“create:“aZone];Ž¡‘H}Ž¡¡‘H-–¹–(void)“setX:“(unsigned)“X“Y:“(unsigned)“YŽ¡‘H{Ž¡‘Qs,x–¹–=“X;Ž¡‘Qs,y–¹–=“Y;Ž¡‘H}Ž¡¡‘H-–¹–drawSelfOn:“(id“)“aRasterŽ¡‘H{Ž¡‘Qs,static–¹–id“nailPixmap;Ž¡¡‘Qs,if–¹–(nailPixmap“==“nil)Ž¡‘Qs,{Ž¡‘ZæXnailPixmap–¹–=“[Pixmap“createBegin:“[self“getZone]];Ž¡¡‘ZæX[nailPixmap–¹–setDirectory:“[arguments“getAppDataPath]];Ž¡‘ZæX[nailPixmap–¹–setFile:“"nail.png"];Ž¡‘ZæXnailPixmap–¹–=“[nailPixmap“createEnd];Ž¡‘ZæX[nailPixmap–¹–setRaster:“aRaster];Ž¡‘Qs,}Ž¡¡‘Qs,[aRaster–¹–draw:“nailPixmap“X:“x“Y:“y];Ž¡¡‘Qs,return‘¹–self;Ž¡‘H}Ž¡‘H@endŽŽŸ’åÿ²21ŽŽŒ‹²í y ý£ ? ýä‘>Æ9Ž‘VLËStringRepresenšŒÌtation–ffof“the“initial“w˜orldŽŸç‘>²There–§œare“no“static“memš¸ãbGer“v‘ÿqÇariables“in“Ob‘Ž8jectiv˜e-C,“but“this“is“no“loss“as“C-ޤ ‘>likš¸ãe–ù—statics“ t“the“same“nic˜he“pGerfectly‘ÿ*ª.‘S2The“header“is“empt˜y“except“for“the“fourŽ¡‘>methoGd‘UUdeclarations.Ž© ]¢‘‘½22aŽ‘>ÏhÍStringR•‡epr“esentation.h‘N<½22aÏiŽ’°ý¸ޤ ‘HÊ#import‘¹–"Position.h"Ž¡¡‘H@interface‘¹–StringRepresentationŽ¡‘H{}Ž¡‘H+–¹–(unsigned)“getSizeX;Ž¡‘H+–¹–(unsigned)“getSizeY;Ž¡‘H+–¹–(void)“resetToChar:“(char)“aChar;Ž¡‘H+–¹–(Position*)“getNextPos;Ž¡‘H@end;ŽŸ]¢‘M²The–—èimplemenš¸ãtation“ le“starts“with“the“actual“string“arra˜y“whic˜h“serv˜es“asޤ ‘>the–4‹database“for“the“class,‘;and“can“bGe“easily“cš¸ãhanged“with“an˜y“ xed-width“fon˜tŽ¡‘>text‘UUeditor.ަ‘¬½22bŽ‘>ÏhÍSR–NŽ¡¡‘H@implementation‘¹–StringRepresentationŽ¡¡‘Hstatic–¹–char“*str[]“=“{Ž¡‘H"– s,100000000000001“",Ž¡‘H"– s,110000000000011“",Ž¡‘H"–,Â1100000000011“",Ž¡‘H"–æX11000000011“",Ž¡‘H"–Ÿî110000011“",Ž¡‘H"–Y„1100011“",Ž¡‘H"–!11011“",Ž¡‘H"‘YÆ"",Ž¡‘H"–*†F1“",Ž¡‘H"–%̰1‘¹–1“",Ž¡‘H"›!1–¹–1“1˜",Ž¡‘H"›Y„1–¹–1“1“1˜",Ž¡‘H"›Ÿî1–¹–1“1“1“1˜",Ž¡‘H"›æX1–¹–1“1“1“1“1˜",Ž¡‘H"›,Â1–¹–1“1“1“1“1“1˜",Ž¡‘H"› s,1–¹–1“1“1“1“1“1“1˜",Ž¡‘H"‘YÆ"",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H"1111111111111111111"};ŽŽŸ’åÿ²22ŽŽŒ‹¶Œ y ý£ ? ýä‘M²Outside–Ê0of“the“¹resetToChar“²methoGd,‘çfthere“are“additional“statics“declared,Ž© ‘>and–UUset“within“for“later“use.ŽŸ‘‘½23aŽ‘>ÏhÍSR–Nnext–UUoGccurence“of“¹activeChar²,“returning“a“¹Position“²ob‘Ž8ject“or“¹nil².Ž©‘¬½23bŽ‘>ÏhÍSR–NÏhÍSR–N“max)“max“=“len;Ž¡‘Qs,}Ž¡‘Qs,return‘¹–max;Ž¡‘H}Ž¡¡‘H-–¹–(unsigned)“getSizeY“{“return“sizeof(str)/sizeof(char*);“}ŽŽŸ’åÿ²23ŽŽŒ‹½q y ý£ ? ýä‘M²A¸ãt–UUlast,“the“whole“ le:Ž©‘‘½24aŽ‘>ÏhÍStringR•‡epr“esentation.m‘N<½24aÏiŽ’³Ò׸ޤ ‘HÏhÍSR–NÆ10Ž‘^fdThe–ffPŒÌosition“classŽŸç‘>²F‘ÿ*ªolloš¸ãwing,–UUwithout“commen˜t,“the“t˜w˜o“respGectiv˜e“ les“for“this“class.ަ‘¬½24bŽ‘>ÏhÍPosition.h‘N<½24bÏiŽ‘~²­¸Ž¡‘HÊ#import‘¹–Ž¡¡‘H@interface–¹–Position:“SwarmObjectŽ¡‘H{Ž¡‘Qs,unsigned–¹–theX,“theY;Ž¡‘H}Ž¡‘H+–¹–create:“aZone“withX:“(unsigned)“x“Y:“(unsigned)“y;Ž¡‘H-–¹–(unsigned)“getX;Ž¡‘H-–¹–(unsigned)“getY;Ž¡‘H@end;ŽŸ‘ t½24cŽ‘>ÏhÍPosition.m‘N<½24cÏiŽ’€–=¸Ž¡‘HÊ#import‘¹–"Position.h"Ž¡¡‘H@implementation‘¹–PositionŽ¡¡‘H+–¹–create:“aZone“withX:“(unsigned)“x“Y:“(unsigned)“yŽ¡‘H{Ž¡‘Qs,Position*‘¹–obj;Ž¡‘Qs,obj–¹–=“[super“create:“aZone];Ž¡‘Qs,obj->theX–¹–=“x;Ž¡‘Qs,obj->theY–¹–=“y;Ž¡‘Qs,return‘¹–obj;Ž¡‘H}Ž¡¡‘H-–¹–(unsigned)“getX“{“return“theX;“}Ž¡¡‘H-–¹–(unsigned)“getY“{“return“theY;“}ŽŽŸ’åÿ²24ŽŽŒ‹Þ y ý£ ? ýä‘>Æ11Ž‘^fdThe–ff le“main.mŽ©ç‘>¹main.m–y³²is“the“enš¸ãtrance“in˜to“the“sim˜ulation,‘‚Ëand“the“only“thing“to“do“here“is“toŽŸ ‘>¹initSwarm–UU²and“create“the“¹Board².ŽŸ‘‘½25aŽ‘>ÏhÍmain.m‘N<½25aÏiŽ‘sñï¸ޤ ‘HÊ#import–¹–‘ s,//“for“initSwarmŽ¡‘H#import‘¹–"Board.h"Ž¡¡‘Hint–¹–main“(int“argc,“const“char“**argv)Ž¡‘H{Ž¡‘Qs,Board‘¹–*theBoard;Ž¡¡‘Qs,initSwarm–¹–(argc,“argv);Ž¡¡‘Qs,theBoard–¹–=“[Board“create:“globalZone];Ž¡‘Qs,[theBoard‘¹–buildObjects];Ž¡‘Qs,[theBoard‘¹–buildActions];Ž¡‘Qs,[theBoard–¹–activateIn:“nil];Ž¡‘Qs,[theBoard‘¹–go];Ž¡¡‘Qs,return‘¹–0;Ž¡‘H}ŽŸ$Ä‘>Æ12Ž‘^fdThe‘ffMakŒÌe leަ‘>²The–UU¹Makefile“²consists“of“the“v‘ÿqÇariable“part“and“sev¸ãeral“targets.ŽŸ‘¬½25bŽ‘>ÏhÍMake le‘N<½25bÏiŽ‘w²¸Ž¡‘HÏhÍMake le–Neasily–for“other“apps“bš¸ãy“replacing“v‘ÿqÇariable“con˜ten˜t“|“it“suces“to“set“the“appli-Ž¡‘>cation–UUname,“and“its“ob‘Ž8jects.Ž©‘‘½26aŽ‘>ÏhÍMake le–N]//g'\Ž¡‘H|–¹–sort“+1“-n“-t-)ŽŸ‘M²After–UUthat,“the“generic“Èswarm‘¸²Mak¸ãe le“is“included“and“the“¹all“²target“set.ަ‘¬½26bŽ‘>ÏhÍalxäl–NOb‘Ž8jectiv¸ãe-C‘UUsource.ަ‘ t½26cŽ‘>ÏhÍsr•‡c›NŸ'EŽ‘ãxX“source“is“extracted“and“compiled,˜andŽŸ ‘>evš¸ãerything–UUneeded“put“in˜to“the“D˜VI“directory‘ÿ*ª.ަ‘¬½26dŽ‘>ÏhÍdvi–Nbody.texŽ¡‘m̰latex‘¹–$(APPLICATION).texŽ¡‘m̰latex‘¹–$(APPLICATION).texŽ¡‘m̰latex‘¹–$(APPLICATION).texŽ¡‘m̰cp–¹–$(APPLICATION).dvi“*.ps.gz“*.ps.bb“DVIŽŽŸ’åÿ²26ŽŽŒ‹ÌÇ y ý£ ? ýä‘M²The–<Ÿ'EŽ‘ãxX2¹HTML²,“put“in¸ãto“the“HTML˜directory‘ÿ*ª,Ž© ‘>and–UUmade“HTML-4.0“(transitional)“conformanš¸ãt“with“Ama˜y˜a-2.2.ŽŸ‘‘½27aŽ‘>ÏhÍhtml–Nbody.texŽ¡‘m̰latex2html–¹–-split“0“-no_navigation“$(APPLICATION).texŽ¡‘m̰cp–¹–$(APPLICATION)/$(APPLICATION).html“$(APPLICATION)/*.png“\Ž¡’“™`$(APPLICATION)/$(APPLICATION).css‘¹–HTMLŽ¡‘m̰rm–¹–-rf“$(APPLICATION)Ž¡‘m̰amaya‘¹–HTML/$(APPLICATION).htmlŽŸ‘M²F‘ÿ*ªor–ãothe“tarball,‘ú7a“helpGer“directory“is“created“and“the“w•¸ãan“ted–ão les“copied“in¸ãtoަ‘>that–UUbGefore“arc¸ãhiving.ŽŸ‘¬½27bŽ‘>ÏhÍtarb•‡alxäl›NÆ13Ž‘^fdDebuggingŽŸç‘>²A¸ãt–¢this“time,›ž6the“source“compiles“but,˜of“course,˜there“are“still“bugs“and,˜fromޤ ‘>here– Òon,‘Äìcš¸ãhanges“w˜ere“added“as“patc˜h“ les“named“¹patches-1“²and“so“on.‘5œP˜atc˜hesŽ¡‘>are–úMpresenš¸ãted“in“uni ed“format“whic˜h“should“bGe“the“easiest“to“read.‘`¯Y‘ÿ*ªou“canŽ¡‘>get–¼qyš¸ãourself“suc˜h“patc˜hes“b˜y“using“revision“con˜trol“systems“lik˜e“¹cvs“²or“¹rcs²,Ž¡‘>or–V‰b¸ãy“giving“the“command“¹diff–?ý-u“oldfile“newfile².‘ucIn–V‰the“¹src“²target“ofŽ¡‘>Section–_12“(¹Makefile²)“the“correspGonding“steps“are“shoš¸ãwn“to“apply“the“patc˜hesŽ¡‘>to–UUthe“hitherto“written“ rst“v¸ãersion“ les.ŽŸþ6‘>Ç13.0.1Ž‘fã€Coredump:‘pno‘ÕTcolormapŽŸuT‘>²In–(athe“ rst“run,‘1_the“simš¸ãulation“w˜en˜t“on“and“prošGduced“a“core“dump.‘bËLo˜oking“atŽ¡‘>the–š¨bacš¸ãktrace“with“gdb“(the“¹bt“²command)“rev˜eals“it“happGened“when“trying“toŽ¡‘>¹setRaster–7k²in“¹Ball::drawSelfOn:²,›=fand“further“examination“sho¸ãws“that,˜insideŽ¡‘>swš¸ãarm,‘–}a–VBcolormap“is“accessed“but“w˜e“nev˜er“set“the“handle.‘tŽThis“sho˜ws“theŽ¡‘>argumenš¸ãtation–\on“page“7“w˜as“ a˜w˜ed,‘LÝthe“reason“bGeing“that“there“is“alw˜a˜ys“aŽ¡‘>colormap–tCneeded“(in“other“cases,‘{ÿswš¸ãarm“issues“a“w˜arning“but“it“did“not“in“thisŽ¡‘>case–UUso“a“bug“repGort“with“patcš¸ãh“w˜as“sen˜t“to“the“bug“address).Ž¡‘MThe–‹latter“means“wš¸ãe“ha˜v˜e“to“patc˜h“the“start“of“¹Board::buildObjects“²andŽ¡‘>include–ˆ‡cošGde“for“creating“the“¹colormap²,‘•Tsetting“a“n•¸ãum“b˜er–ˆ‡of“colors,‘•Tand“givingŽ¡‘>the–UUcolormap“to“¹worldRaster².ŽŸ‘Ñ”½28Ž‘>ÏhÍp‡atch-1‘N<½28ÏiŽ‘n ̸ޤ ‘HÊ---‘¹–Board.mŽ¡‘H+++‘¹–Board.mŽ¡‘H@@–¹–-11,11“+11,16“@@Ž¡‘L¹–{Ž¡‘V,Âid‘¹–nails;Ž¡‘V,Âid–¹–“world;Ž¡‘H-Ž¡‘H+‘ s,id‘¹–colormap;Ž¡‘H+‘ s,int‘¹–i;Ž¡‘H+Ž¡‘V,Â[super‘¹–buildObjects];Ž¡‘V,Â[controlPanel‘¹–setStateStopped];Ž¡‘V,Âif–¹–([controlPanel“getState]“==“ControlStateQuit)Ž¡‘{ùrreturn‘¹–nil;Ž¡‘H+‘ s,colormap–¹–=“[Colormap“create:“self];Ž¡‘H+‘ s,for–¹–(i=0;“i<32;“i++)Ž¡‘H+‘æX[colormap–¹–setColor:“i“ToRed:“0“Green:“0“Blue:“0];Ž¡‘V,Âballs–¹–=“[Balls“create:“[self“getZone]];Ž¡‘V,Ânails–¹–=“[Nails“create:“[self“getZone]];Ž¡‘V,ÂworldRaster–¹–=“[ZoomRaster“createBegin:“self];Ž¡‘H@@–¹–-24,6“+29,7“@@Ž¡‘V,Â[worldRaster–¹–setZoomFactor:“4];Ž¡‘V,Â[worldRaster–¹–setWidth:“[StringRepresentation“getSizeX]Ž¡’“™`Height:–¹–[StringRepresentation“getSizeY]];Ž¡‘H+‘ s,[worldRaster–¹–setColormap:“colormap];ŽŽŸ’åÿ²28ŽŽŒ‹Ú\ y ý£ ? ýä‘V,ÂÊ[worldRaster–¹–setWindowTitle:“"Balls“and“Nails"];ޤ ‘V,Â[worldRaster–¹–pack];’’y*//“draw“the“window.Ž¡‘V,Âworld–¹–=“[Grid2d“create:“selfŽŸþ6‘>Ç13.0.2Ž‘fã€Windo®9w–ÕTtošQÇo“small:‘pzo˜om“factorŽŸuT‘>²Then,‘—~it–Wcomes“to“notice“that“the“simš¸ãulation“windo˜w“can't“kno˜w“its“elemen˜tޤ ‘>size–òÈbšGeforehand“so“the“zo˜om“factor“is“adjusted“to“16“to“makš¸ãe“the“windo˜w“bigŽ¡‘>enough.ŽŸ‘Ñ”½29Ž‘>ÏhÍp‡atch-2‘N<½29ÏiŽ‘n ̸ޤ ‘HÊ---‘¹–Board.mŽ¡‘H+++‘¹–Board.mŽ¡‘H@@–¹–-26,7“+26,7“@@Ž¡‘V,ÂworldRaster–¹–=“[ZoomRaster“createBegin:“self];Ž¡‘V,ÂSET_WINDOW_GEOMETRY_RECORD_NAME‘¹–(worldRaster);Ž¡‘V,ÂworldRaster–¹–=“[worldRaster“createEnd];Ž¡‘H-‘ s,[worldRaster–¹–setZoomFactor:“4];Ž¡‘H+‘ s,[worldRaster–¹–setZoomFactor:“16];Ž¡‘V,Â[worldRaster–¹–setWidth:“[StringRepresentation“getSizeX]Ž¡’“™`Height:–¹–[StringRepresentation“getSizeY]];Ž¡‘V,Â[worldRaster–¹–setColormap:“colormap];ŽŽŸ’åÿ²29ŽŽŒ‹䢠y ý£ ? ýä‘>Ç13.0.3Ž‘fã€W‘ÿ «orld–ÕThas“no“nails:‘pputOb‘£ŽjectŽŸuT‘>²Aš¸ãt–Othis“pGoin˜t,‘jthe“sim˜ulation“windo˜w“loGoks“lik˜e“Fig.“4,‘jand“there“are“sev˜eralޤ ‘>things‘UUwrong.ŽŸ_®ŸŸ¯C(’±˜ZïWps: currentpoint currentpoint translate 0.3742 0.3742 scale neg exch neg exch translateïXps: gsave currentpoint currentpoint translate -90 neg rotate neg exch neg exch translateï?PSfile="sshot1.ps.gz" llx=225 lly=229 urx=387 ury=532 rwi=1620 ŽŽ’¢›…ï ps: currentpoint grestore movetoŽŽŽŽŽïcps: currentpoint currentpoint translate 1 0.3742 div 1 0.3742 div scale neg exch neg exch translateŽŽŸNË’¼_üFigure–UU4:‘qÇscreen“shotŽŽŽŸ‘MW‘ÿ*ªe–Ï–see“the“nail“pixmaps“are“missing,‘î&but“the“balls“are“at“the“righ¸ãt“places.Ž¡‘>Including–¹printf“²statemenš¸ãts“in˜to“the“¹Balls²/¹Nails“²coGde“rev˜eals“the“nails“areŽ¡‘>created–¾5with“the“correct“pšGositions.‘¬hSwitc¸ãhing“the“graphics“ le“do˜esn't“matter:Ž¡‘>no–UUnail“ev¸ãer“gets“the“¹drawSelfOn:‘qDzmessage“but“for“what“reason?Ž¡‘MIt–´turns“out“that“nail“ob‘Ž8jects“are“nevš¸ãer“put“in˜to“the“w˜orld,‘&nwhic˜h“is“the“caseŽ¡‘>with–ûballs“acciden¸ãtally‘ÿ*ª,‘ "in“their“¹step“²methoGd.‘S²A‘úÿsolution“is“to“add“a“¹setWorld:Ž¡‘>²message–·to“¹Nails“²as“w¸ãell,›|and“call“it“from“the“¹Board“²coGde,˜so“wš¸ãe“ha˜v˜e“theŽ¡‘>follo•¸ãwing‘UUpatc“hes.ŽŸ‘‘½30aŽ‘>ÏhÍp‡atch-3‘N<½30aÏiŽ‘rJиޤ ‘HÊ---‘¹–Board.mŽ¡‘H+++‘¹–Board.mŽ¡‘H@@–¹–-39,6“+39,7“@@Ž¡‘V,Â[balls‘¹–buildObjects];Ž¡‘V,Â[nails‘¹–buildObjects];Ž¡‘V,Â[balls–¹–setWorld:“world];Ž¡‘H+‘ s,[nails–¹–setWorld:“world];Ž¡‘V,ÂboardDisplay–¹–=“[Object2dDisplay“create:“selfŽ¡’¡Æ"setDisplayWidget:‘¹–worldRasterŽ¡’¡Æ"setDiscrete2dToDisplay:‘¹–worldŽŸ‘¬½30bŽ‘>ÏhÍp‡atch-4‘N<½30bÏiŽ‘rô¸Ž¡‘HÊ---‘¹–Nails.mŽ¡‘H+++‘¹–Nails.mŽ¡‘H@@–¹–-25,4“+25,10“@@Ž¡‘V,Â}Ž¡‘V,Âreturn‘¹–self;Ž¡‘L¹–}Ž¡‘H+Ž¡‘H+-–¹–setWorld:“aWorldŽ¡‘H+{Ž¡‘H+‘ s,[theNails–¹–forEach:“M(setWorld:)“:“aWorld];Ž¡‘H+‘ s,return‘¹–self;Ž¡‘H+}Ž¡‘L¹–@endŽŽŸ’åÿ²30ŽŽŒ‹è¶ y ý£ ? ýä‘‘½31aŽ‘>ÏhÍp‡atch-5‘N<½31aÏiŽ‘rJиޤ ‘HÊ---‘¹–Nail.mŽ¡‘H+++‘¹–Nail.mŽ¡‘H@@–¹–-1,4“+1,5“@@Ž¡‘L¹–#import‘¹–Ž¡‘H+#import‘¹–Ž¡‘L¹–#import‘¹–"Nail.h"Ž¡¡‘L¹–@implementation‘¹–NailŽ¡‘H@@–¹–-30,6“+31,12“@@Ž¡¡‘V,Â[aRaster–¹–draw:“nailPixmap“X:“x“Y:“y];Ž¡¡‘H+‘ s,return‘¹–self;Ž¡‘H+}Ž¡‘H+Ž¡‘H+-–¹–setWorld:“(id“)“aWorldŽ¡‘H+{Ž¡‘H+‘ s,[aWorld–¹–putObject:“self“atX:“x“Y:y];Ž¡‘V,Âreturn‘¹–self;Ž¡‘L¹–}Ž¡‘L¹–@endŽŸ‘M²F–ÿ*ªortunately“,‘ this–å(bug“leads“us“to“the“fact“that“¹Ball“²doGesn't“put“itself“in¸ãtoŽŸ ‘>¹world²,–UUtoGo,“so“ nding“the“solution“for“the“next“bug“at“once“with“the“patc¸ãh:ŽŸ‘¬½31bŽ‘>ÏhÍp‡atch-6‘N<½31bÏiŽ‘rô¸Ž¡‘HÊ---‘¹–Ball.mŽ¡‘H+++‘¹–Ball.mŽ¡‘H@@–¹–-1,4“+1,5“@@Ž¡‘L¹–#import‘¹–Ž¡‘H+#import‘¹–Ž¡‘L¹–#import‘¹–"Ball.h"Ž¡¡‘L¹–@implementation‘¹–BallŽ¡‘H@@–¹–-17,6“+18,7“@@Ž¡‘L¹–-–¹–setWorld:“aWorldŽ¡‘L¹–{Ž¡‘V,Âworld–¹–=“aWorld;Ž¡‘H+‘ s,[world–¹–putObject:“self“atX:“x“Y:y];Ž¡‘V,Âreturn‘¹–self;Ž¡‘L¹–}ŽŽŸ’åÿ²31ŽŽŒ‹ ñ* y ý£ ? ýä‘>Ç13.0.4Ž‘fã€Board–ÕTwidth:‘punkno®9wn“causeŽŸuT‘>²No•¸ãw›Eíw“e˜can˜see˜the˜nails,‘Iand˜it˜loGoks˜lik“e˜Èswarm‘ P²adds˜t“w“o˜columns˜at˜the˜leftŽŸ ‘>side–UUof“the“grid,“so“a“quicš¸ãk“hac˜k“mak˜es“the“picture“symmetrical“again.ŽŸ‘Ñ”½32Ž‘>ÏhÍp‡atch-7‘N<½32ÏiŽ‘n ̸ޤ ‘HÊ---‘¹–StringRepresentation.mŽ¡‘H+++‘¹–StringRepresentation.mŽ¡‘H@@–¹–-4,7“+4,7“@@Ž¡‘L¹–@implementation‘¹–StringRepresentationŽ¡¡‘L¹–static–¹–char“*str[]“=“{Ž¡‘H+"‘ s,100000000000001‘æX",Ž¡‘H-"– s,100000000000001“",Ž¡‘L¹–"– s,110000000000011“",Ž¡‘L¹–"–,Â1100000000011“",Ž¡‘L¹–"–æX11000000011“",ŽŽŸ’åÿ²32ŽŽŒ‹!õÁ y ý£ ? ýä‘>Ç13.0.5Ž‘fã€No–ÕTgo:‘pBall“x,y“not“setŽŸuT‘>²Noš¸ãw–òþappGears“the“problem“of“balls“not“mo˜ving,‘©but“they“get“their“¹step“²message,ޤ ‘>so–å³it“turns“out“the“pGosition“that“¹ball“²knoš¸ãws“of“itself“isn't“c˜hanged“in“¹step².‘L‘TheŽ¡‘>patc¸ãh–UUis“easy‘ÿ*ª.ŽŸ‘Ñ”½33Ž‘>ÏhÍp‡atch-8‘N<½33ÏiŽ‘n ̸ޤ ‘HÊ---‘¹–Ball.mŽ¡‘H+++‘¹–Ball.mŽ¡‘H@@–¹–-30,7“+30,7“@@Ž¡‘V,Âif–¹–(pos1Object“==“nil)Ž¡‘V,Â{Ž¡‘_Ÿî[world–¹–putObject:“nil“atX:“x“Y:“y];Ž¡‘H+‘æX[world–¹–putObject:“self“atX:“x“Y:“++y];Ž¡‘H-‘æX[world–¹–putObject:“self“atX:“x“Y:“y+1];Ž¡‘r†Freturn;Ž¡‘V,Â}Ž¡¡‘H@@–¹–-41,14“+41,14“@@Ž¡¡‘V,Â[world–¹–putObject:“nil“atX:“x“Y:“y];Ž¡‘V,Âif‘¹–(pos1Object)Ž¡‘H+‘æX[world–¹–putObject:“self“atX:“++x“Y:“++y];Ž¡‘H-‘æX[world–¹–putObject:“self“atX:“x+1“Y:“y+1];Ž¡‘V,Âelse–¹–if“(pos2Object)Ž¡‘H+‘æX[world–¹–putObject:“self“atX:“--x“Y:“++y];Ž¡‘H-‘æX[world–¹–putObject:“self“atX:“x-1“Y:“y+1];Ž¡‘V,ÂelseŽ¡‘_Ÿîif–¹–([uniformIntRand“getIntegerWithMin:“0“withMax:“1])Ž¡‘H+‘Y„[world–¹–putObject:“self“atX:“--x“Y:“++y];Ž¡‘H-‘Y„[world–¹–putObject:“self“atX:“x-1“Y:“y+1];Ž¡‘r†FelseŽ¡‘H+‘Y„[world–¹–putObject:“self“atX:“++x“Y:“++y];Ž¡‘H-‘Y„[world–¹–putObject:“self“atX:“x+1“Y:“y+1];Ž¡‘L¹–}Ž¡‘L¹–-–¹–drawSelfOn:“(id“)“aRasterŽ¡‘L¹–{ŽŽŸ’åÿ²33ŽŽŒ‹"ø‹ y ý£ ? ýä‘>Ç13.0.6Ž‘fã€Ball‘ÕTo•®9v“er o“w!ŽŸuT‘>²The–@” rst“run“shoš¸ãws“ev˜erything“w˜orking“nicely“except“the“middle“slots“are“ lledޤ ‘>to–Ûjthe“brim“causing“ha•¸ãv“oGc.‘I$Accordingly‘ÿ*ª,‘óÌw“e›Ûjpatc“h˜the˜starting˜bGoard˜to˜giv“e˜theŽ¡‘>slots–UUmore“capacit¸ãy‘ÿ*ª.ŽŸ‘Ñ”½34Ž‘>ÏhÍp‡atch-9‘N<½34ÏiŽ‘n ̸ޤ ‘HÊ---‘¹–StringRepresentation.mŽ¡‘H+++‘¹–StringRepresentation.mŽ¡‘H@@–¹–-27,6“+27,13“@@Ž¡‘L¹–"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘L¹–"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘L¹–"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘H+"1–¹–1“1“1“1“1“1“1“1“1",Ž¡‘L¹–"1111111111111111111"};Ž¡‘L¹–static–¹–char“activeChar“=“'0';Ž¡‘L¹–static–¹–int“currentX,“currentY;ŽŽŸ’åÿ²34ŽŽŒ‹#þ y ý£ ? ýä‘>Æ14Ž‘^fdConclusions–ffabs3out“the“ rst“vŒÌersionŽŸç‘>²Sevš¸ãeral–§ktries“with“the“no˜w“debugged“program“con rm“ev˜erything“w˜orks“as“en-ޤ ‘>visioned.‘—Di erenš¸ãt–aÄrandom“n˜um˜bšGer“b˜eha¸ãviour“can“b˜e“seen“when“in•¸ãv“oking‘aĹbellŽ¡‘>²with–æÞthe“¹-s“²option.‘LõEvš¸ãen“the“spGeed“of“the“sim˜ulation“is“nice,‘üöon“faster“mac˜hinesŽ¡‘>one–UUwš¸ãould“man˜ually“step“through“it.Ž¡‘MWhat–ìqremains?‘NÐAš¸ãt“this“pGoin˜t“in“time,›kthere“are“still“no“illustrations“done,˜soŽ¡‘>wš¸ãe'll–ƒ‹ nish“the“doGcumen˜tation“with“that“and“a“thorough“review.‘ühBut“the“coGdeŽ¡‘> oš¸ãw–µthat“has“k˜ept“us“in“a“linear“motiv‘ÿqÇation,‘žMsame“as“with“the“patien˜t“reader'sŽ¡‘>attenš¸ãtion–íòhopGefully‘ÿ*ª,‘has“crystallized“in˜to“a“small“demo“application“that“w˜orksŽ¡‘>with–UUswš¸ãarm-2“(other“v˜ersions“not“tested).‘qÇNot“more“did“w˜e“w˜an˜t.‘ ¸ÁR.S.,“AprilŽ¡‘>2000ŽŸ!Ä‘>Æ15Ž‘^fdGNU–ffF‘þ¦free“Dos3cumenŒÌtation“LicenseŽŸç‘Ñ”½35Ž‘>ÏhÍfdxäl.txt‘N<½35ÏiŽ‘h ¸ޤ ’“™`ÊGNU–¹–Free“Documentation“LicenseŽ¡’¡Æ"Version–¹–1.1,“March“2000Ž¡¡‘L¹–Copyright–¹–(C)“2000‘ s,Free“Software“Foundation,“Inc.Ž¡‘_Ÿî59–¹–Temple“Place,“Suite“330,“Boston,“MA– s,02111-1307“USAŽ¡‘L¹–Everyone–¹–is“permitted“to“copy“and“distribute“verbatim“copiesŽ¡‘L¹–of–¹–this“license“document,“but“changing“it“is“not“allowed.Ž¡¡¡‘H0.‘¹–PREAMBLEŽ¡¡‘HThe–¹–purpose“of“this“License“is“to“make“a“manual,“textbook,“or“otherŽ¡‘Hwritten–¹–document“"free"“in“the“sense“of“freedom:“to“assure“everyoneŽ¡‘Hthe–¹–effective“freedom“to“copy“and“redistribute“it,“with“or“withoutŽ¡‘Hmodifying–¹–it,“either“commercially“or“noncommercially.‘ s,Secondarily,Ž¡‘Hthis–¹–License“preserves“for“the“author“and“publisher“a“way“to“getŽ¡‘Hcredit–¹–for“their“work,“while“not“being“considered“responsible“forŽ¡‘Hmodifications–¹–made“by“others.Ž¡¡‘HThis–¹–License“is“a“kind“of“"copyleft",“which“means“that“derivativeŽ¡‘Hworks–¹–of“the“document“must“themselves“be“free“in“the“same“sense.‘ s,ItŽ¡‘Hcomplements–¹–the“GNU“General“Public“License,“which“is“a“copyleftŽ¡‘Hlicense–¹–designed“for“free“software.Ž¡¡‘HWe–¹–have“designed“this“License“in“order“to“use“it“for“manuals“for“freeŽ¡‘Hsoftware,–¹–because“free“software“needs“free“documentation:“a“freeŽ¡‘Hprogram–¹–should“come“with“manuals“providing“the“same“freedoms“that“theŽ¡‘Hsoftware–¹–does.‘ s,But“this“License“is“not“limited“to“software“manuals;Ž¡‘Hit–¹–can“be“used“for“any“textual“work,“regardless“of“subject“matter“orŽ¡‘Hwhether–¹–it“is“published“as“a“printed“book.‘ s,We“recommend“this“LicenseŽ¡‘Hprincipally–¹–for“works“whose“purpose“is“instruction“or“reference.Ž¡ŽŸ’åÿ²35ŽŽŒ‹$à y ý£ ? ýä¤ ‘HÊ1.–¹–APPLICABILITY“AND“DEFINITIONSŽ¡¡‘HThis–¹–License“applies“to“any“manual“or“other“work“that“contains“aŽ¡‘Hnotice–¹–placed“by“the“copyright“holder“saying“it“can“be“distributedŽ¡‘Hunder–¹–the“terms“of“this“License.‘ s,The“"Document",“below,“refers“to“anyŽ¡‘Hsuch–¹–manual“or“work.‘ s,Any“member“of“the“public“is“a“licensee,“and“isŽ¡‘Haddressed–¹–as“"you".Ž¡¡‘HA–¹–"Modified“Version"“of“the“Document“means“any“work“containing“theŽ¡‘HDocument–¹–or“a“portion“of“it,“either“copied“verbatim,“or“withŽ¡‘Hmodifications–¹–and/or“translated“into“another“language.Ž¡¡‘HA–¹–"Secondary“Section"“is“a“named“appendix“or“a“front-matter“section“ofŽ¡‘Hthe–¹–Document“that“deals“exclusively“with“the“relationship“of“theŽ¡‘Hpublishers–¹–or“authors“of“the“Document“to“the“Document's“overall“subjectŽ¡‘H(or–¹–to“related“matters)“and“contains“nothing“that“could“fall“directlyŽ¡‘Hwithin–¹–that“overall“subject.‘ s,(For“example,“if“the“Document“is“in“part“aŽ¡‘Htextbook–¹–of“mathematics,“a“Secondary“Section“may“not“explain“anyŽ¡‘Hmathematics.)‘ s,The–¹–relationship“could“be“a“matter“of“historicalŽ¡‘Hconnection–¹–with“the“subject“or“with“related“matters,“or“of“legal,Ž¡‘Hcommercial,–¹–philosophical,“ethical“or“political“position“regardingŽ¡‘Hthem.Ž¡¡‘HThe–¹–"Invariant“Sections"“are“certain“Secondary“Sections“whose“titlesŽ¡‘Hare–¹–designated,“as“being“those“of“Invariant“Sections,“in“the“noticeŽ¡‘Hthat–¹–says“that“the“Document“is“released“under“this“License.Ž¡¡‘HThe–¹–"Cover“Texts"“are“certain“short“passages“of“text“that“are“listed,Ž¡‘Has–¹–Front-Cover“Texts“or“Back-Cover“Texts,“in“the“notice“that“says“thatŽ¡‘Hthe–¹–Document“is“released“under“this“License.Ž¡¡‘HA–¹–"Transparent"“copy“of“the“Document“means“a“machine-readable“copy,Ž¡‘Hrepresented–¹–in“a“format“whose“specification“is“available“to“theŽ¡‘Hgeneral–¹–public,“whose“contents“can“be“viewed“and“edited“directly“andŽ¡‘Hstraightforwardly–¹–with“generic“text“editors“or“(for“images“composed“ofŽ¡‘Hpixels)–¹–generic“paint“programs“or“(for“drawings)“some“widely“availableŽ¡‘Hdrawing–¹–editor,“and“that“is“suitable“for“input“to“text“formatters“orŽ¡‘Hfor–¹–automatic“translation“to“a“variety“of“formats“suitable“for“inputŽ¡‘Hto–¹–text“formatters.‘ s,A“copy“made“in“an“otherwise“Transparent“fileŽ¡‘Hformat–¹–whose“markup“has“been“designed“to“thwart“or“discourageŽ¡‘Hsubsequent–¹–modification“by“readers“is“not“Transparent.‘ s,A“copy“that“isŽ¡‘Hnot–¹–"Transparent"“is“called“"Opaque".Ž¡¡‘HExamples–¹–of“suitable“formats“for“Transparent“copies“include“plainŽ¡‘HASCII–¹–without“markup,“Texinfo“input“format,“LaTeX“input“format,“SGMLŽ¡‘Hor–¹–XML“using“a“publicly“available“DTD,“and“standard-conforming“simpleŽ¡‘HHTML–¹–designed“for“human“modification.‘ s,Opaque“formats“includeŽ¡‘HPostScript,–¹–PDF,“proprietary“formats“that“can“be“read“and“edited“onlyŽ¡‘Hby–¹–proprietary“word“processors,“SGML“or“XML“for“which“the“DTD“and/orŽŽŸ’åÿ²36ŽŽŒ‹% Û y ý£ ? ýä‘HÊprocessing–¹–tools“are“not“generally“available,“and“theޤ ‘Hmachine-generated–¹–HTML“produced“by“some“word“processors“for“outputŽ¡‘Hpurposes‘¹–only.Ž¡¡‘HThe–¹–"Title“Page"“means,“for“a“printed“book,“the“title“page“itself,Ž¡‘Hplus–¹–such“following“pages“as“are“needed“to“hold,“legibly,“the“materialŽ¡‘Hthis–¹–License“requires“to“appear“in“the“title“page.‘ s,For“works“inŽ¡‘Hformats–¹–which“do“not“have“any“title“page“as“such,“"Title“Page"“meansŽ¡‘Hthe–¹–text“near“the“most“prominent“appearance“of“the“work's“title,Ž¡‘Hpreceding–¹–the“beginning“of“the“body“of“the“text.Ž¡¡¡‘H2.–¹–VERBATIM“COPYINGŽ¡¡‘HYou–¹–may“copy“and“distribute“the“Document“in“any“medium,“eitherŽ¡‘Hcommercially–¹–or“noncommercially,“provided“that“this“License,“theŽ¡‘Hcopyright–¹–notices,“and“the“license“notice“saying“this“License“appliesŽ¡‘Hto–¹–the“Document“are“reproduced“in“all“copies,“and“that“you“add“no“otherŽ¡‘Hconditions–¹–whatsoever“to“those“of“this“License.‘ s,You“may“not“useŽ¡‘Htechnical–¹–measures“to“obstruct“or“control“the“reading“or“furtherŽ¡‘Hcopying–¹–of“the“copies“you“make“or“distribute.‘ s,However,“you“may“acceptŽ¡‘Hcompensation–¹–in“exchange“for“copies.‘ s,If“you“distribute“a“large“enoughŽ¡‘Hnumber–¹–of“copies“you“must“also“follow“the“conditions“in“section“3.Ž¡¡‘HYou–¹–may“also“lend“copies,“under“the“same“conditions“stated“above,“andŽ¡‘Hyou–¹–may“publicly“display“copies.Ž¡¡¡‘H3.–¹–COPYING“IN“QUANTITYŽ¡¡‘HIf–¹–you“publish“printed“copies“of“the“Document“numbering“more“than“100,Ž¡‘Hand–¹–the“Document's“license“notice“requires“Cover“Texts,“you“must“encloseŽ¡‘Hthe–¹–copies“in“covers“that“carry,“clearly“and“legibly,“all“these“CoverŽ¡‘HTexts:–¹–Front-Cover“Texts“on“the“front“cover,“and“Back-Cover“Texts“onŽ¡‘Hthe–¹–back“cover.‘ s,Both“covers“must“also“clearly“and“legibly“identifyŽ¡‘Hyou–¹–as“the“publisher“of“these“copies.‘ s,The“front“cover“must“presentŽ¡‘Hthe–¹–full“title“with“all“words“of“the“title“equally“prominent“andŽ¡‘Hvisible.‘ s,You–¹–may“add“other“material“on“the“covers“in“addition.Ž¡‘HCopying–¹–with“changes“limited“to“the“covers,“as“long“as“they“preserveŽ¡‘Hthe–¹–title“of“the“Document“and“satisfy“these“conditions,“can“be“treatedŽ¡‘Has–¹–verbatim“copying“in“other“respects.Ž¡¡‘HIf–¹–the“required“texts“for“either“cover“are“too“voluminous“to“fitŽ¡‘Hlegibly,–¹–you“should“put“the“first“ones“listed“(as“many“as“fitŽ¡‘Hreasonably)–¹–on“the“actual“cover,“and“continue“the“rest“onto“adjacentŽ¡‘Hpages.Ž¡¡‘HIf–¹–you“publish“or“distribute“Opaque“copies“of“the“Document“numberingŽ¡‘Hmore–¹–than“100,“you“must“either“include“a“machine-readable“TransparentŽ¡‘Hcopy–¹–along“with“each“Opaque“copy,“or“state“in“or“with“each“Opaque“copyŽŽŸ’åÿ²37ŽŽŒ‹&  y ý£ ? ýä‘HÊa–¹–publicly-accessible“computer-network“location“containing“a“completeޤ ‘HTransparent–¹–copy“of“the“Document,“free“of“added“material,“which“theŽ¡‘Hgeneral–¹–network-using“public“has“access“to“download“anonymously“at“noŽ¡‘Hcharge–¹–using“public-standard“network“protocols.‘ s,If“you“use“the“latterŽ¡‘Hoption,–¹–you“must“take“reasonably“prudent“steps,“when“you“beginŽ¡‘Hdistribution–¹–of“Opaque“copies“in“quantity,“to“ensure“that“thisŽ¡‘HTransparent–¹–copy“will“remain“thus“accessible“at“the“stated“locationŽ¡‘Huntil–¹–at“least“one“year“after“the“last“time“you“distribute“an“OpaqueŽ¡‘Hcopy–¹–(directly“or“through“your“agents“or“retailers)“of“that“edition“toŽ¡‘Hthe‘¹–public.Ž¡¡‘HIt–¹–is“requested,“but“not“required,“that“you“contact“the“authors“of“theŽ¡‘HDocument–¹–well“before“redistributing“any“large“number“of“copies,“to“giveŽ¡‘Hthem–¹–a“chance“to“provide“you“with“an“updated“version“of“the“Document.Ž¡¡¡‘H4.‘¹–MODIFICATIONSŽ¡¡‘HYou–¹–may“copy“and“distribute“a“Modified“Version“of“the“Document“underŽ¡‘Hthe–¹–conditions“of“sections“2“and“3“above,“provided“that“you“releaseŽ¡‘Hthe–¹–Modified“Version“under“precisely“this“License,“with“the“ModifiedŽ¡‘HVersion–¹–filling“the“role“of“the“Document,“thus“licensing“distributionŽ¡‘Hand–¹–modification“of“the“Modified“Version“to“whoever“possesses“a“copyŽ¡‘Hof–¹–it.‘ s,In“addition,“you“must“do“these“things“in“the“Modified“Version:Ž¡¡‘HA.–¹–Use“in“the“Title“Page“(and“on“the“covers,“if“any)“a“title“distinctŽ¡‘V,Âfrom–¹–that“of“the“Document,“and“from“those“of“previous“versionsŽ¡‘V,Â(which–¹–should,“if“there“were“any,“be“listed“in“the“History“sectionŽ¡‘V,Âof–¹–the“Document).‘ s,You“may“use“the“same“title“as“a“previous“versionŽ¡‘V,Âif–¹–the“original“publisher“of“that“version“gives“permission.Ž¡‘HB.–¹–List“on“the“Title“Page,“as“authors,“one“or“more“persons“or“entitiesŽ¡‘V,Âresponsible–¹–for“authorship“of“the“modifications“in“the“ModifiedŽ¡‘V,ÂVersion,–¹–together“with“at“least“five“of“the“principal“authors“of“theŽ¡‘V,ÂDocument–¹–(all“of“its“principal“authors,“if“it“has“less“than“five).Ž¡‘HC.–¹–State“on“the“Title“page“the“name“of“the“publisher“of“theŽ¡‘V,ÂModified–¹–Version,“as“the“publisher.Ž¡‘HD.–¹–Preserve“all“the“copyright“notices“of“the“Document.Ž¡‘HE.–¹–Add“an“appropriate“copyright“notice“for“your“modificationsŽ¡‘V,Âadjacent–¹–to“the“other“copyright“notices.Ž¡‘HF.–¹–Include,“immediately“after“the“copyright“notices,“a“license“noticeŽ¡‘V,Âgiving–¹–the“public“permission“to“use“the“Modified“Version“under“theŽ¡‘V,Âterms–¹–of“this“License,“in“the“form“shown“in“the“Addendum“below.Ž¡‘HG.–¹–Preserve“in“that“license“notice“the“full“lists“of“Invariant“SectionsŽ¡‘V,Âand–¹–required“Cover“Texts“given“in“the“Document's“license“notice.Ž¡‘HH.–¹–Include“an“unaltered“copy“of“this“License.Ž¡‘HI.–¹–Preserve“the“section“entitled“"History",“and“its“title,“and“add“toŽ¡‘V,Âit–¹–an“item“stating“at“least“the“title,“year,“new“authors,“andŽ¡‘V,Âpublisher–¹–of“the“Modified“Version“as“given“on“the“Title“Page.‘ s,IfŽ¡‘V,Âthere–¹–is“no“section“entitled“"History"“in“the“Document,“create“oneŽ¡‘V,Âstating–¹–the“title,“year,“authors,“and“publisher“of“the“Document“asŽŽŸ’åÿ²38ŽŽŒ‹'$N y ý£ ? ýä‘V,ÂÊgiven–¹–on“its“Title“Page,“then“add“an“item“describing“the“Modifiedޤ ‘V,ÂVersion–¹–as“stated“in“the“previous“sentence.Ž¡‘HJ.–¹–Preserve“the“network“location,“if“any,“given“in“the“Document“forŽ¡‘V,Âpublic–¹–access“to“a“Transparent“copy“of“the“Document,“and“likewiseŽ¡‘V,Âthe–¹–network“locations“given“in“the“Document“for“previous“versionsŽ¡‘V,Âit–¹–was“based“on.‘ s,These“may“be“placed“in“the“"History"“section.Ž¡‘V,ÂYou–¹–may“omit“a“network“location“for“a“work“that“was“published“atŽ¡‘V,Âleast–¹–four“years“before“the“Document“itself,“or“if“the“originalŽ¡‘V,Âpublisher–¹–of“the“version“it“refers“to“gives“permission.Ž¡‘HK.–¹–In“any“section“entitled“"Acknowledgements"“or“"Dedications",Ž¡‘V,Âpreserve–¹–the“section's“title,“and“preserve“in“the“section“all“theŽ¡‘V,Âsubstance–¹–and“tone“of“each“of“the“contributor“acknowledgementsŽ¡‘V,Âand/or–¹–dedications“given“therein.Ž¡‘HL.–¹–Preserve“all“the“Invariant“Sections“of“the“Document,Ž¡‘V,Âunaltered–¹–in“their“text“and“in“their“titles.‘ s,Section“numbersŽ¡‘V,Âor–¹–the“equivalent“are“not“considered“part“of“the“section“titles.Ž¡‘HM.–¹–Delete“any“section“entitled“"Endorsements".‘ s,Such“a“sectionŽ¡‘V,Âmay–¹–not“be“included“in“the“Modified“Version.Ž¡‘HN.–¹–Do“not“retitle“any“existing“section“as“"Endorsements"Ž¡‘V,Âor–¹–to“conflict“in“title“with“any“Invariant“Section.Ž¡¡‘HIf–¹–the“Modified“Version“includes“new“front-matter“sections“orŽ¡‘Happendices–¹–that“qualify“as“Secondary“Sections“and“contain“no“materialŽ¡‘Hcopied–¹–from“the“Document,“you“may“at“your“option“designate“some“or“allŽ¡‘Hof–¹–these“sections“as“invariant.‘ s,To“do“this,“add“their“titles“to“theŽ¡‘Hlist–¹–of“Invariant“Sections“in“the“Modified“Version's“license“notice.Ž¡‘HThese–¹–titles“must“be“distinct“from“any“other“section“titles.Ž¡¡‘HYou–¹–may“add“a“section“entitled“"Endorsements",“provided“it“containsŽ¡‘Hnothing–¹–but“endorsements“of“your“Modified“Version“by“variousŽ¡‘Hparties--for–¹–example,“statements“of“peer“review“or“that“the“text“hasŽ¡‘Hbeen–¹–approved“by“an“organization“as“the“authoritative“definition“of“aŽ¡‘Hstandard.Ž¡¡‘HYou–¹–may“add“a“passage“of“up“to“five“words“as“a“Front-Cover“Text,“and“aŽ¡‘Hpassage–¹–of“up“to“25“words“as“a“Back-Cover“Text,“to“the“end“of“the“listŽ¡‘Hof–¹–Cover“Texts“in“the“Modified“Version.‘ s,Only“one“passage“ofŽ¡‘HFront-Cover–¹–Text“and“one“of“Back-Cover“Text“may“be“added“by“(orŽ¡‘Hthrough–¹–arrangements“made“by)“any“one“entity.‘ s,If“the“Document“alreadyŽ¡‘Hincludes–¹–a“cover“text“for“the“same“cover,“previously“added“by“you“orŽ¡‘Hby–¹–arrangement“made“by“the“same“entity“you“are“acting“on“behalf“of,Ž¡‘Hyou–¹–may“not“add“another;“but“you“may“replace“the“old“one,“on“explicitŽ¡‘Hpermission–¹–from“the“previous“publisher“that“added“the“old“one.Ž¡¡‘HThe–¹–author(s)“and“publisher(s)“of“the“Document“do“not“by“this“LicenseŽ¡‘Hgive–¹–permission“to“use“their“names“for“publicity“for“or“to“assert“orŽ¡‘Himply–¹–endorsement“of“any“Modified“Version.Ž¡¡¡‘H5.–¹–COMBINING“DOCUMENTSŽŽŸ’åÿ²39ŽŽŒ‹(1_ y ý£ ? ýä¤ ‘HÊYou–¹–may“combine“the“Document“with“other“documents“released“under“thisŽ¡‘HLicense,–¹–under“the“terms“defined“in“section“4“above“for“modifiedŽ¡‘Hversions,–¹–provided“that“you“include“in“the“combination“all“of“theŽ¡‘HInvariant–¹–Sections“of“all“of“the“original“documents,“unmodified,“andŽ¡‘Hlist–¹–them“all“as“Invariant“Sections“of“your“combined“work“in“itsŽ¡‘Hlicense‘¹–notice.Ž¡¡‘HThe–¹–combined“work“need“only“contain“one“copy“of“this“License,“andŽ¡‘Hmultiple–¹–identical“Invariant“Sections“may“be“replaced“with“a“singleŽ¡‘Hcopy.‘ s,If–¹–there“are“multiple“Invariant“Sections“with“the“same“name“butŽ¡‘Hdifferent–¹–contents,“make“the“title“of“each“such“section“unique“byŽ¡‘Hadding–¹–at“the“end“of“it,“in“parentheses,“the“name“of“the“originalŽ¡‘Hauthor–¹–or“publisher“of“that“section“if“known,“or“else“a“unique“number.Ž¡‘HMake–¹–the“same“adjustment“to“the“section“titles“in“the“list“ofŽ¡‘HInvariant–¹–Sections“in“the“license“notice“of“the“combined“work.Ž¡¡‘HIn–¹–the“combination,“you“must“combine“any“sections“entitled“"History"Ž¡‘Hin–¹–the“various“original“documents,“forming“one“section“entitledŽ¡‘H"History";–¹–likewise“combine“any“sections“entitled“"Acknowledgements",Ž¡‘Hand–¹–any“sections“entitled“"Dedications".‘ s,You“must“delete“all“sectionsŽ¡‘Hentitled‘¹–"Endorsements."Ž¡¡¡‘H6.–¹–COLLECTIONS“OF“DOCUMENTSŽ¡¡‘HYou–¹–may“make“a“collection“consisting“of“the“Document“and“other“documentsŽ¡‘Hreleased–¹–under“this“License,“and“replace“the“individual“copies“of“thisŽ¡‘HLicense–¹–in“the“various“documents“with“a“single“copy“that“is“included“inŽ¡‘Hthe–¹–collection,“provided“that“you“follow“the“rules“of“this“License“forŽ¡‘Hverbatim–¹–copying“of“each“of“the“documents“in“all“other“respects.Ž¡¡‘HYou–¹–may“extract“a“single“document“from“such“a“collection,“and“distributeŽ¡‘Hit–¹–individually“under“this“License,“provided“you“insert“a“copy“of“thisŽ¡‘HLicense–¹–into“the“extracted“document,“and“follow“this“License“in“allŽ¡‘Hother–¹–respects“regarding“verbatim“copying“of“that“document.Ž¡¡¡¡‘H7.–¹–AGGREGATION“WITH“INDEPENDENT“WORKSŽ¡¡‘HA–¹–compilation“of“the“Document“or“its“derivatives“with“other“separateŽ¡‘Hand–¹–independent“documents“or“works,“in“or“on“a“volume“of“a“storage“orŽ¡‘Hdistribution–¹–medium,“does“not“as“a“whole“count“as“a“Modified“VersionŽ¡‘Hof–¹–the“Document,“provided“no“compilation“copyright“is“claimed“for“theŽ¡‘Hcompilation.‘ s,Such–¹–a“compilation“is“called“an“"aggregate",“and“thisŽ¡‘HLicense–¹–does“not“apply“to“the“other“self-contained“works“thus“compiledŽ¡‘Hwith–¹–the“Document,“on“account“of“their“being“thus“compiled,“if“theyŽ¡‘Hare–¹–not“themselves“derivative“works“of“the“Document.Ž¡ŽŸ’åÿ²40ŽŽŒ‹)=È y ý£ ? ýä‘HÊIf–¹–the“Cover“Text“requirement“of“section“3“is“applicable“to“theseޤ ‘Hcopies–¹–of“the“Document,“then“if“the“Document“is“less“than“one“quarterŽ¡‘Hof–¹–the“entire“aggregate,“the“Document's“Cover“Texts“may“be“placed“onŽ¡‘Hcovers–¹–that“surround“only“the“Document“within“the“aggregate.Ž¡‘HOtherwise–¹–they“must“appear“on“covers“around“the“whole“aggregate.Ž¡¡¡‘H8.‘¹–TRANSLATIONŽ¡¡‘HTranslation–¹–is“considered“a“kind“of“modification,“so“you“mayŽ¡‘Hdistribute–¹–translations“of“the“Document“under“the“terms“of“section“4.Ž¡‘HReplacing–¹–Invariant“Sections“with“translations“requires“specialŽ¡‘Hpermission–¹–from“their“copyright“holders,“but“you“may“includeŽ¡‘Htranslations–¹–of“some“or“all“Invariant“Sections“in“addition“to“theŽ¡‘Horiginal–¹–versions“of“these“Invariant“Sections.‘ s,You“may“include“aŽ¡‘Htranslation–¹–of“this“License“provided“that“you“also“include“theŽ¡‘Horiginal–¹–English“version“of“this“License.‘ s,In“case“of“a“disagreementŽ¡‘Hbetween–¹–the“translation“and“the“original“English“version“of“thisŽ¡‘HLicense,–¹–the“original“English“version“will“prevail.Ž¡¡¡‘H9.‘¹–TERMINATIONŽ¡¡‘HYou–¹–may“not“copy,“modify,“sublicense,“or“distribute“the“Document“exceptŽ¡‘Has–¹–expressly“provided“for“under“this“License.‘ s,Any“other“attempt“toŽ¡‘Hcopy,–¹–modify,“sublicense“or“distribute“the“Document“is“void,“and“willŽ¡‘Hautomatically–¹–terminate“your“rights“under“this“License.‘ s,However,Ž¡‘Hparties–¹–who“have“received“copies,“or“rights,“from“you“under“thisŽ¡‘HLicense–¹–will“not“have“their“licenses“terminated“so“long“as“suchŽ¡‘Hparties–¹–remain“in“full“compliance.Ž¡¡¡‘H10.–¹–FUTURE“REVISIONS“OF“THIS“LICENSEŽ¡¡‘HThe–¹–Free“Software“Foundation“may“publish“new,“revised“versionsŽ¡‘Hof–¹–the“GNU“Free“Documentation“License“from“time“to“time.‘ s,Such“newŽ¡‘Hversions–¹–will“be“similar“in“spirit“to“the“present“version,“but“mayŽ¡‘Hdiffer–¹–in“detail“to“address“new“problems“or“concerns.“SeeŽ¡‘Hhttp:///www.gnu.org/copyleft/.Ž¡¡‘HEach–¹–version“of“the“License“is“given“a“distinguishing“version“number.Ž¡‘HIf–¹–the“Document“specifies“that“a“particular“numbered“version“of“thisŽ¡‘HLicense–¹–"or“any“later“version"“applies“to“it,“you“have“the“option“ofŽ¡‘Hfollowing–¹–the“terms“and“conditions“either“of“that“specified“version“orŽ¡‘Hof–¹–any“later“version“that“has“been“published“(not“as“a“draft)“by“theŽ¡‘HFree–¹–Software“Foundation.‘ s,If“the“Document“does“not“specify“a“versionŽ¡‘Hnumber–¹–of“this“License,“you“may“choose“any“version“ever“published“(notŽ¡‘Has–¹–a“draft)“by“the“Free“Software“Foundation.Ž¡¡ŽŸ’åÿ²41ŽŽŒ‹*Hò y ý£ ? ýä‘HÊADDENDUM:–¹–How“to“use“this“License“for“your“documentsޤ ¡‘HTo–¹–use“this“License“in“a“document“you“have“written,“include“a“copy“ofŽ¡‘Hthe–¹–License“in“the“document“and“put“the“following“copyright“andŽ¡‘Hlicense–¹–notices“just“after“the“title“page:Ž¡¡‘dY„Copyright›¹–(c)– s,YEAR“YOUR˜NAME.Ž¡‘dY„Permission–¹–is“granted“to“copy,“distribute“and/or“modify“this“documentŽ¡‘dY„under–¹–the“terms“of“the“GNU“Free“Documentation“License,“Version“1.1Ž¡‘dY„or–¹–any“later“version“published“by“the“Free“Software“Foundation;Ž¡‘dY„with–¹–the“Invariant“Sections“being“LIST“THEIR“TITLES,“with“theŽ¡‘dY„Front-Cover–¹–Texts“being“LIST,“and“with“the“Back-Cover“Texts“being“LIST.Ž¡‘dY„A–¹–copy“of“the“license“is“included“in“the“section“entitled“"GNUŽ¡‘dY„Free–¹–Documentation“License".Ž¡¡‘HIf–¹–you“have“no“Invariant“Sections,“write“"with“no“Invariant“Sections"Ž¡‘Hinstead–¹–of“saying“which“ones“are“invariant.‘ s,If“you“have“noŽ¡‘HFront-Cover–¹–Texts,“write“"no“Front-Cover“Texts"“instead“ofŽ¡‘H"Front-Cover–¹–Texts“being“LIST";“likewise“for“Back-Cover“Texts.Ž¡¡‘HIf–¹–your“document“contains“nontrivial“examples“of“program“code,“weŽ¡‘Hrecommend–¹–releasing“these“examples“in“parallel“under“your“choice“ofŽ¡‘Hfree–¹–software“license,“such“as“the“GNU“General“Public“License,Ž¡‘Hto–¹–permit“their“use“in“free“software.Ž¡¡¡ŽŸ’åÿ²42ŽŽŒøS«ƒ’À;èy— *ó&߆µT cmtt12ó$©±Ê cmsy9ó"¼j‘¹ cmti9ó!ßCÊscmtt8óߤN cmtt9óÂÖN  cmbx12óý': cmti10óò"V cmbx10óÂÖN ff cmbx12ó¾KÈ cmsy8ó¹Aa¨cmr6ó|{Ycmr8óX«Q cmr12ó߆µTG® cmtt12óDÓítG®G®cmr17óßê cmmi10ó 0e—rcmmi7óKñ`y cmr10óÙ“ Rcmr7ó†›Zcmr5ùYXßßßßß