Thread Tools
Old March 6, 2002, 05:39   #1
korn469
Emperor
 
korn469's Avatar
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: Apr 1999
Location: In the army
Posts: 3,375
A Better Strength Algorithm Would Help the AI
Currently because of the strength Algorithm the AI often times makes rather poor choices of when to declare war, when to ask for peace, etc. a simple change to the algorithm could give the AI a better understanding of its strength and that could make it a better opponent

judging from information given by the Military advisor and many players experience here the AI simply add up all of the units each side has (including workers) and then whoever has the most the AI concludes is most powerful

so this means that if the AI has 25 workers and 25 warriors it will conclude that it is stronger than a player with 40 modern armor, which is obviously wrong

or if the player has 20 spearmen and 30 workers and the AI has 10 workers, 10 infantry and 30 tanks then it will conclude that the player has an equal amount of military force, which is obviously wrong

what this means is times when the AI should beef up their military forces and proceed with caution they are fool hardy and times when the AI should strike quickly and proceed with great military zeal they are timid, all because the AI is getting bad feedback from its military strength algorithm

right now any improvement to the system would be better, even something as simple as not counting workers would give the AI slightly better feedback on which side had the more powerful military; however the more accurate the AI's measurement of strength is the better opponent it should be

This is the simple system, it should be easy to do yet it should give the AI a much better gauge of the relative military powers of each side. What i propose is that every unit with one of the following AI types should count toward the military strength:

Land Unit AI Types
offensive
defense
cruise missile

Naval Unit AI Types
naval power
naval carrier
naval missile transport

Air Unit AI Types
air bombard
air defense

Thos units should count toward the military strength total at the following rates:

2 points for ancient units
3 points for middle age units
4 points for industrial units
5 points for modern age units

the following units are special cases

Army 6 points
Tactical Nuke 6 points
ICBM 7 points

if we take a look at the two examples i gave above then the AI would have the following military strengths 50 points vs. 200 points in the first example and 40 points vs. 160 points in the second example, while certainly not perfect it would be much better than what we have right now, i mean when the AI thinks that 3 scouts, 2 workers, and a caravel are more powerful than 4 modern armor in an army there is something wrong with the system
korn469 is offline  
Old March 6, 2002, 07:44   #2
Harovan
staff
PtWDG Gathering StormPtWDG2 Monty PythonC4DG Gathering Storm
Civ4: Colonization Content Editor
 
Local Time: 22:23
Local Date: October 31, 2010
Join Date: Dec 2001
Posts: 11,117
Good idea, but I doubt that there are settings about the unit's era in their data structure. Wouldn't it be simpler to add up the A/D/M and bombard value?
Harovan is offline  
Old March 6, 2002, 08:05   #3
Skanky Burns
Alpha Centauri Democracy GameACDG The Cybernetic ConsciousnessC4DG Team Alpha CentauriansApolytoners Hall of FameACDG3 Spartans
 
Skanky Burns's Avatar
 
Local Time: 08:23
Local Date: November 1, 2010
Join Date: Aug 2001
Location: Skanky Father
Posts: 16,530
I agree with you whole-heartedly. The strength algorithm needs work.

I'll let you in on a secret, just between you, me and Sir Ralph
In whatever thread I have found it to be relevant, I have been telling people how to exploit the AI by abusing its military strength estimating algoithm, specifically by building workers (to make themselves look stronger) or selling workers (to make a weaker AI feel stronger and declare war).

The reason I have been doing this was so Soren would firstly notice that there was a problem, and secondly that he would view this as a loop-hole, and therefore fix it.

Then again, your direct, obvious approach may work too
__________________
I'm building a wagon! On some other part of the internets, obviously (but not that other site).
Skanky Burns is offline  
Old March 6, 2002, 08:31   #4
korn469
Emperor
 
korn469's Avatar
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: Apr 1999
Location: In the army
Posts: 3,375
Sir Ralph

yes you could use something like

U^1=A+D+1.5M+B
U^1+U^2+...U^N=military strength
{attack defense movement bombard strength}

that could work fine too and if you wanted to get really in depth then you could change it to this

U^1=(A+D+1.5M+B)*Hitpoints
U^1+U^2+...U^N=military strength
{attack defense movement bombard strength}

that would give you a really indepth look at the military strength though i'm sure other more gifted players and math majors could come up with something even better than that
but we need something that gives the AI a better indication of its strength

Skanky Burns

you keep up on your end and i'll keep up on mine and hopefully soren will answer
korn469 is offline  
Old March 6, 2002, 09:03   #5
Pius Popprasch
Warlord
 
Pius Popprasch's Avatar
 
Local Time: 21:23
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Europe
Posts: 120
So you want to add one more cheat? How can the A.I. know what units I have? OK, the Advisors should be fixed. They cannot tell what they don't know. Once the A.I. has installed Spies it can use the received data for a more precise estimation.

The A.I. actually looks for the best defenders in accesible cities.
Pius Popprasch is offline  
Old March 6, 2002, 09:31   #6
korn469
Emperor
 
korn469's Avatar
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: Apr 1999
Location: In the army
Posts: 3,375
Pius Popprasch

Quote:
So you want to add one more cheat? How can the A.I. know what units I have? OK, the Advisors should be fixed. They cannot tell what they don't know. Once the A.I. has installed Spies it can use the received data for a more precise estimation.
it wouldn't be adding another AI cheat, because i am almost positive that the AI already knows, and the AI gets the same poor feedback as the advisor gives you...the reason i say this is this, when you are weak the AI will make demands on you and will sometimes declare war on you, if you reload a game a few turns before the AI makes demands on you or declares war on you and you beef up your military you can avert this

also once you have a spy in another civ then you know exactly what units makes up their entire military, so then it certainly wouldn't be cheating

as strategies evolve and players understand the game better it will get easier and easier to win, so the AI needs to make the best use of every single advantage it has otherwise in a few months time it will be even more outclassed than it already is
korn469 is offline  
Old March 6, 2002, 12:47   #7
Soren Johnson
PtWDG Gathering StormC4WDG The GooniesC4DG Gathering StormApolyCon 06 ParticipantsApolytoners Hall of FameC4BtSDG Realms Beyond
Civilization IV Lead Designer
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: May 2001
Location: San Francisco, CA
Posts: 335
Re: A Better Strength Algorithm Would Help the AI
Quote:
Originally posted by korn469
Currently because of the strength Algorithm the AI often times makes rather poor choices of when to declare war, when to ask for peace, etc. a simple change to the algorithm could give the AI a better understanding of its strength and that could make it a better opponent

judging from information given by the Military advisor and many players experience here the AI simply add up all of the units each side has (including workers) and then whoever has the most the AI concludes is most powerful

so this means that if the AI has 25 workers and 25 warriors it will conclude that it is stronger than a player with 40 modern armor, which is obviously wrong

or if the player has 20 spearmen and 30 workers and the AI has 10 workers, 10 infantry and 30 tanks then it will conclude that the player has an equal amount of military force, which is obviously wrong

what this means is times when the AI should beef up their military forces and proceed with caution they are fool hardy and times when the AI should strike quickly and proceed with great military zeal they are timid, all because the AI is getting bad feedback from its military strength algorithm

right now any improvement to the system would be better, even something as simple as not counting workers would give the AI slightly better feedback on which side had the more powerful military; however the more accurate the AI's measurement of strength is the better opponent it should be

This is the simple system, it should be easy to do yet it should give the AI a much better gauge of the relative military powers of each side. What i propose is that every unit with one of the following AI types should count toward the military strength:

Land Unit AI Types
offensive
defense
cruise missile

Naval Unit AI Types
naval power
naval carrier
naval missile transport

Air Unit AI Types
air bombard
air defense

Thos units should count toward the military strength total at the following rates:

2 points for ancient units
3 points for middle age units
4 points for industrial units
5 points for modern age units

the following units are special cases

Army 6 points
Tactical Nuke 6 points
ICBM 7 points

if we take a look at the two examples i gave above then the AI would have the following military strengths 50 points vs. 200 points in the first example and 40 points vs. 160 points in the second example, while certainly not perfect it would be much better than what we have right now, i mean when the AI thinks that 3 scouts, 2 workers, and a caravel are more powerful than 4 modern armor in an army there is something wrong with the system
The strength algorithm that the AI uses to determine power is similar to what you are describing. It counts up military units and gives them a value according to their attack and defense values. This value is "Power" on the Historgraph (including some of factors including techs/cities/resources/wonders...)

The algorithm the foreign advisor uses to tell the user relative military strength is not used by the AI in any way. It is only used by the foreign advisor. (Also, it does not count workers. I'm not sure where that rumor got started... perhaps it was a bug in 1.07. At any rate, it does not count non-military units in 1.17. If you have experienced differently, please post a save.)
Soren Johnson is offline  
Old March 6, 2002, 13:00   #8
Bill9999
Chieftain
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: Dec 2001
Posts: 37
Looking at current experiences, I think we can draw the conclusion that the AI already knows what units you have, they just are not using that information in the most logical way when using the data to declare war.

The problem is that the AI is logical, teach it to use a set equation for power, and it will follow it. This would lead to situations that are not like real life.

Leaders are often illogical in the military arena when it comes to straight military might. They obviously fight wars they know they have no chance of winning.

Would the AI take into account the military might of MPP civs too when deciding to declare war? Would they declare war if they were inferior but saw the gap between itself and the human widening? Would they start wars with specific goals, as do many human players (take the 3 closest cities and sue for peace)? Would the AI wait until it overpowered you by its calculation before attacking? How would the AI take into account any units being built by itself or the human into an equation?

I think this is why they went with a very simple number based model. Don't get me wrong, the calculation used needs some tuning, removing workers would make things a bit more realistic, even if 5 warriors would still be more powerful in the computer's eyes than 4 Modern Armor. Bigger changes would be huge works of programming, simply because using a more complex equation would require more complex decision making factors for the AI to use.

Do I make any sense?

EDIT: Guess not according to Soren's post. I know workers were being factored in to the calc in earlier versions, I have not patched to 1.17 yet, as I am finishing my last game still...

The rumor came from the fact that if I had 100 workers, and an average size army compared to Germany, and then I gave 50 workers to Germany through diplomacy, and went back to military advisor, he would say our army was smaller than Germany, (net change of 100 units) . And in some cases Germany would declare war the very next turn. Now it could be happenstance, and Germany was going to declare war anyway, due to a hundred other factors, but this was tested early on, and led to similar results multiple times.

Last edited by Bill9999; March 6, 2002 at 13:09.
Bill9999 is offline  
Old March 6, 2002, 13:03   #9
Solver
lifer
Civilization IV CreatorsAge of Nations TeamApolytoners Hall of FamePolyCast TeamBtS Tri-LeagueThe Courts of Candle'BreC4WDG Team Apolyton
Deity
 
Solver's Avatar
 
Local Time: 00:23
Local Date: November 1, 2010
Join Date: Sep 2000
Location: Latvia, Riga
Posts: 18,355
Thanks Soren, nice to hear that, really good by AI. However, in 1.07 I did definitely have the impression of the AI counting Workers. Not now, though.
__________________
Solver, WePlayCiv Co-Administrator
Contact: solver-at-weplayciv-dot-com
I can kill you whenever I please... but not today. - The Cigarette Smoking Man
Solver is offline  
Old March 6, 2002, 13:22   #10
korn469
Emperor
 
korn469's Avatar
 
Local Time: 16:23
Local Date: October 31, 2010
Join Date: Apr 1999
Location: In the army
Posts: 3,375
thanks for the responce soren!

i just know that i have had the AI demand of me, and that by going back and adding a few military units it doesn't, that coupled with the Military advisor made me fear the worst...because the AI still doesn't seem like it accurately judges the relative strengths of each player in the

but as far as real suspicious things, please check out the thread by player1, it looks like air bombardment is bugged and i do have a save for that
korn469 is offline  
Old March 6, 2002, 19:33   #11
Skanky Burns
Alpha Centauri Democracy GameACDG The Cybernetic ConsciousnessC4DG Team Alpha CentauriansApolytoners Hall of FameACDG3 Spartans
 
Skanky Burns's Avatar
 
Local Time: 08:23
Local Date: November 1, 2010
Join Date: Aug 2001
Location: Skanky Father
Posts: 16,530
Re: Re: A Better Strength Algorithm Would Help the AI
Quote:
Originally posted by Soren Johnson Firaxis
At any rate, it does not count non-military units in 1.17
Just what I wanted to hear, Soren.
Thanks
__________________
I'm building a wagon! On some other part of the internets, obviously (but not that other site).
Skanky Burns is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 17:23.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team