Bibor
Doomsday Machine
Hello 2 all members.
I have a suggestion, or rather a point of view, that I think could help the developers of CIV4 to build a better AI. I will not write mathematical formulae or such things, I will to write it down in a very readable way
First, the merits of AI over human players.
1. AI can crunch many more data than a human can in given time.
2. AI can be lose with no emotions. It has no Ego to indulge.
3. There can be many AI players at a single computer.
4. AI knows the game rules perfectly.
5. AI is not making any mistakes.
Second, the merits of human players over AI.
1. Only one. The human player *do* err. They make mistakes.
If a human player makes a mistake, the AI views it as a different aproach to the problem that it has to counter. AI is simply *unable to undestand* that humans make mistakes. By reacting to human wrong move, the AI starts to make a mistake(reaction) after mistake(reaction), finally to be beaten. That is, the AI does not know that the human pressed the 7 key and moved his scout NW by mistake. It will react to it and divert its troops from the original city attack plan it had.
++
Another problem with CIV3 AI is "hardcoded" to defeat the *human strategic genius* by simply limiting the human player's options. Examples: counter human early archer rush by giving more defensive units to AI. Counter ICS and "settler factories" by giving more settlers to AI. Be sure that transport arrives on designated place by giving it an ernormous and expensive escort.
The main problem with *green* AI programmers is that they think that a human will come up with something miraculous that will beat the AI to death.
Wrong.
Human players tend to be very predictable. How much lines of code does it take to code so that the AI understands the following:
* human player has access to iron and iron working
* human player has very limited space for expansion
* human player has a low culture score so it must be building units
* human player has one luxury grayed out in diplomacy screen.
* human player has no other civs around him
* I, the AI, have 3 luxuries and no iron or horses
____
* The human is going to attack me in 1-10 turns.
Solution: rather than build an AI from scratch, use the forums and learn what people do to defeat the *game mechanics* not the AI. What are the human players priorities, what are their EGO weaknesses, what are they going to research first? Which way they expand? What's the ICS and when do they use it? What's an early archer rush? What's a Ring City Placement and how does it help? Why are they amassing 40+ artillery and then stomp city after city? Why they connect all cities with RR first and then let loose the workers? Why they use workers to go with army so they can build RRs immediately after the inital attack? etc.
This way, the AI gets a "knowledge base". By a larger knowledge base, the AI has more variants to play off. And this leads to...
+++
The real AI.
The real AI is actually the "king of copycats". Like the perfect illusionist or disguiser, it can be a multiple persona, whichever persona fits its needs.
The trick here is to give AI priorities, short term goals and long term goals.
Example: at reasonably early game, the AI sees that it has access to 4 luxury resources, iron and horses. It has a decent territory with marshes, deserts and several tundra tiles. It concludes it is more or less "self sufficient". It is going for a SPACE RACE victory. This is its "long term" plan. For now.
Now, lets take the example from above with predictable greedy human player. The AI undestands the threat and decides it will take the initiative: first he sends a diplomatic message stating that "I, mighty Hammurabi of the Babylonians will create roads to your mighty kingdom and I am pleased to inform you that I want to trade my luxuries to you. You can also expand four tiles east from your last settlement. That much I will tolerate. Since we are first neighbours, the prices for luxuries will be reasonable." Human player agrees. AI adds -1 to this particular human agression level. But, from the example above, the human player is not true to his words. Contingecy plan: attacking two of human's bordering cities. It estimates the human's army strenght by culture points, city numbers and sizes (of scouted territory of course, no "no FoW cheating") and resources that are available to the human (visible on the diplomacy screen, iron 0, horses 1 = it has 1 iron and 2 horses, hmmm).
The AI makes three strike teams, two for cities and one for chasing a counterattack/diversion/off-city units. It is not expecting town walls at this point so it is going 2 to 1 tactic. It is 4 to 1 for 1st city, and maybe 2 to 1 if first city is taken. Its a warning, not an invasion.
It sends another clear diplomatic message to human player: Stop building warriors and/or so many settlers, my friend, or I will not trade with you. I will send an emisarry to check your work.
AI sends a worker to roam the human's lands. It cannot be kicked out since its a non-combat unit.
This the AI short plan. And it *will* stick to it. No matter what.
The human builds army. He thinks the AI is dumb. AI adds +2 to human agression level. +1 for neglecting the first deal, +1 as cumulative penalty.
...
After this inital attack the human is obviously confused? What??? The AI dares to destroy one of my cities and almost take the other one? I will crush him. I'll build and army of 20 swordsmen and strip him of his lands.
AI continues to build his by his long term priorities. Culture, science, a military unit here-and-there (if applicable), chops trees for important improvements (since it knows the granary + 5 food per city per turn strategy), la la la la la, and after 5 turns builds an embassy at the human player. And he sends a scout (or worker if non expansionis) to human lands again. If it sees swordsmen in towns and in country side, it gets the point. If the scout/woker gets killed/captured... the human's intentions are obvious. retaliation and war. AI adds +4 point to Human agressivness table. The human is geting notorious the AI's eyes.
Etc.
I hope that you understand what I wanted to say, since my English is not perfect
EDIT: The above examples of "how AI knows that human is building units" are just examples, not real CIV3. Especially not the culture points and city sizes since humans whip citizens (can be mistaken for building much settlers) and build workers. But, actually, getting spies only in the mid-industrial is not realistic. Spies exist from the very beginning of man vs. man conflicts. Maybe the ancient spy info would delay a few turns (you have to wait for results), be with errors (not exact army number) or such, but they should definitely exist. Also, unit movements outside opponent civ's borders should be an automatic information for free. "An army is leaving England to the west".
I have a suggestion, or rather a point of view, that I think could help the developers of CIV4 to build a better AI. I will not write mathematical formulae or such things, I will to write it down in a very readable way

First, the merits of AI over human players.
1. AI can crunch many more data than a human can in given time.
2. AI can be lose with no emotions. It has no Ego to indulge.
3. There can be many AI players at a single computer.
4. AI knows the game rules perfectly.
5. AI is not making any mistakes.
Second, the merits of human players over AI.
1. Only one. The human player *do* err. They make mistakes.
If a human player makes a mistake, the AI views it as a different aproach to the problem that it has to counter. AI is simply *unable to undestand* that humans make mistakes. By reacting to human wrong move, the AI starts to make a mistake(reaction) after mistake(reaction), finally to be beaten. That is, the AI does not know that the human pressed the 7 key and moved his scout NW by mistake. It will react to it and divert its troops from the original city attack plan it had.
++
Another problem with CIV3 AI is "hardcoded" to defeat the *human strategic genius* by simply limiting the human player's options. Examples: counter human early archer rush by giving more defensive units to AI. Counter ICS and "settler factories" by giving more settlers to AI. Be sure that transport arrives on designated place by giving it an ernormous and expensive escort.
The main problem with *green* AI programmers is that they think that a human will come up with something miraculous that will beat the AI to death.
Wrong.
Human players tend to be very predictable. How much lines of code does it take to code so that the AI understands the following:
* human player has access to iron and iron working
* human player has very limited space for expansion
* human player has a low culture score so it must be building units
* human player has one luxury grayed out in diplomacy screen.
* human player has no other civs around him
* I, the AI, have 3 luxuries and no iron or horses
____
* The human is going to attack me in 1-10 turns.
Solution: rather than build an AI from scratch, use the forums and learn what people do to defeat the *game mechanics* not the AI. What are the human players priorities, what are their EGO weaknesses, what are they going to research first? Which way they expand? What's the ICS and when do they use it? What's an early archer rush? What's a Ring City Placement and how does it help? Why are they amassing 40+ artillery and then stomp city after city? Why they connect all cities with RR first and then let loose the workers? Why they use workers to go with army so they can build RRs immediately after the inital attack? etc.
This way, the AI gets a "knowledge base". By a larger knowledge base, the AI has more variants to play off. And this leads to...
+++
The real AI.
The real AI is actually the "king of copycats". Like the perfect illusionist or disguiser, it can be a multiple persona, whichever persona fits its needs.
The trick here is to give AI priorities, short term goals and long term goals.
Example: at reasonably early game, the AI sees that it has access to 4 luxury resources, iron and horses. It has a decent territory with marshes, deserts and several tundra tiles. It concludes it is more or less "self sufficient". It is going for a SPACE RACE victory. This is its "long term" plan. For now.
Now, lets take the example from above with predictable greedy human player. The AI undestands the threat and decides it will take the initiative: first he sends a diplomatic message stating that "I, mighty Hammurabi of the Babylonians will create roads to your mighty kingdom and I am pleased to inform you that I want to trade my luxuries to you. You can also expand four tiles east from your last settlement. That much I will tolerate. Since we are first neighbours, the prices for luxuries will be reasonable." Human player agrees. AI adds -1 to this particular human agression level. But, from the example above, the human player is not true to his words. Contingecy plan: attacking two of human's bordering cities. It estimates the human's army strenght by culture points, city numbers and sizes (of scouted territory of course, no "no FoW cheating") and resources that are available to the human (visible on the diplomacy screen, iron 0, horses 1 = it has 1 iron and 2 horses, hmmm).
The AI makes three strike teams, two for cities and one for chasing a counterattack/diversion/off-city units. It is not expecting town walls at this point so it is going 2 to 1 tactic. It is 4 to 1 for 1st city, and maybe 2 to 1 if first city is taken. Its a warning, not an invasion.
It sends another clear diplomatic message to human player: Stop building warriors and/or so many settlers, my friend, or I will not trade with you. I will send an emisarry to check your work.
AI sends a worker to roam the human's lands. It cannot be kicked out since its a non-combat unit.
This the AI short plan. And it *will* stick to it. No matter what.
The human builds army. He thinks the AI is dumb. AI adds +2 to human agression level. +1 for neglecting the first deal, +1 as cumulative penalty.
...
After this inital attack the human is obviously confused? What??? The AI dares to destroy one of my cities and almost take the other one? I will crush him. I'll build and army of 20 swordsmen and strip him of his lands.
AI continues to build his by his long term priorities. Culture, science, a military unit here-and-there (if applicable), chops trees for important improvements (since it knows the granary + 5 food per city per turn strategy), la la la la la, and after 5 turns builds an embassy at the human player. And he sends a scout (or worker if non expansionis) to human lands again. If it sees swordsmen in towns and in country side, it gets the point. If the scout/woker gets killed/captured... the human's intentions are obvious. retaliation and war. AI adds +4 point to Human agressivness table. The human is geting notorious the AI's eyes.
Etc.
I hope that you understand what I wanted to say, since my English is not perfect

EDIT: The above examples of "how AI knows that human is building units" are just examples, not real CIV3. Especially not the culture points and city sizes since humans whip citizens (can be mistaken for building much settlers) and build workers. But, actually, getting spies only in the mid-industrial is not realistic. Spies exist from the very beginning of man vs. man conflicts. Maybe the ancient spy info would delay a few turns (you have to wait for results), be with errors (not exact army number) or such, but they should definitely exist. Also, unit movements outside opponent civ's borders should be an automatic information for free. "An army is leaving England to the west".