Java Applets: Superintelligent Shades of the Color Blue

jhlabs01

“Somewhere in the cosmos, he said, along with all the planets inhabited by humanoids, reptiloids, fishoids, walking treeoids and superintelligent shades of the colour blue…
–Douglas Adams, The Hitchhiker’s Guide to the Galaxy

What could be more intelligent and etherial than a clever java applet like this one made by Jerry Huxtable.  It’s creative and I don’t know why.  Applets by their very definition are tiny, but clever programming seems to be able to give Herculean strength to those little pieces of interpreted java code.  In fact, this applet has no buttons or sliders whatsoever; it starts automatically when you visit the page and the only way to turn it off is to leave.  You can’t save anything or load anything, the only thing the applet needs from you is a mouseclick.  This is almost as minimal as a screensaver.

I had to push the zoom button (oh, there’s a button) and then take a screenshot of the zoomed image.  I had a lot of fun with this thing.  Jerry, the author of the applet says, “At present there is too much variation in the child images – they often don’t bear any similarity to the parent.”  But I found that to be good thing.  One click and you could be jumping from one branch to another in the animal kingdom of genetic art.  Other similar genetic art programs I’ve tried like Kandid suffer from the opposite problem: imagery is too monotonous.  But I’m the kind of person who likes to push all the buttons and move the sliders to the very end, so a genetic art program that hops rather than walks is fine with me.

For those of you wondering what genetic art is:  genetic art is imagery made by a process of combining the graphical parameters of  other images to make new, hybrid ones.  You breed images.  If you ever wanted to grow up and live on the Island of Doctor Moreau and create a world of hideous monsters and reign supreme over them, laughing madly during the day and barricading yourself up in a fortress during the night while your insane brood prowls and parades their grotesque and abominable lives to the accompaniment to a bloodchilling symphony of  screams beneath the light of the moon…  Well, try playing with genetic art instead.

These are rough hewn images; torn from the Earth and spilled from the test tube.  I like them.  There’s an artyness to them.  Good art doesn’t have to be great art.  There’s the smell of flowers and then there’s the smell of old air freshener.  Which one is more provocative?  More suggestive of genetic speculation and mutative properties?

jhlabs12

What about the applet?  How does it work and what’s it all about?  In Jerry’s own words (and the site is offline at the moment):

This applet lets you create art using a genetic algorithm. It generates a random mathematical function and displays an image representing the function in the centre square. It also generates twelve random variations on the image, displayed in the squares around the outside. Click on the centre square to create new variations, or on one of the small images to move that image to the centre and create variations on it. Press the “Zoom” button to see the centre image displayed larger in a new window. Press the “Tree” button to show or hide the function tree (or at least as much as will fit) of the centre function.

See a gallery of pictures created with this applet.

This applet is (like all my stuff) still under development. At present there is too much variation in the child images – they often don’t bear any similarity to the parent. There’s a lot of tweaking of parameters to be done to get the mutation rate right. Other things which need to be done are to implement crossover between images and determine a good mix of mathematical functions to choose from. There should also be a way to save your art.

How does it work?

The applet builds a tree representing a mathematical function, with one node per function, leaf nodes being variables such as X, or Y, or numbers. This function is then randomly called to determine its probable range and then normalized to that range so you actually get valid colors. The function is then called for every pixel in the image to calculate the color of the pixel. There are two sorts of node: color nodes and numeric nodes. A color node returns a color when evaluated, a numeric node returns a numeric value. The root node is always a color node, but nodes below this will usually be numeric. For example, one sort of color node calls three numeric nodes to determine the red, green and blue components. Another calls a single numeric node and looks the result up in a color map. The mysterious “N” function you may see is a normalising function which samples its child function to determine its likely range and normalises it to between 0 and 1.

Mutation is done by traversing the tree and probabilistically changing parameters or type of a node or by pruning the tree at any point and replacing the pruned part with a new random subtree.

All you need to know is click on something.  Even the current image in the center can be clicked on to, uh, –breed it with itself.  See how weird this gets?  If things start to get really ugly then just click on any of the outer images that look completely unlike the center one, or just refresh the page in your browser which will re-initiate the applet, kill all it’s children, clean up the lab and allow you to start all over again.  C’mon, it’s not murder if you’re wearing a lab coat.  I forget who said that.  Doctor somebody…

Enough of that.  Let’s get to the art.  Here are a few of my favorite things…

Mount Java Applet Sinai

Mount Java Applet Sinai

Red Land

Red Land

Also Red Land

Also Red Land

Skybolt

Skybolt

Dissolving Seascape

Dissolving Seascape

Horizon

Horizon

Arctic Horizon

Arctic Pathway

In for landing

In for landing

It worked for Rothko

It worked for Rothko

Why won't it work for me?

Why won't it work for me?

What else?  I would like to thank “Talfrac” Rafael La Perna from Italy, the home of art, for unknowingly tipping me off to this java applet via his Flickr gallery.  Would you like to view his DNA?