Most Pixels Ever Alpha Release

Seriously, Run Lola Run.  Run!

I’m pleased to announce that we’re releasing the first version of The Most Pixels Ever, an open-source Java framework for spanning Processing sketches across multiple screens (developed with Chris Kairalla). This is an early version that has many limitations and needs a great deal of improvement, but it does work. The site isn’t complete, but the source is available, and there are a couple tutorials to help get your started.

I’ll be using the library in conjunction with teaching a new class at ITP starting today!

Run Lola, Ruuuuuuuuuuuuun!

Working on a demo for the MPE system consisting a grid of cells, each playing the film Run Lola Run at 60×32 pixels. Each cell is one frame behind (or ahead) of its left (or right) neighbor. The idea here is to ultimately have enough pixel space to display the entire movie all at once (much like Brendan Dawes’ Cinema Redux), only in motion. Too bad this is quite a blatant copyright violation.

Seriously, Run Lola Run.  Run! Seriously, Run Lola Run.  Run!

(Special thanks goes to Chris Kairalla for suggesting “Run Lola Run” as the source content.)

Single Parent Ecosystem


Simple EcoSystem

This week, in The Nature of Code, we’re talking about genetic algorithms. A genetic algorithm is a search technique that involves a simulated population of candidate “solutions” (represented by virtual chromosomes) that evolve towards an optimal state. The process is a computational model of principles from biological evolution, such as selection, inheritance, crossover, and mutation.

One of the more challenging aspects to developing a genetic algorithm is coming up with a good “fitness function” for your candidate solutions, i.e. how well does this candidate solve the problem? Without a good fitness function, you won’t get anywhere since the function determines the likelihood of reproducing for the next generation. This is Survival of the Fittest in code.

Nevertheless, as per Flake, a better natural selection catch-phrase might be “Survival of the Survivors.” In the biological world, there is no fitness “function.” The longer you survive, the more likely you are to reproduce.

With that in mind, the above example is a simple evolution simulation, where the simple ability to live longer affords creatures (called “bloops”) a greater chance of having a child (the example uses asexual reproduction for simplicity, but could be modified to incorporate two parents). A bloop’s DNA determines its size and speed (the larger it is, the slower it moves.) The bloops wither away and die unless they find food, in which case their strength increases, causing them to they survive longer and hopefully reproduce.

There’s nothing inherently interesting about this example (other than as a demonstration of the technique itself) and it yields a fairly obvious result:

Bloops that are too big can’t move, don’t find food, die, and aren’t very likely to have children. Bloops that are tiny can move around very quickly, but aren’t terribly likely to find food either because of their small size. After about 10 minutes or so of running, the bloops evolve towards a “midpoint” where a reasonably sized, reasonably fast family of bloops take over (see above screenshots for “before” and “after.)

Since color is encoded into the genes, you can follow bloops from generation to generation (though it should be noted that color plays no role whatsoever in a bloop’s ability to survive.)

WordNet

I’ve posted a brief tutorial on using JWNL, a Java library for accessing WordNet.

“WordNet is a large lexical database of English, developed under the direction of George A. Miller. Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept. Synsets are interlinked by means of conceptual-semantic and lexical relations.”

I wonder how useful it would be to create a Processing library with some basic WordNet functionality (or that simply exists as an interface to JWNL for all things WordNet.) There are many lovely examples of text-based Processing work out there. Two that jump to mind are State of the Union by Brad Borevitz as well as anything ever made by Ariel Malka.

The power of WordNet is not that it provides access to word meanings (which it does), but that it provides information about the relationships between words (and when I say “word,” I really mean set of synonyms, or synset). It’s the myspace for semantic concepts. You’re probably familiar with synonyms and antonyms. In addition, WordNet provides links for less well-known semantic relationships, such as hypernymy, hyponymy, meronymy, troponymy, and entailment. Do I see some sort of tree / network visualization in Processing’s future?

Tech Trek TV!

March 4th 2007. New York City
3 Minutes

Wherein we pick a name we like (Tech Trek: Inside ITP) and catch ITP researcher and teacher Dan Shiffman working on 6, 32-inch TVs. His project is was just up and running when we talked to him. It’s an open source Java framework for spanning real-time graphics applets/applications across multiple screens.

  • More Info: Dan Shiffman: www.shiffman.net

The guests take over!

Today, my site had a slight breakdown. For whatever reason, the Google Analytics plug-in made the site disappear. If you weren’t logged in as an “author”, nothing would appear. So before I could figure out the problem, I enabled author capabilities for all my students so that they could continue to view the material.

Now, the problem is fixed. So I could turn it off. But let’s just let it go a little bit longer.

Generics

I was just settling into a quiet evening of reviewing material for my A to Z class tomorrow when I stumbled across something quite shocking.

Mind you, I was in a fragile state, having finally released myself from a rather unhealthy personal obsession with the StringTokenizer, silently weeping (inside) while adjusting the examples to use split with regular expressions.

Back in the old days, when using some form of Java Collection, one was required to cast elements retrieved from that collection into the type of element stored in the collection. According to Sun’s site: “Besides being inconvenient, this is unsafe. The compiler does not check that your cast is the same as the collection’s type, so the cast can fail at run time.”

Generics allow you to specify the type of a objects to be stored in a collection to the compiler. This means that the compiler can confirm that you are using the collection consistently and cast the values itself as they are taken out of the collection.

What was:

ArrayList strings = new ArrayList();
strings.add("Hello World!");
String s = (String) strings.get(0);

is now:

ArrayList<String> strings = new ArrayList<String>();
strings.add("Hello World!");
String s = strings.get(0);

Frankly, the syntax is a little ugly and awkward (esp. when you start getting into collections with keys and values), but I’ll play along for now. . .

Simplicity

In the interest of trying to lead my life according to my recent minor obession: John Maeda’s Laws of Simplicity, I have decided to start off the Spring semester with a little bit of law 1: Reduce.

So out with http://www.shiffman.net/teaching/the-nature-of-code/

and in with http://www.shiffman.net/teaching/nature/

and out with http://www.shiffman.net/teaching/programming-from-a-to-z/

and in with http://www.shiffman.net/teaching/a2z/.

Apologies if this makes your browsing temporarily complex.