ROBOTWAR @(DSK (?KARSTEN $"ROBODOCS )P)#ROBOT 00LWALID $|PICALC1-C ,P,PPICALCXB  l|PICALD  PICALE  PICALF pROBOT  8TEST $BACKUP  TEST1 Po.,t7V6L6B686./$471111$/*181H1V01e0111/<z1p1f1\2R2H2'>242*2 2W.x 22/N232133*3H35555v4l4b5X6N6D5:606&4686>6Y6h6l645,57767478/0|7.r7\h0@^0dT0J4@7|67,5O"5k747747645.4.../`4(x3n7d7(000 0ZFLAG0205Term 1 iteration #N 205Term 2 iteratiKARSTN11671183ROBOT WAR INSTRUCTIONS ----------------------  NRobot War is a game where you pit a programmed robot in an arena against otherOhuman or computer controlled robots in a fight to the death. Up to 4 robots canfight at a time.  OWhen the program starts, there will be a splash screen displayed. Press any keyOto move on, and you will then be asked the number of human players ranging fromN0 to 4. Pressing zero will result in 4 computer controlled robots to be pickedLat random from the program's robot library. If less than 4 human players areKchosen, then the remainder robots will be computer robots randomly chosen.  ONext you will asked to choose the energy level of the robots, up to 9999 energyMpoints. This will become the starting energy level for ALL the robots in this(session. A good starting point is 1000.  MIf no human players are selected, then the game will go straight to the arenaM(more on that later). Otherwise, for each human controlled robot, you will beJasked to either load a previously saved robot from disk or enter the robotprogram manually.  KIf you decide to load a robot from disk, then you will be prompted to enterIfirst the disk path and then the filename. Entering a blank string at the)filename will cancel the load operation. JOnce the robot is loaded, then the entry sequence is similar to the manualentry option.  MYou will first be asked to enter a robot name (6 letters maximum). This fieldKwill already be filled if you loaded a robot from disk, but it can still be:edited or you can just press to accept the entry.  NNext you will have to enter the program sequence. Again there will be an entryOdisplayed if a robot has already been loaded, and it can be edited by using theJarrow keys to move the cursor and the standard TI editing functions. Press to accept.  MThe program sequence consists of a string of up to 28 macro-instructions. TheJfirst instruction entered is always the emergency instruction used by your7robot if its program becomes corrupted (details later)  IEach isntruction has a corresponding number from 1-9 and is listed on thescreen. Here are the details:  1- Non-Random Movement: ----------------------- LThe robot will look up the next instruction and depending on the result willNmove in a selected direction. A 1 will move it up, 2 right, 3 down and 4 left.JAny other number will be ignored. If the movement path is block by anotherIrobot, the arena perimeter or a random obstruction inside the arena, thenOnothing happens. A mine is NOT considered an obstruction. Regardless of whetherOactual movement occurs or not, energy is spent. The cost of this instruction is20.  2- Random Movement: ------------------- LHere the robot will pick a random non-diagonal direction and attempt to moveCthere. The same movement restrictions apply here as in the previous1instruction. The cost of this instruction is 10.  3- Find And Track: ------------------ LYour robot is equipped with a long-range radar that covers the entire arena.IWith this instruction, it will attempt to find the closest robot and moveNtowards it orthogonally or diagonally. The same movement restrictions as above5also apply here. The cost of this instruction is 40.  4- Run Away: ------------ NThis instruction is the exact opposite of Find And Track, where the robot willFattempt to run away from the closest robot. Same movement restrictions+apply. The cost of this instruction is 40.  5- Place Mine: -------------- MThe robot will attempt to place a mine randomly in any of the available spaceEimmediately adjacent to it except the diagonal spaces. If no space isOavailable, then nothing happens and there is no energy cost. Otherwise the cost is 30. FEach mine can recognize the electronic signature of its owner and willNautomatically deactivate if that robot moves on it. Otherwise, the enemy robotOwill suffer 200 energy points in damage. In addition to that, the mine blast isOso powerful that it causes the current enemy robot program step to be corruptedIat which point that step will be replaced by the pre-programmed emergencyLinstruction. Step on enough enemy mines and your robot's program will becomePseverely altered... The mine is the most damaging weapon available in the game.  6- Horizontal Fire: ------------------- ՋՀMThis instruction will cause the robot to fire its conventional guns, but onlyJhorizontally in both directions. If the shot hits the arena perimeter or aLrandom arena obstruction, then nothing happens. If it hits a mine, then thatMmine is destroyed. If an enemy robot is hit, then that robot incurs 50 points4of energy loss. The cost of this instruction is 30.  7- Vertical Fire: ----------------- OThis instruction is identical to Horizontal Fire except that the guns are firedFin the vertical direction up and down simultaneously. The cost of thisinstructin is 30.  8- Photon Torpedo: ------------------ NHere the robot scans its environment using the long range radar, and will fireMa photon torpedo at the closest enemy robot that is within 10 spaces from it.NIf all of the enemy robots are out of range, then nothing happens. The torpedoLwill home-in on its target in the most direct path possible, however it willNdisipate harmlessly if it hits an arena obstruction or the arena perimeter. IfNa mine is hit, then the mine will be destroyed. If an enemy robot is hit, thenOthat robot will incur a 150 energy point loss. Please note that you only have 4Ophoton torpedoes available, and if the robot runs out then nothing happens. The@cost of this instruction is 50, but only if a torpedo is fired.  9- Proximity Test: ------------------ NWith this instruction, the robot will use its short range scanner with a rangeKo only 4 spaces in any direction. If an enemy robot is detected within thatMrange, then the program instruction immediately following that instruction isMexecuted, then the program ignores the following instruction and jumps to theNon after it. On the other hand, if no enemy robot is detected within 4 spaces,Mthen the program jumps the immediate instruction following the Proximity TestGone and executes the one following it. From there it resumes normally. NFor example, let's say your robot's program is 2149824. When the robot reachesOinstruction 9 (proximity test), it will scan its surrounding. If an enemy robotEis detected, then instruction 8 will be executed then it will jump toLinstruction 4 and continue from there. If no robot is detected, then it willFskip instruction 8 and execute instruction 2 and continue from there. EIt is not advised to use instructions 1 or 9 after the proximity testIinstruction because they require follow up instructions which will not be5handled correctly by the proximity test instruction.   EWhen a program reaches the end of its instructions, it will loop backOautomaticaly to the second instruction in the program and continue from there. NOnce the program is entered, press and you will be asked to accept theOdata entered. Pressing N will take you let you edit your entries, otherwise youNwill given the option to save your robot data to disk. If you choose to do so,Ithen you will be prompted to enter a disk path. Enter that information asJdiskpath.filename then press and your robot will be saved. You canFcancel the saving operation by entering a blank string at the prompt.  NOnce all the data has been entered, the arena will be displayed and the robotsLwill be placed at random locations within it. Each robot will be assigned anLicon which will be displayed on the bottom of the screen along with its nameJand current energy level. The blocks with an X inside the arena are randommpenetrable obstructions.impenetrable obstructions.  MThe battle consists of up to 50 rounds, with each round ending when each liveNrobot has executed one instruction (2 if it is a proximity test instruction). KPress any key to start the battle, and from there on the robots will becomeJautonomous. As they execute instructions and incur potential damage, theirMenergy level will go down. Any robot that reaches 0 energy level is destroyedKand taken out of the arena. However, if executing an instruction brings theKenergy level to 0 or less, that instruction is still executed but the robot5will be destroyed immediately afterwards. LIf during a round there is only one robot left with an energy level above 0,Lthe that robot is declared the winner. If 50 rounds have passed without thisOcondition occuring, then the game ends and the robot with the most energy wins.IIt is also possible to have a tie situation here and the game is a draw.  EDuring each round, each robot is assigned an order of action randomlyL(initiative) and the currently active robot's name will briefly flash at theMbottom of the arena. The round number will also flash at the top of the arenaat the beginning of the round.  NOnce you become familiar with the game, you will be able to create robots with5complex behaviors that will be fascinating to watch.  OI hope you will enjoy this game. Please contact me should you have any commentsNor find any bugs. As usual, this game is freeware and you may modify at will.  Walid Maalouli email: wmaalouli(at)comcast.net February 11, 2008  ՋՀ l{ A D p ײ  L ز j : ړ V |ۯ r hܕ ^ T J @ 6 ,K "- S  ! g ִ j . x n d1 Z P F < 26 (V q  . d   U r U ~߭ t j ` V L B* 8# .8 $c O S u݅ @Vzpf\RݦH>4*6 m eK^tGޥvlbsXND%:?06&R[c|cW!28|-rh^<TJQ@~6,"&2M]8xEnւdZ.PF8j `ߋVLDB~8J.Z$`v}c#*zp8fY\RGH >4* r Jf#G;/vlbXN D:X0&'u{Fy`jA|r{hc^TcJ@@6/,"U=zL;6vFx֣nd;FF0DM10ENEN50MISLNMISLN1 6DM100RM1FF3rMISLN0 INN1շPRG$NINN2 FEBRUARY 2008 EN0;N190YCXCRCϷ4׶136HCHARYCXCRCNBCLEARSCREEN4COLOR016114141 rKEY0KSS0 CLEAR JA2112By Walid Maalouli2314 February 2008Q17151716171717201723172517281730G1614161616181620162316251628e1514151815201521152215231525152615271530G1414141814201423142514281430o13141318132013211322132313251326132713281330v103106109101010131014101510161019102010241025X939698911913916918921924925X838688811813816818821824825X737578711713715718721724725i63646568611613614615618621624625X535658511513516518521524525X4346484114134164184214244253334353639310313314315316319320323324325326+N143YCXCHCHARYCXC30N SPLASH SCREEN-EI0 HCHARYIXI42-EN0 HCHARYNXN42EIEI150  @ ROBOT DESTRUCTION SR! EIEI50CT11 @ EIEI50CT1 @! EIEI50CT11 @ EIEI50CT1 @]SOUND30950RYYN1RY1YN1RXXNCT0CT10ENEN30 6]SOUND30950RXXN1RX1XN1RYYNCT0CT10ENEN30 6LSOUND1110070HCHARRYRXMNENEN30 6$DM100ENEN40RM1 6-INSTϷ4׶1ENEN10 6EINSTڷطPRG$NINN11ENEN20INNINN1 6! ENEN200MF0 6EI0EI0jSOUND3091103011030200003080RXRXѷXIX1RYRYѷYIY1X1RXY1RY%SOUND400110070 HIT SOUND SR?SOUND15110RXRXѷXIXNRYRYѷYIYN$SOUND1511260060 FF1hH ܂HCHARYNXN42YNRYXNRXHCHARYNXNRFNiSOUND400110070SOUND200110573SOUND800110070 EXPLOSION SOUND SRRS19SOUND60220850SOUND60220855S ROBOT MOVEMENT SOUND SRX1XNY1YN ROUND1GPN0ROUND1I14RFLAGI0INI2MISLI4IJ20126RN$ND1100DHCHAR201012812.20422Press Any Key To StartHCHAR20212830 ROBOT PROGRAM EXECUTIONFF2hENEN30.NϷ7׶1N Z P& F& <& 2& (& &COWARD495411111167678JUDGE239532395826726738#ATTILA2339678336785397583658SEEKER 23956239572BERSEK323963973962239762BETA455542559459522"ALPHA4953954962249749432953 COMPUTER ROBOTSFF L (PSdJ^&f 8u171e5- Place Mine 6- Horizontal Fire 7- Vertical Fire 8- Photon Torpedo FF08C42HCHARRYRX135HCHARRYRX42 *C130C133HCHARRYRX42%GCHARRYRXCC128C129 PHOTON SRI14INEI0I14RFLAGI0I?N14RFN135NINN2MN129NMISLN4N"CHAR1352418A55A5AA51824UPRG$4X4Y4E4IN4RN$4RF4RFLAG4M4MISL4)6913 IT'S A TIE!!!2;ROUND514913 TIME IS UP!!!ME0'TYITX76ַRFIEII-NϷ4׶1PN4āRFLAGN1PSڷطPRG$NINN1XE10E20E30E4062ALL ROBOTES DESTROYED!2]PRG$NطPRG$N1INN1طPRG$N11طPRG$NINN1˷շPRG$NINNINFLAG0INNINN2շPRG$NINNINNINNշPRG$N1SKIP0tFC42HCHARRY1RX134HCHARRY1RX42RY1RY11 .FC42HCHARRYRX1134HCHARRYRX142RX1RX11 CT11\%GCHARRYRXCC42PRF5D"C130C133CMNMF1 MF0t"C130C133CMNMF1"C130C133CMNMF1"C130C133CMNMF1"C130C133CMNMF1 P1109ROUND ROUNDI1100IHCHAR1812814#I114COLORI21I%9814PLAY AGAIN? YNMDC36126RN$WR7814IS THE WINNER!2CLEARCOLOR13215141415351451COLOR951105111511251SCREEN12C129CT11 . PN4&EN0RFLAGN1PNPN15DӷXNXI2YNYI2DDMDMDRMI&HCHARRYRXRFIXIRXYIRYI1100II2I4TYTY1I2TX16TY19 I14TX1TY21 SCORE DISPLAY$FF0DM4YFLAG1NFLAG1 PROXIMITY TEST SRCT1CT11zI!I14XIRXYIRY1 $6C130C133HCHARRY1RX42CT11 .GCHARRY1RXCRY119CT11 . CT11 .I I14XIRXYIRY4C130C133HCHARRYRX42CT1C129CT1BC42HCHARRYRX134HCHARRYRX42RYRY1GCHARRYRXCRY2CT1 CT1 VERTICAL FIRE SRCT1CT11I!I14XIRX1YIRYRC129CT11\6C130C133HCHARRYRX142CT11\GCHARRYRX1CRX13CT11\I I14XIRXYIRY4C130C133HCHARRYRX42CT1C129CT1BC42HCHARRYRX134HCHARRYRX42RXRX1GCHARRYRXCRX30CT1 CT1 HORIZONTAL FIRE SRINST5INST1'C42INSTINST1PRFPRF1INST4RXRX141 Robot name? RN$N4136RN$NTX1TY21 NP0z d+PATH$241 7241 Disk Path: 241216PATH$,PATH$241 D 1RN$NPRG$N1v1PATH$361PATH$36 z0241 Disk path: 2412PATH$>KEY0KSS0 BERRECET241 245 I/O error #EC FILE ERROR SUBROUTINEH241 File name: 2412RN$NPATH$PATH$.RN$N K50>1RN$NPRG$N1CERRECET241 245 I/O Error #EC K89*NKEY0KSS0 x DISK ERROR SUBROUTINEKEY0KSS0*241Save robot to disk (Y/N)?o131_1- Non-Random Movement 2- Random Movement 3- Find And Track 4- Run Away!2119- Proximity Test#245Accept data? (Y/N)f84Enter program sequence101PRG$N101 12345678928PRG$N K89vKEY0KSS0 ROBOT PROGRAMMING CLEARK49K50NKEY0KSS0NRN$IPRG$II PARAMETERS SETUP)R219HCHARR34228RGCHARRYRXCC42@COLOR215151 INITIALIZATION I115HCHARRYRX129IGCHARRYRXCC129"RXϷ26׶3RYϷ18׶2vHCHAR1212830VCHAR23112819HCHAR20212830VCHAR2212819 DISPLAY SET UP BY WALID MAALOULI ROBOT WARSRYRXCC129"RXϷ26׶WALID23338672645,57767478/0|7.r7\h0@^0dT0J4@7|67,5O"5k747747645.4.../`4(x3n7d7(000 0ZFLAG0205Term 1 iteration #N 205Term 2 iteration #N LL1L64 >ITRϷD1.4DϷD82D5200jSUM13SUM220000000TERM10TERM220000000S0DENOM13TBASE25MULT16շSUM$8շSUM$8շSUM$8 i102# of decimals (mult. of 8)112(Maximum of 5200 decimals)1312鶵D'DIVIDENDREMAINDER 100000000TERMI)SUMISUMI·QUOTIENT1 100000000#QUOTIENTϷSUMI 1000000001#SUMISUMIQUOTIENT 100000000QUOTIENTϷSUMI 100000000-SUMI 100000000^SUMI0 AUGUST 2007 BY WALID MAALOULI PI CALCULATOR1FL$8011I1SUM$ SUM$0SUM$SUM$۷SUMI I2D11Pi=3.6221Enter path.filename:241FL$K48ڳ\I1SUM$ SUM$0SUM$SUM$۷SUMI I2D11Pi=3. 1PIOCLEARPi=3./241End. Press any key to exit4241Press any key to continueL0KEY0KSTST0RI CLEARKEY0KSTST0* SUM$ SUM$0SUM$SUM$۷SUMI I2D1K49K51KEY0KSTST0n53Send results to:85 1- Screen1052- Printer (PIO)1253- File/CLEAR23Calculations complete!0SUM652SUM1652TERM652TEMP652N1ITR1V18 Pi Calculator36By Walid Maalouli59 August 2007 I1D I1D I1D I1DID21 I1DI1DTEMPITERMIII1DTERMITEMPII"Finalizing calculations...FLAG1l"TBASE57121DENOM13MULT4SUMISUMIMULTTERMI SUMISUMIMULTTERMI6 N1(DENOM239TERM11REMAINDER0J FLAG2I&SUM1ISUM1ISUMISUMISUM1IFLAG1S0ISUMITERMITERMI0DENOM239REMAINDER0TERM14ISUMI0TERMI0SUM1ISUMIFLAG2DENOMTBASEREMAINDER0!REMAINDERDIVIDENDTERMIDENOMITERMIϷDIVIDENDDENOM DIVIDE SUBROUTINENDENOM1DENOM12I#SUMI1SUMI1QUOTIENT1SUMI1SUMI1QUOTIENTS0S1S0 S0,IDENOMDENOM1REMAINDER01 CLEAR?ICALC2 .P^p| ڍb:> R.Nb:> R.~b:> R.ͮb:> R. ڝ ڸ  `B.    ( `  :> ( (9Ȣ>p.9Ȣ>p.~9Ȣ>bp.~9Ȣ>p. :> (vbp]Pi CalculatorBy Walid MaalouliAugust 2007Converted to C99By Fred G. Kaal# of decimals (mult. of 4)(Maximum of 2600 decimals) bܒ !Na hR.~a hR.~9Ȣ>p.pD~~a hR.~9Ȣ>p.pDܒt9Ȣ>N9Ȣ> `n`. ` l. l. ( (`"4] Finalizing calculations... (b  `` `ܬ h. ~ͮ pDͮ~ pD9Ȣ>~9Ȣ> ``| `\ l. l.  l.`l. ( (`p `b4 ( `]Term %u iteration #%u  9Ȣ> (9Ȣ>  `B`ސ  `p p`& l.l.ppl.l.l. ( (`ބ]Np.l.~9Ȣ>Lj`r`ߚ`߂l.l. l.l.l.p pl. l.l.l. (`ߔ]. pˈbˈLj.`n``.9Ȣ>..`j bˈ`jLjlP.`.]Calculations complete!Pi=3. %04luPress any key to continueEnd. Press any key to exit4lL.:NlL.@~lL.FͮlL.]SUM SUM1 TERM TEMP NnLj``t`\(.(~H.l.`n ] %5ld! hX..H.! &!&@H2]AH2]bRQ![[.ˈbˈ.H`.`( (.~H~Hˮ .``..H Z`..HbZ.bˈ( ..~Hbˈ.h.n. (~H.`ˈ`.`J.. `.  `.HbZˈ`ˮ bˈ`( . .b.>~Hˮ `. ` ....(>...(>H Z..HbZ`. n.  `.lX^B>`.H@`n.8~H.H`.H~H...~Z.  . `  ``,, , 8N f|``T.p..]. ]Nbl~Hb.`2 .` ,H ,bl~H` , ,``l` ,H`2.]0bpH`]Nn.p(~H]1.```].]n.n3. !].ˮ. .~H.``j.p`zn.]n](  ! [n.l.].\|u|X2|20A||D|||qW@ Z!(#"Zq&v?8(@ : 9640 AS 0061DSK2. g  " pu{P{N#LL?0O:?0?H{:$$( qd . ! ! ! ! " " " "( " # 0`I ` * P&F?8J  " "  0[!"`X I >   B  `s ~ I 0[  ":-":1"@`"@`]-a@ m[J@#@@d'@< @<   E[~S V@) !   !܁ ROT 6V V 8  , 2 @  r`U    : 4 2  !  A  0  !$ 0[ "` "S V ! 2  !  . $G%$#F&.: . ! % "&FNà "@ %#&b t ,%d#@ $ &` $ $ ( * ` ( ( &. ̠ " ,   %f&P $ *%f&– –SFbD†*CJƓI$ *D `$2`$‹  *& ( *&.ݠ  ŀ@Z‹ &. &.Z &.% @ Z# #[ `$2 20p0T0VP @  .  !p P  < ! [ `$2?@!` *[ [-RQcdU\[_^G.\|u|X2|20A||D|||qWC,+7...;.~/Z/rz/p/3333n-d-Z-U-P.G-XF-A-41 Robot name? RN$N4138RN$NKEY0KSS0 ROBOT PROGRAMMING CLEARK49K50~KEY0KSS0~ N55NP11CLEAR NP5jNϷ3׶1N8BLRN$IPRG$II V VI15NP1PRG$5X5Y5E5IN5RN$5BETA455542559459522 BERSERK323963973962239762"ALPHA4953954962249749432953 COMPUTER ROBOTSN15ENELN741 Energy level?4155ELJ21Human players? (0-5)2221NPNP5CLEARSCREEN15 PARAMETERS SETUPCLEARCOLOR132161471531414141COLOR951105111511251SCREEN12)R219HCHARR34228RGCHARRYRXCC42lCOLOR21515*221robots227E11 INITIALIZATION)HCHARRYRX136XIRXYIYXI I115 RX26׶3RY18׶2 I15HCHARRYRX129IGCHARRYRXCC129D"RXϷ26׶3RYϷ18׶2vHCHAR1212830VCHAR23112819HCHAR20212830VCHAR2212819"CHAR1361824247EBDBD18242CHAR128 FF87878991E1E1FFFFC3A59999A5C3FF DECEMBER 2007 DISPLAY SET UP BY WALID MAALOULI ROBOT WARS212819"CHAR1361824247EBDBD18242CHAR128 FF87878991E1E1FFFFC3A59999A5C3FF DECEMBER 2007 DISPLAY SET UP BY WALID MAALOULI ROBOT WARS? OBOT TEST 123142354655