Putting Leader self-preservation into the AI
Moderator: Forum Moderators
Putting Leader self-preservation into the AI
I am just looking for info on the AI's handling of "danger" and whether there are plans to change anything.
This was tempted when playtesting a scenario, where a "must-survive" ally
(who is controlled by AI, however), is attacked and slightly wounded in his keep, then both his troops and mine rush to create a shield around him (not a prefect one), and whereas he could withdraw to our side of the shield, instead he flees to a village on the enemy's side of the shield and gets cut to pieces next round. The way to deal with this is usually to choose "passive leader". This is the only way you can be sure of what he will do.
In any event, the allied leader's behavior greatly influences balancing-I need a different strategy to get to him fast enough-.
This was tempted when playtesting a scenario, where a "must-survive" ally
(who is controlled by AI, however), is attacked and slightly wounded in his keep, then both his troops and mine rush to create a shield around him (not a prefect one), and whereas he could withdraw to our side of the shield, instead he flees to a village on the enemy's side of the shield and gets cut to pieces next round. The way to deal with this is usually to choose "passive leader". This is the only way you can be sure of what he will do.
In any event, the allied leader's behavior greatly influences balancing-I need a different strategy to get to him fast enough-.
- Bob_The_Mighty
- Posts: 870
- Joined: July 13th, 2006, 1:15 pm
If you have not read this, then do:
http://www.wesnoth.org/wiki/AiWML
If you have, then, nvm. There's two recent threads in the ideas section of the forum about ai behaviour.
http://www.wesnoth.org/wiki/AiWML
If you have, then, nvm. There's two recent threads in the ideas section of the forum about ai behaviour.
My current projects:
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
-
- Posts: 399
- Joined: September 17th, 2007, 4:53 pm
- Location: 2 miles southeast of the Middle of Nowhere
II wonder why scenarios makers don't make the must survive AI bosses passive, or maybe they just want it to be more difficult.
Check out Quietus's Minotaurs!Quiz wrote:You are a Dwarvish Fighter. You're surly and handy with an axe. Go chop some trees.
Indeed... I had to rewrite a scenario that had one of those because it was just unwinnable - he suicided before any of my units could even catch up to him.joshudson wrote:What's truly terrible is an ai-controlled non-leader that is gameloss.
Actually, what I would like to see is for the AI to treat units of a higher level than it can recruit as more valuable. So, if it can recruit Elvish Archers, and it starts the scenario with a Ranger, it tries to keep the Ranger alive, since it can't replace it if it dies.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
I don't think the AI knows the meaning of "treat a unit as valuable"... does it? It's just not capable of evaluating risk to its units, let alone deciding which units are too valuable to expose to that risk, letting the expendable take hits for the valuable and balancing defensive vs. offensive play. Many humans struggle with those same issues, for that matter.
I'm not sure that marking a unit as "more valuable to keep alive" would have any effect.
Now, the AI certainly *does* consider which units are more valuable to *kill*... but it's a lot easier to plan your own attacks than to anticipate your opponent's.
I'm not sure that marking a unit as "more valuable to keep alive" would have any effect.
Now, the AI certainly *does* consider which units are more valuable to *kill*... but it's a lot easier to plan your own attacks than to anticipate your opponent's.
- Federalist marshal
- Art Contributor
- Posts: 382
- Joined: December 17th, 2007, 12:02 am
Nope, the AI often does make some stupid mistakes that most humans probably wouldn't make, which often costs it a good unit. One time, I was facing the AI, and it had a 1HP, poisoned thief, given either the choice of retreating (recommended), or attacking a 5HP cavalryman of mine (not recommended). Apparently the AI decided that killing my cavalryman was more important than saving that thief. I'm sure it's possible to code a bit more into the AI to alleviate us of this problem.
This wouldn't do very well at all. There are many situations where the leader is in grave danger and has much higher than 30%.DDR wrote:if HP < 30% then
run away
end if
Also by the time it's down to 30% it's likely the player has already trapped it between ZoCs.
Finally where does it run to? If it just goes to some nearby village then it'll likely still get hunted down there and killed....if it runs as far as possible, then it'll be difficult for it to heal and get into a situation where it can recruit again...
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Don't know about others but i would have attacked to.Federalist marshal wrote:Nope, the AI often does make some stupid mistakes that most humans probably wouldn't make, which often costs it a good unit. One time, I was facing the AI, and it had a 1HP, poisoned thief, given either the choice of retreating (recommended), or attacking a 5HP cavalryman of mine (not recommended). Apparently the AI decided that killing my cavalryman was more important than saving that thief. I'm sure it's possible to code a bit more into the AI to alleviate us of this problem.
Porro ago res publica of somnium
-
- Posts: 250
- Joined: November 19th, 2007, 7:46 pm
- Location: One among the Fence
Yeah, that's one of the big AI problems. Computers are "1" or "0". They see absolutes. What AI tries to do is simulate human fuzzy logic. In other words, there's not an absolute right or an absolute wrong answer. Because humans are capable of understanding that almost all strategic choices have a fuzziness about them, they have a tactical advantage over computers.Dave wrote:This wouldn't do very well at all. There are many situations where the leader is in grave danger and has much higher than 30%.DDR wrote:if HP < 30% then
run away
end if
Also by the time it's down to 30% it's likely the player has already trapped it between ZoCs.
Finally where does it run to? If it just goes to some nearby village then it'll likely still get hunted down there and killed....if it runs as far as possible, then it'll be difficult for it to heal and get into a situation where it can recruit again...
David
Glory in Blood...Needs Programming Help!
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
Re: Putting Leader self-preservation into the AI
I think that the problem lies not in the computer's absolutes, but the inability of humans to express the processes by which they function.
"If a must-live guy is in danger then run." I think is a good principle for the AI to go by. What must be defined:
danger: brute force the list of units that can attack must-live unit and find the best combination. Check the likelihood of death. If likelihood of death is greater than x%, then we are in danger.
run: check for places that the enemy can't get to. If none, then check for lowest enemy optimum CTK (less than x% -> 0%). Then check for allies. Use this information to decide where to move.
The definition of run needs expanding, but you get the idea.
"If a must-live guy is in danger then run." I think is a good principle for the AI to go by. What must be defined:
danger: brute force the list of units that can attack must-live unit and find the best combination. Check the likelihood of death. If likelihood of death is greater than x%, then we are in danger.
run: check for places that the enemy can't get to. If none, then check for lowest enemy optimum CTK (less than x% -> 0%). Then check for allies. Use this information to decide where to move.
The definition of run needs expanding, but you get the idea.
Re: Putting Leader self-preservation into the AI
So, what exactly do you suggest as a solution to the problem?
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
-
- Posts: 250
- Joined: November 19th, 2007, 7:46 pm
- Location: One among the Fence
Re: Putting Leader self-preservation into the AI
But the problem here is having to define a fuzzy idea (in danger) by statistics (the % likelihood of death), and not everyone agrees on that %. The brute-force approach could also take a while. But it's a good idea.F50 wrote:I think that the problem lies not in the computer's absolutes, but the inability of humans to express the processes by which they function.
"If a must-live guy is in danger then run." I think is a good principle for the AI to go by. What must be defined:
danger: brute force the list of units that can attack must-live unit and find the best combination. Check the likelihood of death. If likelihood of death is greater than x%, then we are in danger.
run: check for places that the enemy can't get to. If none, then check for lowest enemy optimum CTK (less than x% -> 0%). Then check for allies. Use this information to decide where to move.
The definition of run needs expanding, but you get the idea.
Glory in Blood...Needs Programming Help!
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past