From news-rocq!univ-lyon1.fr!news.ujf-grenoble.fr!ciril.fr!fr.usenet-edu.net!usenet-edu.net!newsfeeds.belnet.be!news.belnet.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!news2.POSTED!not-for-mail Mon Nov 12 16:05:48 2001 Article: 13168 of rec.games.corewar Path: news-rocq!univ-lyon1.fr!news.ujf-grenoble.fr!ciril.fr!fr.usenet-edu.net!usenet-edu.net!newsfeeds.belnet.be!news.belnet.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!news2.POSTED!not-for-mail Sender: David Moore From: David Matthew Moore Subject: Re: Are there warriors with subprocesses communicating between themselves Newsgroups: rec.games.corewar References: <01c401c16ae4$3d8998c0$2100a8c0@HomePC> Distribution: world User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Darwin/1.4 (Power Macintosh)) Lines: 68 Message-ID: Date: Sun, 11 Nov 2001 22:54:38 GMT NNTP-Posting-Host: 24.36.117.161 X-Complaints-To: abuse@home.net X-Trace: news2 1005519278 24.36.117.161 (Sun, 11 Nov 2001 14:54:38 PST) NNTP-Posting-Date: Sun, 11 Nov 2001 14:54:38 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: news-rocq rec.games.corewar:13168 Robert Macrae wrote: > I think the best examples are Airbag-style bombers, > in which two bombers keep checking that the other is operational. You only need one loop to do the airbag trick. Observe: Start this demo program in the cdb debugger. pmars -e demo.red Use the "s" command to step through the simulation and "l 0,20" to list the program. Note that the 5 processes execute the program in order: a, b, c, d, a, b, c, ... When you're ready to deal some damage, insert a dat bomb into the main loop (a, b, or c). f 7 Fill with: dat 0,0 See the defensive response. I'm suprised that so few airbags have been written. Paulsson wrote an airbag-style scanner (myBlur2) that survived for a while on the '94 hill. It was durable enough to compete with those efficient little stones that pspacers like to throw out. http://www.ociw.edu/~birk/COREWAR/OPEN/HILL/myblur2.red David. ;redcode-94 ;name Airbag Demo ;author David Moore ;assert 1 org start p spl #1, 100 dat 0,0 dat 0,0 dat 0,0 dat 0,0 a mov {p, >p b mov }p, >p c mov {p, >p d jmn.b a, }p ;if a, b, or c failed, then don't jump phase2 jmp 0 start spl s8 spl s4 spl 2 jmp a ;process #1 jmp b ;process #2 s4 spl 2 jmp c ;process #3 jmp d ;process #4 s8 nop 0 nop 0 jmp a ;process #5 end