Fallen_Kings
Chieftain
- Joined
- Oct 21, 2013
- Messages
- 97
If you are not persuing a domination victory,the deplomatic penalty of declaring war as well as capturing cities is somewhat bitter to bear in BNW,especially in the early stage.Why do we start a war?Mostly to expand territory.The aftermath of conquering cities is severe: population halved,buildings destroyed,and reputation stained.So why not try a peaceful way?We know that AI sometimes give in their cities if the war is not in their side.But we don't know exactly how they make their judgement-sometimes AI would rather die than submit,sometimes they give in just so easily.So,let's figure this out.
I.Definition of parameters:
P(peacetreatywillingtooffer):how much AI would be willing to give in a peace treaty
WS(warscore):how well the war is going for AI
AMP:AI's military power
PMP
layer's military power
MS(MilitaryScore)
layer's relative mitary power comparing with AI
WT(WarTurns):Turns this war has endured.
AEP:AI's economic power
PEP
layer's economic power
ES(EconomicScore)
layer's relative economic power comparing with AI
APL:AI's property lost in this war
APR:AI's property remaining in this war
ARL:AI's relative lost in this war
PPL
layer's property lost in this war
PPR
layer's property remaining in this war
PRL
layer's relative lost in this war
PC: percentage of cities AI willing to give up
CVM:city value modifier
II.Mechanics:
P and MS are originally 0.
To calculate WS(Warscore),AI first consider military power of both sides:
power of military unit=basic combat(ranged unit uses ranged combat)*(1+0.125*unit's level)*unit's current HP/100
AMP=MA=30+Total power of AI's military units*[1+√(AI's Gold)/100]
PMP=MA=30+Total power of Player's military units*[1+√(Player's Gold)/100]
MS=PMP/AMP
If:
MS>=2.5 WS reduces by 100 elseif
MS>=1.65 WS reduces by 60 elseif
MS>=1.15 WS reduces by 25 elseif
MS>=0.8 WS reduces by 0 elseif
MS>=0.6 WS increases by 25 elseif
MS>=0.4 WS increases by 60 elseif
MS<0.4 WS increases by 100
Then consider economic power:
AEP=AI's total population+AI's total production(from tile,building,policy,trade route)+AI's total money yield(from tile,building,policy,city connection and trade route)
PEP=Player's total population+Player's total production(from tile,building,policy,trade route)+Player's total money yield(from tile,building,policy,city connection and trade route)
ES=PEP/AEP
If:
ES>=2.5 WS reduces by 50 elseif
ES>=1.53 WS reduces by 30 elseif
ES>=1.2 WS reduces by 12 elseif
ES>=0.83 WS reduces by 0 elseif
ES>=0.65 WS increases by 12 elseif
ES>=0.4 WS increases by 30 elseif
ES<0.4 WS increases by 50
Then consider war damage:
APL=total power of AI's lost military units*100/the highest combat among all AI's available military units+total population of AI's lost cities except the capital*150+population of AI's capital(if it has fallen)*225
APR=total power of AI's remaining military units*100/the highest combat among all
AI's available military units+total population of AI's remaining cities except the capital*150+population of AI's capital(if it has not fallen)*225
ARL=APL/(APL+APR)*100
PPL,PPR and PRLare calculated likewise.
If:
ARL=0 and AI believe player is aggresively expanding W increases by 25 elseif
ARL>=10 WS reduces by 10 elseif
ARL>=25 WS reduces by 20 elseif
ARL>=50 WS reduces by 30 elseif
ARL>=67 WS reduces by 40
If:
PRL>=10 WS increases by 5 elseif
PRL>=25 WS increases by 10 elseif
PRL>=50 WS increases by15 elseif
PRL>=67 WS increases by 20
At last,consider how long the war has been going:
If:
T>60 WS reduces by 20 elseif
T<=60 WS reduces by(T/3)
Now calculate P:
P is influenced by MS,ARL and PRL
If:
WS<=-100(Destructive) P increases by 100 elseif
WS<=-25(Defeat) P increases by 60 elseif
WS<= 0(Stalemate) P increases by 20 elseif
W>0(Unknown) P increases by 0 elseif
W>=25(Good) P reduces by 20 elseif
W>=100(Very Good) P reduces by 50
If player is a terrible target for AI,change Warprojection Destructive and Defeat to Stalemate.
If:
ARP>=10 P increases by 10 elseif
ARP>=25 P increases by 20 elseif
ARP>=50 P increases by 50 elseif
ARP>=67 P increases by 80
If:
PRP>=10 P reduces by 10 elseif
PRP>=25 P reduces by 20 elseif
PRP>=50 P reduces by 50 elseif
PRP>=67 P reduces by 80
Now AI proposes a peacetreaty depending on P:
White peace:AI gives up nothing
P<20
Armistice:AI gives up 50% Gold and 50% GPT
P>=20
Settlement:AI gives up all Gold and GPT
P>=40
Backdown:AI gives up all Gold,GPT and all strategic resources,open borders
P>=55
Submission:AI gives up all Gold,GPT,all strategic and luxury resources,open borders
P>=70
Surrender:AI gives up one city
P>=95
Cession:AI gives up 25% cities(PC=25%) and 50% Gold
P>=120
Capitulation:AI gives up 33%(PC=33%) cities and 50% Gold
P>=150
UN-Surrender:AI gives up all cities except capital(PC=100%) and all Gold
P>=180
If player has broken a peacetreaty with this AI before,AI will give up nothing.
eg:
promise another player to declare war on this AI after 10 turns.
declare war on this AI and make peacetreaty in 10 turns.
keep promise and declare war on this AI after 10 turns.
Which cities AI choose to give up:
Firstly,sorts all AI's cities except capital based on their distance to player's capital,from proximal to distal,adds them into a queue.If a city is founded player,divide distance by three.
If AI gives up only one city,will choose the closest one.
If AI gives up more than one city,calculates total value of AI's cities,multiply it by PC,and the result is the limit of how much city value AI is willing to give up.
AI will add in cities from the queue one by one if not surpassing the limit.
If the value of the first city hits the limit(When AI has few cities or the one closest to your capital worths the most),AI won't give up any city.
How AI calculates the value of a city:
basic city value=440+population*200+(tiles+0.25*improved tiles-7)*tile cost+total luxury value(equals the cost we pay for them in a fair deal. value per copy=dealturns*happiness provided*2,tripled if unique,240/720 in standard speed)+total strategic value(90 per copy)
tile cost=(50+5*tiles already purchased)*(1+Policy/Traits/Wonder modifier).Tile cost doubled if it belongs to a minor civ(not happen in this case)
(Bad news for Washington...)
city value is also influenced by war:
Warprojection CVM
destructive 1
defeat 1.8
stalemate 2.2
unknown 2.5
good 4
very good 4
CVM=2 if player and AI are in peace
city value=basic city value*CVM
How AI assesses a player as a terrible target:
[edit]
I.Definition of parameters:
P(peacetreatywillingtooffer):how much AI would be willing to give in a peace treaty
WS(warscore):how well the war is going for AI
AMP:AI's military power
PMP

MS(MilitaryScore)

WT(WarTurns):Turns this war has endured.
AEP:AI's economic power
PEP

ES(EconomicScore)

APL:AI's property lost in this war
APR:AI's property remaining in this war
ARL:AI's relative lost in this war
PPL

PPR

PRL

PC: percentage of cities AI willing to give up
CVM:city value modifier
II.Mechanics:
P and MS are originally 0.
To calculate WS(Warscore),AI first consider military power of both sides:
power of military unit=basic combat(ranged unit uses ranged combat)*(1+0.125*unit's level)*unit's current HP/100
AMP=MA=30+Total power of AI's military units*[1+√(AI's Gold)/100]
PMP=MA=30+Total power of Player's military units*[1+√(Player's Gold)/100]
MS=PMP/AMP
If:
MS>=2.5 WS reduces by 100 elseif
MS>=1.65 WS reduces by 60 elseif
MS>=1.15 WS reduces by 25 elseif
MS>=0.8 WS reduces by 0 elseif
MS>=0.6 WS increases by 25 elseif
MS>=0.4 WS increases by 60 elseif
MS<0.4 WS increases by 100
Then consider economic power:
AEP=AI's total population+AI's total production(from tile,building,policy,trade route)+AI's total money yield(from tile,building,policy,city connection and trade route)
PEP=Player's total population+Player's total production(from tile,building,policy,trade route)+Player's total money yield(from tile,building,policy,city connection and trade route)
ES=PEP/AEP
If:
ES>=2.5 WS reduces by 50 elseif
ES>=1.53 WS reduces by 30 elseif
ES>=1.2 WS reduces by 12 elseif
ES>=0.83 WS reduces by 0 elseif
ES>=0.65 WS increases by 12 elseif
ES>=0.4 WS increases by 30 elseif
ES<0.4 WS increases by 50
Then consider war damage:
APL=total power of AI's lost military units*100/the highest combat among all AI's available military units+total population of AI's lost cities except the capital*150+population of AI's capital(if it has fallen)*225
APR=total power of AI's remaining military units*100/the highest combat among all
AI's available military units+total population of AI's remaining cities except the capital*150+population of AI's capital(if it has not fallen)*225
ARL=APL/(APL+APR)*100
PPL,PPR and PRLare calculated likewise.
If:
ARL=0 and AI believe player is aggresively expanding W increases by 25 elseif
ARL>=10 WS reduces by 10 elseif
ARL>=25 WS reduces by 20 elseif
ARL>=50 WS reduces by 30 elseif
ARL>=67 WS reduces by 40
If:
PRL>=10 WS increases by 5 elseif
PRL>=25 WS increases by 10 elseif
PRL>=50 WS increases by15 elseif
PRL>=67 WS increases by 20
At last,consider how long the war has been going:
If:
T>60 WS reduces by 20 elseif
T<=60 WS reduces by(T/3)
Now calculate P:
P is influenced by MS,ARL and PRL
If:
WS<=-100(Destructive) P increases by 100 elseif
WS<=-25(Defeat) P increases by 60 elseif
WS<= 0(Stalemate) P increases by 20 elseif
W>0(Unknown) P increases by 0 elseif
W>=25(Good) P reduces by 20 elseif
W>=100(Very Good) P reduces by 50
If player is a terrible target for AI,change Warprojection Destructive and Defeat to Stalemate.
If:
ARP>=10 P increases by 10 elseif
ARP>=25 P increases by 20 elseif
ARP>=50 P increases by 50 elseif
ARP>=67 P increases by 80
If:
PRP>=10 P reduces by 10 elseif
PRP>=25 P reduces by 20 elseif
PRP>=50 P reduces by 50 elseif
PRP>=67 P reduces by 80
Now AI proposes a peacetreaty depending on P:
White peace:AI gives up nothing
P<20
Armistice:AI gives up 50% Gold and 50% GPT
P>=20
Settlement:AI gives up all Gold and GPT
P>=40
Backdown:AI gives up all Gold,GPT and all strategic resources,open borders
P>=55
Submission:AI gives up all Gold,GPT,all strategic and luxury resources,open borders
P>=70
Surrender:AI gives up one city
P>=95
Cession:AI gives up 25% cities(PC=25%) and 50% Gold
P>=120
Capitulation:AI gives up 33%(PC=33%) cities and 50% Gold
P>=150
UN-Surrender:AI gives up all cities except capital(PC=100%) and all Gold
P>=180
If player has broken a peacetreaty with this AI before,AI will give up nothing.
eg:
promise another player to declare war on this AI after 10 turns.
declare war on this AI and make peacetreaty in 10 turns.
keep promise and declare war on this AI after 10 turns.
Which cities AI choose to give up:
Firstly,sorts all AI's cities except capital based on their distance to player's capital,from proximal to distal,adds them into a queue.If a city is founded player,divide distance by three.
If AI gives up only one city,will choose the closest one.
If AI gives up more than one city,calculates total value of AI's cities,multiply it by PC,and the result is the limit of how much city value AI is willing to give up.
AI will add in cities from the queue one by one if not surpassing the limit.
If the value of the first city hits the limit(When AI has few cities or the one closest to your capital worths the most),AI won't give up any city.
How AI calculates the value of a city:
basic city value=440+population*200+(tiles+0.25*improved tiles-7)*tile cost+total luxury value(equals the cost we pay for them in a fair deal. value per copy=dealturns*happiness provided*2,tripled if unique,240/720 in standard speed)+total strategic value(90 per copy)
tile cost=(50+5*tiles already purchased)*(1+Policy/Traits/Wonder modifier).Tile cost doubled if it belongs to a minor civ(not happen in this case)
(Bad news for Washington...)
city value is also influenced by war:
Warprojection CVM
destructive 1
defeat 1.8
stalemate 2.2
unknown 2.5
good 4
very good 4
CVM=2 if player and AI are in peace
city value=basic city value*CVM
How AI assesses a player as a terrible target:
[edit]