February 4th

Today I have an experiment. When I sat down to work, I took notes on the changes I was making and the results I was getting. My purpose was to keep track of all the changes so that I wouldn’t repeat mistakes, but the resulting document is a pretty good indication of the workflow in a typical day. I have provided explanatory notes in red. Here it is:

Increase energy conservation relaxation time from 3 to 10
not much effect on BAU
(BAU means “Business As Usual” scenario, in which the player does nothing. A starting test scenario)
some effect on C1000, but not enough
(C1000 refers to the scenario in which the player raises carbon taxes to $1000/ton, a ridiculously high number)
Eliminate $30 cap on energy price, converted price stepsize to 0.1% of price
(price stepsize is the increment for the loop that calculates supply from price)
BAU score went up and BAU energy price increased from $8 to $11
C1000 hung, energy supplies simply cannot meet demand, price at $10**18.
(hung means that the supply algorithm got caught in an infinite loop)
Square energyPrice term in denominator for GDP, increase economicOptimism by 4x to compensate
(energyPrice term inhibits GDP, that’s why it’s in the denominator)
BAU comes out OK
C1000: energy price had three plateaus, because GDP bounced around. Where's the instability? Probably GDP relaxation
Reduce GDP relaxation from 4 to 1.
(GDP relaxation is the ‘shock absorber’ algorithm that dampens rapid changes)
BAU hangs!
Increase GDP relaxation from 1 to 2
BAU looks good, -10;
(-10 is the score in that scenario: -10 million points)
C1000 @ -9; still oscillating
(C1000 generates a score of -9 million points)
Decrease GDP relaxation to 1, add println tc.thisYear
(I wanted to see the year in which the algorithm hung)
BAU hangs in 2013, traced flow, discovered that energy production was prevented from rising fast enough to meet demand.
Implemented test for maxing out, with correction
(new algorithm that checked to see if energy resources were maxing out due to the cap on growth)
BAU hangs in 2036; GDP wants to grow by 30%!
(obviously the GDP is growing way too fast. Why?)
Hmm... Can't have GDP growing that fast; do I throttle it at GDP or Energy Price? GDP is better; do I revert to GDP relaxation or direct intervention? They're the same. So I must return GDP relaxation to 4, but I need some way to damp oscillations. How? They arise from the interaction between GDP relaxation and energy resource growth limits. Perhaps I should replace those hard limits with soft limits. That would require replacing the actual price of energy with an inhibited price due to capital costs. No, that's just too messy, and it would probably induce oscillations of its own.

Rerun with closer examination:
Nuclear seems too small; in the BAU scenario it should be much bigger
(nuclear energy was making too small a contribution to the energy mix)
Increase supply of nuclear by 10x
Now BAU has gotten really crazy. Nuclear growth keeps energy price down, which inhibits solar and wind; later coal and oil make a big comeback.

Remove maxOut restrictions
(eliminated the cap on growth established by the maxing-out test)
An experiment: remove limits on resource growth
BAU: restores to a good result (-6)
C1000 is strange: fossil fuels disappear instantly, replaced by nuclear
(fossil fuels disappear because of the steep carbon tax, but they shouldn’t disappear overnight)

Take nuclear back to earlier supply
BAU comes out OK, -9, but nuclear does seem too small
C1000 (-6) shows a huge depression at outset, but recovery is quick.

Increase nuclear by 3x; restore limits on resource growth to 50%
BAU shows little change (-9)
C1000 (-9) shows a depression at outset, followed by steep growth, then steady decline. Energy Price at $22! The boom following the depression was nuclear taking over, then running out. Nuclear peaked at 30K BgOges -- that's ridiculous that the entire boom to bust in nuclear spanned just 10 years.

Go back to limits on resource growth of 25%
No significant effect on BAU (-9)
C1000 hangs again

Run test to see size of demand growth.
Oscillation resulting in depletion of nonrenewables; price skyrocketed by renewables couldn't meet demand.

I *MUST* have a means for dealing with supply restrictions. Either let supply grow to meet demand or return unsatisfied demand.

Let's see what happens with unsatisfied demand:
C1000 hangs because of round-off error. Basic problem lies in the fact that I establish an endPrice above which the algorithm returns zero (because the linear algorithm goes negative at the endPrice)
The results are insane. GDP of $5 trillion with Total Energy Production at 37K BgOges!

I'm wandering too far off into the reeds. Time to snap back and take a bigger view.

So I added a little algorithm that produces a tiny bit of additional renewable energy each time the price goes up. This insures that the system doesn't hang. But we still have big oscillations and something really crazy: with a GDP of only $30 trillion (half the initial GDP), we're burning nine times as much energy. What?!?!? To make matters worse, energy conservation is at 186% of initial value. We need 9 times as much bang to generate half the bucks?!!? There's something seriously wrong here!

Perhaps the problem lies in the role that food production plays in the GDP. What if I remove that term from the GDP formula? No, that didn't do it. I think I figured it out: it's the economic optimism term. Every turn, GDP grows by some 3% to 5% just because of a term I call "economic optimism". This reflects the natural progression of technology, specialization, and globalization. I could try to reduce this value, but the system is extremely sensitive to changes in this value. Here's the current equation:


I'm tempted to change it to this:


This would permit economic optimism to imply less economic energy intensity (fewer joules required per dollar of GDP output). I think I'll give it a whirl.
That helped a bit, but it certainly didn't solve the problem. The energy intensity of the economy just keeps increasing. Why?

(Break to eat lunch, change cat litter, dig up leaking water pipe, and take a nap)

I'm going to try squaring the conservation term. It runs from 1.00 initially and steadily increases with price, so it should permit reductions in energy intensity; apparently it doesn't go far enough.

Wait a minute! I just had another thought: what if we calculate GDP in reference to the original GDP rather than incrementally, like this:

GDP = initial GDP * ratio of energy prices * ratio of conservation...

That makes a lot of sense. It might also avoid some of the oscillatory behavior that has been so disruptive. Let's give it a try...

Wait again! Notice that the above equation doesn't include any contribution from energy production. It says that GDP increases or decreases based on the price of energy and the degree of energy conservation. As is, this will cause GDP to fall, because conservation can't keep up with price change. Besides, it's too simple a closed loop: rising GDP -> rising energy price -> rising energy conservation. There's no balance point in this: it's either all up or all down. Have I been pursuing a chimera all this time? Is my core system just plain wrong? If so, why has it worked so well until now?

I think it's time to break off and sleep on this.