From news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!howland.reston.ans.net!nntp.coast.net!fu-berlin.de!cs.tu-berlin.de!uni-erlangen.de!lrz-muenchen.de!news Tue Jun 25 16:13:08 1996 Article: 5506 of rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!howland.reston.ans.net!nntp.coast.net!fu-berlin.de!cs.tu-berlin.de!uni-erlangen.de!lrz-muenchen.de!news From: guenzel@extern.lrz-muenchen.de (Bjoern Guenzel) Newsgroups: rec.games.corewar Subject: tiny scan - selfmutating scanner Date: Tue, 25 Jun 1996 11:26:45 GMT Organization: Tichy Works Lines: 132 Distribution: world Message-ID: <4qoemc$efn@sparcserver.lrz-muenchen.de> NNTP-Posting-Host: line5d.ppp.lrz-muenchen.de X-Newsreader: Forte Free Agent 1.0.82 Hello everybody! Many weeks ago, when Scanny Boy was still king, David van Damn told me it was an eight instructions scanner. Not wanting to make a one-shot, since then I have tried to make a small scanner. One of the ideas I was obsessed with was to turn the attack of the scanner into a 0.66c clear. I just was unsatisfied with having no further use for two mov.i bomb,>ptr in a row, it seemed to be too perfect for a fast clear. I have tried MANY things... Countless hours, for me it turned out to be very difficult (although it might seem easy, if you see it now). A few days ago I gave it another try, and now here it is :-) I am glad that at least I got my idea to work, only it doesn't score well. I am unhappy with having to store some bombs so far away from the main code - since paper attacks with carpets, the scanner could as well be 30 instructions long, then... Also the clear tends to be unstable - in earlier versions it often ended up with only spl, because it overwrote the pointer with the wrong bomb. In this version it's better, but there are the dispersed bombs... :-( Anyway, I am satisfied with the scan engine itself - I think it is quite neat (?), and one of the faster ones. A problem is that if it hits a location that is constantly changed (eg a djn stream pointer), it is stuck... But I think other scanners like memories or Iron Gate have the same problem? (not sure) I also made a version that jumped to a seperate clear after the scan, which does much better, but it hasn't got the feature I wanted... I hope it interests someone - I guess it is one of the smaller scanners of it's kind (bombing s/s/j) :-). If anyone has an idea how to improve it, I would be very glad to hear!!! Also about other comments of any kind! Any hints how to make it score well? I doubt scanners have good odds, but after all, tiny scan theoretically has a better size/speed ratio than most bombers (?? at least better than justice, which is my best) - not counted the time wasted on decoys, unfortunately... Aaargh, please help me to make it good, I am exhausted from dealing with it............................... Thanks for listening! Bjoern P.S.: Has somebody else tried a similiar thing, perhaps found different solutions? I really tried a lot of things, this is the only one I got to work... I guess I could also have called it 'bag of tricks', but somebody else did that before :-) ;redcode-94 ;name tiny scan ;author bjoern guenzel ;strategy paper x-tinction ??? Probably not :-( ;strategy 0.66c size 12 scanner, bombs with s/s/j -> s/d/d... clear ;strategy beta test - no boot or decoy yet ;assert CORESIZE==8000 ;release 22.6.96 ;kill test step5 equ 15 dist equ step5 step spl #2*step5+1,#2*step5 b0 spl 0,#0 ;first compared+decr dat 0,0 ;semi-gate dat 0,0 ;scanned, better put same to +/- dist dat 0,0 loop add.x step,@ref return sne.f *ptr,ptr ref mov.i b1,>ptr decref mov.i jb,@ptr ;hit with jb -> clear :-) modi djn.b return,@decref ;last action: decrement return last dat 0,0 ;scanned, 5 to ptr,12 to b0 for 17 dat 0,0 rof dat >2667,#last-ptr+1 ;30 to b0, 23 to ptr for 10 dat 0,0 rof b1 spl #-7,#3 ;34 to ptr for MAXLENGTH-CURLINE dat 0,0 rof end return Here is an example of how to use my scan engine in an old fashioned way, scan-> jump to clear. (one of the earlier stages in my quest for a small scanner... it's only 13 instructions :) It also needs some improvement, I only include it as a demo. ;redcode-94 ;name tinc 2 ;author bjoern guenzel ;strategy scanner, not as small as I had hoped... ;assert CORESIZE==8000 ;release ;kill test step5 equ 15 dist equ step5 clptr equ step dat 0,0 ;scan dat 0,0 loop add.f step,@return return sne.i @ptr,{ptr jb jmp loop,#sp-loop ptr mov.x #ptr+step5+1,#ptr+step5+dist mov.i sp,}ptr mov.i sp,}ptr mov.i jb,*ptr jmp @loop,{ptr dat 0,0 ;scan for 8 dat 0,0 rof step spl #2*step5+1,#2*step5 dat 0,0 ;scan dat #1,#last-clptr+3 sp spl #-4,#last-clptr+3 mov.i @1,>clptr last djn.b -1,{sp dat 0,0 ;scan end return