Return to site

Game civilization v

broken image

In Civilization's technology tree, nuclear weapons are generally unlocked only after democracy, so Gandhi's aggression level would have already spiked by the time India became nuclear-capable. The negative value would therefore result in an integer overflow, with the value being stored as 255 and Gandhi becoming about 25 times more aggressive than the most aggressive leaders in the game. However, the aggression level was stored as an 8-bit unsigned integer variable that could only store values in the range from 0 to 255 (or 2 8-1).

broken image

In the case of Gandhi, this would lead to a negative aggression level of −1. Once the AI changed its government form to democracy, which was preferred by peaceful nations such as India, its aggression level decreased by 2. Indian leader Mahatma Gandhi was the only leader in the game with the lowest possible aggression rating of 1 and, as a result, was only able to wage defensive wars. According to other sources, there was a scale from 1 to 12. Integer overflow can be explained with an odometer: on a six-digit odometer, the zero is preceded by 999999 and in an eight-bit integer variable zero appears after 255Īccording to the legend, each leader's artificial intelligence in Civilization had a parameter that described his or her aggression on a scale from 1 to 10, with 1 being the least aggressive and 10 being the most aggressive.