Showing posts with label deterministic chaos. Show all posts
Showing posts with label deterministic chaos. Show all posts

Saturday, June 20, 2015

The Iconic Image of Deterministic Chaos


  The image on the right in the graphic below is the iconic image of what is called deterministic chaos. To understand the mathematical construction of that image (called a map) requires beginning with the graph of the quadratic equation y = x2 + c, as is shown in the image on the left (c = -1.3).
   To simplify the process of how you get from the parabola to the map, I’ve written a series of four Scratch projects. The two concepts needed to understand the transition are the concept of iteration and the concept of a mathematical attractor.
   The first project looks at a linear equation and computes a single attractor of x = 6.
   y = (x + 6)/2 - A Mathematical Sink Hole can be seen at the following link.
https://scratch.mit.edu/projects/12537308/
   The next project plots the attractors of the quadratic equation y = x2 + c by plotting on the parabola and on the y = x line (the definition of iteration line).
   x2 + c Plots can be seen at this link.
https://scratch.mit.edu/projects/63919408/
   This project drops plotting the parabola, stores the iterations in a list, and lets you scan the list for patterns in the attractors.
   The Attractors of y = x2 + c is at this link.
https://scratch.mit.edu/projects/62164438/
   The last project in the series plots just the x values of each iteration for successive values of c beginning with c = -0.5 until c < -2.
   Map of y =x2 + c as a Function of c.
https://scratch.mit.edu/projects/65695456/
   A free pdf file containing more information about the mathematics and coding in each project is available on request at grandadscience@gmail.com.

Tuesday, March 12, 2013

Langton's Ant Trapped In a Circle, Triangle, or Near a Line Segment


  This Scratch project is a series of experiments using Langton’s Ant as the ‘lab rat’. 
  Langton’s ant is a cellular automaton invented by researcher Chris Langton in the early 1980s. The ant, once set in motion, crates an iconic picture of order emerging from chaos and is often a student’s first exposure to the study of deterministic chaos and nonlinear dynamics (chaos theory).
   When we observe complex behavior we tend to believe its behavior is the result of a complex set of rules. In the picture above, the path of a single Langton ant is shown. The ant started in the center of the screen and has worked its way to near the lower right corner of the screen. Out of the mess seen in the center, after over 10,000 applications of the rules governing its behavior, the ant starts building the diagonal ‘highway’! 
  I purposely stopped the ant before it built the highway to the boundary. What happen after the ant hits the side? Even though the rules that actually governs the behavior (movement) of the ant are quite simple, there is no way to predict what happens when the ant strikes the side of the rectangle. The actual path created by the ant has to be computed, step by step, in order to be seen. 
  Here are the rules:
   The ant is sitting on an infinitely large checkerboard made up of only white squares. The ant moves one square forward and, if the square is white, it paints it black, turns left 90º and moves one square forward. If the square is black, the ant paints it white, turns right 90º and moves one square forward. In either case, after painting the square white or black, the ant applies the same rule again. That’s it!. That simple rule creates the ant’s complex behavior.
   The following screen shot displays the ant wandering around the center of the screen and then building the highway.


   If you would like to find out what happen when Langton’s ant is placed inside a circle, square, or triangle go to the following link, download the project, and find out!
http://scratch.mit.edu/projects/40908674/
   The line segment at the bottom of the screen can also be picked up and placed closer to the ant's starting point. Below is a screen shot showing the ant building a highway after interacting with the line segment.

   Remember, there is no known method for predicting the behavior of the ant. Have fun experimenting with Langton's Ant!