ISIS 072
Visual Studies
Computer Science

Information Science & Information Studies Program.

ALiCE: Artificial Life,
Culture & Evolution

Simulating complexity with multiagent and evolutionary computation

Spring 2012 Calendar
subject to change...


nick.gessler(at)duke.edu
Lab: Tu/Th 10:05 - 12:55
Perkins LINK Classroom "6"


 

Jean-Philippe Rennard's Introduction to Alife
fusebox
Alife Fusebox
Temple of Alife
evol
Rob Saunder's
GenArt Evol
genetic art
John Mount's
Genetic Art IV
And the signifieds butt heads with the signifiers,
and we all fall down slack-jawed to marvel at words!
While across the sky sheet the impossible birds,
In a steady, illiterate movement homewards.
Joanna Newsome,
"This Side of the Blue"
(2004 Drag City Records).

Classroom #6 Reservations Calendar

 
Tuesmonth
Thursmonth
 
Color Code:
Notes on what we accomplished on months past.
Color Code:
Tentative agenda for the months ahead.
 
Week 0
10 January 12 January  
Visual Component ----- Found Under Tab

Welcome and Introduction:
We are over-enrolled in order to offer a full class, knowing that some of you will drop.
We welcome those of you with no programming experience, to introduce you to the epistemology of complexity and evolutionary computation and to impart to you some power over the machine.
We welcome those of you with programming experience, to encourage you to pursue the philosophy of this course by exploring applications beyond those offered on our website.
We want to empower you with the confidence to express your own ideas, hypotheses and theories on how the world works in code, to enable you to build your own applications and to enable you to critique the assumptions hidden behind the eye-candy of other peoples'software.

Administrative details:
Over-enrollment, grading policy, format for assignments...
"Office Hours" will be here in classroom #6, Tuesmonths and Thursmonths, before and after class.
Please confirm appointments by email in advance.

For the programming challenges, please purchase:
12 burnable CDs with 12 clear-front envelopes. Do not turn in plastic jewel-cases.
A pen for marking your CDs and 12 clear sheet-protectors for letter-size paper.
For backing up your work, please purchase and bring in daily:
1 USB memory stick.

Course overview:
A quick look at some ancestors of our silicon computers, the take-home-message being that we discovered, not invented, computation and that computation is inherent in the physical and natural world around us.
A quick look at some of our applications, progressing from simple to complex representations of:
Space: raster (grid-based or cellular) vs. vector (omnidirectional).
Time (polling for multiple agents):
cinematic, random, sequential.
Agency (causality): from two-state to agents with "senses, thoughts and actions" (STA).
Applications: from those you write from scratch to those you augment and modify.

Evolution and flocking:
Evolving solutions to the Traveling Salesman's Problem.
The emergence of global group behavior from local individual rules of interaction.

Video:
A progression through the work of Karl Sims...

--- break ---

Building a graphics application for Wiindows PCs with Embarcadero C++ Builder:
Handout...

Overcoming the ugly details of getting started:
The Windows Application Programmers' Interface (API).
The Embarcadero Integrated Development Environment (IDE).
(Once we master these details, our job becomes much easier.)
The C++ language.

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
We start to build this application from scratch up to the point of having a MouseDown on the PaintBox produce visible black dots (cities)...

Over the weekend:
Practice building some simple programs on your own from scratch. See Quiz 0.

Week 1

17 January

19 January

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
Continued...

Ensuring that you application will run on any PC operating system:
Project / Options / C++ Linker: set "Dynamic RTL" to false.
Project / Options / Packages: uncheck "Build with Runtime Packages."

We continue with more visual components, functions and events.
Buttons: Run and Reset...
Functions: reset(), drawFrame(), run()) function...
Execution of the program constructs a topographic landscape.
How would we visualize a landscape? Let's do that for our array.
What is going on that we're not seeing? Let's try color and shading.
We end by implementing the colorRamp() function... .

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
Continued...

Review of the Handout from Day 0.

Preparation for Tuesmonth's Quiz:
This will make use of what we've done so far.
You will have to create a project from scratch and use the visual components and C++ language skills that we have gone over in class. The quiz will be simpler than but similar to the "Roll a pair of dice" applications on our "Games" pages or to a "Pick a card" scenario (for which I have no examples). You will have 20 minutes to complete it and to burn it into a CD-ROM.

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers


Continued...

We implement:
Reverse coloring & faux shadows.

We consider:
Changing a target every now and then.

Implementing a third dimension: 3D

Stephen Wolfram on the Chaos Game.
More Interesting Patterns.

Sonification, Can we transform the fractal visual pattern into a fractal aural sequence?
Can a fractal image be turned into a fractal musical composition?
Will sonification provide an alternative way of comprehending the pattern?

Week 2

24 January

26 January

Quiz 0:
Write a program from scratch and turn it in on a CD. I will tell you what it should do at that time. You will have 20 minutes to complete the application and to burn it into a CD-ROM.

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
Keep copies of everything you turn in. I will return comments, but not your papers.

Due on TUESDAY.
Continued...
We implement:
Reverse coloring & faux shadows.
Changing the distance travelled.

"A Full-Text Visualization of the Iraq War Logs."
Investigate the other visualizations, and for the one illustrated above keep clicking on the image
that appears on each successive URL until you get to the huge legible one.

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
Keep copies of everything you turn in. I will return comments, but not your papers.

Due on TUESDAY.
Continued...

Demos of variations on the Chaos Game.

We consider:
Various visualization and sonification schemes.

Implementing a third dimension: 3D

Week 3

31 January

2 February

Programming Challenge 0: The Chaos Game / Saga of the Indecisive Travellers
DUE TODAY before class
Go here for the format for the challenges.
Participant presentations (everyone)...

An introduction to Cellular Automata:

Programming Challenge 1: Cellular Automata / Conway's Game of Life
We begin building the GUI for Conway's GOL:
thisWorld[][], nextWorld[][] and initialize()

run(), step(), stop(), computeNextWorld(),
copyNextWorldToThisWorld(), countNeighbors(), wrap(),
>showThisWorld(), OnMouseDown()...

Implementing parallel (cinematic) time; implementing toroidal cellular space.
Implementing the rules: computeNextWorld() and the functions it relies upon.
Speeding things up: renderChanges()

This challenge includes experimenting on Conway's world.
Specifically, I want you to characterize the ecology and ethology of the creatures in the GOL:
What is the relative proportion of different creatures spontaneously created from a random world?
How do they behave when single neighboring cells change state? What is the nature of each of those creatures?. Yes, I want you to include this information in the papers you hand in.

 

Exploring the power of Conway's world:
Is there any limit to the processes we can build in a GOL world? How about a "computer" that counts out decimal digits? What we will be looking at is a computer (a digital counter) running on a computer (the Game of Life Cellular Automaton) which is running on a computer (the PC in front of you) which is running on a computer (the computational universe we live withing, or the "Other").

Visualizing the ongoing "evolution" of Conway's worle:
Coloring "births."
Coloring "
deaths."
Tracking populations growth and decline.

Given one state of a cellular automaton, for instance Conway's Game of Life, can we retrodict the previous states that gave rise to it? Can the Game of Life be used to recognize your passwords without remembering what they are? Can it serve as a "trap-door function?"

Programming Challenge 1: Cellular Automata / Conway's Game of Life
We continue optimizing the application with some minor changes:
Replacing the w() (wrap) function with a modular divide "%".
Showing "iterations" in the Edit box.
Streamlining "computeNextWorld()" by introducing the variable "livingNeighbors" and changing the function with that name to "countLivingNeighbors()".
Inserting "randomize()".
We introduce some enhanced functionality:
save() and open() functions.

Quiz 1 (Tomonth):
Due at the beginning of class.

 

Programming Challenge 1: Cellular Automata / Conway's Game of Life
An afterthought:
We should reset iterations to 0 and display it after we Open a file.
We continue enhancing the application:
What tweaks would you suggest?

  1. Find the intitial configuration of the world that runs the longest before it becomes stable?
    How many initial configurations are there? 2^10,000 or 2 x 10^3,010? The age of the Universe is 4.33 x 10^17 seconds.
    The fastest computer runs at 8.162 petaflops or 8.162 x 10^15 floating point operations per second.
    Running at this speed since the origin of the Universe, this machine could construct only 3.53 x 10^33 initial conditions, much less run them to completion.
  2. Importing "creatures" into the world.
  3. Implementing a "creature counter."
  4. Can we add a "midiRamp()" function to give us an audible "image" of how the world is progressing? How would we have to scale it?
  5. How might we evolve a bitmap image using a cellular automaton?

Mirek's Cellebration...
Under "Classroom Applications" on your desktop,
or surf the web and download it on your own computer

Take Home Challenge 0:
Test your ingenuity and intuition by playing 100 rounds of a game of chance: pick-a-door.
http://www.duke.edu/web/isis/gessler/borland/games.htm
Play 100 games and record the results (all the statistics),
Explain your strategy, if any, and your reasons for adopting it.
Turn this information in next class typewritten on a single sheet of paper.

Free coffees to the highest ten scores (please don't cheat).

Week 4

7 February

9 February

More work on Conway's Game of Life...

Take Home Discursive Challenge 1: Cellular Automata / Conway's Game of Life
DUE Later

Does the GOL have any epistemological significance, any relevance to knowing our own world? As the GOL becomes stable and calm, are its objects static? Or are they in a continuous process of dynamic re-creation? The objects ("creatures") in the GOL are not evident in the "code;" they only "come into being" as the code is run. There is no way to predict a future state of this system other than to run the computation to its completion. Here we have a canonical example of "emergent complexity." Are the "objects" in our world, the patterns that we observe in daily life, equally emergent? These are some of the issues explored by Ed Fredkin in his article "A New Cosmogony" which is on our BLACKBOARD Course Documents page. Please reread Marvin Minsky's "Public Lecture, Nara, Japan" and "A New Cosmogony" on our BLACKBOARD pages and address the questions in this paragraph and on the first FORUM on our DISCUSSION BOARD. Have fun, but take these ideas seriously...

Programming Challenge 1: Cellular Automata / Conway's Game of Life
Continued development...

Conway's GOL running Conway's GOL
From Colton Brown: OTCA MetaPixel

Week 5

14 February

16 February

Programming Challenge 1: Cellular Automata / Conway's Game of Life
DUE TODAY
Participant Presentations...

Programming Challenge 2: Evolutionary Computation - An Introduction to the ECT or TSP:
The Evolutionary Concert Tour (a.k.a. Travelling Salesman's Problem).
An overview from the user's perspective.
An "underview" (a look "under the hood") from the programmer's perspective.

First Short Written Report: DUE THURSDAY (next meeting)
Single-spaced, typewritten, one or two pages...
Simulation begs the question of how we can represent processes in the real-world in languages and processes that computers can understand and how we can represent the results in a way that we can understand (through good visualizations and/or sonifications). The ECT or TSP is a problem that is readily amenable to simulated evolution. The problem is easily visualizable. The fitness function is easy to write (just compute the shortest path distance). Knowing what you know about the programming language to date, I want you to outline a problem that would be practical for us to program in class. (Don't worry, I won't ask you to do the programming.)
How would you represent the problem?
How would you represent the mechanisms of evolution, specifically how would you code:
Variation.
Inheritance.
Fitness.
Please be specific. Use pseudocode if you can...

 

Programming Challenge 2: Evolutionary Computation - Continued...:
The Evolutionary Concert Tour (a.k.a. Travelling Salesman's Problem).
An overview from the user's perspective.
An "underview" (a look "under the hood") from the programmer's perspective.

Most of us will be working with:
Evolutionary Concert Tour (ECT) - Compact Version 13 - 24 February 2011

A Second Short Written Report: DUE TUESDAY, February 21th. (next Tuesmonth)
Pick a challenge level appropriate to your skills.

Single-spaced, typewritten, one or more pages as necessary.

ENGLISH: Begin with a description in English.
PSEUDOCODE: Rethink and rewrite that description in a language closer to source code...
VALID SOURCE CODE: Eventually, this is what we want to produce.

For any evolutionary problem:

  1. How would you represent the problem?
  2. How would you represent a single solution, a population of solutions?
  3. How would you represent inheritance (how would the child vary from its parent)?
    How would your represent reproduction (asexual, sexual, polygamic)?

  4. How would you measure fitness and implement selection?

An advanced challenge may comprise workin on writing a very different evolutionary application or an evolutioary algorithm from another school of Evolutionary Computation (e.g. evolultionary programming, genetic algorithms, and genetic programming).

An intermediate challenge would be to adapt the framework of the TSP/ECT to a similar problem. Notice that the application is based on a sequencing challenge. It is like arranging a deck of cards, and C++ offers you several functions that shuffle, rotate and reverse the order of cards in user-defined groups. Other sequencing problems are:
Seriation: Arranging assemblages of different frequencies of various styles in order in archaeology.
Phylogeny: Arranging fossil or living species in order of affinity.
Picture Reassembly: We attempted this as a result of DARPA's "Shredder Challenge." The code online accomplishes this to some degree, but the code is probably buggy. We could work on fixing it...
Cryptology: Solving a single substitution cipher.
Stock Trading: Knowing the past history of anual fluctuations in "bid" and "ask" prices, retrodict a sequence of anual trades to maximize profit.
Complex Logistics: Arranging a sequence of pick-ups and deliveries to minimize distance and maximize effectiveness. (In a minimal way, some of our "tweaks" to TSP/ECT already do that.)
Art, Poetry and Narrative: Evolve an arrangement of graphics, words or sentences for maximum literary value. (A big problem would be to write an effective fitness function.)

A basic challenge might be to devise one or more additional constraints that will fit into the model that we presently have online. Although I've classified these tweaks as "basic," some can be developed to an advanced challenge level.

Pick any level of challenge that you feel comfortable working with. I anticipate that most of us will be working with the basic challenge, which is just fine. It will not downwardly effect your grade.

Now is the time to get into specifics of what you are trying to do. Spell out the additional variables, program code and functions you will need to make this happen. For the ECT in particular, what more can we do with what we've got? We already have:

  1. Different types of places: houses, gas stations, hotels, restaurants, cities....
  2. Different bounded regions: countries, swamps, ethnic areas, political regions...
  3. Sweet Spot: Different constraints on the order in which places are visited (line 820 ff)...
  4. The X and Y positions of each place so we can specify any path geometry...
  5. The distance of each place from the center...
  6. 3D Version but without the added constraints and features of the 2d version...
Week 6

21 February

23 February

Programming Games for Pay - $15 per hour:
Greater-than-Games Project "Speculation"
Contact: katherine.hayles@duke.edu

From Taylor Gothe:
A Transistor from a Single Atom

Programming Challenge 2: Evolutionary Computation - Some tweaks...
The Evolutionary Concert Tour (a.k.a. Travelling Salesman's Problem).
We look towards implementing some additional constraints.
Some thoughts:

Metaphors: the preferences for directions could be interpreted as winds and ocean currents affecting a ship's voyage economizing on costs/travel time using sail/motor. :

To encourage visiting sequential cities which are at the same distances from the center. This could be a metaphor for imagining the world with a mountain peak at its center and a traveller wishing to avoid steep path segments. Alternatively, if we interpret the cities as blocks of data stored on different tracks of a disk drive, we might wish to discover the most efficient way of recovering all those blocks.

What if each "city" represents a "corporation" from which you can buy or sell shares at a price which is a function of the month you visit them. Stock performance graphs should be available online. You have 48 months to purchase and sell stock in each of these 48 corporations, making one trade each month. How would you maximize your initial investment of $1000? Currency trades among countries would also fit this model. (The geographic distances, penalty boxes and other constraints may not be relevant here.)

I will be out of town at the Society for Cross-Cultural Research conference in Las Vegas.

PHILOSOPHY AND EPISTEMOLOGY OF SIMULATION:
A Third
Written Report
Single-spaced, typewritten, two or more pages as necessary, DUE TUESDAY, February 28..

Tiara Meriweather will screen THE THIRTEENTH FLOOR (1999) for you today. The film is a murder mystery and love story, but like DARK CITY and even MULHOLLAND DRIVE, it blurs the distinction between reality and simulation and questions the validity of our methodologies of knowing the real world. THE THIRTEENTH FLOOR and WELT AM DRAHT (World on a Wire, 1973) are based Simulacron-3 (1964), a novel by Daniel F. Galouye. WELT AM DRAHT was released this month on Blue-Ray.

On first viewing, the first encounter between Douglas Hall and Jane Fuller seems enigmatic. It is only after the complexity of the entire narrative is revealed towards the end of the film that this scene can be understood. You may wish to back and replay "Chapter 4" to give the actors the credit they deserve.

I have put several readings on the philosophy and epistemology of simulation on our BLACKBOARD / COURSE DOCUMENTS page:

  • Non Serviam - Stanislaw Lem
  • Permutation City (excerpt) - Greg Egan
  • A Computer Scientist's View of Life, the Universe and Everything - Jurgen Schmidhuber
  • A New Cosmogony - Ed Fredkin

What roll does simulation play in individual cognition, in cultural affairs, in the scientific discovery of the nature of reality? What themes do the film and the four readings share in common? To what extent do the issues raised by each complement the others? What relevance does the possibility of simulations running inside of other simulations (representations in representations) have to the arguments that are made?

Week 7

28 February

1 March

World on a Wire (1973) excerpt:
(Title 2, Chapter 13, 1:21 to 1:26)
Press conference...

Programming Challenge 2: Evolutionary Computation
Correcting, testing and evaluating three rules for RED flanked by GREENS:
Construct some appropriate test patterns.
What is different about the behavior of the three rules?
Do they work in all circumstances? How well? Why? Why not?
What is the logic?
What is the fitness landscape?
What is the evolutionary result? (Run and document some tests.)

Add one or more rules on your own and evaluate them with the same criteria!
(You might try a nested flanking rule, such as RED flanked by GREEN and
BLACK flanked by WHITE.)

Programming Challenge 2: Evolutionary Computation
Participant presentations.

Challenge 3: Segregation/Assimilation.
Introduction

Spring
Break

6 March

8 March

Spring Break

Spring Break

Week 8

13 March

15 March

Challenge #3: Segregation/Assimilation.
Introduction...

 

Challenge #3: Segregation/Assimilation DUE TODAY.
Participant presentations.

Challenge #4: Flocking (Herding, Schooling, Crowd Behvior).
Introduction...

Familiarize yourselves with the variety of User's settings for both applications.
Familiarize yourselves with the rules, how they are written and how they work:
Flocking Images 25 "sweet spot" is between lines 572 and 789.
Flocking Polygons 12 "sweet spot" is between lines 384 and 562.
Come back on Thurday with some ideas for new rules...

A technical to-do list for Flocking Images:
Use smaller images / Expand the playing field / Introduce more agent sub-variables...
Improve the 3d path visualizations by implementing Red + Cyan makes White.
Connect the dots in the path array visualizations.
Expand to fullScreen and autoRun (but there will be a problem expanding the path arrays).

A technical to-do list for Flocking Polygons:
New functions in the agentClass: setVelocity(), getVelocity(), setDirection(), getDirection().
New sub-variables for the agentClass: acquire(), divest(), memories...
New visualization of agents: uniform size vs. size as f(velocity).
New variant of existing rule: e.g. adopt a portion of NN's velocity and direction.
New coloring routine: color by iteration.

Week 9

20 March

22 March

Challenge #3: Segregation/Assimilation.
Due Today - Participant presentations...

Challenge #4: Flocking (Herding, Schooling, Crowd Behvior)
Brief introduction...

The Swiss NEMA, improvement on the German ENIGMA...

Movie: ENIGMA

Written Challenge, due Tuesday, 27 March, 1-2 pages, single spaced...
On our COURSE DOCUMENTS page, you will find an article on the NSA which recently appeard in WIRED.
Put yourself in the role of an NSA Public Relations Officer who has read the article, who knows something of the history of Bletchley Park, and who is responsible for preparing a response for the approval of the Director of the NSA. Outline three options that the NSA might consider, along with the pros and cons of each. Remember, public relations and credibility are important as well as secrecy
...

Week 10

27 March

29 March

Challenge #4: Flocking (Herding, Schooling, Crowd Behvior).
Introduction continued...

Familiarize yourselves with the rules, how they are written and how they work:
The Flocking Polygons 21 rules "sweet spot" begins approximately at line 505.
Come back on Thurday with some ideas for some new functionality and new rules...

 

A technical to-do list for Flocking Polygons:

New visualization of agents: uniform size instead of size as a function of velocity: size =f(velocity).

New coloring routines:

New functions for the agentClass:
setVelocity(), getVelocity(), setDirection(), getDirection() done!
pick-up(), put-down(), buy(), sell()...

New functions for the agentClass:
friendship[POP], encounters[POP], hunger, thirst

New rules of interaction:
borrow some from segregation/assimilation
variation in speed (start, stop)
attention paid to those ahead, rather than those ahead and behind.

Week 11

3 April

5 April

Challenge #4: Flocking (Herding, Schooling, Crowd Behvior).
Due today...

Challenge #5: Sensors & Actuators
Introduction...

Challenge #5: Sensors & Actuators
Continued...
Week 12

10 April

12 April

Challenge #5: Sensors & Actuators
Continued...
Challenge #5: Sensors & Actuators
Continued...
Week 13

17 April

19 April

Challenge #5: Sensors & Actuators due today.
Participant presentations.

Work on Course Projects

Work on Course Projects
No Final

24 April

No Final

Have a great year's end...

Course Projects due today.
Participant presentations.

Written Challenge: The Computational Universe
Due the last month of class (circa 5-6 pages on paper):
In consideration of the ideas expressed:
a) in these five short articles and excerpts on our Course Documents page:

  1. Non Serviam - Stanislaw Lem
  2. Permutation City (excerpt) - Greg Egan
  3. Rechnender Raum - Konrad Zuse
  4. A Computer Scientist's View of Life, the Universe and Everything - Jurgen Schmidhuber
  5. The Computerman, the Cryptographer and the Physicist - Nick Gessler
  6. and...

b) in these two movies which you should rent and view (some notes are here):

  1. Dark City - Alex Proyas
  2. Thirteenth Floor - Josef Rusnak
  3. Matrix - (great FX, but otherwise intellectually below par)

Please sympathetically* review and critique each of these with respect to a "theory of reality" which all these authors, in their own ways, are envisioning. In other words, what are all these writers attempting to express? How does each contribute to that vision? What are the implications that this "way of knowing" may have for advancing our understandings (both scientific and humanistic) of the world we find ourselves a part of?
* In other words, don't dismiss these ideas out-of-hand. Instead, work within the concepts these writers are alluding to.