Usage

Bugs

The bugs survive by searching out and feeding on bacteria. Their movement patterns dictate their success. As a local area becomes depleted of bacteria a bug must either move to a non-depleted area of bacteria or starve. Each bug has six genes, the value of which dictates the probability of moving in that direction. The six directions are Forward, Right, Hard Right, Reverse, Hard Left and Left.

When the simulation is started ten bugs are placed on the screen with genes very close to equal. This means that each bug has an almost equal chance of moving in any given direction and therefore appears to “jitter” in one place.  Since their local bacteria are quickly depleted some turn red and die. A minimum number of 3 bugs are artificially kept alive so as to keep the simulation running if necessary. Bugs who survive to the age of 800 moves and have at least 1,000 units of energy (blue) become mature (magenta) and reproduce by fission. They divide into two new bugs each with half the energy of the parent and slightly mutated genes. A bug’s genes remain unchanged for the duration of its life. They are either adequate for that bug to gather enough bacteria to reach maturity, from each of which is derived40 units of energy allowing 40 moves, or inadequate meaning the bug will either die of starvation (red) or of old age (cyan).

Life Cycle

The color of the bugs is significant and is indicative of their age, strength, or both as follows. After reproduction, the two new bugs will each have 1/2 of the strength of the parent which will cause them to start with a white color. The life cycle of a bug will end in either reproduction, or death by starvation or old age as shown below.

Bacteria

The bacteria are the green dots that are randomly replenished on the screen. The represent food for the bugs and each one that is eaten gives a bug 40 units of energy allowing more 40 moves.

Garden of Eden

The Garden of Eden is an area in the center of the simulation window with a higher density of bacteria, which is also replenished at a higher rate. The purpose of the garden is to provide an additional environment that could potentially foster new species called twirlers. A twirler is a bug with genes that cause it to “twirl” either counter clockwise or counter-clockwise, each of which would represent two distinct species. A twirler would be more likely to stay in the same general area rather than “trolling” across the screen in search for new areas of food. Any twirlers that developed which migrate out of the garden tend to die quickly as they deplete the food in their local area. Many of the garden attributes can be controlled though he tab menu to see how different settings change the simulation dynamic.

Here is a magnified section of the edge of the garden from the screen shot available in the Introduction. The bacteria are green while the bugs can be identified by the color legend (below).

Population Graph

The population graph in the lower right hand corner graphs both bug population (white) and bacteria population (green). It should be noted that the bacteria population in the garden (if the garden is enabled) is not displayed in the graph but is included in the Bacteria count above. The garden is discussed in further detail in the section Options Menu.

Species Counter

A species as defined by this program is two or more bugs that have a common gene whose standard deviation falls below a certain threshold. Standard deviation is a statistical term indicating how “spread out” the magnitude of a series of numbers is. If the genes were all equal they would have a very high standard deviation, conversely if one gene had a high value and the others were all zero, you would say the genes had a very low standard deviation. The weight of the numbers would be concentrated in one gene. In this program it would mean that a bug with a low standard deviation has a tendency to move in a given direction much more often than any other. It could be any one of the six genes mentioned above. The top-right section of the screen, just above the population graph, shows the number of bugs that match the criteria for classification as a species for each of the six genes and what their average standard deviation (StDv) is.

Main Menu Options

The menu along the bottom of the screen shows the Hot-Key options for the main menu. They include the following options.

<TAB> or <Right-Arrow>

Replaces the population graph with an options menu that can be navigated with the <TAB> key.

<ALT-L>

Initiates the screen saver. This locks the screen until the correct password is entered. If no password is present the user will be prompted for one. Note: an unregistered copy will first prompt the user for a bypass key in order to enable this function. If you have not registered your program then this function is not available.

<ALT-G>

Toggles the state of the garden. The garden is a rectangular area in the center of the screen that, when enabled, has a higher density of bacteria than the rest of the screen. If a bug developed genes that allowed it to stay in the garden and take advantage of the plentiful food supply then it would flourish. This is basically a variation in the bugs environment that allows for more species to develop. Note: Just because the garden is enabled does not necessarily mean that other species will develop, it is purely a matter of chance.

<ALT-P>

Paused the simulation until a key is pressed.

<ALT-X> or <ALT-Q>

Ends the simulation and exits the program. Note: the simulation is NOT saved.

Tab Menu Options

After the <TAB> key is pressed and the options menu appears the selected option will be bordered by a yellow rectangle. The <TAB> key will move the rectangle to the next field or the <Right-Arrow> key will move to the top of the next menu. As a menu option is highlighted the Hot-Key options bellow the simulation window will be updated and a brief description of the option will be displayed at the extreme bottom right of the screen. The available options with their defaults and function are as follows.

Change Password

Allows the user to change the password. This is the password the user must enter in order to bypass the password lock or screen saver. If one exists then the user will be prompted for old password before being allowed to change it. Note: an unregistered copy will first prompt the user for a bypass key in order to enable this function. If you have not registered your program then this function is not available.

Change Garden Width [50 - 85]

Option: Gard Width

Default: 70
Allows the user to change the width of the garden, if the garden is enabled. Note: the resolution of bacteria on the screen it such that a change in the width of less than four may not visibly change the size of the garden. A larger garden is more likely to allow the evolution of new species and would also be able to support a higher population.
Change Garden Height [50 - 85]

Option: Gard Height
Default: 70

Allows the user to change the height of the garden, if the garden is enabled. Note: the resolution of bacteria on the screen it such that a change in the width of less than four may not visibly change the size of the garden. A larger garden is more likely to allow the evolution of new species and would also be able to support a higher population.

Change Bacteria Screen Rate [1 - 40]

Option: S Rate
Default: 4

The rate bacteria are deposited on the screen. Value represents number of bacteria deposited on screen every turn. A turn being each time every bug moves once. A higher rate allows more bugs to survive and changes the simulation dynamics.

Change Bacteria Garden Rate [1 - 20]

Option: G Rate
Default: 8

The rate bacteria are deposited on the garden, if the garden is enabled. Value represents number of bacteria deposited on bacteria every turn. If Garden has maximum number of bacteria already then no bacteria are deposited. A higher rate allows more bugs to survive and changes the simulation dynamics.

Allow Mutation of Maximum Bug Age [T/F]

Option: M Age
Default: F

Enables (T) or disables (F) the mutation of the maximum age a bug can achieve. This could conceivably allow a species of bugs with longer or shorter lifespan to evolve but it is unlikely unless a different lifespan is somehow a survival trait. The logging file would have to be consulted to see if this had actually happened. UNTESTED.

Allow Mutation of Maximum Bug Strength [T/F]

Option: M Str
Default: F

Enables (T) or disables (F) the mutation of the maximum strength a bug can achieve. This could conceivably allow a species of bugs with a higher or lower maximum strength to evolve but it is unlikely unless it would somehow translate into a survival trait. The logging file would have to be consulted to see if this had actually happened. UNTESTED.

Allow Mutation of Bug Maturity [T/F]

Option: M Mature
Default: F

Enables (T) or disables (F) the mutation of the age at which a bug becomes mature. This could allow a species of bugs that becomes mature at a lower age to evolve. The logging file would have to be consulted to see if this had actually happened. UNTESTED.

Allow Mutation of Minimum Reproduction Strength [T/F]

Option: M ReproStr
Default: F

Enables (T) or disables (F) the mutation of the strength required for reproduction (maturity). This could allow a species of bugs that reaches maturity at a lower level of strength UNTESTED.

Allow Mutation of # of Genes involved in a Mutation [T/F]

Option: Severity(B)
Default: F

Specifies the number of variables mutated on a scale of 1-255 with 255 indicating a maximum of 6 variables. A value of 43 is just about one sixth of the maximum and therefore causes one gene to be mutated for each new bug UNTESTED.

Allow Mutation of Mutation Severity[T/F]

Option: Severity(G)
Default: F

Specifies the mutation severity, on a scale of 1-255 for each variable mutated with 255 indicating a maximum change of 6. A value of 43 is just about one sixth of the maximum and therefore causes each mutated gene to increase or decrease by only one UNTESTED.

Save Simulation to ASCI File [<filename>]

Option: Save Simulation

Saves the current simulation to the file specified by the user. The user is only allowed to specify a filename; the extension of .SIM is automatically assigned. The file created is a user modifiable text file and can be edited with certain restrictions. See the section on Saving/Loading Simulation Files for more information.

Load Simulation from ASCI File [<filename>]

Option: Load Simulation

Loads the simulation file specified by the user. The user is only allowed to specify a filename; the extension of .SIM is automatically assigned. As with the command line parameters, if the file exists, the current simulation is saved to TEMP.$$$ and the new simulation loaded with the defaults of the specified file. If the file does not exist a warning is issued and the previous simulation is resumed.

Protect Garden from Vertically Moving Bugs [T/F]

Option: Protect Garden
Default: T

Enables (T) or disables (F) protection of the garden species from the species of vertically moving bugs. During early testing it was discovered that species that evolved in the garden had a high probability of being wiped out by forward moving bugs that chanced upon the trick of moving vertically through the middle of the screen, thus allowing them to steal food from the garden more often then a forward moving bug would otherwise. Code was added to randomly change the direction of a vertically moving bug that was headed toward the garden. Early testers said this was unfair as I was artificially modifying the environment but I countered that this problem would not exist in a sufficiently large simulation grid and that I was compensating for the limited simulation space. To solve the argument this option was added allowing the user to enabled this feature as desired. Note: This phenomenon is a perfect example of the bugs in the program taking advantage of a food source, or a characteristic in their environment, un-conceived of by the author.

Enable Logging [<filename>]

Option: Logging
Default: F

Allows the user to enable (T) or disable (F) logging. When logging is enabled the user is prompted for a new filename (an extension of .LOG is assumed). After correctly entering and confirming a filename the file is created and logging begins if file did not previously exist, otherwise logging information is appended to the existing file. In either case simulation statistics are logged to the file until is exceeds the maximum size specified by “M File Size” (below). See the section on Logging for more information.

Set Logging Period [1 - 65536]

Option: Log Period
Default: 10

Specifies the interval, in seconds, to update the *.LOG file if logging is enabled. Range is from 1 second to 65536 seconds. See the section on Logging for more information.

Set Maximum Log Size [1 - 500]

Option: M File Size
Default: 1 (100K)

Specifies the maximum size in 100’s of KiloBytes that the logging file can grow to. Range is from 1 (100 kilobytes) to 50 (5 Megabytes). If the Log Period (above) was set to 1 second then the maximum value would allow over 8 hours of log history before shutting logging off. If the user wanted to graph a simulation longer than 8.6 hours then reduce the log period.

Set Timer for Simulation Auto-Termination [0 - 65536]

Option: Min To Run
Default: 0

Allows the user to specify a time limit that the simulation is to run in minutes. Range is 0 – 65536 minutes. Zero value causes simulation to run forever. Even longer times can be specified by editing and loading a simulation file. See Saving/Loading Simulation Files for more information. This function is useful when running multiple simulations from a DOS batch file. See section on Automating Simulation Series for more information.

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>