The Nature of Code — Daniel Shiffman
Classic free textbook on simulating natural systems with code — vectors, forces, fractals, cellular automata, genetic algorithms and neural networks. Full book readable free online.
Why I saved this#
A textbook that’s genuinely free — keep it as a reference for simulation/creative-coding math.
Notes#
- By Daniel Shiffman (NYU ITP, The Coding Train). Teaches how to model the unpredictable, emergent behavior of natural systems in software: vectors and forces, oscillation, particles, autonomous agents, physics libraries, cellular automata, fractals, genetic algorithms, neural networks, neuroevolution.
- Free to read: the entire book is available as web chapters at https://natureofcode.com/ (introduction → neural-networks, plus examples and exercises pages).
- Free PDF (2012 edition): the author’s final pre-print release before print — https://practices.digital/assets/pdf/nature.pdf (~43 MB). The 2012 examples use the Processing language (Java-based, runs in-browser via JS mode).
- Print (2024 edition): published by No Starch, ISBN 978-1718503700; buying options compiled by the author at https://github.com/nature-of-code/buyers-guide .
- Code examples live under the nature-of-code GitHub org.