-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEvolution.html
More file actions
101 lines (80 loc) · 13.1 KB
/
Copy pathEvolution.html
File metadata and controls
101 lines (80 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<html>
<head>
<title>NodeBox | Evolution</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="imagetoolbar" content="no" />
<meta name="description" content="" />
<meta name="keywords" content="NodeBox, Evolution" />
<link rel="canonical" href="https://www.nodebox.net/code/Evolution" />
<link type="text/css" rel="stylesheet" media="screen" href="/media/css/nbar.css">
<script type="text/javascript" src="/code/js/pop.js"></script>
<script type="text/javascript" src="/code/js/confirm.js"></script>
<link href="/code/css/default.css" rel="stylesheet" type="text/css" />
<link href="/code/css/print.css" rel="stylesheet" type="text/css" media="print" />
</head>
<body id="body">
<div class="nbar">
<ol>
<li><a class="node" href="/code/Home">NodeBox 1<span class="nbar-arrow"></span></a>
<ol class="nbar-dropdown">
<li><a href="/">Homepage</a></li>
<li><a href="/node/">NodeBox 3<small>Node-based app for generative design and data visualization</small></a></li>
<li><a href="/opengl/">NodeBox OpenGL<small>Hardware-accelerated cross-platform graphics library</small></a></li>
<li><a href="/code/Home">NodeBox 1<small>Generate 2D visuals using Python code (Mac OS X only)</small></a></li>
</ol>
</li>
<li><a class="gallery" href="/gallery/">Gallery</a></li>
<li><a class="documentation" href="/code/Tutorial">Documentation</a></li>
<li><a class="forum" href="http://support.nodebox.net/discussions">Forum</a></li>
<li><a class="blog" href="/blog/">Blog</a></li>
</ol>
</div>
<div id="all">
<div id="header_and_navigation">
<div id="header">
<a href="/code/Home"><img id="header_image" src="/code/g/header-small.jpg" width="800" /></a></div>
<div id="title">
<a href="/code/Home"><h1>NodeBox</h1>
<strong><em>Create visual output with Python programming code</em></strong>
</a></div>
<div id="contextual">
<div id="languages">
</div>
<div id="search">
<form id="sf" method="get">
<input type="text" id="q" name="q" value="" />
<a href="javascript:document.getElementById('sf').submit();">GO</a>
</form>
</div>
</div>
<div id="navigation">
<div id="navigation_public">
<a href="/code/Home">Home</a>
<a href="/code/Download">Download</a>
<a href="/code/Reference">Reference</a>
<a href="/code/Tutorial">Tutorial</a>
<a href="/code/Library">Library</a>
<a href="/code/Gallery">Gallery</a>
<a href="/code/About">About</a>
</div>
</div>
</div>
<div id="content">
<div id="nodebox-link">
<a href="/code/Home"><img src="/code/g/transparent.gif" /></a>
</div>
<div class="inside">
<h3>Evolution</h3>
<p><span class="header_image"><img src="/code/data/media/evolution-header.jpg" alt="evolution-header" /></span><span class="big_text">The Evolution project is a sequel to Ludivine Lechat's <a href="http://nodebox.net/ludivine/index.php/GCD" target="_self">Graphic Cellular Domestication</a> postgraduate program at Transmedia. She devised a set of parental cells and evolutionary rules with which she could domesticate graphic cell organisms from microscopic components.</span></p> <p> </p> <p><span class="media"><img src="/code/data/media/evolution-gcd.jpg" height="552" width="552" /></span> </p> <p> </p> <p><span class="media"><img src="/code/data/media/evolution-gcd2.jpg" height="552" width="552" /></span> </p> <p> </p> <p>These cells are great material for a genetics proof-of-concept in NodeBox. By recombining the domesticated cells creatures are created that interact with each other in a hostile environment. The idea is to extract a tested set of genetic algorithms from the project later on. These can be used in parts of the planned <a href="http://research.nodebox.net/Gravital_TETRA_projectvoorstel">Gravital</a> research project by applying them on graphic design in general instead of roaming creatures. <b>What happens when we use genetics to describe or create visual communication? Is there a <a href="http://research.nodebox.net/index.php/Generative_Strategies_for_Graphic_Design" target="_self">generative strategy to design</a>? Is there something like a design crossover, a historical gene tree from which contemporary design emerges? Is it possible to recombine "good designs" to create even better ones?</b></p> <p>Anyway, on to the Evolution project.</p> <p> </p> <hr /> <h2>The factory</h2> <p>The factory is the place where creatures are born and bred. Each creature is constructed randomly from a pool of components (or body parts): we discern between heads, tails, cores, flippers and tentacles. The way a creature is constructed determines it's behaviour later on in the survival game. This makes the environment entirely procedural: there is an endless variation of creatures and therefore an endless variation of behaviour and ways creatures interact with each other!</p> <p>Different components and their behavioural impact:</p> <ul> <li><b>Heads</b>: make a creature smarter, imbue it with a <i>cunning</i>. This cunning allows the creature to employ better hunting strategies (ambushing and intercepting) or better evasive strategies (deception, hiding in the flock in the hope that the predator loses interest and starts picking on someone else).</li> <li><b>Tails</b>: make a creature more agile, allows it to take sharper turns - a greater potential when chasing and evading.</li> <li><b>Cores</b>: the complexity of a creature's body influences its fitness and its intelligence. Bigger creatures have a greater health and are more difficult to hurt, more complex creatures have a greater cunning. The drawback of being big is that you become slower and more pacifist.</li> <li><b>Flippers:</b> enhance a creature's velocity. Bigger flippers makes a creature faster.</li> <li><b>Tentacles</b>: are a creature's main weapons. More tentacles not only look more daunting, but make a creature more ferocious and self-assured. Creatures with a lot of tentacles tend to be very aggressive. Combined with a low cunning you get a sort of brute that relentlessly keeps on chasing a prey. Combined with a high cunning you get a typical tiger-hunter that tries to ambush a flock of prey and hunts down the weakest creatures first.</li> </ul> <p> </p> <table border="0"> <tbody><tr> <td><img src="/code/data/media/evolution-creature1.jpg" /></td> <td><img src="/code/data/media/evolution-creature2.jpg" /></td> </tr> <tr> <td><img src="/code/data/media/evolution-creature3.jpg" /></td> <td><img src="/code/data/media/evolution-creature4.jpg" /></td> </tr> <tr> <td><img src="/code/data/media/evolution-creature5.jpg" /></td> <td><img src="/code/data/media/evolution-creature6.jpg" /></td> </tr> <tr> <td><img src="/code/data/media/evolution-creature7.jpg" /></td> <td><img src="/code/data/media/evolution-creature8.jpg" /></td> </tr> <tr> <td><img src="/code/data/media/evolution-creature9.jpg" /></td> <td><img src="/code/data/media/evolution-creature10.jpg" /></td> </tr> <tr> <td><img src="/code/data/media/evolution-creature11.jpg" /></td> </tr> </tbody></table> <p> </p> <hr /> <h2>Genetic recombination</h2> <p>The factory gets a bit more interesting once we have determined a number of creatures that have a high potential of surviving a hostile environment. These we can then use as ancestors to evolve new creatures that are better balanced and have a higher chance of rising up in the food chain. A good breeding programme is essential for the world's evolution.</p> <p>In the example below we cross-bred <i>Docole</i> and <i>Timude</i> species. The Docole is a fast and aggressive predator, but not too bright. The Timude on the other hand is a cute and docile flocker, fast and bright which gives it good evasive qualities. Notice how their children have both the Docole's tentacles and the Timude's flippers, it's not that ferocious anymore but it has flippers for speed and some basic intelligence, which will likely improve its chances of finding food.</p> <p> </p> <p><span class="media"><img src="/code/data/media/evolution-recombination.jpg" height="508" width="650" /></span> <a href="javascript:pop('../data/media/evolution-factory.mov','factory','width=400,height=316')">Play movie</a></p> <p> </p> <p>Internally in the programming code, each creature is stored as a little piece of DNA. Creatures are recombined using a <a href="http://en.wikipedia.org/wiki/Crossover_%28genetic_algorithm%29">genetic algorithm</a> that constructs a new DNA from the information stored in both ancestors' DNA. You can <a href="javascript:pop('../data/media/evolution-factory.mov','mecca','width=400,height=316')">watch the movie</a> in which an even better generation is spawned from crossing the Docole and the Timude.</p> <p> </p> <table style="text-align: center" border="0"> <tbody><tr> <td><b>Docole ancestor</b><br /><br /><img src="/code/data/media/evolution-recombine1.jpg" /></td> <td><b>Timude ancestor</b><br /><br /><img src="/code/data/media/evolution-recombine2.jpg" /></td> <td><b>Vubipo child</b><br /><br /><img src="/code/data/media/evolution-recombine3.jpg" /></td> </tr> </tbody></table> <p> </p> <hr /> <h2>The arena</h2> <p>Creatures pit their strengths against each other in the arena. Here, they get to fly around, flock together, hunt down enemies, struggle for survival. In the example below, the Docole is pitted against three of the Timude species, which is kind of a long and boring match because the predator is way to dumb to catch any of Timude, and the Timude are way to weak to fight the Docole. What you get is a lot of running around in circles.</p> <p>The creatures' motion is handled by the flocking algorithm in the <a href="/code/Boids">Boids</a> library, expanded with procedures for chasing and evading, cooperation and hunting strategy.</p> <p>Typically, a fight goes a bit as follows:</p> <ul> <li><p><b>The predator</b> hunts down the flock of preys in search for food. Ideally, if the predator is smart enough, it will quickly try to single out the weakest individual and separate it from the others. The predator can then use strategic maneuvers like predicting where the prey will go next, or try to ambush it.</p></li> <li><p><b>The prey</b> flock around together. They will try to outrun the predator. If they are smart enough and the predator is not too daunting they will attempt to fight back, or even work together in cooperation to beat it. Smart preys that are not strong may attempt to hide in the flock. The predator can discern individuals in a flock. It may decide to lay off and choose a new victim. Dumb preys mill around in confusion without a general strategy.</p></li> </ul> <p> </p> <p><span class="media"><img src="/code/data/media/evolution-arena.jpg" height="505" width="650" /></span> <a href="javascript:pop('../data/media/evolution-arena1.mov','arena1','width=400,height=316')">Play movie</a></p> <p> </p> <p><span class="media"><img src="/code/data/media/evolution-arena2.jpg" height="502" width="650" /></span> <a href="javascript:pop('../data/media/evolution-arena2.mov','arena2','width=400,height=316')">Play movie</a></p> <p> </p> <p>In the example above we offer a reversed scenario: three of the Docole species against one of the Timude. You can instantly see the difference in the animation as the three work and fight together in a very aggressive manner. The poor Timude doesn't stand a chance and is eliminated from the gene tree. Life is cruel!</p> <p> </p> <hr /> <h2>Further reading</h2> <ul> <li><a href="/code/Evolution_-_mutation">Evolution - mutation</a></li> <li><a href="/code/Evolution_-_motion_physics">Evolution - motion physics</a></li> <li><a href="/code/Evolution_-_fitness">Evolution - fitness</a></li> </ul> <p> </p> <hr /> <h2>Downloads</h2> <ul><li><a href="https://nodebox.s3.amazonaws.com/code/data/media/evolution.zip" target="_self">Evolution - source code</a><br /></li></ul> <ul> <li><a href="/code/Evolution_-_downloads">Evolution - downloads</a> | music and sample creatures </li> </ul> <p> </p> <hr /> <h2>Exhibitions</h2> <ul> <li><a href="/code/Evolution_at_the_Beurs,_Brussels">Evolution at the Beurs, Brussels</a></li> <li><a href="/code/Evolution_at_DorkFest,_Ghent">Evolution at DorkFest, Ghent</a></li> </ul> <p> </p> <hr /> <h2>Credits</h2> <ul> <li>Concept and design: Ludivine Lechat</li> <li>Coding: Frederik De Bleser and Tom De Smedt</li> <li>Music: Siegfried Keersmaekers</li> </ul> <p>The genetic algorithm was written in NodeBox, the creatures' flocking behaviour was based on <a href="/code/Boids">Boids</a> and <a href="/code/Photobot">Photobot</a> was used to render the creature PNG images files.</p> <p> </p>
</div>
</div>
<div id="footer">
Last modified: Mar 23 2008 | © 2004-2012 <a href="http://www.emrg.be/" class="noexternal">Experimental Media Research Group</a>
</div>
<img src="/code/g/footer.jpg" style="border:0" class="footer" width="800" height="334" />
</div>
<script>
try{e=document.getElementsByTagName("span");for(i=0;i<e.length;i++){if(e[i].className=="header_image"){src=e[i].getElementsByTagName("img")[0].src;document.getElementById("header_image").src=src;break;}}}catch(e){}
</script>
</body>
</html>