How can they make the AI smarter?

That is a very impressive screen shot. Funniest civ shot I've seen since the "animal husbandry one".

Also I love that you're Ghandi with your non aggresive protest at the war.
 
There are some AI solutions for this. For one, it would be easy enough to have the AI detect this kind of protection scenario...then deal with it by attacking the protector. Plus, the AI really needs to play more to win and more to not lose (which was supposed to be the case). If the one civ already rolled everyone else in the game, WHY would it leave weak player alone instead of finishing off the win? Obviously the AI is not checking for alternate victory conditions (if one assumes the AI is going for space or something and leaves the player around since he's zero threat).

Seconded. I'm no programmer but there must be a way to edit the code so that AIs recognize that another civilization's units are blocking their path to the city, and then the AI contacts you to basically ask you to get the heck out of the way, and if you don't comply, you suffer serious dip in relations with that civilization for every turn until relations deteriorate so badly that the AI declares war on you. Kinda similar to how the AI can recognize when you are amassing troops on the border?

Anyway just a suggestion, feel free to let me know it's nonsense or can be improved :)
 
I have to say Delgar's solution looks excellent! Let's hope it's soon implemented.
 
What the AI is doing now:

Oh hey a war. Hey that guy has a city over there. Let's send some random units in its general direction and see what happens. Oh hey there is a friendly unit blocking that tile. Let's see if I can just walk around the city...


What the AI *should* be doing:

Oh hey a war. Let's see, he has three cities. City A is the nearest so I'm going to attack that first. Now let's see, there is a mountain pass that will take ages to get my units through and is probably defended. There's also an ocean route to some unclaimed land near A. Let's start by securing the mountain pass. Send some units specifically useful for that purpose (i.e. artillery and foot units with defense bonuses). Make sure to secure enough land on the other side. In parallel, send some warships to patrol the sea route. Once both paths have been secured, send the two main invasion forces. Remember every time they are cut off by friendly soldiers. If it happens too often, kindly ask that foreign power to make way. If it refuses, declare war because they are clearly sabotaging our own war efforts. Once the obstruction has been cleared, set up artillery to fire on the city and advance with foot units. Have ranged support in case he puts up a fight. Etc.
 
What the AI is doing now:

Oh hey a war. Hey that guy has a city over there. Let's send some random units in its general direction and see what happens. Oh hey there is a friendly unit blocking that tile. Let's see if I can just walk around the city...


What the AI *should* be doing:

Oh hey a war. Let's see, he has three cities. City A is the nearest so I'm going to attack that first. Now let's see, there is a mountain pass that will take ages to get my units through and is probably defended. There's also an ocean route to some unclaimed land near A. Let's start by securing the mountain pass. Send some units specifically useful for that purpose (i.e. artillery and foot units with defense bonuses). Make sure to secure enough land on the other side. In parallel, send some warships to patrol the sea route. Once both paths have been secured, send the two main invasion forces. Remember every time they are cut off by friendly soldiers. If it happens too often, kindly ask that foreign power to make way. If it refuses, declare war because they are clearly sabotaging our own war efforts. Once the obstruction has been cleared, set up artillery to fire on the city and advance with foot units. Have ranged support in case he puts up a fight. Etc.


I doubt most human players do that so fat chance the AI will for a long long time. I think civ AI's for war will have reached a pinacle with BTS becuase it was easy to program - Put troops in a stack and head for a city -. Moving individual units will be much harder for the AI to co-ordinate. I notice it leave its long range units quite open.
 
Seems to me that in previous Civs, the AI was mostly focused on macro managing its economies and cities. With linear programming methods the AI could build up a large horde of cash/units/techs.

Now the problem faced in Civ5 is a lot more complicated (for the CPU). They need some sort of search tree algorithm, thinking about "moves ahead", kinda like chess. In chess there are on *average* 32 moves you can make in a any given turn. So to look just 10 moves ahead you need to check,

32^10, thats over a quadrillion moves if you checked them all. Computer Chess AI's are smarter than this, since over decades they have found algorithms to cut down the search space (a simplified example; don't check exchange queen for pawn path more than 4 moves ahead if checkmate not found).

The lead designer here comes from the Civ 4 mod community I think, I wonder how much he knows about designing algorithms for this?

Another interesting approach you can take, is what Brad Wardell did in Galactic Civ 2. Each unit gets a tiny "brain". It in effect each unit is an object in the code with a number of things it can do, depending upon the sensory "input" it gets. In this way, the units behave more like an insect colony, in that there's very little intelligence in each but you get "emergent" intelligence in the way the colony behaves as a whole.

At I guess I'd imagine the Civ programmers used mostly the latter since it's easier to code for, and that example is the classic case of this "insect swarming" behaviour. The trouble is there insufficient "Overmind", as it were to look at the bigger picture - it does not know what to do next, and it can't see the wood from the trees, it's just lots of dumb units acting on mostly on simple rules.

I hope they fix this, they prolly need to hire some real AI dudes with PHDs if they want a decent AI, would Firaxis pay for that?
 
I doubt most human players do that so fat chance the AI will for a long long time. I think civ AI's for war will have reached a pinacle with BTS becuase it was easy to program - Put troops in a stack and head for a city -. Moving individual units will be much harder for the AI to co-ordinate. I notice it leave its long range units quite open.

Moving individual units is a big issue because the order that they move matters. For the first GOTM, I had to move an army over a long landmass with mostly rough terrain, and every unit was trying to walk the same (fastest) path. The issue was that if one unit tried to take his turn before the unit ahead of him in the line, he would stop because the space was blocked. This would domino back and made moving my army incredibly tedious. The AI has to deal with a similar issue because it's not smart enough to avoid this; it would just have the unit further back in line wander off the fastest path.

Here is another fix I would suggest for the OP issue:
Although players can currently move through friendly units, they cannot do so to make an attack if they would be attacking from a space already occupied by a friendly unit. This is the case even if they are guaranteed to win (and thus take the contested hex). If this rule were ignored, then Persia could bombard the city down and then move through the OP's units to take the city.

I prefer Delgar's solution, but this one is probably much easier to implement.

Frankly though, it seems like there are quite a few issues that result from 1UPT and removing this would resolve several issues for the AI and players. I don't mind 1UPT, and I like the tactical feel of CiV, but I think that mostly results from the zone of control anyway. Yes, this is fundamentally an AI issue, but 1UPT has pretty profound implications that are hard for an AI to grasp.
 
I doubt most human players do that so fat chance the AI will for a long long time. I think civ AI's for war will have reached a pinacle with BTS becuase it was easy to program - Put troops in a stack and head for a city -. Moving individual units will be much harder for the AI to co-ordinate. I notice it leave its long range units quite open.

It's not actually that hard to program. Your normal path finding algorithm on a tiled map already gives you a distance of every tile to the target. To program a front that slowly advances, even a simple constraint that ranged units must be farther away than melee units would help tons.

It's not *that* easy, of course. The AI also needs to realize that it has to halt its advance when it's lost too many units and when there are units blocking the advance, and so on. But the basic strategy I outlined is actually not that complicated. Finding choke points is easy, basically like this: With your distance map, you find a shortest path. Then you find another shortest path, penalizing tiles that have been visited before. And so on. Eventually, choke point tiles become "hot" because despite the penalty, the shortest path is still through them. That will give you a rough idea what areas you need to secure and what different paths there are (hot tiles separated by cold tiles indicate different paths, or different choke points on the same path). It takes a lot of work that a computer is good at while humans have to guess, so even a simplistic implementation should be better than an AI that just throws suicidal spearmen against cities.
 
Seconded. I'm no programmer but there must be a way to edit the code so that AIs recognize that another civilization's units are blocking their path to the city, and then the AI contacts you to basically ask you to get the heck out of the way, and if you don't comply, you suffer serious dip in relations with that civilization for every turn until relations deteriorate so badly that the AI declares war on you.

The logic should already exist somewhere in the code since the system can recognize trade route interruptions and blockades. The AI just needs to be able to apply it when determining if its troops can move to a given location or not and then act on that diplomatically.
 
A thing that would probably help as well is to make the AI realize that can be attacked while marching to the objective, so it should, as possible, march in a way they don't expose their ranged units and in a way that they can use the flanking bonuses. So far the Ai seems to choose a battle area, send the invasion force and then the reinforcements are sent without any concerns.

Other thing that they seem hard to realize is that ranged units are stuff to be protected from direct melee ( so, no, don't bring them to the front line :D ) and that work better on top of hills without forests in the way.
 
The answer would be to remove 1upt;
Give it a rest already. We know you don't like 1upt. Most of the rest of us really like it. War is more fun than before. You've lost this fight.

never have one unit per tile in the game in the first place as anyone realistically knew things like this would result.
Yes, we all knew inevitably that 1upt would lead to potential for blocking exploits.
But so what?
Thats not enough of a reason to abandon it and go back to boring stacks.

Agree that it shouldn't be that hard to add an AI declaration of war on anyone totally blocking them in.
 
You could have the AI check for player units friendly within the city state in its borders.

If some are found send a diplomatic message asking/demanding they be removed

If accepted the units teleport back to your lands

If refused the AI can back down (and go do somthing else) or declares war on you.

Wouldnt that work? Bit of an over reaction to scrap 1upt over it.
 
My best guess would be to treat you having units in a city-state as if you were supporting them. Not quite as bad as going to war over it, but close enough that you're feeling heat, and should start thinking about getting out or going all-out.

This would be good.
 
As for path-finding issues related to 1upt, they could make an exception for roads with the following limitations:

1) you must be on a road or railroad in friendly or neutral territory (a given)
2) if you are attacked, a stack of units will not defend themselves and will be destroyed (imagine that the troops are in a troop truck or the tanks are being transported on another vehicle)
3) No stacked units may attack. A unit must begin its turn 1upt in order to attack that turn.

This would allow you (and the AI) to do peacetime and wartime transportation of units along efficient routes without too much bumping, but with sufficient penalties that there would be no tactical exploit that affects 1upt in combat.

As for the OP's issue, I agree that there should be a reputation penalty with the AI. It could be as simple as "I could get there across land, but friendly troops block ALL routes. Request a move or suffer diplomatic penalties."
 
Similar to what markiness is saying, have the AI check for obstructions. It wants to move into a tile, but the tile is blocked. This triggers a diplomatic option:

"Hi. Your troops are obstructing territory I would like to occupy. We can do this the easy way or the hard way. Will you move your troops?

- 'Why, certainly. I'm sorry we got in your way. (Automatically moves offending unit(s) to nearest unoccupied tiles)'
- 'Go ahead. Make my day. (WAR!)'"

Simple. Teleporting back to your own territory is easily abused. I'd absolutely exploit that if I took a DOW from an unexpected quarter. I'd request open borders and block AI workers.

The bigger issue is that the AI doesn't have a clue about how to take a defended location. It needs to harry the edges of formations with mounted units, rather than going for a full on frontal assault. That extra move that Alex's CC have is absurdly good. It lets you sit just out of visible range, nail whatever moves into a two tile range, then retreat. Hard to lose units that way.

There's no reason that the AI can't use that same set of tactics. Send fast units out wide, weaken the victim, THEN come down like the wrath of God with the melee and the siege.

The other thing that the AI needs to recognize is the value of formations. It understood this in Gettysburg, so I have no clue why it doesn't get the concept thirteen years later.
 
They should fix the AI's incompetence with military units as a priority IMO. This thing you're doing however is not even important to fix, i mean why would you abuse bugs in a SP game? if you want to defend a city-state just declare war on the AI attacking it, don't abuse :):):):) and then complain.
 
There's no reason that the AI can't use that same set of tactics. Send fast units out wide, weaken the victim, THEN come down like the wrath of God with the melee and the siege.

In Civ4, the AI did more than just send in a stack of doom. They also sent fast units to pillage. Seems like that same sort of logic can be used here. Fast units pillage and harass, then send in the main army. The biggest difference is that tactical considerations with the melee and siege.
 
They also sent fast units to pillage.

Yes, the lack of pillaging is noticeable. However, they have to get into my territory first. You can use ZOC to protect your dirt, which you could not do in Civ 4. The lack of ZOC is part of why pillaging was so good in Civ 4.
 
Back
Top Bottom