Overkill - why the AI is so bad

Originally posted by Cartouche Bee


. . . . but over on the AI forum the AI's complain about the human cheating . . . .

They're pretty harsh over there! Shaka in particular can't stop ranting about built-in human technology cheats which absolutely prevent him from holding a tech lead; if I see one more rant from Elizabeth about her crappy Man-o-War I don't know what I'll do; every one of them seems to think that there's a human bias in culture flipping; and how many threads are really needed to discuss human spearmen defeating AI cavalry and tanks? Man they should lighten up and realize its just a game . . . .
 
Catt: I can't help it, but in all the many many games I have playeed I have never had a new resource found in my territory (a resource of whichs kind I had never had one in my territory before). i have found them when i got a new tech, I have had them go and come back, but I have never been without coal or iron or something else and suddenly gotten the message 'We have found a new source of ****' Never!

On the opposite, I have several times had resources run out the very turn my cultural border flipped over them. You go and fight a culture war to get them, and as soon as you reach your goal - wham, gone!

Now where i get suspicious is: it happened never below Monarch, it happened TWICE in a row in my latest Emperor game, both times with coal. IF there is a hidden AI advantage, then this is it!

:p (comeon, Catt, hit my ;))
 
I've had coal, oil and iron appear in my territory (without being there before). Twice it notably came from an adversary I was, or about to be especially not that they have no oil, at war with.

As for the AI, the single target syndrome is a serious problem in military tactics. The reason I would guess that Firaxis created the AI the way they did is because they wanted a solution which is effective but without requiring too many complicated judgement decisions. Remember that each unit has to have pathfinding and other decisions made about where exactly it is going to go and how it is going to get there while simultaneously having to figure out whether it has sufficient strength to destroy or injure the target to begin with.

It is completely impractical for the game to be designed to have every individual unit make a tactical decision (as the player would). The decision time would lead to a massive outcry by most gamers (especially those already annoyed with the length of a huge map's AI turn).

My idea for getting around this is to give the AI a 'task force mentality'. Instead of creating a wily mess of units, they will create three or four super concentrated masses with a decent distribution of unit types and a sliding scale for numbers and technology (i.e. in the modern age they want their armies to be mostly modern, not made up of thousands of swords, also forces tend to get larger with time and perceived danger).

Then the decision process is linked to these three or four task forces, with all their underling units slaved to their destination point (making only pathfinding important, but also making it simpler) and once they get there they process what units attack, which bombard, which defend, etc.

The benefit to the challenge of the game is that the AI would have three to four 'fronts' that they can engage in simultaneously. An AI which you know will make a beeline straight for a specific part of your empire is incredibly easy to beat (even with smaller numbers of troops). An AI which can simultaneously attack you across the nearby plains while simultaneously sending a sneak attack farther along your border through the mountains becomes very dangerous. Though players tend to defend their whole empire effectively, it will become much more dangerous to start a war not knowing exactly where the AI storm is coming from.

Also, by slaving the units to a task force it will guarantee that they attack in mass. Instead of one or two units at a time trickling in to attack your heavilly fortified position, you will have a large force of possibly dozens of units all storming the same front. You also have to worry that a similarly sized force is not slipping in the backdoor while you swarm to defend that single point.

Even in this simple implementation I think it would work fairly well. As for programming difficulty, it is not hard to program in theory, but depending on how they actually coded the program itself it might be hard to put it in at this point. Its one of those things that is easier to put in from the begginning I would think.

Once this was in the game you could mod the AI's military strategy even more, basing it off the task force as the basic unit of warfare. Countering other forces becomes critical, requiring the player to develop similar task force strategies.

I can just imagine how cool it would be if when I charge into enemy territory planning on using its roads to speed my force along, that the enemy AI has scorched all the roads behind it and maybe even planted forests which slow my force to a crawl. Or I run straight into a Maginot Line of fortresses where an enemy task force has spread out in a defensive formation.

Also with less units to make decisions for, more complicated tactics can be devised by the computer. It might free up resources to plan a sneak attack on the player's flank, or they might launch a three pronged attack from entirely different directions (like the Head and Tail of the Tiger described on the main page recently...)
 
It definitely can be done, AOE and AOK both have AIs that understand the concept of a task force. The AI decides the size of the force, gathers or builds units until the force is complete, then sends it to attack. As you noted, this is more effective than the conga line of units that Civ3 often ends up with (especially in the earlier ages when unit movement points are so low).
 
Originally posted by Catt
They're pretty harsh over there! . . . Man they should lighten up and realize its just a game . . . .

I just visited the AI forum. They've convinced themselves that they could win most games, if only they could just circumvent the human's use of the Way-Back Machine. Fat chance, I say!

They're a temperamental lot, the AI's, the whole bunch of 'em. I jus' don't trust 'em.
 
Right now, I am adjacent to Greece, who is a bit larger than me, as well as having a noticeable tech lead (was horribly large, I've narrowed it a little bit), who are fighting someone across my lands to the west.

So, of course, he has to track across my country to get there. So here they come, huge stacks of units....

Except that they get halfway, then move back two to their home, then move BACK to the east...it's ridiculous. Back, forth, back, forth. It's ********. At first I assumed it was because of an attack on their frontier, or because a war objective change. But it happens like every other frigging turn. No idea how to use forces...

That, and the AI never seems to know when the moment of opportunity is passing it by...he had likely 30 cavalry and another 25 infantry in my territory pass through, right next to cities with just a single crusader (4/3) defending. I could never have stopped them as I had no technology. Now, just 12 turns later, I have nationalism and then replaceable parts. The window of opportunity has closed, it is now only a matter of time before I subjugate the Greeks like the slovenly man-whores I know them to be...

Venger
 
Well AOE was good at making huge "tasked forces" but it has its own flaws as well. You could send cavalry units to destroy their seige engines in these columns without their escorts even realizing it. When they talk of tasks, theirs are amazingly single-minded.

For me Starcraft rules in these 'packed forces' formations. And I'm not talking about the campaigns - I'm talking about skirmish AI games. Though some can be said about their relatively weak base defense, their offensive capabilities are undeniable. They attack from all sides - ground and air; they do huge but timed attacks; and their offensive on your base doesn't back out when you yourself are wrecking their own base. The only thing I could say I question about SC is that to assure yourself of a win, most games go to the 8 minute rushes that, although keeps your adrenaline pumping, doesn't give you a 'huge victory' feeling.
 
Originally postd by Lt. Killer M.
:p (comeon, Catt, hit my ;) )

Okay - I'll admit that I'm not sure if you're joking or challenging me to come up with a counter example . . .

I have frequently discovered new resources in my territory long after a technological discovery should make them available, both before 1.29 and after 1.29 (in each example, without having had access to such resource before it "appeared" in my territory - meaning it depleted from someone else's territory). My second (or third :confused: ) game under 1.29f, I felt compelled to play an almost completely peaceful game - after paying an arm and a leg for a source of foreign oil, I was very happy to see a new source spring up in my territory - sorry Montezuma, I don't necessarily want to renew that tech + 75 gpt / oil trade deal we had ;).

Originally posted by Zachriel


I just visited the AI forum. They've convinced themselves that they could win most games, if only they could just circumvent the human's use of the Way-Back Machine. Fat chance, I say!

They're a temperamental lot, the AI's, the whole bunch of 'em. I jus' don't trust 'em.

I agree. I just went back again (after promising myself to stay away from that misanthropic asylum) and they're really getting out of hand.

Abe is beside himself with conspiracies about shutting him out before his UU and a golden age; Xerxes ranting about the lack of iron when in fact iron is plentiful in the world; Bismarck complaining about the others ganging up on him just before Motorized Transportation . . . .

Boy . . . . a tempermental lot to say the least . . . sounds to me like they need some professional help.
 
I read an article in the NYT not so long ago about a guy who was creating an AI. The interesting part is that he was just writing reponses to questions as they came up. Over time, the responses seemed so lifelike and appropriate to the situation that people began to treat the machine like a person.

ANyway, something like this would be so useful for this game. Imagine the AI being told to send only X number of units after a lone barbarian or being told to attack with everything (including the kitchen sink) and to attack 3-5 different points at once. I just don't know if this is possible or not.
 
Originally posted by Zachriel


Wasting resources on foolish adventrues? That would never happen in real life! :lol:
:lol: lol

but yeah, it needs a bit of a fix, either that, or they know just how tough those barbarian warriors are :)
 
I had not really realizwed how bad it is, but just now i observed an AI move 20 Infantry away from an enemy city they had been going for and could have attacked just to 'almost' reach one enemy Cavalry that had snuck behind the lines.... :confused: how can the AI lead wars like that?????


It really needs a change that makes the AI 'goal-orienteted'.
 
Originally posted by Lt. 'Killer' M.



It really needs a change that makes the AI 'goal-orienteted'.

Kind of like the automated workers, that only send 2 workers to work a tile to acheive an improvment. Seems possible, doesn't it?
 
Cartouche Bee: :lol:

no, waht we need is an AI that does not attack three seperate towns with 3 units each, reducing the sole defender in each to 1 HP, then goes and does it again the next turn..... and the next.... and the next........

The AI should form 'Task Forces' that go for their goal regardless of things around them UNLESS there is an emergency. Using frontline attackers positioned at the very front or in enemy territory to fight a sole unit at the home front just becauser these units are the first to be activated is ridiculous....


come to think o it: maybe the AI just needs to learn to use the 'w' button......
 
First it needs to pick a civ to attack (because it has determined that an attack is possible) and then find weaknesses in the defenses and apply units to the task until it achieved and then go on to the next task. Still seems pretty doable.

However, this kind of approach does not permit a devious ROP attack which would require multiple simultaneous goals (however, if abundant forces are available, the AI could then proceed with a multi goal attack or individual attack sequences based on it's evaluation of the situation.).

:D
 
Originally posted by Cartouche Bee
if abundant forces are available, the AI could then proceed with a multi goal attack or individual attack sequences based on it evaluation of the situation.).

:D

exactly! as it is, the AI cannot pursue two goals (like the attack and the destruction of a single unit in it's home territory described above). There should be threshold that tells the AI "this is enough for that job, use other forces for other jobs"

I often see the Ai move several units towards a goal, only to then see them reach that same thing with other units - and the first group goes back..... waste of movement, that's all. Maybe a Task Force can be assigned, then each task is given a priority, then each taskforce is used to complete the task. with a sufficient safety factor this should work.
 
hmm

complex ai = higher minimum system requirements...

people like me still clinging to dinosaur computers would have missed out the game if the min sys req is too high :P

I do miss some of the tactic the AI used to do in civ2 tho...
 
The answer is simple. Instead of recoding all this stuff into task forces/thresholds and other complexity, simply give the AI free nukes as needed.

No more having to worry about AI units going willy-nilly over the map hunting barb warriors, and finally a real and in-your-face AI cheat.
 
More AI complexity would likely increase the time to play the game, it won't necessarilly increase minimum requirements. It would just take longer for the AI to process its turn (so they might recommend a faster CPU and such).

The goal of the Task Force Strategy is to eliminate what I think is a weakness in their program (every unit has a decision cycle) by simplifying the amount of decisions the AI has to make.

Trying to intelligently guide and do the pathfinding for 100 units would take 200 'cycles' (one cycle to do pathfinding, one cycle for decision making). Splitting those 100 units into 4 task forces of 25 each would take 104 cycles (one decision cycle per task force).
In reality its not so easy (pathfinding time is different than the time involved for a decision), but this shows quickly the reduction in work needing to be processed.

As it is now, I believe the AI processes a target for each unit in its army. It decides which is the weakest unit that it can attack and kill. This leads it to send 20 infantry on a quest to defeat a lowly cavalry. Indeed, I've seen it send 30 units away from the front for a horsemen once, and then later in the turn the horsemen was killed by a unit that was close to it to begin with. So those 30 units didn't even have to move back to kill that weakest unit.
If that unit didn't exist close to my horsemen I believe the 30 units would have continued traveling to my little horsey, used however many it needed to kill it, and then turned around and sent the remainder back to the city target.

The task force would change that. The primary division would be a stack (for simplest version of this plan) and it will be set to a NON-UNIT target, such as a city, resource square, or fortress. Its goal will be to claim that target with whatever force necessary, taking the path of least resistance (resistance defined as a mix of time and simply killing units that are in the way). Since each unit is no longer making a decision, merely pathfinding, it doesn't have to spend the time looking at every enemy unit on the map. This time saving can counteract whatever increased decision time is required to have the task force make an intelligent decision.

So the tradeoff is thus:
Each unit takes less time to process a turn.
Each stack (task force) can take five/ten or even twenty times longer to make a decision, so it can make an INTELLIGENT one.
This is compared to the AIs relatively dumb SIMPLE UNIT TARGET decision which takes less time.

The net result is less overall decision time, because although the simple unit target is both easier to program and takes less time per decision, it is not efficient for large scale armies as the combined decision making. The other net result is that the decisions made will also be more comparable to those made by a human player (i.e. humans tend to be goal oriented, not unit oriented like the AI).

I would predict that the actual work done by the hardware would only increase slightly, if at all. You'll be surprised at how much computing time can be saved from approaching the same problem with a different strategy (I'm a programmer btw).

The pathfinding problem still exists, but the advantage of the stack is that if you use a strict stack control (i.e. every unit starts at the same place and ends at the same place and moves at the same speed), you can replicate the pathfinding pattern for one unit and simply copy it for all the other units. Therefore you might even see a decrease in computations for pathfinding purposes (freeing up more time which can counterbalance the time being spent on 'strategy'). REgardless, as it is the computer processes a pathfinding cycle for every unit every turn. It can't possibly get any worst through this innovation, and it has the potential to be better.

I won't go into other facets such as how the concept can be applied towards AI production so they don't make stupid unit decisions or into the more complicated ideas of programming an AI so it not only knows how to attack (with a massed task force), but where and when to attack (i.e. the devious ROP scheme humans love).

MSGT John Drew is correct in that stacks doesn't solve everything, there are still weaknesses involved. But I think further improving the AI to properly utilize/defend artillery, realize advantages of speed, defensive territory, and making formation stacks (i.e. not all on one tile but arrayed in a loose collection of stacks) can be done easily with this idea.

Also coordination between stacks will become easier, make navies and air forces into task forces as well and make combination strategies between multiple stacks. If the AI had to make a decision for every bomber it might just randomly bombard your territory (as it does to me). If the AI air force had a mission to say, cut off reinforcements to a target city for one of the ground forces, it can quickly recognize a line of roads it should bombard and quickly make a fast decision cycle for every bomber (bomb each square until its road is gone and move to next square). Coordinating stacks takes so little time compared to trying to gauge a situation involving lots of different types of units.

I already play with a task force strategy myself, coordinating my ground forces into 'armies', my ships into 'navies', and then assigning airplanes when I get them to corresponding regions or navies (with carriers). Its proven incredibly effective in winning battles, so effective that I feel a little sad. The AI usually puts up a good entrance fight at one point, but once I develop multi-pronged attack strategies with multiple forces and bombardment support? Well it gets just too easy. Even with relatively small forces (say 20-30 units ground, 20 air/navy support), I'm conquering dozens of cities in a few turns while isolating their main army on a single front.

It's gotten so that I don't even call in AI allies and declare wars on multiple people at a time so that I can have at least some semblance of a 'multi-front' war where the single target mentality at least is hidden by the fact that five other countries each might have a different single target.

But if the AI could even do only a weak imitation of my general strategies it would be infinitely more dangerous to fight. If I knew I had to contend with task forces instead of a trickle of units my appreciation of the game would increase with the need for improving on my strategies.
 
We all know the AI is bad...but let's face it: the Zulu are the Jar Jar Binks of AI civs. Nothing suprises me with them.
 
Back
Top Bottom