Skip to content

Commit

Permalink
Merge pull request #603 from nature-of-code/notion-update-docs
Browse files Browse the repository at this point in the history
[Notion] Update docs
  • Loading branch information
shiffman authored Dec 17, 2023
2 parents f6f13a2 + ec07621 commit 1861dad
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 17 deletions.
5 changes: 2 additions & 3 deletions content/00_randomness.html
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,8 @@ <h3 id="exercise-010">Exercise 0.10</h3>
<p>Just as you can overuse randomness, however, it’s easy to fall into the trap of overusing Perlin noise. How should an object move? Perlin noise! What color should it be? Perlin noise! How fast should it grow? Perlin noise! If that becomes your answer to every question, keep reading. My goal here is to introduce you to a universe of new possibilities for defining the rules of your systems. After all, those rules are yours to define, and the more possibilities at your disposal, the more you’ll be able to make thoughtful, informed choices. Randomness and Perlin noise are just the first stars in a vast creative cosmos that we’ll explore in this book.</p>
<div data-type="project">
<h3 id="the-ecosystem-project-1">The Ecosystem Project</h3>
<p><em>As mentioned in the introduction, one way to use this book is to build a single project over the course of reading it, incorporating elements from each chapter as you go. One suggestion is to simulate an ecosystem. Imagine a population of computational creatures living in and around a digital pond, interacting with one another according to various rules.</em></p>
<p><strong>Step 0 Exercise</strong></p>
<p>Develop a set of rules for simulating the real-world behavior of a creature, building on top of principles from the random walk or other noise-driven motions. Can you simulate a jittery bug that flies in unpredictable ways, or perhaps a floating leaf carried by an inconsistent breeze? Start by exploring how much you can express a creature’s personality purely through its behavior. Then you can think about its visual characteristics.</p>
<p><em>As mentioned in the introduction, one way to use this book is to build a single project over the course of reading it, incorporating elements from each chapter as you go. One suggestion is to simulate an ecosystem. Imagine a population of computational creatures living in and around a digital pond, interacting with one another according to various rules. </em><em>At the end of each chapter, you will find this same prompt. It will provide ideas on how to incrementally expand your own simulated ecosystem using the concepts explored in that chapter. But feel free to invent your own!</em></p>
<p>For your first step, develop a set of rules for simulating the real-world behavior of a creature, building on top of principles from the random walk or other noise-driven motions. Can you simulate a jittery bug that flies in unpredictable ways, or perhaps a floating leaf carried by an inconsistent breeze? Start by exploring how much you can express a creature’s personality purely through its behavior. Then you can think about its visual characteristics.</p>
<p>Here’s an illustration to help you generate ideas for building an ecosystem based on the topics covered in this book. Watch how the illustration evolves in each subsequent chapter as new concepts and techniques are introduced.</p>
<figure>
<img src="images/00_randomness/00_randomness_9.png" alt="">
Expand Down
1 change: 0 additions & 1 deletion content/01_vectors.html
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,6 @@ <h3 id="exercise-18">Exercise 1.8</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-2">The Ecosystem Project</h3>
<p><strong>Step 1 Exercise</strong></p>
<p>Incorporate vectors to further develop and refine the motion of the elements within your ecosystem. Explore how motion can be directed by solely manipulating an object’s acceleration vector.</p>
<p>How might you calculate acceleration to emulate certain behaviors—the erratic buzzing of a nervous fly, the gentle hops of a bunny, or the slithering of a snake? What role does acceleration play in nature? Consider the way a bird accelerates when taking off or how a fish suddenly changes direction when swimming. Again, how much of a creature’s personality can be shaped by its behavior alone? What is added (or taken away) by incorporating more visual design elements beyond simple shapes?</p>
<figure>
Expand Down
1 change: 0 additions & 1 deletion content/02_forces.html
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ <h3 id="exercise-216">Exercise 2.16</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-3">The Ecosystem Project</h3>
<p><strong>Step 2 Exercise</strong></p>
<p>Incorporate forces into your ecosystem. How might other environmental factors (for example, water versus mud, or the current of a river) affect the way a character moves through an ecosystem?</p>
<p>Try introducing other elements into the environment (food, a predator) for the creature to interact with. Does the creature experience attraction or repulsion to things in its world? Can you think more abstractly and design forces based on the creature’s desires or goals?</p>
<figure>
Expand Down
1 change: 0 additions & 1 deletion content/03_oscillation.html
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,6 @@ <h3 id="exercise-317">Exercise 3.17</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-4">The Ecosystem Project</h3>
<p><strong>Step 3 Exercise</strong></p>
<p>Take one of your creatures and incorporate oscillation into its motion. You can use the <code>Oscillator</code> class from Example 3.7 as a model. The <code>Oscillator</code> object, however, oscillates around a single point (the middle of the window). Try oscillating around a moving point.</p>
<p>In other words, design a creature that moves around the screen according to position, velocity, and acceleration. But that creature isn’t just a static shape; it’s an oscillating body. Consider tying the speed of oscillation to the speed of motion. Think of a butterfly’s flapping wings or the legs of an insect. Can you make it appear that the creature’s internal mechanics (oscillation) drive its locomotion? See the book’s website for an additional example combining attraction from <a href="/force#">Chapter 2</a> with oscillation.</p>
<figure>
Expand Down
1 change: 0 additions & 1 deletion content/04_particles.html
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,6 @@ <h3 id="exercise-414">Exercise 4.14</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-5">The Ecosystem Project</h3>
<p><strong>Step 4 Exercise</strong></p>
<p>Take your creature from step 3 and build a system of creatures. How do they interact with one another? Can you use inheritance and polymorphism to create a variety of creatures, derived from the same codebase? Develop a methodology for the way they compete for resources (for example, food). Can you track a creature’s health much like a particle’s lifespan, removing creatures when appropriate? What rules can you incorporate to control the way creatures are born into the system?</p>
<p>Also, you might consider using a particle system in the design of a creature. What happens if an emitter is tied to the creature’s position?</p>
<figure>
Expand Down
1 change: 0 additions & 1 deletion content/05_steering.html
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,6 @@ <h3 id="exercise-521">Exercise 5.21</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-6">The Ecosystem Project</h3>
<p><strong>Step 5 Exercise</strong></p>
<p>Use steering forces to drive the behavior of the creatures in your ecosystem. Here are some possibilities:</p>
<ul>
<li>Create schools or flocks of creatures.</li>
Expand Down
3 changes: 1 addition & 2 deletions content/06_libraries.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1 id="chapter-6-physics-libraries">Chapter 6. Physics Libraries</h1>
<div class="chapter-opening-figure">
<figure>
<img src="images/06_libraries/06_libraries_1.png" alt="Photo by Arshiya Urveeja Bose, CC BY-SA 4.0.">
<figcaption>Photo by Arshiya Urveeja Bose, <a href="https://creativecommons.org/licenses/by/4.0/deed.en">CC BY-SA 4.0</a>.</figcaption>
<figcaption>Photo by Arshiya Urveeja Bose, CC BY-SA 4.0.</figcaption>
</figure>
<h3 id="living-root-bridges">Living Root Bridges</h3>
<p>In the Indian state of Meghalaya, the Khasi and Jaiñtia peoples live in areas that experience some of the highest rainfall in the world. During the monsoon season, floods often make traveling between villages impossible. As a result, the ancient tradition of constructing living root bridges emerged. These bridges, like the double living root bridge in East Khasi shown here, are created by guiding and growing tree roots through bamboo, palm trunks, or steel scaffolding. They grow and become stronger as the roots interact with the environment, forming adaptive, spring-like connections.</p>
Expand Down Expand Up @@ -1777,7 +1777,6 @@ <h3 id="exercise-614">Exercise 6.14</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-7">The Ecosystem Project</h3>
<p><strong>Step 6 Exercise</strong></p>
<p>Take your system of creatures from step 5 and use a physics engine to drive their motion and behaviors. Here are some possibilities:</p>
<ul>
<li>Use Matter.js to allow collisions between creatures. Consider triggering an event when two creatures collide.</li>
Expand Down
1 change: 0 additions & 1 deletion content/07_ca.html
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ <h3 id="exercise-714">Exercise 7.14</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-8">The Ecosystem Project</h3>
<p><strong>Step 7 Exercise</strong></p>
<p>Incorporate CA into your ecosystem. Here are some possibilities:</p>
<ul>
<li>Give each creature a state. How can that state drive its behavior? Taking inspiration from CA, how can that state change over time according to its neighbors’ states?</li>
Expand Down
3 changes: 1 addition & 2 deletions content/08_fractals.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 id="chapter-8-fractals">Chapter 8. Fractals</h1>
<div class="chapter-opening-figure">
<figure>
<img src="images/08_fractals/08_fractals_1.png" alt="Photo by Saad Akhtar, CC BY-SA 4.0.">
<figcaption>Photo by Saad Akhtar, <a href="https://creativecommons.org/licenses/by/4.0/deed.en">CC BY-SA 4.0</a>.</figcaption>
<figcaption>Photo by Saad Akhtar, CC BY-SA 4.0.</figcaption>
</figure>
<h3 id="chakri-maha-prasat-hall">Chakri Maha Prasat Hall</h3>
<p>The Chakri Maha Prasat Hall, located within the Grand Palace in the heart of Bangkok, Thailand, is an architectural feat known for its intricate details and grandeur. Each level of the multilayered roof echoes a smaller or larger version of itself and represents the different levels of Mount Meru, the center of the Buddhist universe.</p>
Expand Down Expand Up @@ -973,7 +973,6 @@ <h3 id="exercise-813">Exercise 8.13</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-9">The Ecosystem Project</h3>
<p><strong>Step 8 Exercise</strong></p>
<p>Incorporate fractals into your ecosystem. Here are some possibilities:</p>
<ul>
<li>Add plant-like creatures to the ecosystem environment.</li>
Expand Down
1 change: 0 additions & 1 deletion content/09_ga.html
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,6 @@ <h3 id="example-95-an-evolving-ecosystem">Example 9.5: An Evolving Ecosystem</h3
<p>This example is rather simplistic given its single gene and cloning instead of crossover. Here are some suggestions for applying the bloop example in a more elaborate ecosystem simulation.</p>
<div data-type="project">
<h3 id="the-ecosystem-project-10">The Ecosystem Project</h3>
<p><strong>Step 9 Exercise</strong></p>
<p>Add evolution to your ecosystem, building from the examples in this chapter:</p>
<ul>
<li>Add a population of predators to your ecosystem. Biological evolution between predators and prey (or parasites and hosts) is often referred to as an <em>arms race</em>, in which the creatures continuously adapt and counter-adapt to one another. Can you achieve this behavior in a system of multiple creatures?</li>
Expand Down
3 changes: 1 addition & 2 deletions content/10_nn.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1 id="chapter-10-neural-networks">Chapter 10. Neural Networks</h1>
<div class="chapter-opening-figure">
<figure>
<img src="images/10_nn/10_nn_1.jpg" alt="Photo by Pi3.124, Museo Machu Picchu, Casa Concha, Cusco, CC BY-SA 4.0.">
<figcaption>Photo by <a href="https://commons.wikimedia.org/wiki/User:Pi3.124">Pi3.124</a>, Museo Machu Picchu, Casa Concha, Cusco, <a href="https://creativecommons.org/licenses/by/4.0/deed.en">CC BY-SA 4.0</a>.</figcaption>
<figcaption>Photo by Pi3.124, Museo Machu Picchu, Casa Concha, Cusco, CC BY-SA 4.0.</figcaption>
</figure>
<h3 id="khipu">Khipu</h3>
<p>The <em>khipu</em> (or <em>quipu</em>) is an ancient Incan device used for recordkeeping and communication. It comprised a complex system of knotted cords to encode and transmit information. Each colored string and knot type and pattern represented specific data, such as census records or calendrical information. Interpreters, known as <em>quipucamayocs</em>, acted as a kind of accountant and decoded the stringed narrative into understandable information.</p>
Expand Down Expand Up @@ -940,7 +940,6 @@ <h3 id="exercise-107">Exercise 10.7</h3>
</div>
<div data-type="project">
<h3 id="the-ecosystem-project-11">The Ecosystem Project</h3>
<p><strong>Step 10 Exercise</strong></p>
<p>Incorporate machine learning into your ecosystem to enhance the behavior of creatures. How could classification or regression be applied?</p>
<ul>
<li>Can you classify the creatures of your ecosystem into multiple categories? What if you use an initial population as a training dataset, and as new creatures are born, the system classifies them according to their features? What are the inputs and outputs for your system?</li>
Expand Down
1 change: 0 additions & 1 deletion content/11_nn_ga.html
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,6 @@ <h3 id="example-116-a-neuroevolutionary-ecosystem">Example 11.6: A Neuroevolutio
<p>The final example also includes a few additional features that you’ll find in the accompanying online code, such as an array of food that shrinks as it gets eaten (respawning when it’s depleted). Additionally, the bloops shrink as their health deteriorates.</p>
<div data-type="project">
<h3 id="the-ecosystem-project-12">The Ecosystem Project</h3>
<p><strong>Step 11 Exercise</strong></p>
<p>Try incorporating the concept of a brain into the creatures in your world!</p>
<ul>
<li>Can different creatures have different goals and incentives? Are some searching for food while others seek different resources? What about creatures avoiding dangers like predators or poisons?</li>
Expand Down

0 comments on commit 1861dad

Please sign in to comment.