Sunday, October 16, 2005

MY BRAIN IS FAILING
I just found a horrid bug in the neural network code within Democracy. Democracy is built like your brain, a big interconnecting matrix of neurons and neural effects (in your brain i think they are called dendrites?). If a neuron changes its value, it changes the 'voltage' of its signal to its connecting neurons. Thats how a rise in taxes will affect GDP etc etc.
To add to the simulation, there are some neurons that I have designed to be 'sluggish'. For example, if you introduce a new policy on car emmissions, that policy takes effect over 15 months, regardless how high or low its set. this is the time it takes to put the law in effect and see the benefits, and is separate from the scaling caused by the policy slider.
That means that the first month after introduction, the policy has 1/15th of its normal effect. This worked fine.
To make the game run reasonably fast, Democracy only updates a neuron when it has to. So I wait until one of my inputs change before recalculating. This is done on a 'push' system, so it's my job as neuorn A to tell neuron B that i just got activated /cancelled or adjusted, so it needs to re-evaluate the input from me.
That all worked fine.
But the one thing I had forgotten was to force an update on connected neurons for any policy that was still being implemented. So if you introduced car emmissions limits and didnt touch it, you were only getting 1/15th of the effect, at least until something else affected air quality, you loaded / saved or adjusted the level of the policy itself.
In practice this meant you hardly noticed, because enough stuff went on to ensure that neurons 'caught up'
But it was still a bug.
I'm going to do a new release soon with a few more dilemmas, maybe a new policy, new meu artwork and my new 'manifesto' feature. As a result of this, I might push the price up for new buyers to $24.95, or even introduce a new 'gold' version at the higher price.
hmmmmmmm

Links to this post:

Create a Link

<< Home