Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
simulating_photosynthesis [2008-10-06 08:34] – created davegriffiths | simulating_photosynthesis [2008-10-09 11:08] – davegriffiths | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===Using genetic algorithms and l systems to make plants grow=== | + | ===Making |
+ | |||
+ | Using lindenmayer systems and genetic algorithms to simulate plant growth. | ||
+ | |||
+ | Plants are given a " | ||
+ | * How much do they face the light? | ||
+ | * Are they too close to other leaves? | ||
+ | * Are they in shadow from another leaf? | ||
+ | * Are they below the ground? | ||
+ | * Also - the fitness drops as the plant description (a linenmayer system string) gets too long. | ||
{{http:// | {{http:// | ||
{{http:// | {{http:// | ||
{{http:// | {{http:// | ||
+ | The leaf score is indicated by it's colour (red=bad, green=good). | ||
+ | |||
+ | Using this measurement, | ||
< | < | ||
<embed src=" | <embed src=" | ||
</ | </ | ||
+ | |||
+ | The simplest strategy is to " | ||
{{http:// | {{http:// | ||
+ | |||
+ | The result of a long run with many thousands of generations. Many leaves circle the light to get the maximum photosynthesis possible. | ||
+ | |||
{{http:// | {{http:// | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | < | ||
+ | <embed src=" | ||
+ | </ | ||
+ | |||
+ | Another evolutionary run, a bit more interesting than the one-leaf approach. |