Usage: Advanced

Options for running the program in a MS-DOS

With Window XP, you cannot natively run 16 bit MS-DOS programs in a window so this program will only run in full screen mode. The program will actually run best in full screen mode as it will be very fast and give you the best visual experience. Even so, some people may want to run the program other Windows based Operating System platforms or in a window on a MS-Windows XP which I actually had to do in order to take advantage of the Windows screen shot utilities.

DOSBox

For that, I use, and recommend, a program called DOSBox 7.0 which is, in effect, a x286 DOS emulator with full EGA,VGA support. As it is software based emulator there is a significant performance penalty but some of the advantages include the fact that you can minimize the program and the simulation will continue to run. After installation and obtaining a emulated DOS window, you must mount your local drive so that you can access your files. For example, to mount my local C:\ drive I used the command “Z:> mount c c:\<your-sub-directory>”. Great for testing or running multiple simulations at the same time.

Command Line Parameters

This program will accept up to two command line parameters in the following format

SE <simulation-file> <log-file>

The program assumes that the <simulation-file> has an extension of .SIM and that the <log-file> has an extension of .LOG so they do not need to be included in the command line. If filenames with different extensions are included they are removed and replaced with either .SIM or .LOG. Example. Each of the following would attempt to load simulation file TEST.SIM and log to RUN1.LOG (“SE TEST.SIM RUN1.LOG” = “SE TEST.TXT RUN1.TXT” = “SE TEST RUN1”). See the section on Saving/Loading Simulation file for more information.

If the log file is found then logging is activated and logging information is appended to the existing file. If the log file is not found then it is created. In either case simulation statistics are logged to the file until is exceeds the maximum size specified in the Options Menu. See the section on Logging for more information. Note that the Log file size in in 100KBytes, NOT MegaBytes!

Seeded (Canned) Simulation Sets

Executing the SE.EXE program with no parameters will create a new simulation with 10 bugs, each with randomized genes and position. You may want to start with the same exact simulation if you are doing some experimentation with the settings and comparing the results for multiple simulations. The following .SIM files are provided with the identified attributes. Feel free to modify them or add your own to the collection. If you do re-distribute simulation files, please include some explanation about their intended purpose.

SET_00.SIM

This file is a sample default simulation with no modifications except that the garden is turned off to begin with. It is provided as an example only. It contains the same settings that you might get if you started the program without specifying a simulation file (except that the garden is of) and is provided as a reference only.

SET_01.SIM

This file is the same as SET_00.SIM except that the first bug has enhanced genes such that it contains has a strong tendency to move forward. In addition, the screen environment has been modified such that the Density of bacteria in the Screen has been doubled as shown in the line below:

 4.0000000000E-03 rSLIMPCT

The first letter ‘r’ indicates a Real number, the ‘S’ indicates Screen, the ‘LIM’ indicates Limit and the ‘PCT’ indicates Percent. (see the section Editing Simulation Files below for more information).

Using this simulation file should result in the decedents of the forward moving taking over the environment as their genes will be more highly evolved. When running this simulation, the bugs will sometimes die off (drop to 3 or less) and the system will artificially keep some alive with random genes. Playing with the Screen Limit, one may be able to create a more stable simulation.

SET_10.SIM

This file is a modification of a simulation that was running for just over 20 minutes with the garden is on. All bugs were removed except for 6. Each of the 6 bugs has a different one of it’s six genes set to be dominant ( value of 8 ) and has the forward moving gene set to slightly influence the movement (value of 1). In the case of the bug with the dominant forward moving gene, the gene to move to the right was set to a 1.

The object of this simulation is to jump start the evolution process by creating a viable parent for a species with a predominate gene and seeing how they fare in the given environment. Setting the non-dominant gene to 1 causes a ‘rotating’ bug that might otherwise occupy the exact same space as another with very similar movement patterns to occasionally shift over and occupy a new space.

SET_11.SIM

This simulation is identical to SET_10.SIM (above) except that each of the 6 bugs does not have a non-dominant gene set to 1 to skew the default movement.

The object of this simulation is almost identical to SET_10.SIM but will demonstrate the even a ‘pure’ pre-dominant gene will eventually become somewhat corrupt due to mutation. As each generation occurs and takes on the mutated genes of it’s parents, it will develop non-zero values in the other non-dominant genes that will cause two bugs with the same genes (and therefore movement patterns) to possibly drift apart.

SET_12.SIM

This simulation is identical to SET_10.SIM (above) except the Bacteria density of the garden has been increased and the bacteria density of the screen has been decreased as follows.

1.2000000000E+00            rSDENSITY
8.2500000000E+00            rGDENSITY
5.0000000000E-04            rSLIMPCT
3.0000000000E-01            rGLIMPCT

The object of this simulation is identical to SET_11.SIM but will allow more bugs and possibly more species to exist in the garden.

SET_13.SIM

This simulation is identical to SET_11.SIM (above) but with the same bacteria density modifications in SET_12.SIM

The object of this simulation is identical to SET_11.SIM but will allow more bugs and possibly more species to exist in the garden.

Custom Simulation Sets

Simulation files are stored in a ASCII text file, allowing the user to modify it with almost any text editor in order to tailor a simulation to their liking. SE.EXE performs limited error checking when loading a simulation file so extreme care must be used when modifying a simulation file.

Guidelines for modifying a simulation file: 1.) Always start with a known good file. If you are unsure then start a fresh simulation (with no command line parameters) and save it to a new file. 2.) Never add extra spaces or carriage returns. Try to retain original formatting of fields as much as possible. 3.) When changing a value never change it outside its allowed range. Most fields only require a small change to observe results in simulation dynamics. 4.) When modifying a long integer (32 bit word) be aware that fields of this type are stored in two 16 bit words, one representing the high word and one representing the low word. 5.) Be aware that the numeric value of fields stored in the simulation file may differ from the same field displayed in the user menu. For instance in the user menu the field Min To Run has a range of 0-65536 and represents minutes; in the simulation file it has a range of 0 – 4294967296 (of which the high end would be represented as a high and low word of 65536 65536). In addition, the value stored in the simulation file is in 10’s of milliseconds instead of minutes, so a value of 1 entered in the program and then saved to a simulation file would show up in the following format: (6000 0). If all of this seems too confusing then don’t worry about it. Most everything you would ever want to do with this program can be done through the user interface of the program. Access to the simulation file is offered to appease the hard-core enthusiasts that would otherwise feel limited. 6.) If you get a runtime error or undesirable results then make a less drastic change to the file and try again.

The basic format of a simulation file along with descriptions of fields, possible ranges of variables and recommendations as to whether they are user modifiable follows…

Example Format for Simulation File

[HEADER INFORMATION]
[GLOBAL]
 0 00 00 59         Days, Hours, Mins & Secs     Don’t Change!
12 0                 Cycle_Cntr, Low Word / High Word    Don’t Change!
32                   NumofBugs            Must match bug quantity (below)
666                  Bact_on_Screen        Don’t Change!
244                  Bact_in_Garden        Don’t Change!
1                    GardenOn            1 or 0
 1.2000000000E+00    rSDENSITY            Keep floating point format
 6.2500000000E+00    rGDENSITY            Keep Floating point format
70                   bGARDWID            50-85
70                   bGARDHIG            50-85
 2.0000000000E-03    rSLIMPCT            Keep Floating point format
 1.7400000000E-01    rGLIMPCT            Keep Floating point format
0                    tMAXAGE            1 or 0
0                    tMAXSTR            1 or 0
0                    tMATURE            1 or 0
0                    tREPROSTR            1 or 0
1                    tGProtect            1 or 0
42                   bMUTRATNG            1-255
42                   bMUTRATMS            1-255
DEFAULT              Log File Name        8 char string
0                    tLogging            0 or 1
1000 0               Log Period in 10s of mSec    Long Integer (Guideline #4)
1                    Max Size of Log file in 100Kb    1-50
0 0    Elapsed time   at which to end program (0=NoEnd)
 Long Integer (Guideline #4)
 Time in 10s of mSec in form of LowWord, HighWord
0 0    Elapsed Cycles at which to end program (0=NoEnd)
 Long Integer (Guideline #4)
 Cycles in form of LowWord, HighWord
# Note that the number of bugs must exactly match the NumofBugs variable above!
[BUG X] (Sample Bug)
578                  age            1-MAXAGE (below)
889                  str            1-MAXSTR (below)
5                    dir            0-5
58                   posx            4-498
401                  posy            22-438
7                    colr            Don’t Change!
1000                 MAXAGE            16-65520
1500                 MAXSTR            16-65520
800                  MATURE            16-65520
1000                 REPROSTR            16-65520
5                    gene[0]            (-100) - 100
1                    gene[1]             (-100) - 100
-1                   gene[2]             (-100) - 100
-5                   gene[3]             (-100) - 100
-2                   gene[4]             (-100) - 100
2                    gene[5]             (-100) - 100
[GRAPH CTRL] changing anything below [GRAPH CTRL] risks crashing the program

Automating Multiple Simulations

I was able to automate twelve one hour simulations and send logging to different log files by performing the following steps. 1.) Starting and saving a new simulation to S1.SIM; 2.) Editing S1.SIM as desired, i.e. setting elapsed time to one hour (Low Word 32320, High Word 5) Note this could been done in the simulation much easier before saving it to the S1.SIM file; 3.) Creating and executing a batch file as shown below:

SE S1 L1 (Loads simulation S1.SIM and sends logging to L1.LOG)
SE S1 L2 (Loads simulation S1.SIM and sends logging to L2.LOG)
SE S1 L3 (Loads simulation S1.SIM and sends logging to L3.LOG)
SE S1 L4 (Loads simulation S1.SIM and sends logging to L4.LOG)

Different initial conditions could have been used for each of these simulations by creating different simulation files.

VN:F [1.7.9_1023]
Rating: 0.0/10 (0 votes cast)
VN:F [1.7.9_1023]
Rating: 0 (from 0 votes)
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>