Notes for the Little Corewar Evolver version 0.8...

In this text, line number notes refer to lines in the LCE8.ini file.

The LCE8 program requires a server version of pmars to run the battles, for
Windows the SDL pmars-server.exe should work, rename to pmars.exe or edit
line 6 and change pmars to pmars-server. For Linux the pmars binary should
be put in a path directory such as /usr/local/bin. For safety reasons the
first two letters of the pmars command line must be "pm" (any case), if not
on path for dos/win must be in current, for Linux in "pm" dir from current.

LCE8 is written in "intense" BASIC and can be run under QBasic, or with
minor changes (comment the RESUME statements) compiled using FreeBasic for
Windows or Linux. Note.. compiling for Linux requires fixed SHELL command,
modified fblib.a file at: http://newton.freehostia.com/fb020shellmod.tar.gz
Note.. writes to numerous files in the current directory while evolving,
to avoid wear on the system disk run from a ram disk or external hard drive.
Note.. uses 100% available CPU cycles while running, don't run on a fast
system with inadequate cooling. To test in QBasic run: a:IF INKEY$="" GOTO a

To run in QBasic from a dos prompt: qbasic /run LCE8qb (or whatever name is)
This requires qbasic.exe, commonly found on the 'net in the qbasic11.zip file.

To compile with FreeBasic edit the source to add ' in front of each of the two
RESUME statements and at a command prompt: fbc -e -lang qb LCE8.bas
add a path in front of fbc if fbc or link to it is not in a path directory,
for Windows: "C:\Program files\FreeBasic\fbc" -e -lang qb LCE8.bas

Notes for Linux.. make sure fblib.a supports infinite shelling (see above).
Don't double-click the resulting LCE8 binary! typically that'll create a bunch
of redcode in your home dir and evolve with no text output and no easy way to
stop besides killing the task - not desirable.. instead like any command-line
program run from a terminal or a script that launches in xterm, konsole, etc,
for example save the following as say "Run_LCE8.sh" (and make executable):

#!/bin/bash
cd `dirname $0`
xterm -e ./LCE8

Windows should automatically change to the current directory and run in a
command shell so a Windows-compiled binary should be runable as-is.
If using the QBasic version, to avoid having to open a dos prompt
can be run from say a "Run_LCE8qb.bat" batch file:

@echo off
mode con lines=25
qbasic /run LCE8qb

When LCE8 is started it reads parameters from LCE8.ini if it exists (otherwise
uses built-in defaults), if 1.red doesn't exist creates a new random soup, and
starts evolving. Press q to quit. Can be stopped and restarted to continue a
run. Once a run has started the soup size cannot be increased or any warriors
past 1.red deleted or an error will occur. To restart a run delete 1.red file
or if reducing the soup size, delete all of the .red files.

Adjusting the INI settings...

Chances are from 0 (never change) to 1 (always change), for example if
instruction chance is .01 there is a 1% chance of changing. Chances are
applied evenly to all items so if instruction chance is .01 and there are
20 instructions in the warrior there is a 20% chance at least one instruction
will be changed. Typically mutation rates are fairly low to avoid breaking
code too much, the idea is to make small tweaks and keep the better tweaks.

Range (line 3) sets soup topology, if 0 a square grid is used with imperfect
wraparound on all sides. If >0 then a ring topology is used where range sets
the maximum soup distance between battle partners (from 1 to range).

The number of battle rounds (the number after -r in the pmars command line)
affects strenth - higher numbers tend to produce stronger code. However the
increased accuracy may prevent papers from forming so usually I set for lower
rounds (-r 20) at first then increase (-r 50 to -r 100) once interesting code
appears in the soup. If nothing interesting appears after a reasonable time,
start over - what arises heavily depends on what is created in the beginning.
A larger soup size increases the chances of a good start but takes longer to
evolve into stronger warriors. For coresize 8000 don't expect great strength,
a mutation-only evolver like this tops out around 80 or 90 Wilkies.

To generate coresize 800 warriors change line 5 to 800 and line 6 to...
pmars -s 800 -p 800 -c 8000 -l 20 -d 20 -b -r 50
To generate coresize 80 warriors change line 5 to 80 and line 6 to...
pmars -s 80 -p 80 -c 800 -l 5 -d 5 -b -r 50

Better coresize 80 results might be obtained if instructions limited
to only SPL MOV and DJN, perhaps try changing lines 7 and 8 to...
spl spl mov mov djn
5

Settings that made true-88 papers in coresize 8000...
(next line must be line 1 - modify settings as needed)
100
20
2
0
8000
pmars -s 8000 -p 8000 -c 80000 -l 100 -d 100 -b -r 20 -8
mov mov mov mov spl spl spl djn jmp jmn jmz cmp slt add sub dat
16
88
0
$ $ $ # @ <
6
(remaining lines the same - can make line 16 = 0 but doesn't matter)

Mutation settings are a matter of evolving art, in general smaller coresizes
require somewhat higher mutation settings, lower settings find stronger code
with larger soups but it takes longer and produces more duplicates. Usually
instruction mutation rate is lowest followed my modifier and address modes,
with data rates the highest. Experiment to find best rate for inc/dec and
ratios of dup lines and small numbers.

More notes are at: http://newton.freehostia.com/cw/LCE.html

(end of LCE8 notes file)

