;redcode-94 ;name Settete ;author Maurizio Vittuari ;contact pan0178@iperbole.bologna.it ;NSFCWT Round 7 ;strategy Copy a core-clear near to the enemy, and then... ;strategy switch between paper and bomber (Flint) ;strategy according to the "Father & Son" strategy ;assert CORESIZE == 8000 ; *** Father & Son strategy *** ; 1=win, 2=tie, 0=loss ; Son : 1 -> stay, else goto father ; Father: 0 -> goto son, else stay ; Here Flint is the father son_str equ #517 ; Son identifier fat_str equ #0 ; Father identifier s_slot equ #297 ; strategy slot boot1 equ ref+4000+250 ; boot distance ref equ m3-300 ;for 300 ; decoy dat <1, {1 ;rof m3 dat #0, {-10 m1 mov m3, {m3 m2 djn.f m1, <250 start mov.i m3, boot1-1 ; copy core-clear near to the enemy mov.i m1, boot1 mov.i m2, boot1+1 spl boot1, {boot1-100 ; * * * Thinking routines * * * res ldp #0, 0 strat ldp s_slot, 0 sne son_str,strat ; skip if father djn father, res ; if son, goto father if res<>1 jmn father, res ; if father, stay if not loose ; NOTE If I'd been in son -->res=0 ; owing to djn: goto son ; jmp son ; goto son if father loose ; or stay if I won ; * * * Son * * * step1 equ 3743 step2 equ 1567 step3 equ 1349 son stp son_str,s_slot r_count spl 1, -1, }-1 mov bomb, }1942 s2 spl step2, #0 mov >-1, }-1 mov bomb, }1842 mov bomb, }1900 mov bomb, }2000 mov -11-1 ;ptr2-1 last djn.f rast, {-12+1 ;ptr2+1 ;for 148 ; decoy dat <1, {1 ;rof end start