Over to You

Turtle graphics exist for many programming languages, though unlike Python, most are implementations available as libraries. You can even build your own to use with your favorite language. You’ll revisit turtles in the final chapter, Chapter 10, Optimize! Find the Best. Until then, you’ll use other ways to draw results.

If you wish to explore turtle graphics further, you may want to read about L-systems. The biologist Aristid Lindenmayer invented these to mathematically describe plants growing. Your spirangles grew iteratively. L-systems grow recursively, following simple looking rules made of symbols. Some symbols mean go forward, say F, or turn, maybe - for left and + for right. L-systems have rules built from these basic symbols, ...

Get Genetic Algorithms and Machine Learning for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.