EVERGREEN INS 2008 - Lab 4: Wandering Through Biomorph-space

Unformatted text preview:

Introduction to Natural Science Lab 4: Wandering Through Biomorph-space Biomorphs In The Blind Watchmaker, the author, Richard Dawkins, discusses how organisms evolve because random mutations in the genotype result in a change in phenotype, which then subject to selection pressure. The set of all possible phenotypes forms a high dimensional phenotype-space and evolution can be viewed as wandering through the various possible phenotypes on a path that increases in fitness. Dawkins creates digital creatures, which he called biomorphs, to illustrate this idea and this is what we will do in this lab. We will use NetLogo to build a geometric structure following a simple set of rules. The rules then become a genome for the creatures, which is subject to random mutations from one generation to the next. The selection pressure comes from you. You choose which mutated form to breed and which to let die. In the end you wander through biomorph-space until a pleasing form emerges. Making Branching Creatures The basic form we will choose for our creatures is a branching structure. The main idea is to create a turtle that plays the role of a seed. It produces a bud, which moves forward, with the pen down to draw a stem, it then hatches two new buds, and dies. Each new bud then repeats the process a certain number of times until a tree-like structure is formed. So that we all start with the same code, I’ve included two procedures that work together to implement this idea below. The first creates the “seed” turtle wherever the mouse is clicked and assigns the seed some parameter values that will determine how it grows. The second procedure makes the seeds grow into a tree-like structure. You will need to create two new breeds (seeds and buds) and make the variables n,step, and angle, into turtles-own variables. Make a go procedure that calls the two procedures below and create a setup procedure that clears the screen. Add a setup and a go button on your interface. Give yourself lots of space by changing the world-view to 100 by 100 with patch size 5. to plant-seeds if mouse-down? [ create-seeds 1 [ setxy mouse-xcor mouse-ycor ;put seed where the mouse is set heading 0 ; face the top of the screen set n 5 ; number of repetitions set step 4 ; length of each branch set angle 25 ]] ; angle of branching wait 0.1 ; wait 0.1 seconds before planting next seed end to grow-seeds ask seeds [ pendown ;get ready to draw the branches hatch-buds 1 [] ; make a bud to draw the main stem repeat n [ ask buds [ fd step ;draw the stem hatch 1 [rt angle] ;make a new bud on the right hatch 1 [lt angle] ;make a new bud on the left die ]] ; central bud dies after drawing stem ask buds [die] ; branching buds die after drawing branches die ] ; remove seeds so they don’t grow again endYou should get a basic tree structure whenever you click the mouse on the screen. Try changing the values assigned to n, step and angle in the plant-seeds procedure to see how changing the parameters changes the shape of your biomorph. Choosing very large angles make for interesting structures, that don’t look much like trees. Play around with these values for a while to see what gives interesting shapes. You could make sliders called n-value, step-value and angle-value corresponding to the values you give these variables. Careful, don’t let the n-value slider go higher than 12 or you may crash NetLogo. With the current set-up you have three variables you can adjust to vary the biomorphs. You can think of these variables as the genes of the creatures, and changing the variables corresponds to sweeping through three-dimensional biomorph-space. Now let’s try modifying our procedure so that it has a few more genes to vary. One thing we might consider doing is breaking the symmetry of our creatures a little. Symmetry breaking We will keep bilateral symmetry – that is, mirror symmetry on the main axis – but after the first branch we will allow left branch angles to be different from right branch angles. We’ll need to keep track of which bud is on the right and which is on the left. First add turtles-own variables called right?, angle-1 and angle-2. Now add lines in your plant-seeds procedure to give values to angle-1 and angle-2 (try 30 and 90). Then modify your grow-seeds procedure so that a seed hatches not one bud, but two buds, one which will have right? set to true and will turn right by an amount angle and the second will have right? set to false and turn left by an amount angle. Do this by replacing the line hatch-buds 1 [] with the lines hatch-buds 1 [set right? true right angle] hatch-buds 1 [set right? false left angle] Then we want the right bud to make branches that are asymmetrical, and the left bud to make branches that are mirror images of the right branches. So in the repeat command block replace the lines where you ask buds to hatch a new bud on the right and another on the left, with the following lines which hatch buds at different angles depending on whether they are right or left buds. ifelse right? [ hatch 1 [rt angle-1] hatch 1 [lt angle-2] ] [ hatch 1 [lt angle-1] hatch 1 [rt angle-2] ] You now have increased the number of genes from three to five genes. Try it out using different values for the new variables, you should get some more variety, depending on how large you make angle-1 and angle-2. You could add sliders called angle-1-value and angle-2-value to represent the values you give these variables. This will help you explore the model.We will now add three more genes (variables) to the genome of our creatures. The creature is made by repeating a series of commands inside the repeat command block n times. In an actual tree the branch length (step) decreases in size as you go up the tree. A similar thing happens with the branching angle. Each time we run the commands in the repeat command block lets change the step size and the two angles angle-1 and angle-2 by multiplying by some factor. Add new variables called step-factor, angle-1-factor and angle-2-factor to the turtles-own list and then in your plant-seeds procedure assign values to these variables (try using something like 0.8 for the step-factor and 2 for the angle factors).


View Full Document

EVERGREEN INS 2008 - Lab 4: Wandering Through Biomorph-space

Download Lab 4: Wandering Through Biomorph-space
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 4: Wandering Through Biomorph-space and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 4: Wandering Through Biomorph-space 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?