;redcode-94f ;name NTfFinal ;author Nenad Tomasev ;assert 1 ;strategy ;coreclear+paper+scanner ;********pGo values******** lt equ 183 ;the number of consecutive tie+loss pstrat equ 377 ;the current strategy n equ 3 ;number of strategies used limit equ 5 ;how many ties+losses before switching strategy ;set to be less aggressive ;is that good? no idea... ;************************** ;********paper steps******* rSize equ (rBase-rPtr) rStep equ 1763 rStep2 equ 581 rAdd equ 1683 incy1 equ 9 pbd equ 1288 ;************************** str2c equ boot1 modstr1c equ papic modstr2c equ clrinc cincy equ 7 whinc1 equ 188 whinc2 equ 252 whincs equ 333 incys equ 3 org pGo for 105 dat 0, 0 rof rPtr dat 1, 0 rNew add.ab #rAdd, rBase rFrst mov.i rBase, rPtr rLoop mov.i *rPtr, go1, }go1 rof mov @go1, *go1 go1 jmp }-1612, gate for 20 dat 0, 0 rof papic ldp.a #whinc1, inc add.a #incy1, inc stp.ab @papic, #whinc1 inc add.a #incy1, papgo str1c mov many ;if not, think + INC(lt) mod.a #n, go ;modify to desired interval go jmp @0, str1c ;pointer to warrior1 dat 0, str2c ;pointer to warrior2 dat 0, boot ;no need to save Afield of go ;since we use the same strategy as before for 9 ;a little empty space dat 0, 0 rof ;now the continuation... pswap mod.ab #limit+1, many ;see if we've reached the critical value stp.b many, #lt ;memorize for future thinking mov.a go, lgo ;transfer strategy choice to this routine sne.ab #0, many ;if critical value, change strategy nop }lgo, 0 ;changing strategy... mod.a #n, lgo ;modify to desired interval stp.ab lgo, #pstrat ;save new (old) strategy lgo jmp @0, modstr1c ;pointer to modification lines for warrior1 dat 0, modstr2c dat 0, scinc ;pointer to modification lines for warrior2 for 39 dat 0, 0 rof gate dat clr, -1790 w dat 1, 11 jmp #1, 11 clr spl #30, 0 mov.i *w, >gate mov.i *w, >gate cend djn.f -3, }clr step equ 1394 sd1 equ 1660 sd2 equ -1720 loop add #step, @2 ;djn protection added scan jmz.b -1, @dest mov jump, @dest dest mov split, *-2 jmn loop, *0 ;made 0 bfield split spl #0, <0 mov 2, >-3 jump jmp -1, 0 scdat dat <1143, 8 for 5 dat 0, 0 rof scinc ldp.a #whincs, incs add.a #incys, incs stp.ab @scinc, #whincs incs add.a #incys, g add.ab -1, g boot mov go2, }go2 for 5 mov >go2, }go2 rof mov @go2, *go2 go2 jmp }1582, gate end