
Larger Than Infinity by Zul Nadzri reveals the results of Zul's experiments with White Noise.
Any feedback would be greatly appreciated.
;redcode-nano ;name medusa's mirror ;author John Metcalf ;strategy evolved using TEV12 with hints ;assert CORESIZE==80 mov.i <46, $11 spl.i #-4, {56 mov.i <36, {79 mov.i {79, {54 djn.f $78, {59 end
@dir /b /o-d *.red >w.evo
@echo END >>w.evo
@gwbasic tev12
@erase ?.evo
10 P$="pmars -s 80 -p 80 -c 800 -l 5 -b -k -P":R=142:L=5:P=25:K=80
20 O$="mov.imov.ispl.bdjn.f;xxxx":M$="<@>{*}$#"
30 DIM W$(99),A$(L,P),B$(L,P),C(L,P),D$(L,P),E(L,P),S(P):RANDOMIZE TIMER
40 W=0:OPEN "w.evo" FOR INPUT AS #1:M=LEN(M$):q=0:h=1
50 INPUT #1,W$(W+1):IF W$(W+1)<>"END" THEN W=W+1:GOTO 50 ELSE CLOSE #1
60 q=(q mod p)+1:J=1:FOR I=2 TO P:IF S(I)<s(j) THEN j=i
70 NEXT i:FOR I=1 TO L:A$(I,J)=A$(I,q):B$(I,J)=B$(I,q):C(I,J)=C(I,q)
80 D$(I,J)=D$(I,q):E(I,J)=E(I,q):NEXT I:S(J)=s(q)
90 Z=S(Q)/H:FOR I=1 TO L:IF RND*Z<.3 THEN C(I,q)=INT(RND*K)
100 IF RND*Z<.3 THEN E(I,q)=INT(RND*K)
110 Z$=MID$(M$,INT(RND*M)+1,1):IF RND*Z<.3 THEN B$(I,q)=Z$
120 IF RND*Z<.3 THEN D$(I,q)=","+Z$
130 IF RND*Z<.1 THEN A$(I,q)=MID$(O$,INT(RND*LEN(O$)/5)*5+1,5)+" "
140 NEXT I:OPEN "w.evo" FOR OUTPUT AS #1:FOR I=1 TO L
150 PRINT #1,A$(I,q);B$(I,q);C(I,q);D$(I,q);E(I,q):NEXT I:CLOSE #1
160 s(q)=0:FOR I=1 TO W:SHELL P$+" w.evo "+W$(I)+" >s.evo"
170 OPEN "s.evo" FOR INPUT AS #1:INPUT #1,Z$:CLOSE #1:Z=1
180 IF MID$(Z$,Z,1)<>" " THEN Z=Z+1:GOTO 180
190 s(q)=s(q)+3*VAL(LEFT$(Z$,Z))+VAL(RIGHT$(Z$,LEN(Z$)-Z)):NEXT I
200 IF s(q)>H THEN H=s(q):SHELL "copy w.evo best.war"
210 goto 60
;redcode-nano ;name wrath of the machines ;author John Metcalf ;strategy evolved mad mad bomber ;strategy 28 hours with TEV 1.2K ;assert CORESIZE==80 spl.b #76, {32 mov.i >11, {49 mov.i }79, {76 mov.i <64, {29 djn.f $-3, {58 end
@dir /b /o-d *.red >w.evo @echo END >>w.evo @gwbasic tev0 @erase ?.evo
10 P$="pmars -s 80 -p 80 -c 800 -l 5 -b -k -P":R=142:L=5:P=20:K=80 20 O$="mov.ispl.bdjn.f;xxxx":M$="<@>{*}$#" 30 DIM W$(500),A$(L,P),B$(L,P),C(L,P),D$(L,P),E(L,P),S(P):RANDOMIZE TIMER 40 W=0:OPEN "w.evo" FOR INPUT AS #1:M=LEN(M$):H=80 50 INPUT #1,W$(W+1):IF W$(W+1)<>"END" THEN W=W+1:GOTO 50 ELSE CLOSE #1 60 FOR I=1 TO L:IF RND*S(1)/H<.6/L THEN C(I,1)=(C(I,1)+INT((RND-RND)*K))MOD K 70 IF RND*S(1)/H<.7/L THEN E(I,1)=(E(I,1)+INT((RND-RND)*K))MOD K 80 IF RND*S(1)/H<.3/L THEN B$(I,1)=MID$(M$,INT(RND*M)+1,1) 90 IF RND*S(1)/H<.4/L THEN D$(I,1)=MID$(M$,INT(RND*M)+1,1) 100 IF RND*S(1)/H<.3/L THEN A$(I,1)=MID$(O$,INT(RND*LEN(O$)/5)*5+1,5) 110 NEXT I 120 OPEN "w.evo" FOR OUTPUT AS #1:FOR I=1 TO L 130 PRINT #1,A$(I,1)+" "+B$(I,1);C(I,1);","+D$(I,1);E(I,1):NEXT I:CLOSE #1 140 S(1)=0:FOR I=1 TO W:SHELL P$+" w.evo "+W$(I)+" >s.evo" 150 OPEN "s.evo" FOR INPUT AS #1:INPUT #1,Z$:CLOSE #1:Z=1 160 IF MID$(Z$,Z,1)<>" " THEN Z=Z+1:GOTO 160 170 S(1)=S(1)+3*VAL(LEFT$(Z$,Z))+VAL(RIGHT$(Z$,LEN(Z$)-Z)) 180 IF I>W/5 AND S(1)*150/H<I*R THEN 240 ELSE NEXT I 190 S(1)=100*S(1)/(W*R):IF S(1)>H THEN H=S(1):SHELL "copy w.evo best.war" 200 FOR J=2 TO P:IF S(J)>S(1) THEN NEXT J:GOTO 230 210 FOR I=1 TO L:A$(I,J)=A$(I,1):B$(I,J)=B$(I,1):C(I,J)=C(I,1) 220 D$(I,J)=D$(I,1):E(I,J)=E(I,1):NEXT I:S(J)=S(1) 230 IF S(1)>H*.9 THEN 60 240 Z=INT(RND*(P-1))+2:FOR I=1 TO L:A$(I,1)=A$(I,Z):B$(I,1)=B$(I,Z) 250 C(I,1)=C(I,Z):D$(I,1)=D$(I,Z):E(I,1)=E(I,Z):NEXT I:S(1)=S(Z):GOTO 60
Program "Incredible!" (length 5) by "John Metcalf"
;strategy tweaked away one instruction
Last battle concluded at : Sun Dec 1 17:26:58 EST 2002
# %W/ %L/ %T Name Author Score Age
1 40/ 42/ 18 Herbal Avenger Michal Janeczek 139 18
2 39/ 42/ 19 Combatra David Moore 136 7
3 24/ 11/ 65 Blowrag Metcalf/Schmidt 136 62
4 35/ 35/ 30 Mantrap Arcade Dave Hillis 136 2
5 24/ 13/ 64 Incredible! John Metcalf 135 1
6 28/ 22/ 51 Reepicheep Grabun/Metcalf 133 135
7 27/ 22/ 52 Son of Vain Oversby/Pihlaja 132 106
8 33/ 34/ 33 Cyanide Excuse Dave Hillis 131 8
9 25/ 22/ 53 Paperazor Christian Schmidt 129 79
10 28/ 27/ 45 Uninvited John Metcalf 129 125
;redcode-94
;name length exploit
;author John Metcalf
;strategy demonstrate how to hide a program's true length
;assert CORESIZE == 8000
for ROUNDS < 5
;the front-end sees this code
for 5
dat 0, 0
rof
rof
for ROUNDS > 4
;the back-end sees this code
;insert warrior code here
rof
end
;redcode-nano ;name plateau ;author John Metcalf ;strategy evolved mad mad bomber ;strategy hit a plateau after 4 hours ;assert CORESIZE==80 spl.b #16, <28 mov.i <-15, {-35 mov.i {-1, {-3 mov.i <-28, <25 djn.f $-3, <33 endThe evolver creates warriors through pure evolution. The soup is seeded with random instructions and evolution is guided only by performance against the 2007 Nano Benchmark. If a benchmark test is scoring below a certain threshold, the test breaks out early.
Here are the top resources to discover more about Core War:
PIN
and MAXPROCESSES
is forbidden. The maximum length is 200.mov.i #1, }1
mov }0, }1
mov.i #1, *1
DJN
loop:mov.i }0, *1
mov.i }1, *1
imp mov.i #3,*-1
jmp imp,{0
mov {2, }0
imp mov.i #3,*-1
DJN
loop:imp mov.i #4, *1
djn.a imp, #0
djn.f #0, >-5The aim is to tie as often as possible. Lines of code and the number of processes should be kept to a minimum.
jmp 0, <-5
; -+REPLICATE+-
; *JAM* 1997
mov 7, 8
add 6, 6
mov #8, -3
mov @-4, <5
djn -1, -5
spl -5
jmp @2
dat -10
qfirst equ (qp2+2*qstep) qdist equ qfirst+111 qstep equ 222 qi equ 7 qr equ 7 qbomb dat <qi/2-qi*qr, <qi*qr-qi/2 qa equ qstep*16 qb equ qstep*5+2 qc equ qstep*10 qd equ qstep*2 qe equ qstep*1 qgo cmp qdist+qc, qfirst+qc jmp qfast, <qa cmp qdist+qe+qd, qfirst+qe+qd qp1 jmp <qfast, <qc qp2 cmp qdist, qfirst qp3 jmp qskip, <qe cmp qdist+qb, qfirst+qb q1 djn qfast, #qp1 cmp qdist+qd+qc, qfirst+qd+qc jmp qslow, <qfirst+qd+qc+4 cmp qdist+qd+qb, qfirst+qd+qb x1 jmp qslow, <q1 cmp qdist+qc+qc, qfirst+qc+qc q2 djn qslow, #qp2 cmp qdist+qd, qfirst+qd jmp qslow, <qfast cmp qdist+qa, qfirst+qa jmp q1, <q1 cmp qdist+qa+qd, qfirst+qa+qd jmp x1, <q1 cmp qdist+qc+qb, qfirst+qc+qb jmp q2, <q1 cmp qdist+qe+qd+qc,qfirst+qe+qd+qc jmp qslower, <qfirst+qe+qd+qc+4 cmp qdist+qe+qd+qb,qfirst+qe+qd+qb jmp qslower, <q1 cmp qdist+qe+qc+qc,qfirst+qe+qc+qc jmp qslower, <q2 cmp qdist+qd+qd+qc,qfirst+qd+qd+qc q3 djn qslower, #qp3 cmp qdist+qe+qc, qfirst+qe+qc jmp <qfast, <q2 cmp qdist+qd+qd, qfirst+qd+qd jmp <qfast, <q3 cmp qdist+qd+qd+qb,qfirst+qd+qd+qb slt <q3, <q1 jmz pgo, qdist+qe+qd+qc+10 qslower add @q3, @qslow qslow add @q2, qkil qfast add @q1, @qslow qskip cmp <qdist+qstep+50, @qkil jmp qloop, <1234 add #qdist-qfirst, qkil qloop mov qbomb, @qkil qkil mov <qfirst+qstep+50, <qfirst sub #qi, @qloop djn qloop, #qr+2 pgo end qgo