Monday, June 06, 2005

« BUSINESS MODEL PROTOTYPE | Main | GRINDING THE WORLD »

EVOLVING NEMO

Under_the_sea
Off the coast of Hypatia and Themiskyra, a year-long experiment in artificial Darwinism continues (originally published here)...

Surina Skallagrimson once created a school of fish, but at the start, most of them were pretty damn dumb. Some of them would wander off and get totally lost, for example, while others were undone by the fundamental laws of Newtonian motion, and simply crapped out in mid swim.

So she did the most obvious thing: she killed them all off, pretty much. The ones that were just a tad less stupid than a box of rocks she spared, and replenished the rest that she didn’t. These she sent back to swimming, and the cycle began again. To all the failed fish, death; to the few that showed potential, a chance to join a new generation of the species.

Repeat this process a few hundreds times, and you really start to get somewhere.

“What you see here is the result of a year’s development,” Surina announces to me from the bottom of the ocean, while her new brood of orange and red clown fish (or, Amphiprion ocellaris) toodle around her. 

Education_in_natural_selection

Now these fish surrounding Surina Skallagrimson, they’re fish.  Other residents have created other species of sea life, of course, and land animals too.  But at best, they’re impressive sculptures of animal life*, and when they move (if they do at all), it’s only along a pre-scripted flight path, like old school animatronic sea beasts from Disney’s underwater sub ride. (It’s not uncommon to glance out from the shore of a Second Life beach, and see a pod of dolphins endlessly leaping out of the water, stuck in an infinite Flipper loop.)

Surina_and_moopf

Surina’s fish, by contrast, flow together in a school that changes shape and direction, dispersing sometimes, then gradually regrouping; occasionally, maverick Nemos will trail off from the school to go on their own adventures, only to eventually return, chastened, into the fold. When a Resident joins them under the sea, the fish wander over to them, and mill about; it’s not unlike wading into Hanauma Bay nature park, and watching as partially tame schools of fish come over to you, curious. (“I added the instinct to shoal around avatars,” Surina explains, “which is why the fish are staying with us and not swimming off.”)

When she began, Surina Skallagrimson initially planned to just create sea life that would populate the coasts and lakes of lands owned by Amazon Nation, the group in which she is Queen.

“The original idea for the fish was just as an ornament in a pond,” Surina tells me. “But I didn't like how other fish swam in circles. So I did a little research and found out about shoaling, or flocking. A lot of work was done in the 80’s with artificial flocking, so I wrote my own version for the fish. What you see here is basic flocking/shoaling.”

But the trouble with them moving in a school, she found, was that they’d often bang their little fishy heads into each other. 

“The biggest problem was with them crashing together,” Surina says. “So ironically, the trick to making it work is in keeping them apart. It's a balancing act. Each fish is independent of the others. There is no communication between them. They scan for other fish and if found, work out the center of the group, then move towards that center. But if they get too close, a repulsion force pushes them apart.” Now the fish move more or less in unison, with no underwater colliding. “What you see as the result looks natural,” she says. “The script I use hasn't actually changed for about six months. Only fine tuning the variables... hence the evolution.”

Fish_food_02

The Darwinian process for the species actually begins when Surina assigns varying abilities to each fish. “[S]ome can see further, some can swim faster, etc. Only the variables are different; the script is the same… If we move to the other side of the sim the fish will follow, but some will get there quicker than others.”

At this point, the role of natural selection is embodied by the bracelet on Surina’s wrist.

“There is a command in [Linden Script Language] script called Sensor,” she says. “It is what the fish use to see. And my bracelet which holds the master copy of the program sees the fish using Sensor… So I can make a change to the program in my wrist band and send it to the fish. If they perform better than the old ones then they get the next update.” Those that don’t get deleted at Surina’s command. (It’s a little like Darwin hiking around the Galapagos and clubbing the weaker animals with his walking cane, so he can speed things up.)

Some other fish do meet their fate through natural selection, of a kind. “[There are fish] that die off due to sim physics problems or swimming off world,” she tells me. Free from the threat of disease or climate change, in other words, one of the greatest threats is a fish’s data slipping off the server. As for death by physics, that happens when the world’s Havok-powered system is unable to keep up with so many fish moving in so many different directions. “Rather than writing collision detection,” Surina explains, “I use the built-in physics. The fish are physical; you give them a push, they keep moving. The script within the fish has to keep up with those external changes and if the sim slows down, the fish don't respond fast enough.” And a fish without physics to propel it tends to do the artificial life version of going belly up.

But Surina is already introducing more genuine forms of natural selection, too. 

“Let me add a predator for you,” she says, grinning. And a larger, black and emerald fish suddenly comes barreling at her school of clown fish, which recede and divide at its approach.

A robot resembling Marvin from the recent Hitchhiker movie watches, impressed. “They split either side of it then, cool,” says Moopf Murray. (As it happens, Moopf is the founder of the couple dozen-strong Artificial Life group, of which Surina Skallagrimson’s project is the farthest, dare one say, evolved.)

“The predator uses exactly the same program as the other fish,” Surina tells us. “So it tries to shoal with the fish. But it has a different name, and I told the other fish that if they see it they should swim away.”

Within a week after our first demo, Surina Skallagrimson has added food and breeding.

“[T]he more they eat, the more they breed. Take away the food and they starve,” she announces cheerily. A food dispenser release a “pellet” of food (an un-textured primitive, actually), and depending on how hungry a nearby fish is (on a scale of 1-10), they’ll be attracted to the food. “The first fish to touch (eat) gets the food and the prim dies.” Fishes that don’t feed in time, die; fishes that do, reproduce through simple cloning.

The gold standard for any creator of artificial life is unplanned emergent behavior, and Surina has noticed at least a couple instances of these. For one, with enough fish in the school, they begin to move in circles. “[T]hey tend to form a line. And if the front moves around so it 'sees' the back of the line, they circle.” With the addition of food, she’s also noticed that “the weaker ones tend to lead the shoal. They are the ones most in need of food. The ones most in need of food will tend to break away from the shoal. This causes the rest of the shoal to follow, so you end up with the weakest near the front, heading for food.”

But Surina Skallagrimson’s ultimate goal is to remove herself from the process entirely, and let it follow its own course.

“What I want is for the fish to change their own variables, not me doing it. The best way is for them to breed. I'm developing simple DNA, so a new fish will take numbers from both parents and maybe a random change to add mutation. The mutations should produce the improvements over time. At the moment, I introduce the mutations.”

“They need a DNA system for proper breeding,” Surina says with the quiet confidence of a clockmaking god. “That is when true evolution will start… then it's a case of ‘sit back and see what they do’.”

* I should, however, mention the early experiments in artificial SL life (third life?) by Rhysling Greenacre, who created a simulation of cats, mice, and cheese, as far back as late 2003. An excerpt from Greenacre’s instruction manual, which I managed to dredge up from my archive:

"Mice reproduce when they bump into each other and the following conditions are met:

- The mouse has 75 or more health
- The mouse is more than five minutes old and has not reproduced in five minutes
   
"A mouse loses 50 health during reproduction, and its offspring starts with 50 health
instead of 100."

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341bf74053ef00d834276ca653ef

Listed below are links to weblogs that reference EVOLVING NEMO:

» Apparently gaming _is_ good for something from IT: Interesting Tangents
In addition to being a World of Warcraft guild master helping you get a job, it appears there are other (more practical to my mind) benefits of the MMORPG scene. I recently read about Second Life which is kind of like a MMORPG version of The Sims. Seco... [Read More]

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Meleno

:D Surina's my rl aunt, she introduced me to the teen grid and i spend a lot of time on it and i'm a good builder now but i don't under stand scripting at all. My sl name is Meleno Fei if you wanna know. See you there! :DD

Post a comment

This weblog only allows comments from registered users. To comment, please Sign In.