ISIS 170
Information Science & Information Studies Program.
Visual Studies 172
Computer Science 107

ALiCE: Artificial Life,
Culture & Evolution

Simulating complexity with multiagent/multicausal & evolutionary computation

Spring 2013 Calendar

subject to change...


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


 


Classroom #6 Reservations Calendar


Jean-Philippe Rennard
evol
Rob Saunder
genetic art
John Mount
fusebox
Alife Fusebox
   
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).
I used to think that the brain was
the most wonderful organ in my body.
Then I realized who was telling me this.

Emo Phillips, Neuropsychology: Clinical and Experimental Foundations
There are, indeed, things that cannot be put into words.
They make themselves manifest.
They are what is mystical.
Ludwig Wittgenstein
(Tractatus Logico-Philosophicus).
 
Tuesday
Thursday
 
Calendar Color Code TAN: Notes on what we did on days past.
Calendar Color Code STRAW: Tentative agenda for the days ahead.
 
Week 0
Thursday, 10 January
 

Welcome and Introduction:
The course is over-enrolled, but some will drop, so we should be OK.
If you have no programming experience, WELCOME!
I encourage you to seize control over these machines.
If you have extensive programming experience. WELCOME!
I encourge you to delve more deeply into complexity.
I want to introduce you to a philosophy of multiple causation and multiple agency
and to an epistemolog of evolution, complexity and computation.
I would like to empower everyone with the confidence to express your own ideas,
processes, hypotheses and theories in computer code.
I want you to build your own applications, and by doing so, to become more critically aware of the assumptions hidden behind the slick visuals and eye-candy of other peoples' applications.

Administrative details:
Over-enrollment, grading policy, format for programming and discursive challenges.
"Office Hours" will be in classroom #6, Tuesdays & Thursdays, before and after class.
Please confirm appointments by email in advance.

YOU NEED TO BUY:
12+ burnable CDs
12+ clear-front CD envelopes. No plastic jewel-cases!
A pen for marking your CDs.
12+ clear and ordinary sheet-protectors for letter-size paper.
1+ USB memory stick. Bring this to every class!

Course overview:
A quick look at some ancestors of our silicon computers.
Did we discover, and not invent, computation?

First, we will write simulations from scratch.
Later, we will augment, modify and enhance more complex code.
Our Desiderata: Explore, Experiment, Enhance and Enjoy!
Our programming challenges will progress from simple to complex representations of:

  • Space (dimensions): cellular (grid-based or raster) or vector (omnidirectional).
  • Time (how agents take turns or ar polled): cinematic, random, sequential.
  • Agency (interaction): from binary agents to those with "senses, thoughts & actions" (STA).

Some of the applications we will be working with...

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

--- break ---

--- break ---

REVIEW OF HANDOUT ON C++ AND THE WINDOWS API

Building a graphics application for Wiindows PCs with Embarcadero C++ Builder:
(Much of this is reviewed in the left column on our Simulations page.)

  1. The API: Windows Application Programmers' Interface. See "Help" in the IDE.
  2. The IDE: Embarcadero Integrated Development Environment. Setting it up.
  3. The C++ language. See the HANDOUT and also "Help" in the IDE.
DUE ON TUESDAY MORNING: Programming Challenge Alpha:
Practice building one or more simple programs on your own from scratch.
They can be simple, complex, insightful, stupid, boring or fun.
Do anything you want to gain some familiarity with C++, the API and the IDE.
Turn this in as you would any challenge.

FYI: Tabs under which common Visual Components may be found:

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)...

Week 1

15 January

17 January

DUE THIS MORNING: Programming Challenge Alpha:

Review of the Handout from Day 0...

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."

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

Execution of the program constructs a topographic landscape, but our implementation
obscures much of what is going on. What is going on that we're not seeing?
How could we show the complexities of this system more clearly?
How could we better visualize its behavior?
Let's treat it as a landscape? Let's record the "hits" in a world array.

How can we visualize that array? Let's try color and shading.
We implement the colorRamp() function in two directions:
a) black, violet, blue... red, magenta, white
b) white, magenta, red... blue, violet, black
What about casting shadows across the landscape?
c) faux shadows (a kludge, a cheat, a heuristic)

A look at some other variations on the Chaos Game under "Fractals & Strange Attractors:"
a) varying the multiplier (divisor)
b) adding the third dimension
c) adding sonification to visulization (can sound characterize the pattern?)
d) a "bent" version (flipping the "+" to "-")

What else might we try???
Come on Thursday with some ideas...

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

a) varying the multiplier (divisor).

Preparation for Tuesday'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 ssimilar to the "Roll a pair of dice" applications on our "Games" pages or to a "Pick a card" or "Roulette Wheel" scenario (for which I have no examples). You will have until 10:30 to complete it and to burn it into a CD-ROM.


We consider:

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

22 January ------------------------------------- (Drop/Add & Wait-lists erased 23 January)

24 January

Come in at 9:00 for a review...

Preparation for today'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 similar to the "Roll a pair of dice" applications on our "Games" pages or to a "Pick a card" or "Roulette Wheel" scenario (for which I have posted no examples). You will have until 10:30 to complete it and to burn it onto a CD-ROM.

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

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

Varying the multiplier (divisor).

We consider:
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?

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)...

COME EARLY, AT 9:00 a.m. ON THURSDAY AND WE WILL GO OVER
WHAT YOU NEED TO DO TO START AN APPLICATION FROM SCRATCH...

Programming Challenge 1: Cellular Automata / Conway's Game of Life
A different representation of space and time...
How do we represent a borderless world with true parallel causation?

Parallel (cinematic) time.
Borderless (toroidal) space.

We begin building the GUI for Conway's GOL:
thisWorld[][], nextWorld[][] and reset(RANDOM)

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

Week 3

29 January

31 January

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

Speeding things up:
renderChanges()

Importing creatures:
A wrap-around function.

Optimizing the application with some minor changes:
Showing iteration" in an Edit box.
Inserting randomize().

EXPERIMENT EXTENSIVELY with Conway's rules.
Characterize the ecology and ethology of the creatures in the GOL:
What is the relative proportion of different creatures spontaneously created?

How do they behave when encountering changes in their surroundings?
Include this information in the challenge you hand in.

TO THINK ABOUT:

Can we automate this type of information gathering?
Does Conway's Game of Life imply anything about:
How we think the world works?
How we think we think?
Philosophy?
Epistemology?


Is Conway's world a complete computational system?
Are there any limits to the processes we can build in a GOL world? Can it compute?

  • How about a "counter" that prints out decimal digits? A digital counter running on a computer (the GOL CA), running on a computer (the PC in front of you), running on a computer (the computational universe we live in).

Deterministic but Unpredictable:
Is there a shortcut to viewing the state of Conway's World 1,000 iterations into the future?
Given one state of Conway's GOL, can we calculate the states that preceded it?
Using the Game of Life as a "one-way" or "trap door" function:
A way to authenticate your passwords without remembering what they are?

Some visualization tweaks to help us see the "evolution" of Conway's world:
Coloring "births."
Coloring "deaths."
Tracking population growth, decline and stability.


Take Home Discursive Challenge 0: A Computational Universe?
DUE 12 February (Thoughtfully written, single-spaced, 2-3 pages.)

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

RadioLab on Emergence...
(Begin at one minute in)

The OTCA Metapixel links have been updated by adding:
Life on Life, a superb progressive zoom out...
Some links for Brice Due, OTCAMP inventor:
The OTCA MetaPixel blog spot.
Sample Patterns
The OTCAMP Pattern in Detail

Introducing the save() and open() functions.
We always SAVE thisWorld for maximum flexibility.
After we OPEN a file to thisWorld reset iterations.

Another Speed Increase:
Repeated Canvas-> calls to the PaintBox on the display take excessive time.
Instead, dynamically create a TBitmap object (e.g. worldBMP) and make the Canvas-> calls to it.
Then when you are finished, make only ONE call to the PaintBox on the display, e.g.:
Form1->PaintBox->Canvas->Draw(0, 0, worldBMP);
I've noted up to a 3-fold speed increase...

Introducing more creatures:
A glossary of terms...
Adding #defines to the switch() statement.

SOME THINGS WE MIGHT DO:

  1. Find the intitial configuration for a world that runs the longest before stabilizing.
    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 that speed since the origin of the Universe, this machine could execute only 3.53 x 10^33 flops, computing an infinitesimal set of those possible.
  2. Implementing a "creature counter."
  3. 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?
  4. How might we evolve a bitmap image as Karl Sims did, using a cellular automaton?

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

Week 4

5 February

7 February

I will be in Tucson locating research materials for my other course on Meteoritics. In my absence, please continue to enhance your work with Conway's GOL:

Programming Challenge 1: Cellular Automata / Conway's GOL
Continued development (DUE ON FEBRUARY 14)...

VHS presentation today: VPRO Amsterdam's documentary, ARTIFICIAL LIFE (1995) interviews with some of the pioneers in the field... (Mostly in English, some Dutch, 90 minutes) Marcus will screen the film.

Take Home DISCURSIVE Challenge 0: Computer scientists' on complexity and the possibility of a Computational Universe.
DUE 12 February (Thoughtfully written, single-spaced, 2-4 pages.)

Did we discover, and not invent, computation? Is computation inherent in reality as we know it, in everything contained within our world? Assuming this to be true, and that we are (in some sense) the patterns that emerge from such computation, it would seem logical to ask, "where is the computer on which this software runs? What is it like?"

TVRO Amsterdam's documentary on Artificial Life provides you with some historical perspectives on issues of complexity, Konrad Zues, Ed Fredkin and Jurgen Schmidhuber wrestle with the problem of of how the world works, and Marvin Minsky gives his critique of traditional philosophy. These readings are available on our SAKAI resources page.

Take these ideas seriously.
Compare, contrast and evaluate the claims being made.
What questions do they raise about philosophy and epistemology?

These two additional readings and the Metapixel may provide you with additional relevant material online:
Alan Turing INTELLIGENT MACHINERY (original draft)
Alan Turiong INTELLIGENT MACHINERY (final version)

I will be in Tucson locating research materials for my other course on Meteoritics. In my absence, please continue to enhance your work with Conway's GOL:

Programming Challenge 1: Cellular Automata / Conway's GOL
Continued development (DUE ON FEBRUARY 14)...

DVD presentation today: Josef Rusnak's film THE THIRTEENTH FLOOR (1999), a remake of the German "World on a Wire. (101 minutes) (Marcus will screen the film).

Take Home DISCURSIVE Challenge 1: Science fiction on complexity and the possibility of a Computational Universe.
DUE 12 February (Thoughtfully written, single-spaced, 2-4 pages.)

Did we discover, and not invent, computation? Is computation inherent in reality as we know it, in everything contained within our world? Assuming this to be true, and that we are (in some sense) the patterns that emerge from such computation, it would seem logical to ask, "where is the computer on which this software runs? What is it like?"

Josef Rusnak's sci-fi film THE THIRTEENTH FLOOR, Greg Egan's sci-fi novel PERMUTATION CITY and Stanislaw Lem's short story NON SERVIAM interrogate this idea. These readings, or extracts, are available on our SAKAI resources page.

Take these ideas seriously.
Compare, contrast and evaluate the claims being made.
What questions do they raise about philosophy and epistemology?

These two additional readings and the Metapixel may provide you with additional relevant material online:
Alan Turing INTELLIGENT MACHINERY (original draft)
Alan Turiong INTELLIGENT MACHINERY (final version)

Week 5

12 February

14 February

Take Home Discursive Challenge 0 and Discursive Challenge 1:
On A Computational Universe?
DUE TODAY
A short class discussion...

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

Continued development...

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

DUE TODAY...
Participant Presentations...

Programming Challenge 2: Evolutionary Computation
INTRODUCTION

Week 6

19 February

21 February

Programming Challenge 2: Evolutionary Computation: due Tuesday, 26 February.
The Evolutionary Concert Tour (a.k.a. Traveling Salesman Problem, Travelling Ferenghi Problem).
Continued...

Participant discussion of brain-stormimg over the weekend. What additional constraints can easily be implemented?

The ECT is a problem in sequencing. As such the basic framework could be applied to any sequencing problem, from piecing together shreded documents (or images), to picking up and delivering commodities and buying and selling stocks and bonds. Please check our S p e c u l a t 1 o n link under simulations for an application that explores that direction.

Take Home Discursive Challenge 2: due Tuesday, 26 February.
Please read the two papers on Evolutionary Computation:
Peter Bentley EVOLUTIONARY DESIGN BY COMPUTERS
David Fogel WHAT IS EVOLUTIONARY COMPUTATION?

On paper (2-4 pages single-spaced), please discuss the differences among the various schools of EC (e.g. GA, GP, EP). Think about how it may be applied in your particular career, in your major or in a problem you are familiar with. Which methodology would be most appropriate? How would you set up the evolutionary algorithm? Has what you are imagining already been developed? Knowing how you would set up the problem, check the web resources for an application similar to what you have been thinking about. Provide a summary and critique.

Programming Challenge 2: Evolutionary Computation: due Tuesday, 26 February.
Continued...

Participant discussion of brain-stormimg of constraints and their implementation...

Week 7

26 February

28 February

Programming Challenge 2: Evolutionary Computation: continued...

To do:
Enhance the rules for additional constraints on solving the Travelling Salesman Problem.
Enhance the mechanisms of evolution (how are reproduction and variation computed).
Evaluate the results in experiments
.

Demonstrations:

  1. Daisuke Imai's application evolving doorway obstacles for safe excapes, here.
  2. The A* "shortest0-path" algorithm, recommended enhancement for those who like a challenge:
    Matt Newcomb's A* application running on different terrains, here.
    Tim's A* Maze-Solving algorithm, here, the last two applications.

Participant ideas and discussions:

  1. Invoke a transitional city type to buffer strings of same city types (aaabcccccbeeeeeeeebaaa).
  2. Preference for "cubist" travels, for instance in pseudocode:
    penalty += (abs(city[now].x - city[next].x) + abs(city[this].y - city[next].y) * penaltyTrackBar;
  3. Discover which one of 30 cities to eliminate (devise a "wrapper" around the current code present the application with 30 variations on a city pattern).
  4. Replace the PaintBoxMap with a TImage "ImageUnaltered" and "ImageToPaintOn." (You must replace all the PaintBox->Canvas commands with Image->Canvas commands. Don't forget the event handlers. Don't forget that Form2 has to talk to Form1, and the Image commands preceeded by "Form1->Image. For each "Shape" (for the penalty boxes), under Edit, we need to click "bringToFront." Your image needs to be a 500 by 500 .bmp. Every "PaintBox->Refresh(); needs to be replaced by "ImageToPaintOn->Picture = ImageUnaltered->Picture" to "erase" it. Probably there are some other adjustments to be made.
  5. Alter the world to a toroidal wrap-around world. (Distances would have to be recomputed and the visualization modified to show path legs going over the edges and back.
  6. Some relationship between city type and path leg length entering or exiting.
  7. Calculate some statistics on the characteristics of the traverse as evolution procedes and/or at its conclusion.

Programming Challenge 2: Evolutionary Computation: DUE TODAY
Participant presentations.

Take Home Discursive Challenge 2: DUE TODAY
Please read the two papers on Evolutionary Computation and discuss the differences in approaches to EC, and in particular how you would approach writing an EC solution to a problem that interests or concerns you...

Challenge 3: Segregation/Assimilation & Growth...
Introduction...

For Tuesday, please submit some new "rules" on paper. It is best if you allow real-world situations to inspire your rules, but please keep in mind the "limits of the simulation." We want rules that will work within the existing program structure, or at least rules that might require minimal changes to the foundations that we currently have coded.

Start your rules in English, then rewrite them in pseudocode and finally in code if you can. Be prepared to discuss them on Tuesday. That means everyone! We want to hear your ideas for enhancements...

Week 8

5 March

7 March

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

Possible "to-dos":

  1. Right-click to zoom in on a region, not just the upper left.
  2. Add some sort of agent memory and design some rules for it.
  3. Adding a "happiness" characteristic. Add it to the class declaration and modify moveMe() to move it to a new cell. Perhaps increment happiness with each moveMe() and decrement it with each !moveMe(). One might also add some rules for it. Count and display happiness by agent type at each frame, and/or replot agents showing positive or negative happiness. How would we visualize the latter? We could enlarge the display and plot happiness with the pen and agent type with the brush of a rectangle.
  4. Recode http://fallingsandgame.com for Embarcadero.

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

Some more thoughts on what to do:

  1. Import the Sluis digital elevation model. But remember the Sluis DEM is bounded and our current world is toroidal. Also, how are we going to visualize different agent types on top of a visualization of the terrain? What colors will we use?.
  2. Expand the agent size.
  3. Remember to check out the notes.
  4. Allow agents to climb a gradient, but only a mild slope or follow a contour.
  5. Drop rain or snow agents on the DEM (but we currently only allow one agent per location).
  6. Happiness second thoughts: If the measure is whether or not one moves, we already monitor that.
  7. If you add another characteristic to an agent, be sure to also add that characteristic to the moveMe() function.

 

Week 9

12 March

14 March

!!! Have a Recuperative Spring Break !!!

Week 10

19 March

21 March

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

Challenge #4: Flocking (Herding, Schooling, Crowd Behavior).
Continued...

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 Thursday 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 full Screen and auto Run (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 11

Wednesday, the 14th Human Domain Analysis Workshop, Charlotte

26 March

28 March

Challenge #4: Flocking (Herding, Schooling, Crowd Behavior).
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 Thursday with some ideas for some new functionality and new rules...

 

A technical to-do list for Flocking Polygons:

Challenge #4: Flocking (Herding, Schooling, Crowd Behavior).
Continued...

Demo of ongoing problem of simulating orbits...

Aesthetics 101:
Doing away with Windows: the Cheshire cat.
Using Timers to constantly vary run parameters.

Aesthetics 102:
Beyond keyboard and display: escaping the confines of the desktop computer.
Transitioning applications into the real world:
TrackBars to IR rangefinders.
WebCams?

Week 12

2 April

4 April

Challenge #4: Flocking (Herding, Schooling, Crowd Behavior).
Continued...

Demo of ongoing problem of simulating orbits...

Challenge #4: Flocking (Herding, Schooling, Crowd Behavior).
Due Today...

Participant presentations...

Challenge #5: Sensors & Actuators
Introduction...

Week 13

9 April

11 April

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

16 April

18 April

Challenge #5: Sensors & Actuators
Continued...

Some more cryptographic devices.
Nanocopters.

Work on Course Projects

Challenge #5: Sensors & Actuators due today if it is NOT part of your course project.
Participant presentations.

Work on Course Projects

Week 15
23 April 25 April
Course Projects due today.
Participant presentations.
NO FINAL

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.