Craig Reynolds: boids flock

8 results back to index


Exploring Everyday Things with R and Ruby by Sau Sheong Chang

Alfred Russel Wallace, bioinformatics, business process, butterfly effect, cloud computing, Craig Reynolds: boids flock, data science, Debian, duck typing, Edward Lorenz: Chaos theory, Gini coefficient, income inequality, invisible hand, p-value, price stability, Ruby on Rails, Skype, statistical model, stem cell, Stephen Hawking, text mining, The Wealth of Nations by Adam Smith, We are the 99%, web application, wikimedia commons

While not as spectacular as the starling swarms in Europe, which often number in the hundreds of thousands and are sometimes referred to as the “Black Sun,” the mynah swarms are interesting enough to start a train of thought that has eventually led me to this basic question: how and why do these birds flock the way they do? As usual, I started off my quest with some searches on trusty old Google, which brought up a number of intriguing results. As it turns out, there is a whole bunch of existing research on flocking birds and swarming insects, dating back to more than 30 years ago. One popular and well-known product of this research is the Boids algorithm created by Craig Reynolds in 1986. The Origin of Boids Boids is an artificial life program developed by Craig Reynolds to simulate the behavior of flocking birds. The name refers to the birdlike objects that populate the simulation.

: (question mark, colon), in Ruby ternary conditional expression, if and unless > (right angle bracket), The R Console, Variables and Functions -> assignment operator, R, Variables and Functions > R console prompt, The R Console ' ' (single quotes), enclosing Ruby strings, Strings [ ] (square brackets), Vectors, Matrices, Data frames accessing subset of R data frame, Data frames enclosing R matrix indexes, Matrices enclosing R vector indexes, Vectors [[ ]] (square brackets, double), enclosing single R vector index, Vectors A aes() function, R, Aesthetics An Inquiry into the Nature and Causes of the Wealth of Nations (University of Chicago Press), The Invisible Hand apply() function, R, Interpreting the Data Armchair Economist (Free Press), How to Be an Armchair Economist array() function, R, Arrays arrays, R, Arrays–Arrays arrays, Ruby, Arrays and hashes–Arrays and hashes, Arrays and hashes artificial society, Money (see Utopia example) as.Date() function, R, Number of Messages by Day of the Month ascultation, Auscultation assignment operators, R, Variables and Functions at sign, double (@@), preceding Ruby class variables, Class methods and variables attr keyword, Ruby, Classes and objects Audacity audio editor, Homemade Digital Stethoscope average, Interpreting the Data (see mean() function, R) Axtell, Robert (researcher), It’s a Good Life Growing Artificial Societies: Social Science from the Bottom Up (Brookings Institution Press/MIT Press), It’s a Good Life B backticks (` `), enclosing R operators as functions, Variables and Functions bar charts, Plotting charts, Interpreting the Data–Interpreting the Data, The Second Simulation–The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation barplot() function, R, Plotting charts batch mode, R, Sourcing Files and the Command Line Bioconductor repository, Packages birds flocking, Schooling Fish and Flocking Birds (see flocking example) bmp() function, R, Basic Graphs Boids algorithm, Schooling Fish and Flocking Birds–The Origin of Boids Box, George Edward Pelham (statistician), regarding usefulness of models, The Simple Scenario break keyword, R, Conditionals and Loops brew command, Installing Ruby using your platform’s package management tool butterfly effect, The Changes C c() function, R, Vectors CALO Project, The Emailing Habits of Enron Executives camera, pulse oximeter using, Homemade Pulse Oximeter case expression, Ruby, case expression chaos theory, The Changes charts, Charting–Adjustments, Plotting charts, Statistical transformation, Geometric object, Interpreting the Data–Interpreting the Data, Interpreting the Data–Interpreting the Data, Interpreting the Data–Interpreting the Data, The Second Simulation, The Second Simulation–The Second Simulation, The Third Simulation–The Third Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation, The Final Simulation–The Final Simulation, Analyzing the Simulation–Analyzing the Simulation, Analyzing the Second Simulation–Analyzing the Second Simulation, Number of Messages by Day of the Month–Number of Messages by Hour of the Day, Generating the Heart Sounds Waveform–Generating the Heart Sounds Waveform, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate, Money–Money, Money–Money, Implementation bar charts, Plotting charts, Interpreting the Data–Interpreting the Data, The Second Simulation–The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation histograms, Statistical transformation, Geometric object, Money–Money line charts, Interpreting the Data–Interpreting the Data, Analyzing the Simulation–Analyzing the Simulation, Analyzing the Second Simulation–Analyzing the Second Simulation Lorenz curves, Money–Money scatterplots, Interpreting the Data–Interpreting the Data, The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation, Number of Messages by Day of the Month–Number of Messages by Hour of the Day, Implementation waveforms, Generating the Heart Sounds Waveform–Generating the Heart Sounds Waveform, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate class methods, Ruby, Class methods and variables class variables, Ruby, Class methods and variables–Class methods and variables classes, R, Programming R classes, Ruby, Classes and objects–Classes and objects code examples, Using Code Examples (see example applications) colon (:), Symbols, Vectors creating R vectors, Vectors preceding Ruby symbols, Symbols comma-separated value (CSV) files, Importing data from text files (see CSV files) Comprehensive R Archive Network (CRAN), Packages conditionals, R, Conditionals and Loops conditionals, Ruby, Conditionals and loops–case expression contact information for this book, How to Contact Us conventions used in this book, Conventions Used in This Book cor() function, R, The R Console Core library, Ruby, Requiring External Libraries corpus, Text Mining correlation, R, The R Console CRAN (Comprehensive R Archive Network), Packages CSV (comma-separated value) files, Importing data from text files, The First Simulation–The First Simulation, The First Simulation, Interpreting the Data, The Simulation, Extracting Data from Sound–Extracting Data from Sound, Extracting Data from Video extracting video data to, Extracting Data from Video extracting WAV data to, Extracting Data from Sound–Extracting Data from Sound reading data from, Interpreting the Data writing data to, The First Simulation–The First Simulation, The Simulation csv library, Ruby, The First Simulation, The Simulation, Grab and Parse curl utility, Ruby Version Manager (RVM) D data, Data, Data, Everywhere–Data, Data, Everywhere, Bringing the World to Us, Importing Data–Importing data from a database, Importing data from text files, The First Simulation–The First Simulation, Interpreting the Data, How to Be an Armchair Economist, The Simulation, Grab and Parse–Grab and Parse, The Emailing Habits of Enron Executives–The Emailing Habits of Enron Executives, Homemade Digital Stethoscope–Extracting Data from Sound, Extracting Data from Sound–Extracting Data from Sound, Homemade Pulse Oximeter–Extracting Data from Video, Extracting Data from Video analyzing, Data, Data, Everywhere–Data, Data, Everywhere, Bringing the World to Us, How to Be an Armchair Economist charts for, How to Be an Armchair Economist (see charts) obstacles to, Data, Data, Everywhere–Data, Data, Everywhere simulations for, Bringing the World to Us (see simulations) audio, from stethoscope, Homemade Digital Stethoscope–Extracting Data from Sound CSV files for, Importing data from text files, The First Simulation–The First Simulation, Interpreting the Data, The Simulation, Extracting Data from Sound–Extracting Data from Sound, Extracting Data from Video from Enron, The Emailing Habits of Enron Executives–The Emailing Habits of Enron Executives from Gmail, Grab and Parse–Grab and Parse importing, R, Importing Data–Importing data from a database video, from pulse oximeter, Homemade Pulse Oximeter–Extracting Data from Video data frames, R, Data frames–Data frames data mining, The Idea data.frame() function, R, Data frames database, importing data from, Importing data from a database–Importing data from a database dbConnect() function, R, Importing data from a database dbGet() function, R, Importing data from a database DBI packages, R, Importing data from a database–Importing data from a database Debian system, installing Ruby on, Installing Ruby using your platform’s package management tool def keyword, Ruby, Classes and objects dimnames() function, R, Matrices distribution, normal, Money dollar sign ($), preceding R list item names, Lists doodling example, Shoes doodler–Shoes doodler double quotes (" "), enclosing Ruby strings, Strings duck typing, Ruby, Code like a duck–Code like a duck dynamic typing, Ruby, Code like a duck–Code like a duck E economics example, A Simple Market Economy–A Simple Market Economy, The Producer–The Producer, The Consumer–The Consumer, Some Convenience Methods–Some Convenience Methods, The Simulation–The Simulation, Analyzing the Simulation–Analyzing the Simulation, The Producer–The Producer, The Consumer–The Consumer, Market–Market, The Simulation–The Simulation, Analyzing the Second Simulation–Analyzing the Second Simulation, Price Controls–Price Controls charts for, Analyzing the Simulation–Analyzing the Simulation, Analyzing the Second Simulation–Analyzing the Second Simulation Consumer class for, The Consumer–The Consumer, The Consumer–The Consumer Market class for, Some Convenience Methods–Some Convenience Methods, Market–Market modeling, A Simple Market Economy–A Simple Market Economy price controls analysis, Price Controls–Price Controls Producer class for, The Producer–The Producer, The Producer–The Producer simulations for, The Simulation–The Simulation, The Simulation–The Simulation email example, Grab and Parse–Grab and Parse, The Emailing Habits of Enron Executives–The Emailing Habits of Enron Executives, Number of Messages by Day of the Month–Number of Messages by Day of the Month, Number of Messages by Day of the Month–Number of Messages by Hour of the Day, MailMiner–MailMiner, Number of Messages by Day of Week–Number of Messages by Hour of the Day, Interactions–Comparative Interactions, Text Mining–Text Mining charts for, Number of Messages by Day of the Month–Number of Messages by Hour of the Day content of messages, analyzing, Text Mining–Text Mining data for, Grab and Parse–Grab and Parse Enron data for, The Emailing Habits of Enron Executives–The Emailing Habits of Enron Executives interactions in email, analyzing, Interactions–Comparative Interactions number of messages, analyzing, Number of Messages by Day of the Month–Number of Messages by Day of the Month, Number of Messages by Day of Week–Number of Messages by Hour of the Day R package for, creating, MailMiner–MailMiner emergent behavior, The Origin of Boids (see also flocking example) Enron Corporation scandal, The Emailing Habits of Enron Executives Epstein, Joshua (researcher), It’s a Good Life Growing Artificial Societies: Social Science from the Bottom Up (Brookings Institution Press/MIT Press), It’s a Good Life equal sign (=), assignment operator, R, Variables and Functions Euclidean distance, Roids evolution, Evolution example applications, Using Code Examples, Shoes stopwatch–Shoes stopwatch, Shoes doodler–Shoes doodler, The R Console–Sourcing Files and the Command Line, Data frames–Introducing ggplot2, qplot–qplot, Statistical transformation–Geometric object, Adjustments–Adjustments, Offices and Restrooms, A Simple Market Economy, Grab and Parse, My Beating Heart, Schooling Fish and Flocking Birds, Money artificial utopian society, Money (see Utopia example) birds flocking, Schooling Fish and Flocking Birds (see flocking example) doodling, Shoes doodler–Shoes doodler economics, A Simple Market Economy (see economics example) email, Grab and Parse (see email example) fuel economy, qplot–qplot, Adjustments–Adjustments heartbeat, My Beating Heart (see heartbeat example) height and weight, The R Console–Sourcing Files and the Command Line league table, Data frames–Introducing ggplot2 movie database, Statistical transformation–Geometric object permission to use, Using Code Examples restrooms, Offices and Restrooms (see restrooms example) stopwatch, Shoes stopwatch–Shoes stopwatch expressions, R, Programming R external libraries, Ruby, Requiring External Libraries–Requiring External Libraries F factor() function, R, Factors, Text Mining factors, R, Factors–Factors FFmpeg library, Extracting Data from Video, Extracting Data from Video field of vision (FOV), Roids fish, schools of, Schooling Fish and Flocking Birds (see flocking example) flocking example, Schooling Fish and Flocking Birds–The Origin of Boids, The Origin of Boids, Simulation–Simulation, Roids–Roids, The Boid Flocking Rules–Putting in Obstacles, The Boid Flocking Rules–The Boid Flocking Rules, A Variation on the Rules–A Variation on the Rules, Going Round and Round–Going Round and Round, Putting in Obstacles–Putting in Obstacles Boids algorithm for, Schooling Fish and Flocking Birds–The Origin of Boids centering path for, Going Round and Round–Going Round and Round obstacles in path for, Putting in Obstacles–Putting in Obstacles research regarding, A Variation on the Rules–A Variation on the Rules Roid class for, Roids–Roids rules for, The Origin of Boids, The Boid Flocking Rules–The Boid Flocking Rules simulations for, Simulation–Simulation, The Boid Flocking Rules–Putting in Obstacles flows, Shoes, Shoes stopwatch fonts used in this book, Conventions Used in This Book–Conventions Used in This Book for loop, R, Conditionals and Loops format() function, R, Number of Messages by Day of the Month FOV (field of vision), Roids fuel economy example, qplot–qplot, Adjustments–Adjustments function class, R, Programming R functions, R, Variables and Functions–Variables and Functions G GAM (generalized addictive model), The Changes gem command, Ruby, Requiring External Libraries .gem file extension, Requiring External Libraries generalized addictive model (GAM), The Changes Gentleman, Robert (creator of R), Introducing R geom_bar() function, R, Interpreting the Data, The Second Simulation, The Final Simulation geom_histogram() function, R, Geometric object geom_line() function, R, Analyzing the Simulation geom_point() function, R, Plot, Interpreting the Data, Generating the Heart Sounds Waveform geom_smooth() function, R, Interpreting the Data ggplot() function, R, Plot ggplot2 package, R, Introducing ggplot2–Adjustments Gini coefficient, Money Git utility, Ruby Version Manager (RVM) Gmail, retrieving message data from, Grab and Parse–Grab and Parse graphics device, opening, Basic Graphs graphics package, R, Basic Graphs graphs, Charting (see charts) Growing Artificial Societies: Social Science from the Bottom Up (Brookings Institution Press/MIT Press), It’s a Good Life H hash mark, curly brackets (#{ }), enclosing Ruby string escape sequences, Strings hashes, Ruby, Arrays and hashes–Arrays and hashes heart, diagram of, Generating the Heart Sounds Waveform heartbeat example, My Beating Heart, My Beating Heart, My Beating Heart, Homemade Digital Stethoscope, Homemade Digital Stethoscope, Homemade Digital Stethoscope–Extracting Data from Sound, Generating the Heart Sounds Waveform–Generating the Heart Sounds Waveform, Generating the Heart Sounds Waveform, Finding the Heart Rate–Finding the Heart Rate, Homemade Pulse Oximeter–Homemade Pulse Oximeter, Homemade Pulse Oximeter–Extracting Data from Video, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate charts for, Generating the Heart Sounds Waveform–Generating the Heart Sounds Waveform, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate data for, Homemade Digital Stethoscope–Extracting Data from Sound, Homemade Pulse Oximeter–Extracting Data from Video audio from stethoscope, Homemade Digital Stethoscope–Extracting Data from Sound video from pulse oximeter, Homemade Pulse Oximeter–Extracting Data from Video heart rate, My Beating Heart, Finding the Heart Rate–Finding the Heart Rate, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate finding from video file, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate finding from WAV file, Finding the Heart Rate–Finding the Heart Rate health parameters for, My Beating Heart heart sounds, My Beating Heart, My Beating Heart, Homemade Digital Stethoscope, Generating the Heart Sounds Waveform health parameters for, My Beating Heart recording, Homemade Digital Stethoscope types of, My Beating Heart, Generating the Heart Sounds Waveform homemade pulse oximeter for, Homemade Pulse Oximeter–Homemade Pulse Oximeter homemade stethoscope for, Homemade Digital Stethoscope height and weight example, The R Console–Sourcing Files and the Command Line here-documents, Ruby, Strings hex editor, Extracting Data from Sound histograms, Statistical transformation, Geometric object, Money–Money Homebrew tool, Installing Ruby using your platform’s package management tool hyphen (-), Variables and Functions, Variables and Functions -> assignment operator, R, Variables and Functions <- assignment operator, R, Variables and Functions I icons used in this book, Conventions Used in This Book if expression, R, Conditionals and Loops if expression, Ruby, if and unless–if and unless Ihaka, Ross (creator of R), Introducing R ImageMagick library, Extracting Data from Video IMAP (Internet Message Access Protocol), Grab and Parse importing data, R, Importing Data–Importing data from a database inheritance, Ruby, Inheritance–Inheritance initialize method, Ruby, Classes and objects inner product, Roids–Roids installation, Installing Ruby–Installing Ruby using your platform’s package management tool, Installing Shoes–Installing Shoes, Introducing R, Installing packages–Installing packages R, Introducing R R packages, Installing packages–Installing packages Ruby, Installing Ruby–Installing Ruby using your platform’s package management tool Shoes, Installing Shoes–Installing Shoes Internet Message Access Protocol (IMAP), Grab and Parse Internet Message Format, The Emailing Habits of Enron Executives invisible hand metaphor, The Invisible Hand irb application, Running Ruby–Running Ruby J jittering, Adjustments jpeg() function, R, Basic Graphs L Landsburg, Stephen E.

The radii for the align and cohere rules are relatively larger, as we want the roids to collect in a single group rather than many small groups. There you have it—these three rules make up the original Boids flocking algorithm created by Craig Reynolds. Supporting Rules While Reynolds’s three rules suffice to make a rather compelling simulation, we need a couple more rules to make the simulation run smoothly: Muffle the speed of the roid. We don’t want roids to randomly speed up as a result of flocking. Real birds can’t speed up too much, so we must slow down the roids if they move too fast as a result of our flocking rules. Allow the roid to fall through from one side of the application window into the other.


pages: 247 words: 43,430

Think Complexity by Allen B. Downey

Benoit Mandelbrot, cellular automata, Conway's Game of Life, Craig Reynolds: boids flock, discrete time, en.wikipedia.org, Frank Gehry, Gini coefficient, Guggenheim Bilbao, Laplace demon, mandelbrot fractal, Occupy movement, Paul Erdős, peer-to-peer, Pierre-Simon Laplace, power law, seminal paper, sorting algorithm, stochastic process, strong AI, Thomas Kuhn: the structure of scientific revolutions, Turing complete, Turing machine, Vilfredo Pareto, We are the 99%

Heterogeneity What if all drivers are not the same; for example, what if they have different speed limits or following distances? Boids In 1987, Craig Reynolds published “Flocks, herds, and schools: A distributed behavioral model,” which describes an agent-based model of herd behavior. You can download his paper from http://www.red3d.com/cwr/papers/1987/boids.html. Agents in this models are called “boids,” which is both a contraction of “bird-oid” and an accented pronunciation of “bird” (although boids are also used to model fish and herding land animals). Each agent simulates three behaviors: Collision avoidance Avoid obstacles, including other birds. Flock centering Move toward the center of the flock. Velocity matching Align velocity with neighboring birds.

Many parameters influence flock behavior, including the range, angle, and weight for each behavior, and the maneuverability, mu. These parameters determine the ability of the boids to form and maintain a flock, and the patterns of motion and organization in the flock. For some settings, the boids resemble a flock of birds; other settings resemble a school of fish or a cloud of flying insects. Example 10-4. Run my implementation of the boid algorithm, and experiment with different parameters. What happens if you “turn off” one of the behaviors by setting the weight to 0? To generate more bird-like behavior, Flake suggests adding a fourth behavior to maintain a clear line of sight; in other words, if there is another boid directly ahead, the boid should move away laterally.

Velocity matching Align velocity with neighboring birds. Boids make decisions based on local information only; each boid only sees (or pays attention to) other boids in its field of vision and range. The Visual package, also known as VPython, is well suited for implementing boids. It provides simple 3D graphics as well as vector objects and operations that are useful for the computations. You can download my implementation from http://thinkcomplex.com/Boids.py. It is based in part on the description of boids in Flake’s The Computational Beauty of Nature. The program defines two classes: Boid, which implements the boid algorithm, and World, which contains a list of boids and a “carrot” the boids are attracted to.


pages: 293 words: 88,490

The End of Theory: Financial Crises, the Failure of Economics, and the Sweep of Human Interaction by Richard Bookstaber

asset allocation, bank run, Bear Stearns, behavioural economics, bitcoin, business cycle, butterfly effect, buy and hold, capital asset pricing model, cellular automata, collateralized debt obligation, conceptual framework, constrained optimization, Craig Reynolds: boids flock, credit crunch, Credit Default Swap, credit default swaps / collateralized debt obligations, dark matter, data science, disintermediation, Edward Lorenz: Chaos theory, epigenetics, feminist movement, financial engineering, financial innovation, fixed income, Flash crash, geopolitical risk, Henri Poincaré, impact investing, information asymmetry, invisible hand, Isaac Newton, John Conway, John Meriwether, John von Neumann, Joseph Schumpeter, Long Term Capital Management, margin call, market clearing, market microstructure, money market fund, Paul Samuelson, Pierre-Simon Laplace, Piper Alpha, Ponzi scheme, quantitative trading / quantitative finance, railway mania, Ralph Waldo Emerson, Richard Feynman, risk/return, Robert Solow, Saturday Night Live, self-driving car, seminal paper, sovereign wealth fund, the map is not the territory, The Predators' Ball, the scientific method, Thomas Kuhn: the structure of scientific revolutions, too big to fail, transaction costs, tulip mania, Turing machine, Turing test, yield curve

Yet the task turns out to be remarkably easy if it is viewed, more realistically, as the aggregation of local interactions by the individual birds in the flock. In an early simulation of that emergent phenomenon, Craig Reynolds, a software engineer and Academy Award winner,3 built a dynamic model for a flock of artificial “boids” based on three simple rules: 1. Separation: don’t get too close to any object, including other boids. 2. Alignment: try to match the speed and direction of nearby boids. 3. Cohesion: head for the perceived center of mass of the boids in your immediate neighborhood. Boids can be structured as a cellular automaton along the lines of Life, with each boid seeing only its immediate surroundings and acting based on simple rules.

See also Conway’s Game of Life Conway’s Game of Life: as an agent-based model, 32–33, 122–123; and boids, 37; and computational irreducibility, 32; and context, 122–124; in the context of radical uncertainty, 123–124; emergence in, 32; rules of, 30–31; self-replication features of, 32; and Turing’s halting problem, 55 credit default swaps, 163–165 Cruise, Tom, 94 Darwin, Charles, 72–73 Dawkins, Richard, 181 decimalization, 149 deduction, 15, 107, 124, 180–183, 188–189 degenerative research program, 90–91 Demon of Our Own Design, A, 108, 157 Department of Defense, 158 Deutsche Bank, 165 diversification, 15–16 Dodd-Frank Act, 156–157 Dostoyevsky, Fyodor, 116 Duffie, Darrell, 152–153 dynamic stochastic general equilibrium model, 92 efficient market hypothesis, 116 emergence, 12; and boids, 37; and complexity, 38; and crises, 105; flock of birds movement, example of, 37; and Hajj stampede, 35–36; and heuristics, 65; and limits to knowledge, 52; and neoclassical economics, 83 (see also neoclassical economics); school of fish movement, example of, 36; and stability, 39; stampedes, example of 127–128; traffic example, 95, 97–98; and traffic flow, 17, 94 enclosures, 5 equilibrium, crises of, 104–105 ergodicity, 12, 17–18, 41, 196; context of, 40; history of, 40; and limits to knowledge, 52; and MGonz, 44; and neoclassical economics, 84 (see also neoclassical economics); in physical systems, 40; in physical versus social sciences, 85; testing models of, 177 essayism, 178 eternal recurrence, 60 fallibility, 59, 115, 117; and the rational expectations hypothesis, 175 Feynman, Richard, 54, 90 financial crises: fire marshal analogy, 127–129; financial crisis of 1987, 90; financial crisis of 2008, 92 (see also financial crisis of 2008); structure of, 129 financial crisis of 2008, 157; an agent-based view, 160; contagion during, 160; leverage and, 156, 176; liquidity and, 156; market-to-market difficulties and, 159–164; regulation and, 156; role of AIG in, 163–165; role of Bear Stearns Asset Management (BSAM) in, 161–162 (see also Bear Stearns Asset Management); role of Goldman Sachs in, 163–164 financial institutions: agents of, 99, 106; interactions between, 128–131 financial markets: complexity of, 108–109, 157; crisis in, 14–16, 108–109; environment of, 100–101; fire marshal analogy, 127–128; and Flash Crash, 147–151; and liquidity, 206; and reflexivity, 59; structure of, 128; weather analogy 113, 185–186 Financial Stability Oversight Council, 158 financial system: fire marshal analogy, 129; flows of, 131; multilayer schematic of, 131, 134; schematic system of, 129; structure of, 129, 131 fire sale, 107; asset-based, 138; funding-based, 139 Flash Crash, 147; effect of decimalization on, 149–150; effect of high-frequency trading on, 150; The Price is Right analogy, 148–150 Flaubert, Gustave, 116 Freudianism, 58 Frydman, Roman, 175 funding, 131, 134; cash providers of, 136; and collateral, 137; flows within financial system, 137; and hedge funds, 136; securities lenders for, 136 funding runs, 138–139 Funes, the Memorious, 75–78 Game of Life.

If you read the accounts by those who were in the middle of, say, the Bear Stearns implosion, the observations and actions don’t follow some model. The accounts are about stressed-out people packed around a table trying to puzzle out what’s going on and devise the best course of action As an example of the difference between focusing on dynamic interactions based on heuristics and a general model, let’s go back to the boids of chapter 3—modeling birds in flight. How do we explain the ability of birds to fly in V formations? A model consistent with the neoclassical approach would determine a utility function to optimize the effort and speed of the birds, dealing with the dynamics of flight. This will lead to a complex mathematical problem that can be the fodder for all sorts of follow-on manipulations.


pages: 294 words: 82,438

Simple Rules: How to Thrive in a Complex World by Donald Sull, Kathleen M. Eisenhardt

Affordable Care Act / Obamacare, Airbnb, Apollo 13, asset allocation, Atul Gawande, barriers to entry, Basel III, behavioural economics, Berlin Wall, carbon footprint, Checklist Manifesto, complexity theory, Craig Reynolds: boids flock, Credit Default Swap, Daniel Kahneman / Amos Tversky, democratizing finance, diversification, drone strike, en.wikipedia.org, European colonialism, Exxon Valdez, facts on the ground, Fall of the Berlin Wall, Glass-Steagall Act, Golden age of television, haute cuisine, invention of the printing press, Isaac Newton, Kickstarter, late fees, Lean Startup, Louis Pasteur, Lyft, machine translation, Moneyball by Michael Lewis explains big data, Nate Silver, Network effects, obamacare, Paul Graham, performance metric, price anchoring, RAND corporation, risk/return, Saturday Night Live, seminal paper, sharing economy, Silicon Valley, Startup school, statistical model, Steve Jobs, TaskRabbit, The Signal and the Noise by Nate Silver, transportation-network company, two-sided market, Wall-E, web application, Y Combinator, Zipcar

Reynolds created avian avatars, which he dubbed “boids,” and wrote a software program in which each boid followed three simple rules based on the position and behavior of nearby flock mates. The three rules are: (1) avoid collisions, (2) head in the same direction as your nearest neighbors, and (3) stay close to your nearest neighbors. These three rules are all that boids need to coordinate with one another and produce their amazing group-level flocking behavior, closely matching that of real birds. Behavioral biologists, who tested Reynolds’s rules in the wild, found that they could explain collective behavior in a wide range of settings, including how mosquitofish shoal, starlings flock, and pedestrians self-organize into orderly lines on busy streets.

Fellow ornithologists wisely dismissed thought-transference but could not come up with a better explanation of flocking behavior. For fifty years after Selous published his book, the question of how starlings orchestrated a murmuration remained unanswered. The solution to how starlings flock came unexpectedly from a software engineer working in a computer lab, not from an ornithologist traipsing around a field. Craig Reynolds studied at MIT, where he wrote his bachelor’s and master’s theses on computer animation. While designing computer-graphics software, Reynolds grew interested in how to simulate coordinated activity in animals, such as the flocking of birds. Reynolds created avian avatars, which he dubbed “boids,” and wrote a software program in which each boid followed three simple rules based on the position and behavior of nearby flock mates.

. [>] Reynolds created avian: Craig Reynolds, “Flocks, Herds, and Schools: A Distributed Behavioral Model,” Computer Graphics 21 (1987): 25–34. [>] Behavioral biologists: Ballerini et al. review the models of collective animal behavior and summarize that all agree on three behavioral rules: “move in the same direction as your neighbors, remain close to them, avoid collisions.” Michele Ballerini et al., “Interaction Ruling Animal Collective Behaviour Depends on Topological Rather than Metric Distance: Evidence From a Field Study,” Proceedings of the National Academy of Science USA 105 (2008): 1232–37. [>] In flocks, however: C.


The Greatest Show on Earth: The Evidence for Evolution by Richard Dawkins

Alfred Russel Wallace, Andrew Wiles, Arthur Eddington, back-to-the-land, Claude Shannon: information theory, correlation does not imply causation, Craig Reynolds: boids flock, Danny Hillis, David Attenborough, discovery of DNA, Dmitri Mendeleev, domesticated silver fox, double helix, en.wikipedia.org, epigenetics, experimental subject, Gregor Mendel, heat death of the universe, if you see hoof prints, think horses—not zebras, invisible hand, Large Hadron Collider, Louis Pasteur, out of africa, phenotype, precautionary principle, Thomas Malthus

If you’ve got the behavioural rules right for a single starling, a thousand computer starlings, each one a dot on the screen, will behave like real starlings flocking in winter. If the flocking behaviour isn’t quite right, you can go back and adjust the behaviour of the individual starling, perhaps in the light of further measurements of the behaviour of real starlings. Now clone up the new version a thousand times, in place of the thousand that didn’t quite work. Keep iterating your reprogramming of the cloned-up single starling, until the flocking behaviour of thousands of them on the screen is a satisfyingly realistic screensaver. Calling it ‘Boids’, Craig Reynolds wrote a program along these lines (not specifically for starlings) in 1986. The key point is that there is no choreographer and no leader.

‘All things dull and ugly’: lyrics reproduced with thanks by permission of Python (Monty) Pictures. Thanks to Terry Jones and Eric Idle. p. 218 There are some stunning films available on YouTube: For example, http://www.youtube.com/watch?v=XH-groCeKbE. pp. 219–20 Calling it ‘Boids’, Craig Reynolds wrote a program along these lines: http://www.red3d.com/cwr/boids/. p. 229 it has been deciphered by a group of scientists associated with the brilliant mathematical biologist George Oster: Odell et al. (1980). p. 233 An early classic experiment by the Nobel Prize-winning embryologist Roger Sperry: Meyer (1998). p. 243 the complete family tree of all 558 cells of a newly hatched larva: C. elegans cell family tree from www.wormatlas.org/userguides.html/lineage.htm.

That is just as well for, given the speed at which they fly, any such impact would severely injure them. Often the whole flock seems to behave as a single individual, wheeling and turning as one. It can look as though the separate flocks are moving through each other in opposite directions, maintaining their coherence intact as separate flocks. This makes it seem almost miraculous, but actually the flocks are at different distances from the camera and do not literally move through each other. It adds to the aesthetic pleasure that the edges of the flocks are so sharply defined. They don’t peter off gradually, but come to an abrupt boundary.


pages: 797 words: 227,399

Wired for War: The Robotics Revolution and Conflict in the 21st Century by P. W. Singer

agricultural Revolution, Albert Einstein, Alvin Toffler, Any sufficiently advanced technology is indistinguishable from magic, Atahualpa, barriers to entry, Berlin Wall, Bill Joy: nanobots, Bletchley Park, blue-collar work, borderless world, Boston Dynamics, Charles Babbage, Charles Lindbergh, clean water, Craig Reynolds: boids flock, cuban missile crisis, digital divide, digital map, Dr. Strangelove, en.wikipedia.org, Ernest Rutherford, failed state, Fall of the Berlin Wall, Firefox, Ford Model T, Francisco Pizarro, Frank Gehry, friendly fire, Future Shock, game design, George Gilder, Google Earth, Grace Hopper, Hans Moravec, I think there is a world market for maybe five computers, if you build it, they will come, illegal immigration, industrial robot, information security, interchangeable parts, Intergovernmental Panel on Climate Change (IPCC), invention of gunpowder, invention of movable type, invention of the steam engine, Isaac Newton, Jacques de Vaucanson, job automation, Johann Wolfgang von Goethe, junk bonds, Law of Accelerating Returns, Mars Rover, Menlo Park, mirror neurons, Neal Stephenson, New Urbanism, Nick Bostrom, no-fly zone, PalmPilot, paperclip maximiser, pattern recognition, precautionary principle, private military company, RAND corporation, Ray Kurzweil, RFID, robot derives from the Czech word robota Czech, meaning slave, Rodney Brooks, Ronald Reagan, Schrödinger's Cat, Silicon Valley, social intelligence, speech recognition, Stephen Hawking, Strategic Defense Initiative, strong AI, technological singularity, The Coming Technological Singularity, The Wisdom of Crowds, Timothy McVeigh, Turing test, Vernor Vinge, Virgin Galactic, Wall-E, warehouse robotics, world market for maybe five computers, Yogi Berra

As one army colonel asked, “Obviously the birds lack published doctrine and are not receiving instructions from their flight leader, so how can they accomplish the kind of self-organization necessary for flocking?” The answer actually comes from a researcher, Craig Reynolds, who built a program for what he called “boids,” artificial birds. As an army report on the experience described, all the boids needed to do to organize themselves together as a flock was for each individual boid to follow three simple rules: “1. Separation: Don’t get too close to any object, including other boids. 2. Alignment: Try to match the speed and direction of nearby boids. 3. Cohesion: Head for the perceived center of mass of the boids in your immediate neighborhood.” This basic boid system worked so well that it was also used in the movie Batman Returns, to create the realistic-looking bat sequences.

The U.S. military hopes to do this by building what it calls “an unassailable wireless ‘Internet in the sky.’ ” Basically, it plans to take the kind of wireless network you might use at Starbucks and make it global by beaming it off of satellites, so a robot anywhere in the world could hook into and share information instantaneously. Of course, others think that this will make U.S. military doctrine inherently vulnerable to computer hacking, or even worse. As one military researcher put it, “They should just go ahead and call it Skynet.” Just as the birds and the boids follow very simple rules to carry out very complex operations, so would an unmanned swarm in war. Each system would be given a few operating orders and let loose, each robot acting on its own, but also in collaboration with all the others. The direction of the swarm could be roughly guided by giving the robots a series of objectives ranked in priority, such as a list of targets given point value rankings.

Fabey, “F-22: Unseen and Lethal,” Aviation Week & Space Technology 166, no. 2 (2007): 46. 230 “If you look at nature’s most efficient predators” Noah Shachtman, as quoted in Warbots, History Channel, broadcast on August 8, 2006. 231 40 percent of these victories Sean J. A. Edwards, “Swarming and the Future of Warfare” (doctoral thesis, Pardee Rand Graduate School, 2005), 83. 231 “an influence, a thing invulnerable, intangible” Ibid., 64. 231 “Obviously the birds lack” Thomas K. Adams, “The Real Military Revolution,” Parameters 30, no. 3 (2000). 231 “boids,” artificial birds Craig W. Reynolds, “An Evolved, Vision-Based Model of Obstacle Avoidance Behavior,” in Proceedings, ed. C. Langton (Redwood City, CA: Addison-Wesley, 1994). 231 follow three simple rules Adams, “The Real Military Revolution.” 232 “the wisdom of crowds” James Surowiecki, The Wisdom of Crowds: Why the Many Are Smarter than the Few and How Collective Wisdom Shapes Business, Economies, Societies, and Nations, 1st ed.


pages: 402 words: 110,972

Nerds on Wall Street: Math, Machines and Wired Markets by David J. Leinweber

"World Economic Forum" Davos, AI winter, Alan Greenspan, algorithmic trading, AOL-Time Warner, Apollo 11, asset allocation, banking crisis, barriers to entry, Bear Stearns, Big bang: deregulation of the City of London, Bob Litterman, book value, business cycle, butter production in bangladesh, butterfly effect, buttonwood tree, buy and hold, buy low sell high, capital asset pricing model, Charles Babbage, citizen journalism, collateralized debt obligation, Cornelius Vanderbilt, corporate governance, Craig Reynolds: boids flock, creative destruction, credit crunch, Credit Default Swap, credit default swaps / collateralized debt obligations, Danny Hillis, demand response, disintermediation, distributed generation, diversification, diversified portfolio, electricity market, Emanuel Derman, en.wikipedia.org, experimental economics, fake news, financial engineering, financial innovation, fixed income, Ford Model T, Gordon Gekko, Hans Moravec, Herman Kahn, implied volatility, index arbitrage, index fund, information retrieval, intangible asset, Internet Archive, Ivan Sutherland, Jim Simons, John Bogle, John Nash: game theory, Kenneth Arrow, load shedding, Long Term Capital Management, machine readable, machine translation, Machine translation of "The spirit is willing, but the flesh is weak." to Russian and back, market fragmentation, market microstructure, Mars Rover, Metcalfe’s law, military-industrial complex, moral hazard, mutually assured destruction, Myron Scholes, natural language processing, negative equity, Network effects, optical character recognition, paper trading, passive investing, pez dispenser, phenotype, prediction markets, proprietary trading, quantitative hedge fund, quantitative trading / quantitative finance, QWERTY keyboard, RAND corporation, random walk, Ray Kurzweil, Reminiscences of a Stock Operator, Renaissance Technologies, risk free rate, risk tolerance, risk-adjusted returns, risk/return, Robert Metcalfe, Ronald Reagan, Rubik’s Cube, Savings and loan crisis, semantic web, Sharpe ratio, short selling, short squeeze, Silicon Valley, Small Order Execution System, smart grid, smart meter, social web, South Sea Bubble, statistical arbitrage, statistical model, Steve Jobs, Steven Levy, stock buybacks, Tacoma Narrows Bridge, the scientific method, The Wisdom of Crowds, time value of money, tontine, too big to fail, transaction costs, Turing machine, two and twenty, Upton Sinclair, value at risk, value engineering, Vernor Vinge, Wayback Machine, yield curve, Yogi Berra, your tax dollars at work

But giving them a few simple rules, like “fly toward the closest bird,” “go with the flow,” and “don’t hit other birds,” could give rise to distinctly birdlike behavior. The original ALife flock is Craig Reynolds’ “Boids,” done at Symbolics in 1986.† Simulated herding and flocking turn out to be of some commercial interest. Those massive stampedes in Disney cartoons, with thousands of <insert fast, large mammal of your choice>, and all those schools of talking fish are descendants of the Boids. Hollywood showed its appreciation by giving Reynolds an Academy Award in 1998. *“The Santa Fe Institute is devoted to creating a new kind of scientific research community, one emphasizing multidisciplinary collaboration in pursuit of understanding the common themes that arise in natural, artificial, and social systems.”

*“The Santa Fe Institute is devoted to creating a new kind of scientific research community, one emphasizing multidisciplinary collaboration in pursuit of understanding the common themes that arise in natural, artificial, and social systems.” It was founded in 1984 (www.santafe.edu/). † . . . and still flocking after all these years at www.red3d.com/cwr/boids. 156 Nerds on Wall Str eet Like our early algos, the SFI artificial life was dumb, just obeying a few simple handwritten rules, without any ability to learn from mistakes. But the ALife researchers had a good answer—evolving intelligent behavior by mimicking natural evolution. Represent the programs as digital chromosomes, and simulate crossover and mutation, to breed better programs.


pages: 287 words: 86,919

Protocol: how control exists after decentralization by Alexander R. Galloway

Ada Lovelace, airport security, Alvin Toffler, Berlin Wall, bioinformatics, Bretton Woods, Charles Babbage, computer age, Computer Lib, Craig Reynolds: boids flock, Dennis Ritchie, digital nomad, discovery of DNA, disinformation, Donald Davies, double helix, Douglas Engelbart, Douglas Engelbart, easy for humans, difficult for computers, Fall of the Berlin Wall, Free Software Foundation, Grace Hopper, Hacker Ethic, Hans Moravec, informal economy, John Conway, John Markoff, John Perry Barlow, Ken Thompson, Kevin Kelly, Kickstarter, late capitalism, Lewis Mumford, linear programming, macro virus, Marshall McLuhan, means of production, Menlo Park, moral panic, mutually assured destruction, Norbert Wiener, old-boy network, OSI model, packet switching, Panopticon Jeremy Bentham, phenotype, post-industrial society, profit motive, QWERTY keyboard, RAND corporation, Ray Kurzweil, Reflections on Trusting Trust, RFC: Request For Comment, Richard Stallman, semantic web, SETI@home, stem cell, Steve Crocker, Steven Levy, Stewart Brand, Ted Nelson, telerobotics, The future is already here, the market place, theory of mind, urban planning, Vannevar Bush, Whole Earth Review, working poor, Yochai Benkler

He writes: “I proposed to create a very large, complex and inter-connected region of cyberspace that will be inoculated with digital organisms which will be allowed to evolve freely through natural selection”94—the goal of which is to model the 92. For other examples of artificial life computer systems, see Craig Reynolds’s “boids” and the flocking algorithm that governs their behavior, Larry Yaeger’s “Polyworld,” Myron Krüger’s “Critter,” John Conway’s “Game of Life,” and others. 93. Tom Ray, “What Tierra Is,” available online at http://www.hip.atr.co.jp/~ray/tierra/ whatis.html. 94. Tom Ray, “Beyond Tierra: Towards the Digital Wildlife Reserve,” available online at http://www1.univap.br/~pedrob/PAPERS/FSP_96/APRIL_07/tom_ray/node5.html.

“We believe in freedom of speech, the right to explore and learn by doing, and the tremendous power of the individual.”30 Yet this is a new type of individual. This is not the same individual who is the subject of enlightenment liberalism. It is an extension (perhaps) of the modern dream of individuality and independence. Yet this new resistive agent has more in common with the autonomous “boids” of Tom Ray’s Tierra than with radicals from protocol’s prehistory. “A true hacker is not a group person,”31 wrote Stewart Brand in 1972. Or, as he would write fifteen years later: “Workers of the world, fan out”32—advice that inverts the message of resistance-through-unity found in Marx and Engel’s Communist Manifesto.