**************************************** EVOLUTION (c)1994 by Tom Hollander **************************************** Installation ------------ Make sure you have the file VBRUN300.DLL in your \WINDOWS\SYSTEM directory. Copy the file EVOLVE.EXE and this file EVOLVE.TXT wherever you want and run it. If only everything was this easy! History ------- This program has a somewhat interesting history. The original idea, I am told, came from Richard Dawkins' book, "The Blind Watchmaker" (not that I've read it!). At the time, my mother was inspired and wrote the program in LOGO on our Texas Instruments TI-99/4A (a good computer for its day!) Last year, remembering the program, and also wanting to play with Visual Basic's graphics facilities, I decided to port the program to Windows. However, since the program is based on "trees", I had to rewrite LOGO for VB. More on that below... What does it do? ---------------- Evolution is not a very good name, I just called it that since the original was. Evolution is really a game about artificial selection. The little V shapes you see at the start of the program are trees. Each tree has (I think) eight "genes" which can have a number of values. The genes for the trees include colour, width, branch length, branch angle, tree depth, branch length ratio, branch angle ratio and so on. The tree in the centre of the screen is the parent. The four trees you see around it are its four children (asexual reproduction, here!). Each child will have just one random "gene" set to either one more or one less than its parent's gene value - hence, there will be evolution! As GOD, your role is to choose which child will be the most successful. You do this by clicking once on the child you want to be the parent of the next generation. Note that there may be twins. Note also you can click on the parent to get a new set of children if you don't like any of the current batch. When playing the game you can take any approach you like. Usually I just choose the most interesting looking trees. If you prefer you can try to "breed" the trees to look like something - beetles, frogs and butterflies seem to come up a lot. You could also choose a random approach (by always selecting the top-left child, for instance) for some sort of simulation of how it might have happened in a real, random world. If you breed them too big, they might overlap and become hard to see. If this happens you should consider breeding them smaller. Feel lucky you aren't using the original TI-LOGO version. It used to come up with an error message, "Out of Ink" when the trees got too big! VB Virtual LOGO --------------- If you use VB and want to use LOGO routines in your programs, use the LOGO.FRM form provided in your projects. You can also use the form in a logo-style interactive mode if you just want to play with it and draw pictures. To do this, run the program (from within VB), immediately press Ctrl-Break, and type your commands into the Debug window. It will behave just like real logo! Of course, if you want new procedures, you'll have to write them into VB. The LOGO routines supported in this version are: FD x Move the turtle forward x units BK x Move the turtle backward x units LT x Turn the turtle left x degrees RT x Turn the turtle right x degrees CIRCL r Draw a circle to the left of radius r pixels CIRCR r Draw a circle to the right of radius r pixels ARCL r x Draw an arc to the left of radius r pixels x degrees around ARCR r x Draw an arc to the right of radius r pixels x degrees around HT Hide turtle ST Show turtle PU Pen Up PD Pen Down PE Pen Erase PX Pen Reverse (invert current colour!) SETPC c Sets Pen colour to colour #c SETBG c Sets background colour to colour #c SETW w Sets Pen width to w pixels CS Clear Screen and move turtle to home position HOME Move turtle to home position VANISH Clear Screen without moving turtle SETPOS x y Move turtle to coordinates (x,y) SETH h Set turtle heading to h degrees (0 is up) TREE n Draw a tree of depth n. This is the basis of EVOLUTION, but with fewer parameters! SQ x Draw a "squiral" of angle x degrees. Try SQ 91, or SQ 145 ! If you can come up with any good new logo routines, or can think of some standard ones I've missed, please let me know. __________________________________________ Tom Hollander June 1995. E-mail me at tholland@pcug.org.au. Visit my web page at http://www.pcug.org.au/~tholland