I've had a theory about why we sleep and dream for many years, and recently recorded a video that explained my theory. I decided that the next step is to write a software simulation of the relevant aspects of a brain that will hopefully exhibit the various sleep patterns based purely on a few simple equations related to cell metabolism.
I've written most of the simulation already, with the main actors - Simulator, Brain and Neuron - written in Ruby and the web interface written using Rails. I use ProtoChart to display the results of the simulation in real time.
The simulation is of a 50x50x50 "cube" of neurons (125,000 total) that are locally interconnected. Each neuron accumulates metabolic waste when it's awake and disposes of it when it's asleep. The probability of a neuron switching between states is based on its metabolic waste levels and the state of the neurons it's connected to.
I'm also postulating (and there is some anecdotal evidence for this) that there's a continuous 90-minute cycle throughout the day that stimulates neurons according to the position in the cycle. In addition, I'm simulating light levels because they are an external source of stimulation.
Here's a graph that only shows the daylight levels (yellow) and the 90 minute cycle (blue). Next week I'm going to incorporate neuron activity and hopefully reproduce the typical sleep/REM cycles from basic principles. I'm keeping my fingers crossed!
p.s. I will open source the simulation if anyone is interested.
Comments