Defence strategies? (for the AI)

Share and discuss strategies for playing the game, and get help and tips from other players.

Moderator: Forum Moderators

WesnothNewbie
Posts: 49
Joined: May 7th, 2012, 6:57 pm

Re: Defence strategies? (for the AI)

Post by WesnothNewbie »

To be honest, I always thought the AI was rather predictable. For example, if I were to move a Dwarfish Guardsman in a strong position (like a mountainous village, let's say) close to the AI's troops, and leave my commander unprotected, the AI often does the stupid idea of making several units waste time on trying to kill the expendable guardsman, and doesn't use as many units on advancing towards the commander, which ultimately would win the game. I've been able to slow down forces of multiple enemy leaders to help me kill one enemy leader in HttT many times with this little trick. But this type of thing doesn't really work on a normal player; sure, normal players can make dumb mistakes and rash decisions, but in a way, that makes them more difficult, because they're not so damn predictable all the time!
I would think the AI would be a better one if it tried to emulate a human more, and that means instead of playing by the book all the time and making no mistakes, it should deliberately make some mistakes and make unpredictable surprise decisions.

I also agree with the above poster; initial battles should be easier at first and concentrate on the narrative. By the way, what campaign should I start now that I've finished Heir to the Throne?
In Linux Land, if you listen hard at night, you can hear the whirr of Windows machines rebooting.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Defence strategies? (for the AI)

Post by mattsc »

WesnothNewbie wrote:I would think the AI would be a better one if it tried to emulate a human more, and that means instead of playing by the book all the time and making no mistakes, it should deliberately make some mistakes and make unpredictable surprise decisions.
Funny that you should say that... A bunch of us are currently working on AI development -- not to replace the default AI (at least not for the time being), but to add additional capabilities. As part of that, Rigor recently suggested to add some random elements to the AI behavior. So while you probably won't see this in mainline anytime soon, there might be some custom AI's out there that do just that.
WesnothNewbie wrote:By the way, what campaign should I start now that I've finished Heir to the Throne?
Any of the other mainline campaigns would be good. Stay at novice level if HttT seemed about right in difficulty, or you can step up to intermediate if that seemed "too easy". I think I played all of them, pretty much in the order in which they appear in the campaign menu - which seemed just as good a (random) choice as any other.
WesnothNewbie
Posts: 49
Joined: May 7th, 2012, 6:57 pm

Re: Defence strategies? (for the AI)

Post by WesnothNewbie »

mattsc wrote:
WesnothNewbie wrote:I would think the AI would be a better one if it tried to emulate a human more, and that means instead of playing by the book all the time and making no mistakes, it should deliberately make some mistakes and make unpredictable surprise decisions.
Funny that you should say that... A bunch of us are currently working on AI development -- not to replace the default AI (at least not for the time being), but to add additional capabilities. As part of that, Rigor recently suggested to add some random elements to the AI behavior. So while you probably won't see this in mainline anytime soon, there might be some custom AI's out there that do just that.
WesnothNewbie wrote:By the way, what campaign should I start now that I've finished Heir to the Throne?
Any of the other mainline campaigns would be good. Stay at novice level if HttT seemed about right in difficulty, or you can step up to intermediate if that seemed "too easy". I think I played all of them, pretty much in the order in which they appear in the campaign menu - which seemed just as good a (random) choice as any other.
Oh, that's nice to hear! I always like programs with such an active development cycle.

I'm playing Orcish Incursion right now. It seems very similar to HttT, although it's still somewhat challenging, as I've started playing on medium difficulty. Still, I would like to see some more campaigns with different factions instead of so many elves. I am personally finding medium difficulty slightly easier in some respects compared to "easy"- more leveled units for one.
In Linux Land, if you listen hard at night, you can hear the whirr of Windows machines rebooting.
User avatar
Alarantalara
Art Contributor
Posts: 786
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Defence strategies? (for the AI)

Post by Alarantalara »

WesnothNewbie wrote:Still, I would like to see some more campaigns with different factions instead of so many elves. I am personally finding medium difficulty slightly easier in some respects compared to "easy"- more leveled units for one.
Don't worry, of the remaining mainline campaigns, only Legend of Wesmere and Under the Burning Suns feature elves, and the one from Under the Burning Suns are somewhat different.
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Defence strategies? (for the AI)

Post by Celtic_Minstrel »

I would say that The South Guard also features elves, though certainly less prominently than the ones already mentioned.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Creativity
Posts: 51
Joined: March 5th, 2012, 6:00 pm

Re: Defence strategies? (for the AI)

Post by Creativity »

Yeah, I agree that having the AI do semi-random things would make it better.
WesnothNewbie, do you think you could make another thread about the campaigns? You'd probably get more people answering you.
roidanton
Posts: 90
Joined: September 7th, 2012, 10:41 pm

Re: Defence strategies? (for the AI)

Post by roidanton »

I'm still very new to this game, but one mistake I've seen a lot already is that the AI does not pay attention to the player's winning condition at all.

A simple example is if you have to kill the enemy commander, but none of your troops could reach him within the turn limit if he just stays in his keep.

And I just experienced a different one today: the enemy commander is inside a large room with a narrow door. He is strong enough that he can not be killed by a single hit, has two bodyguards and I have to kill him in two turns to win the game. This is impossible - if he lets my army come into the room, gets into the far-away corner and uses his bodyguards as shields. Even if I had a much stronger army, since his bodyguards are standing in front of him, I would have to kill them first and there' no way I could do that much damage in just two turns.

However, if he sends one of his bodyguards out to block the door, then yeah I lose a lvl 3 unit, but that bodyguard dies as well and with just one bodyguard, there is an empty hex next to the commander, so I can deal two rounds of damage on him and kill him.

Another "problem" is that the AI which plays my ally's commander often does very stupid things, like leaving his keep unprotected to get himself killed.

The ally's AI also doesn't seem to appreciate my healers very much - I've seen this several times in HttT that I moved one of my healers close to an injured unit of my ally and that unit simply walks away to nowhere (neither a village nor an enemy within range) instead of staying close to that healer.

Same goes for establishing a ZoC to protect an important allied unit. It sucks especially if you dispatch a few bodyguards for it and then that unit takes off so fast that your bodyguards can't follow it.
User avatar
nuorc
Forum Regular
Posts: 582
Joined: September 3rd, 2009, 2:25 pm
Location: Barag Gor

Re: Defence strategies? (for the AI)

Post by nuorc »

I believe every campaign/scenario is play-tested and balanced so you can win (ideally). Taking the current IQ of the ai into account is part of it.
roidanton wrote:The ally's AI also doesn't seem to appreciate my healers very much - I've seen this several times in HttT that I moved one of my healers close to an injured unit of my ally and that unit simply walks away to nowhere (neither a village nor an enemy within range) instead of staying close to that healer.

Same goes for establishing a ZoC to protect an important allied unit. It sucks especially if you dispatch a few bodyguards for it and then that unit takes off so fast that your bodyguards can't follow it.
Know what you're talking about. :annoyed:
Rarely, guessing where the ai ally moves helps (like his keep), but still that's not very satisfying.

Another ai behavior that annoys me is that it doesn't deal damage even if it would take not retal. I've seen allied ai leaders being zoc'ed and move one hex without attacking, while doing the same move they could've easily killed an enemy, thus relieving some of the pressure it's under (e.g. Clashers vs DAs, Burners vs HI).
I have a cunning plan.
alex23
Posts: 179
Joined: October 27th, 2012, 5:54 pm

Re: Defence strategies? (for the AI)

Post by alex23 »

1) making the ai smarter is a good idea, but I think you shouldn't replace the current ai but add the new one, as by making the current ai smarter ALL the camaigns would become unbeatable

2) Another Ai-mistake that happens often is, that the ai leader moves out (on the first turn) to getr a village and thus is sometimes easy to assault in the first turn - or if you place a bait somewhere near him the leader also foten moves out to attack and dies this way, even if he has 10 units who could kill that bait.
User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Defence strategies? (for the AI)

Post by AxalaraFlame »

I guess if we apply the experimental AI to wesnoth, all former campaign balance works would be totally screwed. But, the old AI was just a dying flower under winter's snow. There is no point keeping it anymore in my opinion, because the old AI fight so foolishly. I would even prefer to rebuild all the campaign balance to suffice a new smarter AI, rather than using the old one, because we ought to change with times.
tuggyne
Posts: 76
Joined: May 22nd, 2011, 5:52 am

Re: Defence strategies? (for the AI)

Post by tuggyne »

AxalaraFlame wrote:I guess if we apply the experimental AI to wesnoth, all former campaign balance works would be totally screwed. But, the old AI was just a dying flower under winter's snow. There is no point keeping it anymore in my opinion, because the old AI fight so foolishly. I would even prefer to rebuild all the campaign balance to suffice a new smarter AI, rather than using the old one, because we ought to change with times.
It's generally a pretty terrible idea to try to abruptly upgrade an entire codebase to a new technology; instead, it's best to allow slow, piecemeal upgrading, especially for something that's already functioning fairly well.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Defence strategies? (for the AI)

Post by mattsc »

tuggyne wrote:It's generally a pretty terrible idea to try to abruptly upgrade an entire codebase to a new technology; instead, it's best to allow slow, piecemeal upgrading, especially for something that's already functioning fairly well.
For those of you interested in these things, the AI we call Ron in this thread is, as of today (thanks to Alarantalara), available in mainline. You'll have to compile trunk if you want to use it today, but it will be there by default as of 1.11.1. The RCA AI remains the default, but you will be able to select this AI in MP (choose 'Experimental AI' for the computer player) and can include it in scenarios as well.

As per our last tests, Ron has an 86% win rate vs. the RCA AI averaged over all default era factions and 2-player maps.
User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Defence strategies? (for the AI)

Post by AxalaraFlame »

To be honest, @mattsc, your AI could replace the current one. There is no point keeping trash as our enemies, even if that would require us to rebalance all campaigns.
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Defence strategies? (for the AI)

Post by mattsc »

AxalaraFlame: thanks for the compliment, but rebalancing takes time, so you don't want to make a sudden switch over, but phase things in slowly. This way those who choose to use the new AI can do so, while others who either don't want to or don't have time do not need to. If it turns out that a different AI than the default will be more popular in the future, I'm sure the switch will be made eventually.

Also, as I have said many times before, the RCA AI is anything but trash. In fact, Ron is mostly RCA, with just a few added candidate actions. I encourage you to do some AI development of your own and if, after some while, you don't appreciate the RCA AI much more, I'll buy you a beer. :lol2:
User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Defence strategies? (for the AI)

Post by AxalaraFlame »

Also, as I have said many times before, the RCA AI is anything but trash. In fact, Ron is mostly RCA, with just a few added candidate actions. I encourage you to do some AI development of your own and if, after some while, you don't appreciate the RCA AI much more, I'll buy you a beer.
Sorry, I don't get this logic :doh:
"RCA is anything but trash"...ok, is it trash or not?
"you don't appreciate the RCA AI much more"...did I ever appreciate it?
Locked