Article 2421 of rec.games.corewar: Newsgroups: rec.games.corewar Path: hellgate.utah.edu!dog.ee.lbl.gov!agate!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!news.Vanderbilt.Edu!stst From: stst@vuse.vanderbilt.edu (Stefan Strack) Subject: Re: MNCT Lives! Message-ID: <1994Feb1.032132.14279@news.vanderbilt.edu> Sender: news@news.vanderbilt.edu Nntp-Posting-Host: necs.vuse.vanderbilt.edu Organization: Vanderbilt University School of Engineering, Nashville, TN, USA References: <2ijsa2$rqg@agate.berkeley.edu> Date: Tue, 1 Feb 1994 03:21:32 GMT Lines: 82 In article <2ijsa2$rqg@agate.berkeley.edu> mconst@soda.berkeley.edu (Michael Constant) writes: >Due to popular request (3 letters!), MNCT has returned! Round 3 was where I >left off, I think. Just to refresh your memory, the rules for round 3 are: > > Style: Standard round-robin (each entry fights each other entry) > Standard: 94 > Coresize: unknown (that is, your program must function in a variety of > coresizes) but always < 64K What about max. warrior length, max. processes, and, most importantly cycles-until-tie? Is cycles-until-tie going to scale with coresize (e.g. 10*coresize) or remain fixed? Remember that the fastest complete core-clear takes 2*coresize cycles. Also, are you going to run round-robins for more than one coresize? >BTW, since this round will incorporate large coresizes, this might be a good >time for me to mention, once again, my optima calculator which handles >coresize up to 64K. [....] Yes, but how is this going to do us any good if we don't know the coresize beforehand :-) (this might be a good time for me to mention that you need the 32-bit pMARS executables (pmars04g.zip) for the large coresize) Things a warrior in a core of unknown dimensions might like to know are what divisors coresize has (to calculate imp-steps, self-avoiding bomb/scan patterns, etc.) and perhaps the approximate size of core (to determine, e.g, the best number of mini-bombers to launch). To find out whether the current coresize is divisible by a certain number is very straightforward in redcode'94: DIVISOR equ 5 org test a dat #-DIVISOR ; if coresize is divisible, so is this test mod #DIVISOR,a jmz divisible,a jmp not_divisible The code below tries to get an idea of how large the core is by binary subdivision. This is a reasonable compromise between speed (40 cycles in a core of 8000) and accuracy (within a power of 2): ;redcode-94 ;name sizer ;strategy Get an idea how large core is (within a power of 2) org sizer cs dat #-1 ;This is coresize-1 sizer div #2,cs add #1,case jmn sizer,cs case jmp @case ;jump somewhere depending on coresize ;trace on ge1 jmp 0 ;core= 1-2 (we would jump to somewhere useful here) ge3 jmp 0 ; 3-4 ge5 jmp 0 ; 5-8 ge9 jmp 0 ; 9-16 ge17 jmp 0 ; 17-32 ge33 jmp 0 ; 33-64 ge65 jmp 0 ; 65-128 ge129 jmp 0 ; 129-256 ge257 jmp 0 ; 257-512 ge513 jmp 0 ; 513-1024 ge1025 jmp 0 ; 1025-2048 ge2049 jmp 0 ; 2049-4096 ge4097 jmp 0 ; 4097-8192 ge8193 jmp 0 ; 8193-16384 ge16385 jmp 0 ; 16385-32768 ge32769 jmp 0 ; 32769-65536 (actually, this is the first time I find mul/div/mod really useful) > - Michael Constant Looking forward, Michael! -Stefan (stst@vuse.vanderbilt.edu)