為什麼《文明5》的設定里,甘地特別喜歡造/用核彈? 有什麼背景、事實支持這個設定嗎?

請看CIV V Interactive AI Bias Value Chart 甘地造核彈和用核彈的point都是12 ! 其他文明的各個decision都不超過10.

我自己玩過的文明5 中, 如果把甘地拖到後期不處理(聖母心...不想揍他...) 確實就會看到他很快出Manhattan Project然後找Uranium...


據說這是向早期文明遊戲致敬的一個搞笑設計。

在文明1裡面,印度是最和平的文明,但問題是有個設計上的疏漏。每個文明都有自己的「侵略性」這一隱藏屬性,數值是1到10。民主政體能讓侵略性降低2點。而印度本身的侵略性是1點。這個數值用的是一個無符號單位元組整形變數存儲。其結果就是一旦印度進入民主政體,侵略性就爆表了,變為255點。印度就忽然變成了全世界最瘋狂的戰爭販子。

而更加糟糕的是,民主和核武器的研發靠得很近。基本上印度進入民主以後沒幾個回合就研發出了核彈……然後兇殘爆表的印度就開始瘋狂造核彈併到處扔了。

謝謝 @李秋林提供原文。

What to expect when Facing Gandhi (Civ V) : gaming

For those wondering what the hell this is all about:

Every AI leader in Civ has different inherent values for how they act. Genghis Khan is warlike and aggressive, Gandhi is peaceful and defensive, with most leaders being in between.

There was a bug in Civ I. Gandhi"s aggressiveness was set to 1 by the game (on a 1-10 scale). If an AI adopts Democracy as a government, the game notches their aggressiveness down 2. As a result, if Gandhi adopted Democracy, you got a rollover error that led to his aggressiveness being set at 255/10.

Needless to say, he very rapidly turns from peaceful to murderous, and will them attempt to acquire and build nukes at all costs. He"ll then nuke whatever he damn well feels like, because he"s Gandhi.

The Civ team loved this bug so much, they deliberately programmed similar AI into every game. In Civ V, for example, every leader has a "Use of Nukes" stat, that is, again, on a scale of 1 to 10. Gandhi"s is hard-coded at 12 - even with the +/- 2 random modifiers assigned at game start, Gandhi"s use of nukes will always be rounded to 10/10 would nuke again.


剛學完相關內容,給非計算機專業的同學試著解釋一下從1減2到255的整個過程:)

Step 1. 甘地的原侵略指數1被保存為無符號(只表示非負數)整數類型,即二進位的00000001(這裡用8位表示,16位,32位也一樣)。

Step 2. 當進入民主政體時需要減去2,編譯器會將減2轉換成加-2,那麼-2被保存為有符號(可以表示負數和正數)整數類型11111110(-2=-2∧7+2∧6+2∧5+2∧4+2∧3+2∧2+2∧1)。

Step 3. 當無符號數和有符號數做運算時,有符號數會被轉化為無符號數,即-2的二進位11111110會被看成是無符號整型,但是每個二進位比特本身的值不會改變,運算結果也會被看成是無符號整型。

Step 4. 最後就是二進位加法了,00000001+11111110=11111111。由於結果被看成是無符號整型,因此結果為2∧7+2∧6+2∧5+2∧4+2∧3+2∧2+2∧1+2∧0=255。


因為甘地愛核平。


不奇怪。我到現在還是覺得,「非暴力不合作」的意思就是,你不暴力我就不跟你合作。


因為溢出了啊,甘地的戰鬥慾望本來是最低的,後來因為某些bug,就低成了負值,然後就變成了255,一下戰鬥慾望爆表…


冷哲基本說完了

俺就追加一條:這個BUG很早就已經被修正了,但是作為傳統,印度人的核彈愛好被特意調高保留了下來。


官方回答:

Have you ever played a game of Civilization V (or any of the older numbered versions), only to have the continent you』re trying to conquer completely annihilated by the 「supposed pacifist」 Gandhi and a fleet of nuclear missiles? That』s not by accident (or, at least, not any more…).

A new article over on Kotaku digs into why this lover of peace so readily commits mass genocide. Turns out it all started with a bug in the very first Civilization game. Essentially, Gandhi was given a value of 「1」 on the aggression scale in that game. Additionally, when a player adopted Democracy, it was supposed to reduce aggression by 2 points. However, since Gandhi was already at a level of 1, adopting Democracy would cause Gandhi』s aggression to cycle all the way to the highest aggression level of 255! Hello, Nuketown.

The bug itself is no longer a problem in modern iterations, but the developers decided to keep some remnants of the bug as a sort of tribute/easter egg. For instance, Gandhi』s nuke 「rating」 in Civilization V is 12, versus the next highest of 8, and 6 or below for most of the other world leaders.

You can learn more about Gandhi』s nuclear hijinks over at Kotaku, or you can play a game of Civ yourself and see just how far you can test Gandhi』s patience!

Reference: Looney, R. (2014). Why You Should Fear Gandhi in Civilization Games. Retrieved Nov.6, 2014, from Why You Should Fear Gandhi in Civilization Games


媽的,怪不得今天第二個城市被甘地老兒炸成渣了,謝樓上。回去讀檔在文藝復興時期滅了他。


這是一個程序設計的問題,

有符號和無符號,

溢出,翻轉。。。


推薦閱讀:

TAG:文明遊戲|Civilization | 設定 |