Wednesday, April 25, 2007

The Physics of Sex Widget Game

In the tradition of physicists through the ages, I've attempted to make a very simple model of a complex system.

This image is screen shot from a game that simulates some of the feedback issues involved in sex. It's the Physics of Sex equivalent of a spherical cow.

To play the game, you have to stimulate the floating ball with your mouse. If you do it properly, the meter on the left will show your progress. Ultimately the meter will top out and the ball will turn red and throb. I'm not going to tell you exactly how to stimulate the ball. Just like learning about the birds and bees in real life, you'll have to discover some of the details on your own. Also just like real life, it's not that hard to figure out.

If you want to give it a try, click the image to download the Widget file. If you've never installed a Widget before, you'll first have to install the free Yahoo Widget 4 engine. It should work automatically on a Mac.

The game is a bit simple and not too challenging at the lower levels(although I haven't beaten it at Level 12 yet), but it illustrates three things about sex

1. Positive feedback (provided by the level meter) helps you achieve the ultimate goal.

2. Negative feedback is necessary to help you follow the ball and apply the appropriate stimulation at the apprpriate place. That is, when the mouse cursor is too far from the ball you adjust by bringing it back.

3. The simplified orgasms simulated by playing the game, which I claim are similar to the type that men have most of the time and women have at least some of the time, are essentially the result of integrate-and-fire circuits.

The first two points are probably familiar to most folks, but integrate-and-fire circuits are a bit more obscure. Basically, this type of circuit measures some input and when it reaches a trigger point it fires.

Avalanches look a lot like integrate-and-fire circuits - snow builds and builds on a mountain until it's unstable, then the slightest disturbance can send it careening down the slope.

Neurons are often described as leaky integrate-and-fire circuits. That means that the correct input can push the neuron toward firing, but if the stimulation stops the neuron will gradually lose memory of the stimulus and return to its resting state.

Picture it in terms of a leaky balloon. If you blow it up far enough, it will eventually pop. But if you take a break before it blows, the air will slowly escape and the balloon will deflate.

I made my widget leaky too. If you stimulate the ball, the meter will climb, but stop for a while and the meter will slowly drop back to zero.

Another aspect of integrate-and-fire circuits is the fact they often experience a refractory period after firing. During that time, they don't respond to any stimulation at all. If you blow up a leaky balloon until it pops, the refractory period corresponds to the time it takes you to find another balloon. Men are intimately familiar with the refractory period that follows sex, and older men know that it seems to take longer to find their balloons with every passing year.

I added a refractory period to my model as well. If you manage to get the ball to throb, you have to wait a few moments before it's ready for you to start again.

I adapted the game from an even simpler game called Focus developed by Aaron McBride of MIT.

Check out the thousands of other widget in the Yahoo gallery. Lot's of them are as useless as the Physics of Sex widget, but plenty of them are handy and/or cool, and most are made by amateur programmers with an idea and a little free time.

Read the rest of the post . . .