Complex Systems, Spring 1998
Bio 367: Computational Models of Biological Organization
CS 246: Programming Paradigms


Paul Grobstein, Bryn Mawr College Department of Biology
Clare Congdon, Bryn Mawr College Computer Science Program
______________________________________________________________________

Running sa2

Note: this following file is a copy of ~ccongdon/Public/SA/README

---------------------------------------------------------------------
Clare's instructions on how to run the (modified) sa2 program
  which is in the directory ~ccongdon/Public/SA
---------------------------------------------------------------------
Contents:
1. How to make your own copies of the files
2. How to make small changes and recompile the program
3. How to run the program
---------------------------------------------------------------------
1. How to make your own copies of the files

   Make a new directory of your own, e.g.
        mkdir SA

   Copy all the files from this directory
   (but all you really need is the Makefile and the sa2.c file)
        cp ~ccongdon/Public/SA/* SA

---------------------------------------------------------------------
2. How to make small changes and recompile the program

   Note: If you need these instructions, you should only attempt small 
   changes to functions F1 through F8.

   Save a backup copy if you're uncertain (or recopy sa2.c from Clare if you
   goof)

   Use any Unix editor to:
     a. go to the end of sa2.c
     b. edit one or more of the functions
     c. save the file

   At the Unix prompt, recompile:
     make sa2.c

   If you get any errors, get help
      e.g., you can send email to Clare and tell her where your program is
      -- I should be able to look at it electronically

---------------------------------------------------------------------
3. How to run the program -- all at the Unix prompt

(Note: if you are an emacs user, you can start a shell in Emacs with 
"meta-x shell". You can later save this entire buffer as a file, or 
just cut and paste interesting parts. If you are not an emacs user, 
know that the typical xterm buffer will save only the most recent 500 
lines or so.)

a. cd to your SA directory
b. (compile, if necessary)
c. sa2          (type sa2 at the unix prompt to run the program)

You are now running sa2, and you have a different prompt
This is initially set to run with 
  strings that are 16 bits long
  the second fitness function (find a string of all 1's)
  minimal information printed as you run

Useful things you can type at the prompt:
help          for a complete listing of the things you can type
run 1         to run 1 generation
run 100       to run 100 generations (etc.)

res	      to restart (with or without changing some of the
		following settings first)

di pop	      to display the current population

exit	      to get the heck outta here

set watch 1   to have more info displayed (good starting point)
set watch 0   to turn all that extra stuff off

set function 1  to use the Scientific American function (Riolo)
set function 2  to use the "all ones" function
set function 3  to use the "alternating 1's and 0's" function
set function 4  to use the "composite of 8 functions" function

set l 32        to set the length to 32 bits 
set l 64        to set the length to 64 bits 
                (Note: length must be 16 for function 4 and
                  length > 16 is not recommended for watch 1)

set p 20        to set the population size to 20

set rs 12345    to set the Random Seed to 12345 
                (e.g., between experiments)

set xp .60      to set the crossover rate to 60% (default is 75%)
set mr .001     to set the mutation rate to .1% (default is .5%)

---------------------------------------------------------------------

______________________________________________________________________
Maintained by:

Clare Bates Congdon (ccongdon@brynmawr.edu)
Paul Grobstein (pgrobste@brynmawr.edu)
______________________________________________________________________