[Mainline] AI Behaviour
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
- PeterPorty
- Translator
- Posts: 310
- Joined: January 12th, 2010, 2:25 am
- Location: Chair, In-Front-Of-Computer
[Mainline] AI Behaviour
Well, hello guys, I come here today with an idea for the AI.
The idea is that the AI manages teams as if they were one side; see the screenshot below.
Team 1 is the player and team 2 and 3 are a team of AIs fighting side one.
The current behaviour if the AI would be the red arrows, while the blue arrow represents what I mean. (If both attack the troll, they'd have a pretty good chance of killing it, and the dragon can't reach the naga, but the skeleton doesn't seem to be aware of the existence of the dragon, and therefore attacks the naga instead, dealing relatively high damage, but not killing either of the enemy units.
What do you think about this? I don't know C++, and I am aware coding the AI is hard, or so I have been told, but... I thought I might as well post this.
The idea is that the AI manages teams as if they were one side; see the screenshot below.
Team 1 is the player and team 2 and 3 are a team of AIs fighting side one.
The current behaviour if the AI would be the red arrows, while the blue arrow represents what I mean. (If both attack the troll, they'd have a pretty good chance of killing it, and the dragon can't reach the naga, but the skeleton doesn't seem to be aware of the existence of the dragon, and therefore attacks the naga instead, dealing relatively high damage, but not killing either of the enemy units.
What do you think about this? I don't know C++, and I am aware coding the AI is hard, or so I have been told, but... I thought I might as well post this.
"The real world is for people who can't imagine anything better."
Re: [Mainline] AI Behaviour
Wouldn't it feel cheap for the players when all the AIs take their turn simultaneously, especially if they are non-consecutive sides (like 1 and 4, or 2 and 5 in a 3-teams/6-sides match)?
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth
Current projects: Internet meme Era, The Settlers of Wesnoth
Re: [Mainline] AI Behaviour
I don't think he means for them to take their turns simultaneously. I think he means for them to take allied units into account when acting.
- PeterPorty
- Translator
- Posts: 310
- Joined: January 12th, 2010, 2:25 am
- Location: Chair, In-Front-Of-Computer
Re: [Mainline] AI Behaviour
I indeed meant what Caphriel said, but yes, I hadn't thought about the possibility of their turns not being consecutive... Hmm...
"The real world is for people who can't imagine anything better."
Re: [Mainline] AI Behaviour
Non-consecutive turns would significantly complicate the calculations. It may be better for the skeleton archer to attack the naga, because the AI can't be certain that the drake or the troll will still be there when the Drake AI's turn comes and that the drake will be able to reach the troll. However, the AI sometimes behaves strangely even when it has consecutive turns. One common poor behavior is blocking attacking hexes that the next AI in sequence could use much more effectively.
Of course, none of this even takes into account that the AI doesn't seem able to evaluate whether it'd be better to kill the troll, or to take/hold the village and damage the naga and the troll without killing either one. Also, the AI doesn't even seem to move its units in a particularly effective order when it's controlling just one side. It often feels like it's iterating over a list and moving them in order, but I've never checked. I'm not convinced (although this may have changed since I last played against the AI) that the AI even considers the rest of the units on the same side when deciding what to do with a unit, much less units on other allied AI sides.
For what it's worth, my first reaction to this is "Wow, that sounds really hard to implement," but my second reaction was "the AI really needs to handle this in order to be credibly equal to a human player."
Of course, none of this even takes into account that the AI doesn't seem able to evaluate whether it'd be better to kill the troll, or to take/hold the village and damage the naga and the troll without killing either one. Also, the AI doesn't even seem to move its units in a particularly effective order when it's controlling just one side. It often feels like it's iterating over a list and moving them in order, but I've never checked. I'm not convinced (although this may have changed since I last played against the AI) that the AI even considers the rest of the units on the same side when deciding what to do with a unit, much less units on other allied AI sides.
For what it's worth, my first reaction to this is "Wow, that sounds really hard to implement," but my second reaction was "the AI really needs to handle this in order to be credibly equal to a human player."