Why is Gandhi a nuclear asshole in Civilization?

Didn’t you ever notice that India’s peaceful leader, Gandhi, has been dropping nukes around? From the first game up to today he is dropping nukes.
This is not just our mind playing tricks on you, noticing things that are not there, nor a myth being accepted as a fact.

So why does this happen?
Well in the original game, each leader in the game would have an “aggression” rating. Now to store that aggression rating the original developers used an unsigned byte variable. Which means that the possible values this variable can hold go from 0-255.
Gandhi, being a peaceful leader, was assigned the initial value for aggression as 1.

Where is the problem?
Well when a player adopted democracy their aggression would be automatically reduced by 2. Given that aggression was stored in an unsigned variable, value of -1 could be stored. An overflow would occur and Gandhis aggression would become 255, which is the maximum possible aggression value and so he would start dropping nukes as soon as possible.

This are the effects of a simple overflow bug.
Now this has been fixed in later versions of the game but as an easter egg his nuclear love has been kept around. For example in Civilization V, while his regular diplomatic approach is more peaceful than other leaders, he’s also more likely to drop nuclear bombs when pushed, with a nuke “rating” of 12 putting him well ahead of the competion (the second highest rating being at 8, while most leaders are between 4 and 6).

So the next time you see Gandhi laying waste to an entire continet by dropping nuclear bombs know that it’s planned. He’s meant to be an asshole, he is programmed that way.

Leave a Reply