Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
simulating_photosynthesis [2008-10-06 09:54] davegriffithssimulating_photosynthesis [2008-10-06 09:57] davegriffiths
Line 1: Line 1:
 ===Making plants grow towards light===  ===Making plants grow towards light=== 
 +
 +Using lindenmayer systems and genetic algorithms to simulate plant growth.
  
 {{http://www.pawfal.org/dave/images/patab-angle-s.png}} {{http://www.pawfal.org/dave/images/patab-angle-s.png}}
Line 6: Line 8:
  
 Plants are given a "fitness" based on their leaves -  Plants are given a "fitness" based on their leaves - 
-* How much do they face the light?  +  * How much do they face the light?  
-* Are they too close to other leaves? +  * Are they too close to other leaves? 
-* Are they in shadow from another leaf? +  * Are they in shadow from another leaf? 
-* Are they below the ground? +  * Are they below the ground? 
-* Also - the fitness drops as the plant description (a linenmayer system string) gets too long.+  * Also - the fitness drops as the plant description (a linenmayer system string) gets too long.
  
 Using this measurement, a genetic algorithm can create populations of individual plants, score each one and iteratively create new populations by combining fit individuals. Using this measurement, a genetic algorithm can create populations of individual plants, score each one and iteratively create new populations by combining fit individuals.
Line 17: Line 19:
 <embed src="http://blip.tv/play/AdGkH4_+Sw" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed>  <embed src="http://blip.tv/play/AdGkH4_+Sw" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed> 
 </html> </html>
-Each frame is the fittest of a new population - the simplest strategy is to "cheat" :)+ 
 +The simplest strategy is to "cheat" :) Each frame is the fittest of a new population.
  
 {{http://www.pawfal.org/dave/images/patab-long.png}} {{http://www.pawfal.org/dave/images/patab-long.png}}
 +
 The result of a long run with many thousands of generations. The result of a long run with many thousands of generations.
  
 {{http://www.pawfal.org/dave/images/patab-helped.png}} {{http://www.pawfal.org/dave/images/patab-helped.png}}
 +
 You can also evolve from a starting point - in this case a simple tree is modified to create a bigger and more suitable one for the environment. You can also evolve from a starting point - in this case a simple tree is modified to create a bigger and more suitable one for the environment.
  
 +Code: http://www.pawfal.org/flotsam/jetsam/patabotany/scheme/
  • simulating_photosynthesis.txt
  • Last modified: 2008-10-09 11:08
  • by davegriffiths