EV3C/Evolution 3 by Jacob Rose (jrose@whiteshell.com) FOREWORD Please note that I wrote almost all of this program twelve years ago in high school, so don't expect virtual primates to evolve in ten minutes and start praying to you as their god. It does some neat things, but the universe around us is vastly more interesting. Take a class in historical geology (preferably at a secular college) if you get a chance. Real-life evolution is amazing. There was an EV1, which was a program that followed a single branch of the evolution of a virtual organism as it learned a static "food" map. It was pretty neat but too simple. EV2 was rewritten to become EV3, which spawned EV3A, EV3B, and finally EV3C. Thanks to my high school Computer Science Lab teacher, Don Hyatt (http://www.tjhsst.edu/~dhyatt/), for encouraging me to finish the project in 1990 and take it to the science and computer fairs. Yes, I do feel a little silly firing up vintage Turbo Pascal code on Windows 2000, but man does it ever run fast on my AMD chip! ABOUT THIS VERSION This April 2002 version of the program fixes several bugs that make it more usable than previous versions. I've greatly reduced the risk of a program crash by restricting the number of instructions in each new child organism to the size of its biomass, and preventing any organism from storing more than one element of data on its stack; if anyone finds that naturally evolved organisms use even one element of stack data, please save the map to disk and send me all four map component files (".INS", ".INF", ".MAP", and ".MEM"). This version will automatically create "fossil" files every 1 million cycles, which will appear in the list of saved simulations. WANT TO SEE SOMETHING COOL RIGHT AWAY? Run EV3C.EXE, press the spacebar once, press Escape once, push the down arrow key until "Load Simulation" is highlighted, then press Enter once. Select "SURVIVAL.MAP" from the three maps that are included with the program, then push Escape when you are returned to the main menu to proceed with the simulation. Something different happens every time. DISTRIBUTION/MODIFICATION Please credit me in any derivative works, and send me e-mail so I can see your ideas. Write me at "jrose@whiteshell.com" to say "hi" if you like this software, get a cool idea from it, or find yourself bored. I'm definitely interested in working on similar projects on a modern OS, preferably Linux. Please do not use this software to make bombs, guns, evil self-replicating robots, or other machines designed to kill people. If you find a way to make money using this software, good for you! EV3C is GPL software: see the "COPYING" file for details. USING THE BINARY PROGRAM (EV3C.EXE) From the DOS prompt, change to the directory where your .ORG and .MAP files are located, and execute EV3C.EXE. Alternately, you can double-click the EV3C.EXE program file from Windows. Note that it does run faster if you switch to full-screen mode by pressing Alt-Enter. After the title screen, press the Escape key to open the menu. There is no mouse support (when I was in high school, only Macs came with mice), so use the arrow keys to highlight the menu option you want to use, and press Enter to select it. Escape generally functions as a "Back" button, but there are some steps that you can't back out of; usually these will prompt you. I recommend you start by loading just one EVE.ORG organism onto the default map. Choose "Load Organism" from the main menu, and you will get the map cursor, a purple square that you can move around with the arrow keys. For historical reasons, the Home, End, PgUp, and PgDn keys will jump to the corners of the map, but you always start at its center. Move the map cursor to the place where you'd like to add your organism, and press Enter. Now you will see a list of all .ORG files in the current directory. If you don't see anything, you didn't start the program from the same directory as the .ORG files, and you'll have to quit and do so. Assuming you see a list of organisms, you'll probably see these four: EVE.ORG - sits in one spot and eats her neighbors PACKNML1.ORG - charges after and eats organisms that don't look like itself PACKNML2.ORG - same as PACKNML1, but looks different so they can compete ART-WALL.ORG - not really an organism, this is what you use to build walls Highlight "EVE.ORG" and press Enter. Now you're presented with a palette of colors to choose from. You can only choose the foreground color, which you do by moving side-to-side. This color will "mark" the organism and her descendants for all time, unless you use the "Mark Organism" menu option to change individuals later, so you can always tell who is descended from whom. When you press Enter, you'll be returned to the main menu, so you can load lots of organisms before the show starts. For now, just press Escape to clear the menu and the simulation will start running. It's likely that all of the organisms will die; if this happens, you can load another organism onto the map full of dead ones (which will be food for the new batch), or you can clear the map with "Restart Simulation." You might also want to load EVE.ORG into one of the included maps by choosing "Load Simulation" and selecting ARENA.MAP or LINEMAP.MAP. These maps have one or more "compartments." Since the organisms have to eat each-other to survive, keeping the organisms contained will make them more likely to survive. You could also tinker with EVE's mutation rate by editing the EVE.ORG file and changing "REPRODUCE 1" to (for instance) "REPRODUCE 19", which would reduce the mutation rate and make her offspring less likely to turn into jibbering wrecks, improving their short-term odds of survival. You can completely turn off mutation using the menu option "Turn Mutation Off", but turn it back on after a while or the rest of the simulation will be pretty boring. If you want to give someone a copy of a neat simulation you ran, you can save it using "Save Simulation", but make sure you include all four files: you need the ".INF", ".INS", ".MEM", and ".MAP" files that match the name you give it, or the map won't load. That's enough to get you started! If you want to know how to write your own "organisms," have a look at the EV3C.PAS file; near the top is a list of all the commands you can use. Note that all commands must have a parameter, even if it's just "0". The entire program code will be executed in a loop. Start with EVE.ORG and make changes. Also note that you need those mysterious numbers at the top of the file, or it won't load: 4800 <- initial biomass; divide by "repmass" to get total # of organisms 50 <- repmass (reproduction biomass); the size of a "standard" organism 10000 <- wellness (lifespan) 69 <- 16-bit identifier; lower byte of this is shown on screen (69=E) EAT . <- "." provides a parameter placeholder - all commands need a parameter REPRODUCE 1 <- "1" means a mutation rate of 1/((n+1)*100) where n is 1 TURN LEFT <- "LEFT" and "RIGHT" are the only options for "TURN" BUILDING THE TURBO PASCAL SOURCE CODE (EV3C.PAS) This April 2002 version was built with a crusty copy of Turbo Pascal 5. I've looked up the publisher, Borland International, on the web and found that they are giving away Turbo Pascal 5.5, which ought to be compatible, on the "Museum" page of their "Community" site: http://community.borland.com/museum/ You'll need the TPU files included to build the EV3C.PAS source code file. They are libraries which I wrote, but I've lost the source code to them.