Stubborn Idealism

RSS Feed

Page: << 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 >>

Artificial Life

Date: Wed 12 April 2006
Time: 3:41 AM EDT

I took a break from working on the business for a few days and wrote an artificial life program. Here are some pictures to give you an idea of what it's like:


This is an overview of the world. Some of the little dots are the artificial organisms (I call them bugs) and other dots are food pellets.


This shows a close-up of some bugs and food pellets. The food pellets are the small bright green dots, and the bugs are the larger, variously colored objects.

Two ideas that fascinate me are (1) the emergence of complex organized structures by the blind action of random mutation and natural selection and (2) neural networks. I combine these two ideas in this program. Each bug is controlled by its own neural network. It has sensors at three points around its perimiter that detect food, walls, and other bugs. It also has a sensor that tells it how close to starvation it is. These sensors feed into the neural network, which is composed of 15 neurons. 3 of those neurons are designated as outputs; their charge levels determine whether and how fast the bug moves forward, turns left, and turns right.

The rules of death and reproduction are simple. A bug has an energy level that decreases with time, and it decreases faster if the bug is moving or turning. When the energy level reaches zero, the bug dies. When the bug eats food, the energy level goes up by the amount of energy in the food. If the energy level goes over a certain threshold, then the bug reproduces. Reproduction is accomplished by dividing the bug's energy level in half, making a copy of the bug, and then making a random change in the neural net of the copy. The mutated copy is then placed in the world near the parent bug.

At the beginning of the simulation, all the bugs are created with completely random neural nets. Most of the time they all quickly die from starvation because they either don't move at all or they just spin around in tight little circles. But after a few tries, I get one or two bugs that happen to move forward more or less in a straight line. In the beginning, I set the amount of food in the world to a high setting, so these bugs easily encounter food in their blind, drunken wanderings and reproduce and spread around the world. (I gradually decrease the amount of food in the world as the bugs get better at gathering it to keep things interesting.)

At first, they don't do anything really intelligent. They just go until they hit a wall, at which point most of them fail to turn around and as a result die of starvation. At the beginning though, the neural nets are still fairly random and the output is jittery, and some of the bugs that hit the walls happen to jerk around in the right direction before they starve. But they don't swerve to avoid walls when they see them, they don't home in on food pellets when they see them, and they don't avoid other bugs (if two bugs collide early in the simulation, they tend to starve to death because they haven't yet developed the reflex to steer around each other). So at this point, even though they've gotten a foot-hold, they're pretty dumb.

Start the simulation running right before I go to bed, and then check it in the morning, and it's a whole different story. Once the neural nets have had a few hours to develop through blind, unguided natural selection, I see them consistently making U-turns when they see walls, zeroing in on food pellets, and veering around other bugs as they cruise around the world for food. This is always a very gee-wizz moment for me.

This evening when I checked on their progress, I got a fascinating surprise: two distinct species of bugs had developed! I absolutely had not expected this to happen at all. Unlike the old population of bugs always cruising around for food, the bugs in this new population sat still, conserving energy, waiting for new food pellets to appear within their sensor ranges, at which point they pounced on the food.

But it got even better than that. I checked on them a few hours later and found a third distinct species had developed! The hold-still-and-wait bugs were sprinkled in a rough arc from the middle-left side of the world down to the middle-bottom, so the bottom-left corner of the world was effectively isolated from everything else (at this point the hunt-for-food bugs' reflex for turning aside when they approached another bug was well ingrained, so when they got close to the population of hold-still-and-wait bugs they tended to head off in another direction rather than penetrate through to the isolated corner of the world). However, at some point at least one of the hunt-for-food bugs had gotten into that corner and started breeding there. Few if any of them got back out, and few if any of the outside bugs got in. These bugs, being in a relatively confined area, eventually stopped moving constantly and started "resting" occasionally to conserve energy.

I've got another artifical life project in the works that I haven't worked on since 2004. It's much more ambitious, with a three-dimensional world and realistic physics. In this one, in addition to the behavior of the organisms, their bodies will be mutated as well. Instead of having outputs like "go forward," "turn left," and "turn right," they will instead get around the world by moving their bodies at the joints. There will be varied environments in the world, such as flat land, shallow water, deep water, rocky, hilly, and whatever else I can come up with. And these organisms will have sex :). It will be really exciting if I ever finish it.

All Cells One Cell

Date: Sun 9 April 2006
Time: 11:35 PM EDT

Imagine that you had invented a tiny camera that could clamp on to a cell in your body and travel back in time, sending video as it went. Imagine that you attach this camera to one of your skin cells, say on the back of one of your arms, set it going back into time, and then watch the picture it sends back.

You see the cell it is clamped on to gradually shrink and then suddenly merge with another cell. The camera, still attached to the cell, continues to monitor. The cell once again gradually shrinks and merges with another cell. It happens again, and again, repeatedly. Then a sperm emerges from the cell and swims away facing backwards.

Through all this, the camera has never let go to the cell you clamped it to. It is still attached to the same cell.

You continue to watch as the cell keeps up its pattern of shrinking then merging with other cells. At this point, let's say you had built a detachable probe into the camera that could fly outside the body and show you what it looks like from the outside. You do this now, and you see a picture of your mother when she was a young woman.

Going back further into time, the cell (still the same cell you clamped the camera to on your arm, as the camera never let go) continues to shrink, merge, shrink, merge, and you see another sperm wriggle out tail first and recede. The detachable probe now shows you your maternal grandmother's face as it looked when she was young.

The camera continues to ride what one day will be every cell of your body back into time, and the faces shown to you by the outside probe become less and less familiar. As you grow impatient with the repeating pattern, you speed up the camera's pace into the past. Not only are the faces themselves becoming less familiar, but the hair styles and facial features are taking odd turns, and you soon realize that they are becoming less human.

You turn your attent back to the cell and increase the camera's past-traveling speed again. After a long while, the cells surrounding it disappear, and you realize that you're looking at a single-celled eukaryote. It continues the same pattern, shrinking, merging.

As you keep watching, the cell's mitochondrai suddenly all join together and the resultant single organelle emerges from the cell and recedes into the distance, now a cell in its own right.

After a while, inside the cell you notice that some of the DNA is gradually migrating out of the nucleus into the surrounding cell plasma. When the amount of DNA inside and outside the nucleus is roughly the same, the cell wall opens up and spits out the nucleus, which now seems like it's happier outside anyway.

The cell continues the same pattern of shrinking and then merging with another cell. It goes on and on and on, until the screen goes blank: the camera has finally worn out. [Well, how was I supposed to tell it? Nobody knows yet how the cell first formed.]

You marvel that through all of that, the camera never let go of the cell that you attached it to on the back of your arm, and you realize that every cell in every organism alive today is in a very real sense the same cell.

If another person had done the same experiment, then at some point before the face began to lose its human features you both would have found your cameras attached to the same cell. If somebody had done the experiment on, say, his cat, then his camera's cell and your camera's cell would have become one cell much later in the video. Somebody else might have done the experiment starting on a blade of grass in his yard, and his camera would have joined yours after the point when your cell became a single-celled organism but before it ejected its mitochondria, while the other person would have gotten to see his version of the cell spit out its chloroplasts before meeting up with yours.

Ouch, the back!

Date: Wed 5 April 2006
Time: 11:54 AM EDT

The next time a Creationist asks me to show him transitional species, I'll tell him to look in a mirror. What happens when a structure that's been tweaked for hundreds of millions of years to be an excellent horizontal beam suddently finds itself in the role of a vertical column? Myriad chronic back problems, that's what.

I'm stuck to my easy chair again, probably for at least the next week.

Page: << 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 >>

FairTax     Stop Sylvia Browne