The best kittens, technology, and video games blog in the world.

Thursday, November 26, 2009

Why CO2 emissions will not fall before 2050

Do the milkshake by imchaudhry photography from flickr (CC-NC-ND)
In my previous posts I explained why emissions are unlikely to fall below current levels before 2050, and why due to peak heating occurring long after peak emissions we do have a very long term problem. Conclusion being - geoengineering is pretty much inevitable.

In this post I'd like to talk about two things - what the world will look like in 2050, and the Climategate.

First, the Climategate. As shown by the leak, scientists from East Anglia University engaged in some highly unethical practice, such as knowingly fudging data to support their thesis, violating FOIA and hiding data to the point of deleting it to avoid release, and organized bullying campaigns against scientists with the opposite views. This makes them bad persons, and if God existed, they'd suffer in Purgatory for it / or got shitty reincarnation in the next life / or something like that. Fortunately for them there is no God, so they will get off scot-free with it.

But this behaviour, while highly unethical, doesn't really seem to change the main conclusion of IPCC reports that anthropogenic releases of greenhouse gases have caused significant warming, and are likely to cause a lot more in the future.

The only consequences for climate predictions I can think of is that it might damage people's opinion of credibility of climate change science disproportionally to the breach of proper scientific practice (which did occur, but were fairly minor), thus reducing political will to act on climate change, and increasing the problem. But then, I doubt the damage will be that big.


Now to the main subject - world in 2050. There's no question that we'll stop emitting ever increasing amounts of greenhouse gases at some point. We already have at least four ways to entirely solve the problem even without any significant technological breakthroughs: nuclear, solar thermal, solar photovoltaic, and wind. But the question of when is a big one, and I doubt it will happen soon.


As I wrote in previous blog posts, in 2050 population will be around 9-10 billion, per capita GDP will be around current EU levels, and so will per capita energy use. But energy use and carbon emissions are not that closely connected - there are gains to be made in efficiency, both nuclear and renewables emit little in terms of greenhouse gases, so that doesn't directly imply much about per capita CO2 emissions (nor emissions of other greenhouse gases).

Let's make a simple table - what would have to change for 2050's CO2 emissions to be equal to 2009's CO2 emissions. For simplicity let's assume every country's per capita emissions will be the same for now. If some countries don't take their share of the burden, others will have to.

CountryPopulation (mln)CO2 emissions (mln ton)CO2 emissions per capita (ton/person)
20092050Change20092050Change20092050Change
China1334 [19.6%]1462 [15.7%]+9.6%6103 [21.5%]4458 [15.7%]-27.0%4.573.05-33.3%
USA308 [4.5%]397 [4.3%]+28.9%5752 [20.2%]1210 [4.3%]-79.0%18.683.05-83.7%
EU-27499 [7.3%]424 [4.5%]-15.0%3914 [13.8%]1293 [4.5%]-67.0%7.843.05-61.1%
Russia141 [2.1%]104 [1.1%]-26.2%1564 [5.5%]317 [1.1%]-79.7%11.093.05-72.5%
India1173 [17.3%]1572 [16.9%]+34.0%1510 [5.3%]4794 [16.9%]+217.5%1.293.05+136.9%
Japan127 [1.9%]109 [1.2%]-14.2%1293 [4.5%]332 [1.2%]-74.3%10.183.05-70.1%
Other countries3214 [47.3%]5253 [56.4%]+63.4%8293 [29.2%]16021 [56.4%]+93.2%2.583.05+18.2%
World6799 [100.0%]9322 [100.0%]+37.1%28431 [100.0%]28431 [100.0%]+0.0%4.183.05-27.1%

Data sources: emissions, population projections. EU-27 is used as European Union will most likely expand before 2050, and I don't want considerations like that to complicate matters.

Right now just six big entities - China, India, USA, EU-27, Russia, and Japan - emit over 70% of global CO2. But poor countries will develop, and this means more emissions. India's emissions are ridiculously low now - due to poverty - but once Indians get richer they will want cars. They will want pretty things. This will use energy, and this will emit CO2. The same story will take place in the "rest of the world" category (which unfortunately mixes small rich countries with big poor countries, obscuring the change).

What kind of emission cuts will the big emitters have to do just to counteract population growth of the world and economic growth of poor countries? Assuming the burden will be equally shared, USA will have to cut by 83.7%, or to 1/6th of current per capita levels. EU, Japan, and Russia will have to cut by about 2/3 per capita, and even China will have to cut by 1/3 per capita, in spite of so much economic development still being ahead of them! Other countries will have a mix of increases for the poor, and very significant decreases for the rich.

Now how likely is this scenario? I quite doubt we'll actually achieve equal sharing of burden.  Cuts for developed countries people talk about tend to be around 15% levels by 2025, so presumably around 40% by 2050, and even these are best case scenarios.

Intrade thinks that odds of any cap and trade system being established in USA by 2011 is about 50:50, and that says nothing about levels of caps, and severity of loopholes passed due to industrial lobbyists' money. After that it's Palin's administration as Krugman says, so don't hope for any meaningful limits. In general, people vote for current party when economy is good, and vote against current party when economy is bad, no matter who's guilty. Current predictions of American unemployment for 2012 are so high, that Democrats are very likely to be voted out of power unless they get their act together.


Anyway, 40% by 2050 is nowhere near enough to even keep 2050's emissions equal to 2009's! So rich countries, especially USA, are not providing the leadership here. What are the chances that poor countries will voluntarily take most of the burden of reducing carbon emissions all on their own? I'd say extremely slim.

And, most importantly... even if reductions from the table did happen, and 2050's emissions were at 2009 levels and falling, this still leaves us with massive global warming problem as peak warming happens long after peak concentrations, and peak concentrations happen long after peak emissions.

What brings us to where we started - there's simply no realistic scenario under which geoengineering can be avoided.

Thursday, November 19, 2009

Medieval 2 Total War Concentrated Vanilla 0.08

In love by Έλενα Λαγαρία from flickr (CC-NC-SA)

Time for another version of my Medieval 2 Total War minimod. It doesn't contain that many changes over 0.07.

The biggest change is fixing the "everyone hates you" bug I wrote about a few days ago. That doesn't mean everyone will love you now - but now you have the option of acting chivalrous, getting good reputation, and if you do your alliances will be more likely to survive, your enemies will be more likely to sign peace with you instead of insisting on silly wars until you destroy them and so on. The game still makes everyone hate you if you're too strong, or if you're playing on very hard difficulty, so don't worry about it being too easy.

Rubber swords bug

The second bug fixed is the extremely well known "rubber swords" bug. In Medieval 2 Total War units have between 1 and 3 weapons, usually 2. It's absolutely necessary for missile units, which need some sort of missile weapon, and also some secondary melee weapon in case they have to fight man to man. But many units have two melee weapons - most knights have a lance for charging and sword for close combat.

Like many things this all makes sense in theory. The problem is with pikemen. They have long pikes for fight in formation, and swords for close combat. Unfortunately their logic for weapon choice is pretty much the same as with knights and their lances - instead of trying to use pikes as long as they can, they switch to swords almost immediately after first charge. And with very weak swords, no shields, and weak armor pikemen make for really horrible infantry.

If it was just a matter of them being weak, it wouldn't be that big of a deal - there's plenty of weak units in game. The real problem is that they switch to rubber swords too early, and you don't see any pike action at all! Removing their "rubber swords" completely makes them much stronger, and behave properly.

Now there's a valid counterargument, that is raised on Total War forums every time the rubber sword bug is mentioned - the game was balanced with rubber sword behaviour, Pikemen are extremely cheap, and so shouldn't be expected to be much good.


It has some validity - Pike Militia costs only 150 florins, half as much as Town Militia at 290, so making them into some sort of super-unit would unbalance the game. Recruitment costs are only meaningful in battle mode (that is mostly multiplayer). In campaign mode, cost of an unit is cost of its recruitment, upkeep over multiple turns, and of buildings necessary to recruit the unit.

Compare scenarios of building required buildings (other than basic things like walls and barracks up to city watch and you need anyway), recruiting 10 (for vanilla, or 15 for mod as buildings are 50% more expensive) units from it, keeping them for 5 turns in garrison, and 5 turns in field. Costs per unit would be:
  • Town Militia: 290 recruitment + 0 garrisoned + 625 in field + 0 only basic buildings = 915
  • Genoese Crossbow Militia: 570 recruitment + 0 garrisoned + 500 in field + 0 only basic buildings = 1070
  • Peasants: 110 +  450 garrisoned + 450 in field + 60 mustering hall = 1070
  • Italian Spear Militia: 460 recruitment + 0 garrisoned + 625 in field + 0 only basic buildings = 1085
  • Peasant Archers: 220 recruitment + 500 garrisoned + 500 in field + 120 bowyer = 1340
  • Peasant Crossbowmen: 220 recruitment + 500 garrisoned + 500 in field + 360 practice range = 1580
  • Pike Militia: 150 recruitment + 0 garrisoned + 625 in field + 960 militia barracks = 1735
  • Mailed Knights: 680 recruitment + 1250 garrisoned + 1250 in field + 0 only basic buildings = 3180
  • Lancers: 930 recruitment + 1600 garrisoned + 1600 in field + 2760 all stables = 6890
Recruitment costs are simply a tiny fraction of total costs! Now this depends on which building you'd build anyway (you always need walls; city watches increase public order, shipyards increase trade etc. so you might buy them anyway), how many units you're going to recruit from each such building, how long you're going to keep them garrisoned, and how long in field and so on. These are not definite numbers - but they should give you some idea. It's quite easy to spot the most overpowered and most underpowered unit on the list here - Genoese Crossbow Militia is as cheap as Peasants, but they're ridiculously stronger - it's one of the best missile units in game versus absolutely the worst unit in game!

So anyway, I did some experimenting with pikemen. I've heard about two solutions on Total War forums - either remove their secondary weapons, or make their formations tighter. I made two AIs fight each other - 3 Pike Militia versus 3 Italian Speak Militia. Results were:
  • Normal Pike Militia - lost, 86% dead vs 37% dead
  • Tight formation - lost, 83% dead vs 58% dead
  • No secondary weapons - won, 66% dead vs 80% dead
  • Tight formation + no secondary weapons - lost, 88% dead vs 88% dead
The only reason tighter formations work is by making it harder for the enemy to get real close, and making pikemen use their pikes longer. Now AI was clearly unbelievably dumb here - happily charging on the pike wall. Manual results were:
  • Me normal Pike Militia, AI Italian Speak Militia - I won, 65% dead vs 89% dead
  • Me Pike Militia without secondary weapons, AI Italian Spear Militia - I won, 37% dead vs 85% dead
  • Me Italian Spear Militia, AI Normal Pike Militia - I won, 1% dead vs 20% dead
  • Me Italian Spear Militia, AI Pike Militia without secondary weapons - I won, 4% dead vs 13% dead

So properly used, Italian Spear Militia is far stronger than Pike Militia - properly used means flanking, and not blindly charging onto the pike wall. Nothing too complicated. Claims of Pikemen being overpowered without secondary weapons seem greatly overstated.

Scaling down previous changes


I decided to scale down a few changes. Cavalry no longer costs 50% extra - nerfing them was fun, but now that most infantry gets free upkeep in castles, and pikemen actually work, cavalry is decently nerfed anyway.

I reduced extra ammo for missile infantry from +100% to +50%. It doesn't really make that much difference, and I'd rather stay closer to vanilla values unless I have a good reason not to.

Full list of changes

Here's the full list for reference
  • Fixed standing bug
  • Fixed rubber swords bug
  • Castle garrisons free for basic infantry
  • City garrisons twice as big
  • King's purse x2
  • Rebel spawn rates 10x lower (supposedly, I have my doubts if it works)
  • Missile infantry ammo +50%
  • Bodyguard unit sizes halved
  • Building construction times all 1 turn
  • Mining income x2
  • Building costs other than mines +50%, mines x3
  • When defending a settlement, towers are activated from much greater distance
  • Wall and gate strength x5, but tower strength unchanged
  • Tower fire rate x2, but only for non-flaming ammo
  • Spy costs x2
  • Campaign movement speed +75%
Here's the download.

Tuesday, November 17, 2009

Dietary consequences

Brainsucker by Kevin Steele from flickr (CC-NC)

This post is a follow-up to The myth of 5 a day - people never ate that much fruit and veg.

"Because" is not a logical connective of classical logic, it's not possible to construct a truth table for "A because of B" statement. Even when A and B are true, it's really quite difficult to prove that causality flows from B to A - correlations, no matter how strong, don't prove causality.

On the other hand, while proving such statement true is hard, proving it false can be very simple - if either A or B is false, "A because of B" must necessarily be so too. So "crime is on the rise because of violent video games" can easily proven to be false, because the consequence part ("crime is on the rise") is false - therefore collapsing the whole argument before we get anywhere near analyzing causality.

"Guns prevent crime" / "death penalty prevents crime" arguments collapse equally fast - countries with more guns and more executions don't have less crime - so we don't even need to think much about causality here. That doesn't mean that reverse statement "gun control prevents crime" is necessarily true, causality might be missing even if correlation exists. By the way there is actually some pretty good research indicating that violent movies deters violent crime, at least in short term - apparently because violence-loving young males go to theaters to watch violent movies instead of getting into real crimes. It's not too unlikely that it might be the same with violent video games.


Now that we're past the obligatory cat and the obligatory detour, let's get back to diets. There's a widely repeated claim, which basically goes "people are fatter than in the past because their diets have much more fat, especially animal/saturated fat than in the past, and nowhere near as much fruit and vegetables as in the past". The consequence is undoubtedly true - obesity is on the rise pretty much everywhere.


On the other hand, the part about too much (saturated/animal) fat, and not enough fruit and veg is entirely wrong. We actually eat a lot less fat; the fat we eat is increasingly unsaturated vegetable fat; and we eat a lot more fruit and vegetables than in the past.

Take a guess - what are the biggest sources of calories in American diet? Here's the list for 1961 and 2003, in kcal/day. I don't believe 1961's diets were perfect, and I'd love to have data earlier than 1961, but that's as far back as FAO statistics go.


Vegetal products consumption increased a lot - 1871 (65%) to 2708 (72%) kcal/day, while animal products consumption stayed constant in absolute terms, and decreased a lot proportionally - 1010 (35%) to 1045 (28%).

Top vegetal products:
  • cereals without beer - 627 to 832 (of which wheat - 504 to 603; rice 26 to 94)
  • sugar and sweeteners - 515 to 657 (of which sugar 453 to 320; HFCS 56 to 331)
  • vegetable oil - 276 to 606 (of which soybean oil 157 to 492)
  • alcoholic beverages - 108 to 150 (of which beer 68 to 100)
  • "fruits" without wine - 79 to 117 (of which oranges 14 to 32)
  • potatoes - 77 to 100
  • maize (without HFCS, maize oil etc.) - 59 to 98
  • "vegetables" - 63 to 77
  • beans - 32 to 30
It's quite surprising list - foods which can be considered traditional like wheat, potatoes, and beans, are a really small portion of the whole. Modern vegetal products like soybean oil (unsaturated fat), sugar+HFCS (sugar, obviously not fat) dominate the list.

And for animal products:
  • meat - 335 to 451 (of which poultry 64 to 197; pork 127 to 132; beef 125 to 115)
  • whole milk - 304 to 199
  • animal fat products (butter etc.) - 199 to 116
  • cheese - 48 to 149
  • eggs - 67 to 55
  • butter - 65 to 40
  • fish and seafood - 19 to 28
Total fat and protein consumption in g/day:
  • Animal fat - 69g to 71g (63% to 46%)
  • Vegetable fat - 40g to 83g (37% to 63%)
  • Total fat - 110g to 155g
    What increased here was poultry - the approved lean meat; and cheese - the most vegetarian of animal products; what decreased most was whole milk, butter, eggs, and animal fats as whole category.

    This is as far away from the conventional story as it gets. Proportionally to their diets, people eat less fat, a lot less of the supposedly "unhealthy" saturated animal fat, less milk and butter (saturated fat), vastly more "healthy" vegetable fat, more lean meat, more vegetables, more fruit. Sugar+HFCS consumption increased a lot in absolute terms, but stayed fairly constant proportionally, even decreasing slightly from 17.8% to 17.5% of all calories.

    So it's not that people lack personal responsibility - people adjusted their diets to follow every single point of conventional dieting advice. To keep blaming people's eating habits for obesity epidemic is to blame the victim. You cannot claim that people are fat because they don't follow dietary advice, as they actually do!

    The only alternative is that the conventional advice doesn't work. Eating more fruit and veg, switching from animal to vegetable fats, reducing proportion of fats in diet and so on - does not make you slimmer. I won't answer the question if the advice is merely useless or actually harmful in this post (causality in reverse direction) - that would require a lot of research. But we sure know it doesn't work.

    I doubt that another round of minor adjustments to the advice (look at all reversals on butter vs margarine), let's say by insisting on more fish oil this time, are likely to magically make it work now, in spite of consistent track record of failure.

    I don't have enough data to give you reliable advice, but the most obvious alternative would be eating reasonably-sized portions of the most delicious food you can think of. This will usually be something fairly traditional (even not necessarily from your culture), often but not always with plenty of animal products in it, and extremely rarely with much sugar or vegetable oil. If type of food doesn't matter, and only portion size does, then you can as well enjoy it, instead of torturing yourself with diets.

    For the record, author of this post has BMI 23. Never trust overweight people to give you diet advice.

    Monday, November 16, 2009

    Why everyone hates you in Medieval 2 Total War

    Knight cat by doozzle from flickr (CC-NC)Short answer - because of a really stupid bug in data files. If you want it fixed, download corrected file and put it in your C:\Program Files\SEGA\Medieval II Total War\data\ directory or similar. For the long version, read on.

    Reputation and standing

    First, technicalities. The game keeps track of two important numbers - your reputation (also called global standing), which is global, and standing with a particular faction. Both are numbers between -1 (the worst possible) and +1 (the best possible).

    Good behaviour increases your reputation, and your standing; while bad behaviour decreases it - as expected. There are two kinds of deeds - some actions are unconditionally good or bad - they simply add or subtract from your reputation/standing. If you do 5 good deeds and 4 bad deeds of this kind, it's pretty much the same as just doing 1 good deed.

    The other kind use what the game calls "normalization". This "normalization" operation has two parameters - target value, and "divisor". It takes your current standing or reputation, and moves it by 1/divisor towards the target.

    For example if your current standing is 0.6, then "normalizing towards +1 with divisor 10" will result in standing of 0.6 + (+1 - 0.6)/10, that is 0.64. If your initial standing was -0.8 instead, the result would be -0.8 + (+1 + 0.8)/10, or -0.62. In other words - if your reputation/standing is bad, good deeds improve it a lot, while bad deeds damage it little. And if your reputation/standing is good, good deeds improve it little, but bad deeds damage it a lot. In our example, the good deed had value of +0.04 for the well-reputed faction, but +0.18 for the ill-reputed one.

    Normalization to some value with divisor 1 is equivalent to completely changing your reputation/standing - by our equation initial + (target - initial) / 1 = target. Doing both good and bad things of this kind will move your reputation towards neutral values around 0.0, even if one kind of deeds is more frequent than the other. It's all quite sensible in practice.

    Obviously we want our relations with different factions to be high - factions that hate us will be more likely to start wars against us, disrespect treaties and so on. Even with enemies we would prefer higher standing, in case we want to sign peace treaty someday.

    What changes reputation

    Most reputation changes are absolute.

    First, your reputation normalizes to 0 with divisor of 200 anyway, which is extremely slow - it takes 140 turns to halve your good or bad reputation. Having an ally normalizes your reputation to +1 with divisor of 400, and being at war (except with rebels obviously) normalizes your reputation to -1 with divisor of 800. These are extremely small divisors, but if you have multiple allies, or multiple enemies they add up.

    On top of that, some generic good and bad deeds:
    • "Taking back" settlement, which you gave by diplomacy (but then do you ever give settlements by diplomacy?): -1.0
    • Attacking an ally: -0.5
    • Canceling alliance (also when forced by one of your allies attacking another - tough luck): -0.1
    • Bribing settlement (it's virtually impossible in Medieval 2 Total War anyway, unlike in Rome Total War where you would be doing it all the time): -0.15
    • Breaking treaty terms (I'm not sure what counts here): -0.15
    • Military assistance to your ally in battle: +0.1
    Treatment of prisoners is probably the most important source of reputation. If you put your prisoners up for ransom, it doesn't affect your reputation either way - this is the standard expected behaviour in Medieval warfare. What changes it is either releasing or executing prisoners.
    • Releasing prisoners: +0.01; +0.025 for groups of over 80 soldiers; +0.025 if any family member was released.
    • Executing prisoners: -0.01; -0.025 for groups of over 80 soldiers; -0.025 if any family member was executed.
    I'll get back to this later in more detail.

    And here we arrive at the bug. Treatment of civilians is supposed to affect your reputation:
    • Occupying a settlement peacefully: +0.05
    • Sacking a settlement: -0.02
    • Exterminating population: -0.05
    But due to a bug the first never happens. Here's the data file:
    ;------------------------------------------
    Trigger 0103_occupy_settlement_increase_global
    WhenToTest OccupySettlement

    FactionStanding global 0.05
    FactionStanding target_faction normalise 1.0 20
    FactionStanding target_allies normalise 1.0 40
    ; FactionStanding target_enemies normalise -1.0 40

    ;------------------------------------------
    ;Trigger 0102_city_razed_decrease_global
    ; WhenToTest CitySacked

    FactionStanding global -0.05
    FactionStanding target_faction normalise -1.0 10
    FactionStanding target_allies normalise -1.0 20
    ; FactionStanding target_enemies normalise 1.0 20
    Semicolon means code is commented out and inactive. The first event describes what happens when settlement is peacefully occupied. The second is old sacking code, probably from Rome Total War times. It's supposed to be commented out, but only trigger was commented out, the effects were not. So the results are equivalent to:
    ;------------------------------------------
    Trigger 0103_occupy_settlement_increase_global
    WhenToTest OccupySettlement

    FactionStanding target_faction normalise 1.0 20
    FactionStanding target_faction normalise -1.0 10
    FactionStanding target_allies normalise 1.0 40
    FactionStanding target_allies normalise -1.0 20
    So not only you don't get the promised reputation bonus, your standing with the target and their allies gets lower, instead of higher - they're actually happier when you sack their settlements than when you occupy them peacefully, what is nonsense! By the way, all websites about Medieval 2 Total War I've seen seem unaware of the bug, even though it's trivial to test.

    Just see how different the game is with and without bug. If you take 6 neutral settlements, your reputation should rise to 0.3 (Reliable); with the bug it will stay at 0.0 (Mixed). This has huge effect on how others will treat you!

    Standing

    Now that we know about your reputation, how about standing? There's extremely long list of rules related to the Pope, crusades and such, which I'll cover later. For normal factions it's much simpler. I'll spare you the numbers, but basically:
    • Factions with high reputation get liked more, factions with low reputation get liked less. Thresholds are -0.4, -0.1, +0.1, +0.4.
    • Depending on difficulty, your standing tends to drift towards +1.0 (very easy), 0.0 (medium), -0.5 (hard), and -1.0 fast (very hard).
    • Factions which are strong get liked less, factions which are weak get liked more.
    • There's small advantage to having the same religion.
    • Your allies grow to like you more, and your enemies to like you less. Allies/enemies of your allies/enemies change their standing accordingly, by smaller factors. If this works correctly, you can see two big coalitions developing, and it often happens.
    There are miscellaneous actions that increase or decrease your standing. In addition to the obvious acts of war, bribing, sabotage, and spying decreases your standing - spying much more than I thought - to -1.0 with divisor 20, and with divisor 80 for all allies. I'm not sure if it counts only when spy is caught, but it's far higher than I expected. Only 13 acts of spying will move perfect standing all the way to neutral.

    What doesn't affect your standing is merchants buying each other out, your princesses marrying (and stealing) their generals, and your priests preaching on their territory. Marrying your princess to their faction heir is worth a lot - +0.2 instantly, and normalization to +1 with divisor 20 every turn.

    Adding it all together - the way it's supposed to work is that increased standing due to high reputation should counteract decreased standing due to your size and difficulty level (at least on hard, maybe not so much on very hard). But because you don't get reputation points you deserve for peacefully occupying settlements, there's no balance, and everyone gets to hate you.

    The Pope

    It's only vaguely related to the bug this post is about, but as I started talking about Medieval 2 Total War standing system, I can as well describe how it works with the pope.

    First you get points for building religious building - from 0.02 for small churches and chapels, to 0.2 for huge cathedrals, and additional 0.2 for your first huge cathedral, and additional 0.2 if it's the first huge cathedral in the world - so you can get +0.6 with the pope for just one building, after first getting +0.52 for first cathedral in the world.

    On the other hand destroying religious building for money makes the pope hate you, about 5x as much as building them. But as you never really destroy buildings anyway, you probably don't need to bother yourself with it too much.

    Crusade get you huge bonuses with the Pope - but only arriving at target region, and taking the target settlement, not just joining. You get bonuses for every general, and every unit, but a lot more if you send your heir (+0.2) or your leader (+0.6) to the crusade.

    Something I didn't know about before reading the code is that attacking Orthodox factions while on crusade (usually taking Constantinople on the way to Jerusalem or Antioch) gets pretty high penalties with the Pope. You'll get your papal standing back if you actually conquer your target, but if the crusade is just an excuse for sacking the Byzantine Empire the Pope will not be happy. As you probably already know, attacking non-excommunicated Catholic factions while on Crusade, or Islamic factions while on Jihad is prohibited by the rules.

    Recruiting priests and doing papal missions get you points. Getting excommunicated loses you -1.0 points, obviously. Getting your cardinals promoted get you points (0.1 per cardinal), and there are even more points in elections - Pope from your country means +0.8, from allied country means +0.4, enemy country's Pope means -0.6, and voting for the winner pope is +0.2. Surprisingly I don't see any negative points for voting for the wrong candidate, even though in-game text insist on wrong vote being a major transgression.

    You also lose points with the Pope for being at war with other Catholics. And look after heretics in your lands - if the Pope has to appoint an Inquisitor, it costs you immediate -0.2.

    Now it's going to more or less even out - you will build churches and recruit priests anyway, especially if you're close to Islamic or Orthodox regions - what will score you major Pope points. And you'll lose points for inevitable wars with other Catholics. You're supposed to get extra points for good reputation, but as I said, you won't due to the bug.

    What to do with prisoners

    There's one more thing I wanted to write about - treatment of prisoners. You naturally know that you shouldn't normally sack or massacre settlements, as these will be your subjects, but why do anything except execution with the prisoners? Let's do some game theory:
    • Value of reputation gained or lost: A (by marginal view it's supposed to be the same either way, it's not exactly true, but let's keep it this way for simplicity)
    • Value of money gained from ransom: B
    • Cost of enemy getting units back: C
    So payoffs are:
    • Released: A-C
    • Ransom accepted: B-C
    • Ransom rejected: 0
    • Executed: -A
    It helps to know if the enemy is likely to accept the ransom or not. Usually the answer is clear - due to war they don't have any money, so they cannot pay you. In this case if A>C, you release prisoners, otherwise you ask for ransom and don't get it. A>C is the usual situation, you've just defeated their armies, so they probably weren't that good anyway. The biggest exception I can think of is when you're on your way to take a weakly defended settlement, and these armies would join the defenders and make your work much more difficult when released. Or when it's really late in game, you're at war with everyone, and you don't care about reputation anyway.

    How about when you think the ransom will be accepted? First, decision between release and ransom. If A-C>B-C, release straight away. Unless you captured their leader (10000) or heir (5000), reputation will be almost always more valuable than money - mostly because for reputation purposes they're treated just like any other general, but for ransom purposes they're a lot more valuable. Except your enemies are quite unlikely to have that much money, so it's not a common occurrence.

    How about executing them? It only makes sense when C>2A, and C>A+B. Reputation cost of execution is twice as high, as now you have to actually execute the prisoners, instead of just request ransom. Your loss due to release of troops is very rarely that high. Even tiny group of soldiers released or executed will make a difference of 0.02 reputation points, about as much as you need to counteract being at war with someone for 16 turns. If you act chivalrously wars improve your reputation instead of damaging them. Paradoxically the worst kind of war for your reputation is a prolonged war in which nothing happens.

    This is all a lot less true once the bug is fixed. Due to the bug releasing prisoners is the only way to significantly improve your reputation, and you need that just to stay positive, as you'll lose it due to broken alliances, executions of prisoners, and sackings of settlements that will inevitably happen sometime during the game. Having allies and assisting them militarily just won't be enough - once big major start, getting allies will get really tough, especially if your reputation isn't very high (chicken and egg...), and assisting stupid bots requires way too much of effort.

    But without the bug, you should have decent reputation from just straightforward conquest, unless you kill and sack on your way - and value of A gets a lot lower.

    To fix or not to fix


    With minor bugs the question is clear - definitely fix them. But this bug is so big, and changes the game so much... Not only AI will like you more, AI will like each other more too. And acting chivalrous will be much more important - with buggy M2TW you really had to go out of your way to get decent reputation, but with the fix if you behave you'll reap diplomatic rewards.

    Most likely the fix will make the game significantly easier - as long as you act chivalrous it will delay your wars and make your enemies much more likely to agree to cease fire. On the other hand it will make AI factions hate each other less too - so who knows, maybe they'll unite against you? At some point you'll be big enough to overwhelm your reputation-based bonus, so maybe it doesn't matter that much...

    I'll try my next game with the fix, and tell you how it went. It's a really long post for a bug that's basically 3 missing semicolons.

    Thursday, November 12, 2009

    Things I read

    Sakura last days here... by fofurasfelinas from flickr (CC-NC-ND)As some people expressed interest in RSS feeds I follow, here they are.

    For every feed I want to include some recent good item (if there's none, then obviously I should just unsubscribe). Standard fair use disclaimer here (some comics are explicitly CC-*, but most aren't; it's all legit fair use, no matter what Rupert Murdoch thinks).

    Webcomics

    First, I love webcomics, and there's plenty of those in my feed. Most of them are "one self-contained funny story per item" type, which work very well with RSS readers.

    Abstruse Goose is sort of xkcd-ish, crudely drawn smart jokes about science and pop culture, less obsessed with girls than xkcd, and without mouse-over tooltips.
    oglaf.com calls itself "Comics. Often dirty.", and is exactly that. Most of it is NSFW, so if you need something to read while sipping a morning coffee in the office, and waking up, it's probably not it. This sample is from quite far back, not because more recent ones weren't good, but because it was hard to find one that was SFW. It's also very nicely drawn, unlike most comics here.
    Cyanide & Happiness is an extremely well known comics, strangely with multiple people drawing it, all in more or less the same style. I'll use this opportunity to rant about one infuriating thing about their RSS feed is that very often comics get into RSS feed before they get live on their website (it happened like 4 times just last month).
    Order of the Stick is something completely different - instead of being "one funny a day", it actually has a multi-year story of a team of adventurers playing Dungeons&Dragons-inspired campaign and making fun of the rules as they go. Well, at first it was "make fun of D&D vaguely connected strips" format, I think it got significantly worse as it tried to get serious, and most of the humour is about OotS characters, not D&D. Here's one really old strip that you'll get even if you don't follow OotS.
    Saturday Morning Breakfast Cereal is another one of those good funny comics - it delivers daily, and has fairly mainstream appeal.
    xkcd probably got more cult following than any other webcomics ever. In addition to fans, there are blogs of xkcd hate, and even RSS-able Web 2.0-style website Is xkcd shitty today - their answer always being YES, most often unfairly. It can get really cutesey and sad, or mindlessly evil, or philosophical, or anything else. There are many meciocre xkcds, but it reaches pure comics awesomeness level more often than any other comics I know. And don't forget the mouseover tooltips.
    Zero Punctuation isn't really a webcomics - it's a weekly sarcastic video game review. It's universally loved as it tends to find faults in games and make fun of them, while most of the so called "reviewers" just rehash press releases. Here's one old review of one particularly good game:

    Reading

    All right, I sometimes read and not just look at pretty pictures.

    538 is probably the only blog about political polling in existence. It has some highlight, such as predicting results of 2008 American elections much better than anyone else, and finding out that one polling firm was a total fraud, and all their results were fabricated.

    It contains a mix of detailed analyses of particular elections (not terribly interesting, unless you happen to live there), criticism of bad polling and bad analysis, and probably most interesting of all - big picture view of shifts in public opinion. Unfortunately it's mostly about USA, and rarely writes about Europe and other places.

    Less Wrong is a spin-off of Overcoming Bias, or what Overcoming Bias used to be before becoming Robin Hanson's personal blog. It's filled with insightful posts about human rationality, and biases in thinking, and philosophy of thought. It also has scary amount of discussion that's only understandable to insiders. Some examples:
    There's plenty more, and I even sometimes post there.

    Marginal Revolution is one of the Freakonomics-style "economics made fun, now with more anecdotes" blogs. It publishes insanely often, five posts a day pace is entirely typical. Unlike this blog, which gets more like five posts a month. A lot of it is reposts of interesting things they found somewhere else, what saves you from following too many feeds. Like repost of this bathroom scales that tweets your weight for all world to see as motivating factor, and experiments with placebo coffee.

    Actually 90% of Marginal Revolution is reposts with tl;dr summaries, comments, and counter-arguments. It's pretty good this way. Sometimes they get into crazy libertarian mode, especially when discussing health care, but it doesn't happen that often.

    Paul Krugman's blog, and New York Times column (which is like blog, just with longer posts). Krugman can get annoyingly dogmatic about whatever the left wing of Democratic Party believes at time, and often gets horribly "wonkish" about tiny details of macroeconomic analysis. Some good posts:
    Krugman can be as bad as dogmatic libertarians, but at least it's bad in the opposite direction. It would be highly amusing if Paul Krugman and Tyler Cowen were locked into one room for a week, and forced to Aumann.

    Overcoming Bias used to be Eliezer's blog about rationality, then Eliezer moved to Less Wrong, and Overcoming Bias is all Robin Hanson's. Robin has three big ideas: everything people do is about signaling status, modern medicine doesn't work, and prediction markets are universal solution to every problem. Robin has way too many crazy libertarian moment, so if your libertarian-phobia is stronger than mine do not read. Some good recent posts:
    Peak Oil Debunked used to fight peakoiler doomsdayers during their high days of doom. The doom didn't come, peakoiler movement sort of died, so there are few posts these days, but it was really good back then. Most posts are just facts and figures, something peakoilers hate with passion. (my recent post about geoengineering and its followup were in similar style)

    Some nice posts:
    Schneier on Security is probably the least controversial of blogs on my reading lists - most of them do politics from time to time, but it's hard to be angry at Schneier about anything. Some good posts:
    And the last feed I follow - the War Nerd. Unfortunately it hasn't been posting much since The Decider left. He's way better at predicting course of events on the Middle East than the mainstream media - mostly because mainstream media is just rehashing White House press releases instead of doing any independent thinking. Some good pieces, most pretty old:
    Plus countless pieces about Iraq and Afghanistan of course.

    Enjoy your reading.

    Tuesday, November 10, 2009

    Inevitability of geoengineering, part 2

    oven Scamp by bildungsr0man from flickr (CC-NC-ND)In my previous post, I explained why geoengineering to counteract global warming seems inevitable. To summarize, data suggests that between 2009 and 2050:

    • World population will increase by about 45%
    • Poor people are getting a lot richer, average wealth will increase by 200%
    • This means they will use a lot more energy than now
    • Neither renewables nor nuclear power seem likely to be able to replace them by 2050, at realistic growth rates
    • Therefore only plausible source of that energy are fossil fuels, and we already have plenty of examples of countries drastically increasing their fossil fuel use and CO2 emissions extremely quickly.
    • Reduction in energy use by rich countries is nowhere near big enough to counteract this
    What changes around 2050?
    • World population is expected to more or less flatten out around 2050. We're already adding fewer people each year than during peak growth, so growth is sublinear, let alone expecting it to be exponential. Long term projections need to be taken with a pinch of salt, but it's as safe as it gets to expect much slower growth in second half of 21st century than now.
    • While world economy will keep growing, average GDP per capita will be more or less where EU levels are now, and energy use past this level doesn't increase that much.
    • In all likelihood, sources of energy other than fossil fuels will be far better developed than now, so responding to any new energy needs by more renewable energy instead of by more coal power plants, will be much more likely.
    Now I don't know exactly when we will have peak CO2 emissions, and at what level - somewhere vaguely around 2050, and at levels twice current seems likely, as decades before it will have much higher pressures to increase fossil fuel use than decades after.

    The first problem, is that peak CO2 concentrations will happen long after peak CO2 emissions. Here's a random graph with emissions on the top, and concentrations on the bottom, color-indexed. In all scenarios, including almost immediate halving of emissions, peak is somewhere in 21st century, but CO2 concentrations keep growing long past 2300, peaking hundreds of years from now!!!
    Now I don't actually believe CO2 emissions will be falling that slowly - once we figure out how to use renewable energy cheaply, we'll be able to switch almost all our use to it, so peak concentrations will be somewhere during 22nd century.

    It gets worse - many effects of CO2 concentrations, like temperature change and ocean acidification, lag it significantly. So peak warming and peak acidification will occur much later than peak concentrations. With 2050 emission peak, and 2150 concentration peak, we might have 2250 climate change effects peak. (last figure completely made up, as it depends on too many details, different effects have different lags, and nobody makes serious estimates that go that far into the future). So even with a lot of optimism about alternatives to fossil fuels, we will have to deal with massive effects of global warming.

    This gets us back to geo-engineering. No matter what we do now, short of a genocide and collapse of global economy (world economy grew during the recession, and fell only a few percents in the worst hit countries; this isn't the collapse I'm talking about), our choices are geo-engineering and adapting to higher temperatures.

    Disclaimer time

    Now disclaimer time. I'm making the common mistake that anthropogenic CO2 emissions are responsible for all global warming. This is not true - added CO2 is only 2/3 of it, the rest being methane, nitrous oxide, CFCs. But there are good news here - their lifetimes in atmosphere are much shorter - while we're talking tens of thousands of years for CO2, it's only 12 years for methane, and about 100 for nitrous oxide and CFCs, so peak concentrations will occur relatively quickly after peak emissions. And in fact, peak concentrations of methane and CO2 seem to have already happened or be happening about now. In longer perspective global warming problem is CO2 problem, with only small methane and nitrous oxide contribution.
    The second disclaimer is that there are two kinds of geoengineering - solar radiation management (stratospheric sulphides, cloud seeding, albedo changes and such), and carbon capture and storage.

    With solar radiation management we let warming happen, and create equal negative effect.

    With CCS we could pull more CO2 from atmosphere than we're emitting. If we went this way peak concentrations might happen much faster after peak emissions than otherwise, and due to rapid fall in concentrations peak warming will be earlier and smaller.

    I'm mostly talking about solar radiation management, as we already know how to cool down the planet with current technology and for ridiculously small money; while CCS solutions don't seem to be anywhere near scalable enough soon enough.

    Any alternatives like fussion power, nanotech, and new kinds of renewables that people love to talk about won't seriously affect emissions until long after 2050 even in the most optimistic scenarios.

    The myth of 5 a day - people never ate that much fruit and veg

    cool cat by psyberartist from flickr (CC-BY)NHS (to American readers - it's the British socialized medicine destroying UK, and coming to destroy your country too now) strongly promotes the idea of eating "5 servings of fruit and vegetables" a day, with which I disagree on so many levels.

    Here's a quick summary of the alleged benefits, straight from their website:

    • They're packed with vitamins and minerals.
    • They can help you to maintain a healthy weight.
    • They're an excellent source of fibre and antioxidants.
    • They help reduce the risk of heart disease, stroke and some cancers.
    • They taste delicious and there's so much variety to choose from.
    That's all nonsense.
    • You are extremely unlikely to have vitamin and mineral deficiency, and if you suspect some (or want to get pregnant, have symptoms of anemia etc.), get real multivitamin pills, or supplements of the right kind. Most fruit and vegetables are fairly unimpressive as for their vitamin contents anyway - for all practical purposes most fruits are just water and sugar, and have been selected this way by farmers, as larger and sweeter fruit sells better, and vitamins don't have taste.
    • There's absolutely no evidence linking fruit and vegetable consumption to weight - you get stable weight when number of calories taken balances number of calories expended, what's possible on any kind of diet, including a really delicious one based on loads of meat and cheese and chocolate that NHS would not approve of. I'll get back to this point later.
    • Fibre doesn't do anything - it just passes through your digestive system and goes right into the toilet. "Antioxidants" are one of those terms that make me rage, as they've been stripped from their original scientific meaning, and turned into pure value judgment, and not even of the right value. Your cells know how to deal with oxidative stress already. That's what they're evolved to do over the last 1.7 billion years. They have plenty of ways to do so. And increasing amount of antioxidants will not help your cells. Meta-analysis of all available data shows clearly that eating more of them doesn't do anything for you, and can even be harmful.
    • There's been no proper long term trials of that kind. There's very few proper long term trials of anything related to diet, and those that are performed invariably show that simple diet advice (eat this, don't eat this) doesn't work - and unless your diet is spectacularly wrong you'll be fine as long as you have adequate exercise, decent portion control, and don't smoke.
    • As any kid will tell you, fruit and vegetables taste awful - if they were delicious people wouldn't need NHS's bothering about them. Do chocolate and ice cream need NHS campaigns? Obviously not. That's because chocolate and ice cream are tasty, while fruit and vegetables are not, at least not in those ridiculously large amounts.
    So it's wrong on all counts. Anyway, that's not what I wanted to post about - I just get distracted easily. Oh, something shiny. Oh, funny cat. I go for all distractions. Now back on track.

    What I wanted to talk about was the myth that people used to eat enormous amounts of fruit and vegetables - 5 servings a day or more as NHS advices, and that's it's something modern that they do not do so now. Let's look at FAO data, annual consumption per capita of fruit and vegetables, as far back as it goes (that's unfortunately not that far back). I included some particularly fat countries (USA, Mexico), a particularly healthy country (Japan), random countries from Europe (France, Germany, Poland, UK), and totals for Europe and World. For interest of science I'll say I selected countries and criteria before I had a first look at the data, so it's not a biased selection, but feel free to look at others.

    Vegetable consumption, 1961 to 2003, increased in all selected countries:
    • France - 150kg to 142kg
    • Germany - 49kg to 90kg
    • Japan - 95kg to 104kg
    • Mexico - 25kg to 58kg
    • Poland - 91kg to 100kg
    • UK - 60kg to 91kg
    • USA - 93kg to 123kg
    • Europe - 90kg to 117kg
    • World - 63kg to 117kg
    Fruit consumption (excluding wine), 1961 to 2003, also increased in all selected countries:
    • France - 53kg to 95kg
    • Germany - 79kg to 113kg
    • Japan - 29kg to 54kg
    • Mexico - 57kg to 120kg
    • Poland - 18kg to 47kg
    • UK - 55kg to 115kg
    • USA - 76kg to 113kg
    • Europe - 65kg to 88kg
    • World - 38kg to 62kg
    Fruit and vegetables together, 1961 to 2003:
    • France - 203kg to 237kg (+17%)
    • Germany - 128kg to 203kg (+59%)
    • Japan - 124kg to 158kg (+27%)
    • Mexico - 82kg to 178kg (+117%)
    • Poland - 109kg to 147kg (+35%)
    • UK - 115kg to 205kg (+79%)
    • USA - 169kg to 236kg (+40%)
    • Europe - 155kg to 205kg (+32%)
    • World - 101kg to 179kg (+77%)
    So consumption of fruit and veg in the last four decades drastically increased - and so did obesity, heart disease and so on. Increase in UK and Mexico were particularly large - and these are some of the fattest countries in the world, something that was not true in 1961. In increased least in Japan - by far the healthiest of developed countries. NHS was really successful at making Brits eat 5 servings a day - making 63.8% of them overweight in process. So much for fruit and veg consumption helping fight obesity? Here's the list of selected countries ordered by fruit and veg consumption and percentages of overweight people in them:
    • France - 237kg - 40.1%
    • USA - 236kg - 74.1%
    • UK - 205kg - 63.8%
    • Germany - 203kg - 60.1%
    • Mexico - 178kg - 68.1%
    • Japan - 158kg - 22.6%
    • Poland - 147kg - 47.5%
    Is it just me, or do countries that eat more fruit and veg tend to be fatter, not thinner? The answer is probably a lot more like this instead:
    And it's not like 1961's fruit and vegetable consumptions were unusually low - they were in fact unusually high by historical standards - normally it was impossible to eat any other than those that grew in your region, in harvest time, what all amounted to very very little compared to what people eat now with globalized industrial agriculture.

    The take home message: Ignore NHS; eat chocolate, ice cream, beef, cheese, or whatever else you find delicious. In reasonable amounts.

    Thursday, November 05, 2009

    Inevitability of geoengineering

    Cat and fire by Michel Filion from flickr (CC-BY)
    I want to write a quick post showing some arguments about inevitability of large scale geoengineering which I find extremely convincing. I'm sure I won't convince that many people, most have made up their minds already.

    First, look at list of countries by CO2 emissions. In 2006 global emissions were 28.43 billion tons per 6.55 billion people, or 4.34 ton/person. World population is still growing and is estimated to stabilize at levels around 9.5 billion for 2050-2100, which is the time in question.

    Now let's see what would happen if everyone got to current European standards of living, and European CO2 emissions, which are 7.84 tons/person. This would result in CO2 emissions of 74.5 billion tons, or 2.6x times current levels. This number is already quite optimistic - it makes a huge assumption that all countries with higher CO2 emissions like US, Japan, Canada, Australia, Russia etc. scale them down quite considerably.

    Now a brief discussion is in order on why numbers like that are relevant. First, I assume that there won't be a massive genocide, or nuclear warfare, or pandemic, or anything else that could drastically reduce population levels. The last time there was a significant reduction in population levels was 1340s. None of the world wars, or any other events even stopped population growth - in fact people tend to reproduce a lot more during times of crisis, than during times of peace and prosperity, so it would need to be the biggest war, pandemic, or other kind of failure in history to significantly reduce population levels. This assumption is probably the safest.

    The second assumption is that the rest of the world will grow quite quickly. World GDP/capita is currently $9,774 PPP. EU GDP per capita is $30,513 PPP. If world economy grows at per capita rate of 2.8%, then by 2050 world average GDP will reach current EU levels. This coincidentally is almost exactly annual per capita growth rate of the world economy of the last 30 years. Unlike with population, where predictions are quite solid, here there are more reasons why growth could be significantly slower, or significantly faster than predicted. We just had a completely unexpected global recession for a fairly obvious example. And not so long ago we had massive completely unexpected boom in China and then India, so it can go both unexpectedly badly and unexpectedly well. Still, 2.8% is a pretty decent first estimate.

    I want to write a bit more on the subject of economy. Many people are sceptical about the idea that the "poor" countries will ever attain levels of economic development seen in rich countries. But the rich-poor divide is illusory. As you can see yourself with Gapminder, the divide is long gone and most countries are in the middle. World average life expectancy today is higher than in most richest countries in 1950s years ago. World average life expectancy in all but one countries is higher than world average 100 years ago - all that in spite of wars, malnutrition, malaria, HIV, and lack of clean water in many of them! Life in countries considered by many to be "permanently poor" is vastly better than it was in Europe of your grandfathers, and rapidly improving. To think it will somehow suddenly stop is to ignore history.

    Development can happen extremely rapidly - world's largest CO2 emitter has been China for a few years now, per capita emissions of which increased by factor of x2.2 between 1990-2006. Likewise for India, growth was x1.6 during that time. Even for big countries not typically associated with rapid growth you have high growth - x4 for Vietnam, x2.4 for Thailand, x2.3 for Malaysia, x1.9 for Indonesia, x1.5 for Pakistan, x1.4 for Brazil and Nigeria and so on (and these are all per capita rates, their total emissions increased far more). Developing countries are catching up fast.

    Let's look at past performance of world CO2 emissions. Between 1992-2007, world's emissions increased by 38% - mostly driven by rapidly developing countries like China and India. Even developed countries weren't terribly successful - US and Japan had significant increases in emissions, and EU's stayed pretty much even, and nominally decreased mostly due to early-90s' collapse of heavy industry in former communist member countries. Even if developed countries got their act together and implemented reductions that were agreed on in Kyoto Protocol, they would still be swamped by just Chinese increases, resulting in net emission increases.

    And the outlook for the next couple of decades doesn't look terribly promising. Intrade markets, thin as they are (and forgive me lack of links, but their website is virtually unlinkable), think it's extremely unlikely that China and India will agree to any CO2 limits anytime soon, and have pretty low opinion on what reductions developed countries will agree to - chance of agreeing to 10% reduction by 2025 seems to be about even, and there's quite a big difference between agreement and implementation (especially due to possibility of accounting shenanigans of land use changes and such), and such reductions would be swamped by developing countries increase. And in any case the 74.5 billion tons number already assumes that developed countries average will get reduced to current EU levels.

    If you hope on peak oil to make 74.5 billion tons/year kind of number impossible, not only peak oil doesn't seem to be happening, coal production grows insanely fast, and estimates of "peak coal" talk about mid 22nd century.

    Alternatives to 74.5 billion tons a year

    So with business-as-usual, we'll be emitting enough CO2 to get the entire planet stir-fried. What would be alternatives?

    First, either outright genocide or indirect genocide by limiting economic growth of developing nations - remember that poverty kills hundreds of millions of innocent people and causes vast suffering. Not only is it unlikely to happen, it would be probably the worst scenario of all.

    Second, learn to live in a warmer world. This isn't necessarily going to be as bad. It's hard to imagine anyone who would like to have their children die of malaria and diarrhea just to satisfy some rich smug liberals. People who measure costs of limiting CO2 emissions usually focus on limits in States, or EU - but this is nonsense! Big increases don't come from SUVs, but from bringing poor people to more civilized standards of living, and limiting that would be disastrous. Costs of just taking global warming would be much less than the genocide that would ensue to keep poor people in their place. I think this scenario isn't entirely implausible - there were quite a few cases in history where international cooperation completely collapsed, and in externalities cases like CO2 emissions, this is a possible result.

    The third solution, and we're getting somewhere now, would be to sever the link between GDP and CO2 emissions. This is surprisingly hard. Yes, it's trivial to move from Hummer to Prius, but the problem is people who cannot afford either yet, but will want some means of transportation eventually. And they will want electricity - coming from coal most likely. The alternatives look pretty bleak - nuclear power, and large-scale hydroelectricity, both provide only 3% of total primary energy use now (or about 15% of electricity each). All fancy types of renewable energy together don't even add up to 1%. A surprisingly large amount of energy is "traditional biomass", or wood and agricultural waste used for heating and cooking (but then, estimates of it seem to vary wildly). Other than that, right now we're entirely dependent on fossil fuels.

    A popular idea of high standards of living without corresponding increase in energy use seems pretty unlikely to me. Yes, we might be able to break the correspondence at some point, but energy use per capita in poor countries is so low, it's simply bound to drastically increase.

    Much more promising path is energy generation without fossil fuels. Our best chance so far was with nuclear power. Unfortunately we suddenly stopped what looked like extremely rapid exponential growth in late 1980s after Chernobyl disaster - estimated 4000 people will die due to increased radiation exposure (much higher estimates based on linear no-threshold model can be safely ignored, as LNT model is known to be empirically completely wrong).
    By ridiculously naive estimations, if this growth continued exponentially as it seemed to have up to Chernobyl, nuclear energy would provide around 20% of total energy production today, or half of all oil could be eliminated. Now this kind of extrapolation is ridiculously naive, but you should give it some thought.

    So could we switch to nuclear at ridiculously rapid pace? We would need over 50 times as much nuclear capacity to generate enough energy to cover increased energy use by 2050, what seems ridiculously optimistic by any standards, not to mention nuclear proliferation issues. It looks somewhat less ridiculous when expressed as 10% a year growth (or doubling every 7 years like pre-Chernobyl), but it's just not going to happen.
    There aren't that many renewable options. Current global energy consumption is 15 TW, and it will be about 39TW by 2050 by extrapolation. The only large scale renewable energy source we use, hydroelectricity, is nowhere close to our needs, and neither is geothermal really, if we look at what small fraction of it we can practically extract thanks to high local concentrations. We're left with just two then - wind, and solar. We would need to use 5% of all wind energy of Earth to fill the energy gap.

    In 2008 wind power had 121GW of installed peak "capacity", and produced 260 TWh of energy (what corresponds to 30GW of actual production). It would require order of 1000x increase in wind power, or 19% a year growth, to make it fill the energy gap. And the actual growth is actually fast enough at 29% in 2008. But there are clear diminishing returns here - best locations will be taken, and massive subsidies cannot really scale to TW levels.

    The other alternative is solar power. Just Earth-based solar is so plentiful that using even 0.02% of solar power now, or 0.045% of it in 2050, we can replace all of world's energy use. And it doesn't stop there, with space-based solar we can get numbers many many orders of magnitude larger. It would sort of need a space elevator, but we might get there by 2200.

    Anyway, while solar is undoubtedly our long term future, it doesn't look that bright in the short term. There's only 15GW of solar thermal installed, and mere 0.6GW of solar thermal. And these are capacity numbers. We're talking x10,000 increase to cover the energy gap, or 25% a year increase, or x200,000, 35% per year for solar thermal. Now these numbers are actually what we see now, but as I said for wind, these are all based on massive subsidies, and there's no evidence that they're scalable to TW range at all.

    By the way all this is based on assumptions that all energy is basically equal, and all greenhouse gas emissions is energy production. Neither of these are true - electricity is relatively easy to replace with renewables, at least if we ignore their intermittent character, but transportation much less so. And even with 100% solar electricity-based economy, there would still be some significant sources of greenhouse gases like methane from agriculture - so whatever we estimate here is bound to be overly optimistic.

    With all this said, thanks to better energy efficiency, and widespread use of renewables, it's quite likely that humanity energy use by 2050 will be much lower than baseline number of 74.5 billion tons a year. On the other hand expecting it to be vastly lower than current emissions is just extremely unlikely.

    And here comes the final solution - without genocides, without unexpected revolution in either nuclear power or renewables, we will have much more CO2 in atmosphere in 2050 than now. And due to massive lag it has, it will keep warming Earth for a very long time after we finally get our emissions to decrease. So if we cannot agree to live in warmer world, we have to geo-engineer to survive the next century without massive and irreversible environmental change.

    Nature did some real life large scale geoengineering testing for us, and it works without major side effects (you probably haven't even noticed the experiment in 1991). Economic estimations put it in ridiculously cheap range - some schemes are estimated to cost just 375 million dollar a year, or just 17,000 Toyota Priuses (seems like a highly relevant unit of measurement) - for comparison replacing every American car with a Prius would cost 5 trillion USD, and it would still do very little towards limiting global CO2 emissions. And stratospheric sulphur isn't the only solution, just the one we have best data on (by the way it's not about polluting more, only about moving less than 1% of existing pollution to higher layers of atmosphere).

    So the alternatives are:
    • Outright genocide
    • Indirect genocide by forced poverty
    • Accepting the warming
    • Increase in nuclear or renewable energy far beyond anything that can be realistically expected in this timeframe
    • Geoengineering
    Guess which one is the least bad?

    Now I just need to blog on abortion, and I win blogging controversy bingo.

    Sunday, November 01, 2009

    Why Malthusianism refuses to die

    kitten in a basket by pixn8tr from flickr (CC-NC-SA)
    It's astonishing how popular Malthusian catastrophism is, in spite of such spectacular evidence to the contrary. As disaster keeps failing to come, its details are changed, but the core prediction that we're all doomed doesn't budge. In this post I'd like to explore some evidence against Malthusian ideology - as with so much evidence to the contrary, it like creationism long ceased to be anything else than ideological view.

    Classical Malthusianism

    But first, let's say what I'm criticizing. Malthus' idea was that population growth is exponential, while food production growth is arithmetic, therefore we're all going to fall back into extreme poverty due to overpopulation, until we're poor enough to be dying in sufficient numbers to counteract that.

    The second part is, and I'm not making this up - "therefore, we should starve and abuse people who lost their jobs in a recession to lower taxes on the rich". That's a forerunner of the Real Business Cycle theory if there ever was one. The predictable result of being tough on the poor was that the working poor were starved to the point of eating pig fertilizer, beaten, and sexually abused.

    But that's not the worst of Malthus-inspired politicians - they decided to starve one million poor people in Ireland. During the alleged "famine", Ireland was a major exporter of food, with its food production even at lowest point estimated to be enough to sustain population twice as high as it had. And there was well known solution to such famines already tried in 1782–83 of temporarily stopping food exports, but those good Malthusians would rather have a bit of a genocide than to stand in ways of profits.

    Anyway, I'm not here to criticize consequences of Malthus' ideology, just its factual basis. It's been 211 years since Malthus' infamous essay, how far behind are we in food production?

    Oh wait, actually food production looks pretty exponential on this graph, while population growth looks rather linear. It's not even that - according to virtually all projections population growth is slower than linear, and world populations are due to stabilize fairly soon, here's Wikipedia:
    Unfortunately I haven't found any useful food production statistics going all the way back to 18th century, but by now it should be very clear that these relationships do not hold.

    Yet, Malthusianism refuses to die. The most popular mid 20th century's neo-Malthusian Paul Ehrlich famously wrote in 1968:
    The battle to feed all of humanity is over. In the 1970s and 1980s hundreds of millions of people will starve to death in spite of any crash programs embarked upon now. At this late date nothing can prevent a substantial increase in the world death rate...
    Or more specifically - "I have yet to meet anyone familiar with the situation who thinks India will be self-sufficient in food by 1971" and "India couldn't possibly feed two hundred million more people by 1980."

    That was in the middle of yield increases so spectacular they caused major difficulties to even harvest it all (High yields led to a shortage of various utilities — labor to harvest the crops, bullock carts to haul it to the threshing floor, jute bags, trucks, rail cars, and grain storage facilities. Some local governments were forced to close school buildings temporarily to use them for grain storage. as Wikipedia says). India became net exporter of cereals by 1978.
    You'd think that after two centuries of predictive failures people would have given up, but no. The latest neo-Malthusian fad just a few years ago was "peak oil". It sort of fizzled since, but in case you forgot, here's an awesome YouTube video describing peakoilnik ideology while dancing:



    "There won't be much food anyway, as oil is used to make fertilizers and pesticides. Up to two thirds of the world population may not make it. Four billion people may not survive."

    Because as they say, we're basically "eating oil" as the meme says. It doesn't bother them much that oil is used at no step of fertilizer production - it's all natural gas, and entire 3-5% of world natural gas (1-2% of world energy use) is spent on fertilizer production (not even as energy source, more as convenient hydrogen source easier than electrolysis of water), but alternatives based on coal, and hydroelectricity are well known and used depending on local availability. China already produces most of its fertilizer with coal. The first commercial hydroelectricity-based fertilizer plant was opened in 1905, over a century ago, and in case you're wondering use of electric plowing equipment dates to late 19th century.

    Pesticide production is so ridiculously low, by some back of an envelope estimates takes about 0.06% of world's oil, and is trivially replaceable by coal if need be (I know of no serious estimates, as it's too small to bother anyone with a clue).

    What a Malthusian world would look like

    So why so many people believe in Malthusian-inspired catastrophism? I have a two-fold hypothesis. First, some people just enjoy beliefs that we're all going to die. It seems that virtually every disaster scenario, no matter how plausible or not - attracts countless believers.

    But there are people smarter than that who still believe in Malthusianism. Here's the second part of my hypothesis. When people look at history, to see if it matches some theory, they just look at things that would be observable if theory was true, and see if there are present. They don't do proper Bayesian updating.

    Here's a simple example - let's say you have a theory which says that clash of civilization causes warfare. Then the naive thing to do would be to look at history, note a few wars between civilizations, and take it as evidence for the theory. It would also be wrong, as far more numerous wars were fought within civilizations, and proper Bayesian thinking must look at both.

    So let's take a look at evidence for Malthusian worldview against the null hypothesis that food production is just like any other commodity, and not any more connected to population than production of clothes, bricks, or paper.

    If Malthusianism was true, food production per capita would be pretty much constant - because any increase in food production would result in increase in population, and decrease in food production would cause mass starvation, and adjust population accordingly. But if Malthusianism was false, food production per capita would also be pretty much constant, because what would be the point of growing more food if there was nobody to eat it? So there's no evidence either way.

    If Malthusianism was true, everyone would be poor. Not only is this ridiculously false, now, historical estimates of life expectancies vary wildly from 18 to 60 for the same time period.

    Malthusianism predicts almost all food production would be in whatever generates highest number of calories per hectare. Non-Malthusianism predicts food production would be much more varied - and it is so. Just the fact that we're keeping farm animals, which by their nature only destroy and not produce nutrients, proves Malthusianism wrong. There might be exceptions, but most grazing lands would produce more calories when cultivated, not to mention Malthusian ridiculousness of feeding animals human food as we do.

    If Malthusianism was true, any sudden decrease in population, due to wars, famines and such, would result in rapid rebound, as agricultural capacity existed to support much larger populations, proven by its previous existence. If Malthusianism was false, population would have no particular reason to rebound. Here the evidence is very clear - there are numerous example of major population loses which were not recovered for centuries. Two best examples affect entire Europe, which used to have high populations at height of Roman empire, then fell to very low levels and didn't recover until 12-13th centuries, almost a millennium later. Second fall was due to Black Death, recovery from which wasn't complete even two centuries later.

    Malthusianism predicts that it would be extremely unlikely for vast amount of spare arable land to exist - yet this was exactly the situation for centuries in early Medieval Europe, with vast tracks of unused lands.

    Malthusianism predicts that famines would happen during times of higher population a lot, while almost never happening during time of low population. But even a brief look at Wikipedia's List of famines shows plenty of major famines both during population lows of early middle ages (5th century famines in Western Europe, 750's famine in Spain, 809 famine in Frankish Empire, 963-964 in Ireland, 1005 in England, 1016 all Europe, 1030-1032 France, 1066 England again, 1097 France again). There were supposedly 95 famines on British Isles alone during Middle Ages. In spite of very low population levels, we can see plenty of them, and we'd probably know about more if it wasn't for horrible Medieval record keeping. Notice that during all that time there was plenty of undeveloped arable land!

    During second period of low populations after Black Death, there are major famines 1390 in England, 1481-1483 in France, 1504 in Spain, 1518 in Venice and so on. I'm not even going to mention that modern periods of European population explosion had fewer famines than any other time in history.

    Non-Malthusian view correctly predicts that famines and population levels are completely uncorrelated. Famines are caused not by the mythical "overpopulation", but commonly by wars, government action (like in Ireland, and 1930s' Ukraine, notice how democratic governments have virtually spotless track record of no famines, in spite of plenty of agricultural disasters), and most of all - simply by major delay between increase in agricultural inputs and outputs. It doesn't matter that there's plenty of unused land around, developing it would take years, and plenty of labour, capital, seed, and farm animal input, before any food was grown on it - all of which being in short supply during famine anyway. By the time food was growing the famine would be long over. To give you some indications of time scales involved, settlers in new developments were freed from any taxation for up to 24 years. During that time net effect on food production would be negative.

    Most of all, current overwhelming explosion of wealth is completely and utterly incompatible with Malthusianism. Even the second worst country in the world - Angola - has life expectancies far greater than world had 100 years ago (one tiny country which doesn't has 26.1% HIV infection rates, and is too poor to afford HIV drugs - hardly a Malthusian reason). In spite, or maybe even due to, population explonion, world's average life expectancy is 66.57 now. This is level not reached by even the richest countries before 1930, and by most developed countries well into 1940s an 1950s.

    However hard I try, I cannot find any evidence for even very broadly constructed Malthusianism that cannot be explained as well or better by treating food as a normal commodity. So worry not - we're not doomed.