Defensive Order handled by poor AI, Option needed for player control

Ranos said:
So what you are saying is that the AI maliciously and intentionally destroys your good units to give itself and advantage? The men in the white coats are only here to help you.

Why the flames? Why are you putting words in his mouth? No it's not "malicious"... it's just not too bright.

The AI picks the strongest unit. If you are defending with a Longbowman with City Defense I, II and III and then some smaller units that have much less strength, then yes, your Longbowman may be used in the first 2 or even three attacks, but that is because you have put one very good defender and the rest are crappy.

A city III defense is a precious unit, why keep feeding it to the dogs?

EDIT: BTW, I have seen this too. If a unit has a promotion coming, and ahs been damaged it should stop defending, and let some of the other units pick up some experience, or die, or the player should be able to shuffle the defenses.


Don't try to blame the AI for your mistakes in not keeping a balanced defnse force in your city. The AI will choose the defender that will have the most strength against the attacker. A City Defense III Longbowman that has been damaged to 3.9 strength is still stronger than a Longbowman with no promotions.

what level do you play at?
 
Neomega said:
A city III defense is a precious unit, why keep feeding it to the dogs?

What good is a strong unit if you don't use it to defend? Besides, a City Defense III unit is not precious. It is easy to get when using barracks, Vassalage and Theocracy together. An attack or two and you have a strong defense unit.

Neomega said:
what level do you play at?
It doesn't matter what level I play at. 3.9 strength + 100% city defense = 7.8 strength. 6 strength + 25% city defense = 7.5 strength. The damaged unit is stronger than the undamaged one.
 
Don't try to blame the AI for your mistakes in not keeping a balanced defnse force in your city.

What good is a strong unit if you don't use it to defend? Besides, a City Defense III unit is not precious. It is easy to get when using barracks, Vassalage and Theocracy together. An attack or two and you have a strong defense unit.

Spoken like someone playing warlord or noble.

1. Not always an option on higher levels

2. Attacking with longbowmen does not happen if it can be helped at higher levels.
 
Ranos said:
So what you are saying is that the AI maliciously and intentionally destroys your good units to give itself and advantage? The men in the white coats are only here to help you..

Don't be silly, I never said anything of the sort. What I said is that the algorithm used to determine the most optimal defender is flawed. In my opinion it selects a defender based on the original strength when the battle started and does not consider current strength, the liklihood to die nor - possibly - abstract promotions such as 'first strike'.

I'm saying that time and time again I've seen the AI select a defender for me that was the same defender from the previous 2 rounds and is therefore damaged to the point where any human player *would not* field said unit.

Malicious? Please ... give me more credit than such innane ramblings ... merely flawed logic and therefore patchable.
 
lol. yep that's why i gave up making mixed defenders 'sacrifiicial ones'. They just 'don't work because u cannot specify which unit u want it to defend against.
 
Kolyana said:
Oh Psyringe, c'mon, it's absolutely true and I've seen it so, so, so many times!!! I have often watched a battle and seen my best unit defending (fair enough!) only to see it destroy the attacker, get reduced in strength, and then line up to defend against the next attack as well.

I've sat there *OFTEN* with somewhat of a "WTH expression" and baited breath, only to see said damaged unit defend successfully. As I breath a sigh of relief and put it down to "well, even damaged it must have been the strongest unit!" I'll then see it line up to defend a third time ... and now, at a fraction of it's former strength, it'll eventually die.

You claim (with this, your previous and your following two posts) that the AI does not choose the currently strongest unit for defense. You claimed in one of your posts:

Kolyana said:
The computer seems intent on picking damaged units until they are destroyed, like it is taking into to consideration only the max strength and not it's current strength into whatever calculation formula it uses.

This is definitely not true. And it can easily be tested.

Since you didn't follow my request to provide evidence, I tested it myself. Start the savegame attached below, and end your turn.

You have a city defended by one archer and one spearman, attacked by a couple of warriors. The warriors will attack. The game will pick the archer first as defender because he is stronger as the spearman (3 strength points plus 50% inherent city defense bonus). The attacking warrior is unlikely to kill the archer however.

If your theory were correct, then the game should pick the archer every time as defender until it is killed.

What you will oberve however is that the warriors will bring down the archer's strength until it is weaker than the spearman. Then the spearman will defend (because it's the strongest unit). Depending on how the fights go, you may even see the archer taking over again as the spearman gets too weak.

So?

PsyringeTest.zip
 

Attachments

And in this test, how much consideration is given to the value of the defender after it's promotions, or how powerful it will be next turn?

Experience can be more precious if you are playing an economic game more than a religious game.

I would much rather lose a spearman with 0 experience, than an archer with 5 experience.

Quite simply, the AI does not take many important aspects into consideration when defending, and can end up fighting you on one of your basic strategies.

In a "real world game" there would be much less warriors, like 3 or 4. If there are only 3 or 4, after the second successful defense, one may wish to preserve their experience, so they can heal and promote, and risk a less experienced unit.

It is all about using the gray to your advantage. Things are black and white for the AI's defensive choices, but the AI is an unthinking partner in your game. One you can only communicate iwth through python scripts... and probably, some situations cannot be communicated, as there are always, in a game this dynamic... "special circumstances".
 
Neomega said:
Spoken like someone playing warlord or noble.

1. Not always an option on higher levels

2. Attacking with longbowmen does not happen if it can be helped at higher levels.

1. You had 3 different unit types in the city you are complaining about losing. Obviously not all that difficult.

2. I never said attack with a City Defense III Longbowman. You assumed. What I meant was, build a Longbowman when you have barracks, Vassalage and Theocracy and you have a unit that has 8 experience and has 2 immediate promotions. Then that unit gets attacked once or twice and it has at least 10 experience giving it three promotions. That is something that is not difficult to acheive.

kolyana said:
Don't be silly, I never said anything of the sort. What I said is that the algorithm used to determine the most optimal defender is flawed. In my opinion it selects a defender based on the original strength when the battle started and does not consider current strength, the liklihood to die nor - possibly - abstract promotions such as 'first strike'.

I'm saying that time and time again I've seen the AI select a defender for me that was the same defender from the previous 2 rounds and is therefore damaged to the point where any human player *would not* field said unit.

I have never seen this unless that unit was still the strongest unit. The AI does NOT select the defending unit based on its original strength. If you have one very strong unit in a city and the rest very weak, the strong unit may be the one with the most strength for two or even three rounds.

Neomega said:
And in this test, how much consideration is given to the value of the defender after it's promotions, or how powerful it will be next turn?

Experience can be more precious if you are playing an economic game more than a religious game.

I would much rather lose a spearman with 0 experience, than an archer with 5 experience.

Quite simply, the AI does not take many important aspects into consideration when defending, and can end up fighting you on one of your basic strategies.

In a "real world game" there would be much less warriors, like 3 or 4. If there are only 3 or 4, after the second successful defense, one may wish to preserve their experience, so they can heal and promote, and risk a less experienced unit.

It is all about using the gray to your advantage. Things are black and white for the AI's defensive choices, but the AI is an unthinking partner in your game. One you can only communicate iwth through python scripts... and probably, some situations cannot be communicated, as there are always, in a game this dynamic... "special circumstances".

The only way to allow for considerations of keeping a more experienced unit alive is to slow the game down drastically, whether by allowing the player to select which units defend against which attack or by programming a more complicated algorithm that would take the computer longer to figure out.

As was also said earlier, that would give the player more of an advantage than he/she already has. If you want a fun game, the AI will make some decisions that you don't like. If you want to win every time, then just turn on the cheats and give yourself 1000 units and conquer everything in the first 50 turns.
 
Psyringe said:
You claim (with this, your previous and your following two posts) that the AI does not choose the currently strongest unit for defense. You claimed in one of your posts:



This is definitely not true. And it can easily be tested.

Since you didn't follow my request to provide evidence, I tested it myself. Start the savegame attached below, and end your turn.

You have a city defended by one archer and one spearman, attacked by a couple of warriors. The warriors will attack. The game will pick the archer first as defender because he is stronger as the spearman (3 strength points plus 50% inherent city defense bonus). The attacking warrior is unlikely to kill the archer however.

If your theory were correct, then the game should pick the archer every time as defender until it is killed.

What you will oberve however is that the warriors will bring down the archer's strength until it is weaker than the spearman. Then the spearman will defend (because it's the strongest unit). Depending on how the fights go, you may even see the archer taking over again as the spearman gets too weak.

So?

PsyringeTest.zip


Psyringe, I really respect you and I tend to find your posts more inntelligent than most, so please don't take my comments as some form of personal attack.

You'll also note - along with your other quotes - that I said it tends to happen more in the latter part of the game (ie, not spearman and etc) ... in fact, I'd go so far to say that I don't think I've even seen it in the early part of the game.

Perhaps my words are being taken slightly out of skew, but simply put I think that a lot of the time the program/game picks a defending unit that is now too hurt to be effective ... I have often seen it use the same defender 2 or 3 times on the trot, when it would be quite obvious to a human player that being down to 1/3 strength it's probably not the best defender anymore.

I'd even go so far to say that if you have a very damaged, heavily promoted unit, and it is down to 1/3 strength (and the unit graphic shows this), you'd probably want to protect it from future attacks if at all possible.

I'm not saying that this is malicious or intentional, I'm saying that often the AI seems to pick units I owuld not ... not necessarily for the initial first defense, but once a unit has defended and been hurt, I start to lean towards picking another defender and especially do after 2 such succesful defenses.

I have literally seen 1 machine gunner in a stack of many units defend a city 2, 3 times and then finally die on the 4th ... and frankly I'd rather protect such units once there 'job is done'.

I'm not saying that you are wrong, I'm merely saying that this is how it appears to me. Any vigor you ahve noticed in my previous post directed at you was, in all truth, perhaps over familiarity, because I've seen you posting a lot, read many of your posts and therefore felt that I could 'talk to you in such a manner'; I apologize if I seemed somewhat 'off' in my tone ... that wasn't intentional.

I appreciate your effort to prove this one way or the other, but like I have said earlier, I have noticed this behavior only really in the latter part of the game, so perhaps the algorithm or whatever code logic is use becomes more flawed, or more obviously so, as the 'numbers' increase ... I have seen it a lot with machine gunners, infantry and marines.

Again, this is just my opinion and one that I believe to be well founded and not just based on one or two casual observances ... anyone is free to disagree, but (and this is directed elsewhere, to be honest), I'm not open to being flamed over it ... an opinion is an opinion.

The next time I see this, I'll grab screenshots and such and perhaps it'll serve as the basis for intelligent debate rather than the mindless "phwrrrr, you don't know how to use your units, noob!" type posts some others seem intent on gettingn into.
 
Neomega said:
And in this test, how much consideration is given to the value of the defender after it's promotions, or how powerful it will be next turn?

None. This was a test designed to verify (or falsify) Kolyana's repeatedly stated hypothesis that the game always picks the unit as defender which is strongest in the beginning of the fight. And it rebuts this hypothesis soundly. If you want to test other hypotheses, you'll have to design other tests of course. Feel free. :)

"Saving" units which just gained a promotion is something that you threw into the discussion, Kolyana never talked about promotions at all. It was not the subject of this test. You are correct that the AI does not save those units, and that it would in many cases (perhaps even the majority of cases) be the best choice to do so. We probably disagree about whether the algorithm can be improved, how it should be improved, which negartive side effects will occur and whether these are worth the change.
 
Psyringe said:
None. This was a test designed to verify (or falsify) Kolyana's repeatedly stated hypothesis that the game always picks the unit as defender which is strongest in the beginning of the fight. And it rebuts this hypothesis soundly. If you want to test other hypotheses, you'll have to design other tests of course. Feel free. :)

"Saving" units which just gained a promotion is something that you threw into the discussion, Kolyana never talked about promotions at all. It was not the subject of this test. You are correct that the AI does not save those units, and that it would in many cases (perhaps even the majority of cases) be the best choice to do so. We probably disagree about whether the algorithm can be improved, how it should be improved, which negartive side effects will occur and whether these are worth the change.

I understand this.... but I do not want you to think any kind of nails have been driven in any kind of coffins. :) I do not want algorithms, I want player choice.


The only way to allow for considerations of keeping a more experienced unit alive is to slow the game down drastically, whether by allowing the player to select which units defend against which attack or by programming a more complicated algorithm that would take the computer longer to figure out.

Not true. A little coding could be done. Units can be flagged for "personal command" or something like spacebar could be used to interrupt a battle, so the player can take "personal command".

As was also said earlier, that would give the player more of an advantage than he/she already has. If you want a fun game, the AI will make some decisions that you don't like. If you want to win every time, then just turn on the cheats and give yourself 1000 units and conquer everything in the first 50 turns.

or I could just play chieftan, come into the discussion and say.. all you need to do is use vassalge with theocracy, and your riflemen will pwn all knights... finish off the stragglers with artillery !!! :nuke:

and I think you missed my memo... I have never won... I want control... not victory.
 
Kolyana said:
Psyringe, I really respect you and I tend to find your posts more inntelligent than most, so please don't take my comments as some form of personal attack.

I can say the same to you :). I must admit that I'm not as "cool" as usual at the moment, mostly because I'm in a hurry. If this has resulted in my mails sounding aggressive, I apologize - it was not intended.

Kolyana said:
Perhaps my words are being taken slightly out of skew, but simply put I think that a lot of the time the program/game picks a defending unit that is now too hurt to be effective ... I have often seen it use the same defender 2 or 3 times on the trot, when it would be quite obvious to a human player that being down to 1/3 strength it's probably not the best defender anymore.

Well, *if* that is the case, then it must be possible to devise a test setting that demonstrates it. Feel free to play around with my save, add modern units and see whether you can get a result that backs your hypothesis up. :)

It might be interesting to test this with the machine gunners you mentioned. Machine gunners cannot attack, so it may be possible that the algorithm assigns them a bias when choosing a defender. It's unlikely IMO, but may be worth testing.


Kolyana said:
I'd even go so far to say that if you have a very damaged, heavily promoted unit, and it is down to 1/3 strength (and the unit graphic shows this), you'd probably want to protect it from future attacks if at all possible.

You're probably right with this, in the majority of cases. The problem is how exactly this can be improved. For example, we could (ask for someone to) change the algorithm in a way that it protects heavily damaged units which have just received enough experience points for a promotion. The algorithm could easily incorporate that (for example, just divide the unit's strength by two if it's current experience exceeds it's necessary experience for levelup). But there will be situations where this is definitely the wrong way to do - e.g. when the damaged unit is a machine gunner that cannot attack, and the only other unit is an offensive unit that will die when it tries to defend, but which would smash the attacker in a counter-attack in the next turn.

No matter how complicated we make the algorithm, there's always a situation where it chooses the wrong thing to do. So it may be better to leave it as it is, because at the moment it is at least predictable for the player.

The other option is, as you said, to let the defender choose the unit. But I still don't think that this is a good solution, it would increase micro-management for many combats, but woukd very rarely be actually needed.

So, while I understand that the current algorithm can lead to frustrating results, I don't see a better solution.

Edit: deleted overspilling quote
 
Not having read through all the thread, has anyone pointed out that SMAX had a way of making a unit in a city the primary defender? A simple addition for SMAC's add-on pack, this kind of thing could easily go into a patch, I should think. I wouldn't make it a priority, but it'd be nice.
 
I never played SMAX, but I would like primary defender option... if there could be an interrupt where you could take personal control. I REALLY want personal control, sometimes the units have sentimental value, I don't want the AI coming in a destroying them for me, if another less elite unit can die in their place.
 
I think that the best solution is to give garrison units defence priority in a city. Units with higher priority number will always defend against enemy first. If two units have a same priority, then the game will select them on the default algorithm.
This should not be hard to implement in a patch.
 
zhengxinhang said:
I think that the best solution is to give garrison units defence priority in a city. Units with higher priority number will always defend against enemy first. If two units have a same priority, then the game will select them on the default algorithm.
This should not be hard to implement in a patch.

another good idea, perhaps being able to flag them as "Guard' units, so they can take the bullet for their commanders first. on the field as as well.
 
Neomega said:
The knights attacked first. And who did the AI pick to defend?

MY F'ING SAMAURI!!!! All their first strikes useless against knights.... no city defense bonus like longbowmen, and 50% melee WASTED :mad: on the non-melee units!!! So the 3 knights SLAUGHTER my Samauri, then the Pikemen come in.... and waste my Spearman.... GRRR!!!! :mad: and finish off my longbowmen....
The game is not broken.
As noted in the manual, when one unit attacks multiple units, it picks the strongest defensive unit to defend.
So you had 40% city defend, assuming that you've fortified for 5 turns, so there's 25% fortify bonus. I won't assume a terrain bonus because you didn't indicate any.
A samurai defending that city would be 8*1.65 = 13.2 str. 17.2 if he's facing melee units.
A spearman defending in that city would have 4*1.65 = 6.6 str. 10.6 if he's facing a mounted unit.
A longbowman defending in that city would be 6*1.9 = 11.4.
Assuming that your enemy didn't have upgrades on his attacking units, you lost because the PRNG said that your Knight triumphed over your samurai on the first try. The maceman has an edge facing your spearman, and can probably do a number on injured units. Mind you he brought 7 troops against your 5.
You may have wish to keep your Samurai to slaughter his pikeman or maceman, but your spearman and longbowmen would be marginally better at taking down the knight.
 
That's not his main complaint. his main complaint is that the game forces him to sacrifice his samurai unnecessarily. he doesn't plan it to be that way. but the game makes it that way, get it ? Since he wasn't given the option to pick corresponding defenders, it makes mixing inferior sacrificial unit in defense a very unworthwhile strat. we're talking a UU ability being totally nullified by the AI's choice.

Why can't I tell the warrior to eat the Knight attack? Since he's so obsolete, instead he dies to the catapult? That'll waste a turn for the Knight since he can't blitz unlike a Tank.
 
calyth said:
The game is not broken.
As noted in the manual, when one unit attacks multiple units, it picks the strongest defensive unit to defend.
So you had 40% city defend, assuming that you've fortified for 5 turns, so there's 25% fortify bonus. I won't assume a terrain bonus because you didn't indicate any.

at best, there was a 5% defense bonus, this was a hurried defense, with me throwing a coupel of catapults at his stack, to delay the inevitable attack.

A samurai defending that city would be 8*1.65 = 13.2 str. 17.2 if he's facing melee units.

-- and two first strikes... vs knights means nothing, as well as the melee defense, so I'd rather lesser units took the hits from the knights. So my samauri


A spearman defending in that city would have 4*1.65 = 6.6 str. 10.6 if he's facing a mounted unit.

Spearman was slightly wounded...


A longbowman defending in that city would be 6*1.9 = 11.4.
Assuming that your enemy didn't have upgrades on his attacking units, you lost because the PRNG said that your Knight triumphed over your samurai on the first try. The maceman has an edge facing your spearman, and can probably do a number on injured units. Mind you he brought 7 troops against your 5.


You may have wish to keep your Samurai to slaughter his pikeman or maceman, but your spearman and longbowmen would be marginally better at taking down the knight.

They might die, but they would do a number on the knights, but the samauri would have survived if I could have pitted them against the melee units, survived, slaughtered, and come out ready to heal up and be promoted. I understand the combat system, I am just mad the AI decided to ignore the fact my Samauri were needed for the melee units, and chose to pit them against knights.
 
Neomega said:
I understand this.... but I do not want you to think any kind of nails have been driven in any kind of coffins. :) I do not want algorithms, I want player choice.
If you want player choice, then mod the game to give you player choice. Your other options are to quit playing or to play better.

Neomega said:
Not true. A little coding could be done. Units can be flagged for "personal command" or something like spacebar could be used to interrupt a battle, so the player can take "personal command".
A flag that says "This unit defends first" could be used but again, this is something that only the player would use and it would give the player an even greater advantage over the AI.

Neomega said:
or I could just play chieftan, come into the discussion and say.. all you need to do is use vassalge with theocracy, and your riflemen will pwn all knights... finish off the stragglers with artillery !!! :nuke:

and I think you missed my memo... I have never won... I want control... not victory.
You complained about the AI doing exactly what it is supposed to do in the situation it was given. Change the situation by making your defenders stronger.

I don't get how you can come in here and whine and complain about something that most people don't seem to have a problem with, then attempt to insult me because you don't like my suggestions and follow that by admittingthat you have never won. Instead of sticking with your same whiny complaint, try taking advice from people that don't seem to have the problem you do and maybe you could even become a good player. If you can't play the game on Monarch, try a lower setting.

Even if someone mods the game to allow you control, you would come back in here with another complaint about the game being too hard.
 
Back
Top Bottom