Defence strategies? (for the AI)

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

Moderators: Forum Moderators, Developers

mattsc
Posts: 1116
Joined: October 13th, 2010, 6:14 pm
Location: Hidden on the hex behind Fred

Re: Defence strategies? (for the AI)

Post by mattsc » November 25th, 2012, 4:17 am

AxalaraFlame wrote:"RCA is anything but trash"...ok, is it trash or not?
Sorry, this means that it is "anything else instead of trash" or "not at all trash". So no, it's not trash. Not at all.
AxalaraFlame wrote:"you don't appreciate the RCA AI much more"...did I ever appreciate it?
What I meant is: if you do not appreciate it much more than you do now, then ... In other words, yes, I know you don't appreciate it much right now. However, if you worked on AI development for a while, I think you would learn to appreciate it more. If you don't, even after working on it for a while, then I'll buy you a beer.

Hope that makes more sense now. :)

User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Defence strategies? (for the AI)

Post by AxalaraFlame » November 25th, 2012, 5:54 am

Still making little sense. What you mean is, someday later, I will appreciate RCA AI so much that I can appreciate it nomore?! :augh:

User avatar
Dixie
Posts: 1756
Joined: February 10th, 2010, 1:06 am
Location: $x1,$y1

Re: Defence strategies? (for the AI)

Post by Dixie » November 25th, 2012, 9:19 am

"You obviously don't appreciate the RCA AI right now, but if you would work on it for some time, you would learn to, because it is fairly complex and well-made. If you don't, even after working on it for some time, mattsc will buy you a beer out of sympathy or whatever."

In other words, making a functional AI, let alone a skilled one, is a very hard job, and if you worked in AI development you would appreciate the RCA AI more because it is well-made, even if falls short to human opponents on many points, which is the doom of any AI in any game as complex as Wesnoth.
Jazz is not dead, it just smells funny - Frank Zappa
Current projects: Internet meme Era, The Settlers of Wesnoth

User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Defence strategies? (for the AI)

Post by AxalaraFlame » November 25th, 2012, 5:50 pm

I see it, thank you. I will ask somebody else about it. :)

User avatar
cookie
Posts: 170
Joined: December 21st, 2010, 6:57 am

Re: Defence strategies? (for the AI)

Post by cookie » December 4th, 2012, 1:00 pm

I would just like to add some considerations to this;
Firstly if the AI could perhaps could be programmed to attack in groups and organised attacks instead of attacking one by one the success rates of attacks may be more higher and at least they would not feed the enemy and give free experience for the enemy.
Secondly, I have also noticed in some maps where there are multiple keeps; the Ai would stay in the original keep although that is not the best placement for the kings. An example of this would be in the Castle hopping Isle map.
Thirdly the recruitment of units by Ai, the AI tends to recuit the more expensive/scout units and the basic swordsmen and basic ranged the most during games. For example, Undead Ai would rarely hire zombies. Therefore the ai should have a more varied pattern of recruitment.
Those are just some vague ideas off the top of my head. Forgive me as I have not played in awhile to help furthermore. Plus I believe you have a pretty large list already. :P

May I also suggest that levels of difficulty in AI may be better suited to wesnoth as wesnoth players are varied in experienced. One may be put off by an excessively difficult Ai in their first game. Plus if I recall, chess has 3 levels of difficulty in their AI. I cant even beat easy but thats' a different story...
Goodluck!
Bye says the cookie.

User avatar
Alarantalara
Art Contributor
Posts: 782
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Defence strategies? (for the AI)

Post by Alarantalara » December 4th, 2012, 4:22 pm

cookie wrote: Secondly, I have also noticed in some maps where there are multiple keeps; the Ai would stay in the original keep although that is not the best placement for the kings. An example of this would be in the Castle hopping Isle map.
Thirdly the recruitment of units by Ai, the AI tends to recuit the more expensive/scout units and the basic swordsmen and basic ranged the most during games. For example, Undead Ai would rarely hire zombies. Therefore the ai should have a more varied pattern of recruitment.
These are both in the AI mattsc mentioned earlier in this thread. The recruitment isn't necessarily more varied, but it is usually more appropriate to the situation. Similarly, while it moves between castles on most maps, those on Cynsaun Battlefield are far enough away that it doesn't move to them yet (they require multiple turns of planning, whereas most maps only require looking ahead to the next turn).

User avatar
cookie
Posts: 170
Joined: December 21st, 2010, 6:57 am

Re: Defence strategies? (for the AI)

Post by cookie » December 5th, 2012, 12:07 am

I suppose you have never watched AI play their own games on maps alone ai vs ai. I remember when I used to test out maps for old friends, Ai didn't move to the keep they were best suited to. They don't move to other keeps regardless of how many turns you want to give them now either.

And yes the recruitment plan could be more appropriate to each faction however I don't think Ai should have a straight forward recruiting plan for each but rather variety instead should be at least in the easy level if you're even having it... If you watch Ai play by themselves with mirrored factions, you would notice the continuous recruitment of the same units. Its' predictable but I could say the same if they put in preferences for certain units for certain factions. However I do see it may be good to a degree that ai can recruit to be best capable of killing us.
I also wonder how you plan to implement these preferential recruiting. What if Ai was against a number of fractions how would it decide on which fractions to use? Eg. on the AuctionX map.

Watch some 2v2 maps with ai vs ai and all the same factions and then tell me that variety isn't needed or considered. Isars' may be the easiest to watch.
Bye says the cookie.

User avatar
Alarantalara
Art Contributor
Posts: 782
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Defence strategies? (for the AI)

Post by Alarantalara » December 5th, 2012, 1:46 am

cookie wrote:I suppose you have never watched AI play their own games on maps alone ai vs ai. I remember when I used to test out maps for old friends, Ai didn't move to the keep they were best suited to. They don't move to other keeps regardless of how many turns you want to give them now either.

And yes the recruitment plan could be more appropriate to each faction however I don't think Ai should have a straight forward recruiting plan for each but rather variety instead should be at least in the easy level if you're even having it... If you watch Ai play by themselves with mirrored factions, you would notice the continuous recruitment of the same units. Its' predictable but I could say the same if they put in preferences for certain units for certain factions. However I do see it may be good to a degree that ai can recruit to be best capable of killing us.
I also wonder how you plan to implement these preferential recruiting. What if Ai was against a number of fractions how would it decide on which fractions to use? Eg. on the AuctionX map.

Watch some 2v2 maps with ai vs ai and all the same factions and then tell me that variety isn't needed or considered. Isars' may be the easiest to watch.
I have watched more AI vs AI games than I can count recently. I invite you to watch this game of the AI I mentioned versus the more familiar AI on Castle Hopping Isle. All sides are played by an AI. Sides 1 and 4 are the current RCA AI, sides 2 and 3 are Ron/the Experimental AI to appear in 1.11.1. The game was played on version 1.11.0 of Wesnoth, so you should have no problems watching it. You will clearly see the AI for sides 2 and 3 moving to different castles, capturing villages and otherwise annihilating the old AI (the game lasts 16 turns and the outcome is clear far earlier).
4p_—_Castle_Hopping_Isle_replay.gz
(33.99 KiB) Downloaded 157 times
Side 3 recruited 10 DAs, 1 Ghost, 4 Ghouls, 3 Skeletons, 4 Skeleton Archers, 1 Vampire Bat and 1 Walking Corpse. Both opponents were Knalgan.

If you want to see more, check out http://forums.wesnoth.org/viewtopic.php ... 90#p539470 and beyond. The earlier replays show older, less impressive, versions of Ron and Fred but they get the point across.

Edit: As for how it decides what to recruit, it picks units based both on what it has and what the sum of all enemies have. When I had it play games on Auction X, this meant that the sides in the corners recruited lots of units that were very survivable for their cost (like spearmen) because they wanted to live to deal with the perceived overwhelming forces. On Cynsaun Battlefield, it recruits hordes of scouts to cover the map quickly, on Arcanclave Citadel it recruits units beside all the villages and captures them all on turn 2, if the map has easy routes to the enemy by water then more water units appear. The more units it has, the more it recruits healers to keep them all in the field. In 1 vs 1 play, you'll see it recruit counters to your units if you try to beat it by spamming mostly a single unit.

alex23
Posts: 179
Joined: October 27th, 2012, 5:54 pm

Re: Defence strategies? (for the AI)

Post by alex23 » December 5th, 2012, 6:26 am

However the new AI waisted alot of turns not attacking a gryphon rider who had no ranged damage with his adepts.. They were standing 1to1 for 4 turns without attacking each other (which seemed strange)

User avatar
cookie
Posts: 170
Joined: December 21st, 2010, 6:57 am

Re: Defence strategies? (for the AI)

Post by cookie » December 5th, 2012, 6:27 am

Thats largely impressive from what it sounds. Nice work, I look forward to playing it. :)
By the way how does the Ai behave in survival maps?
Also; you wouldn't happen to know how a replay file can get placed in a Macbook would you..... :annoyed:
Bye says the cookie.

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Defence strategies? (for the AI)

Post by Crendgrim » December 5th, 2012, 10:23 am

In case you did not know this: http://wiki.wesnoth.org/EditingWesnoth# ... rectory.3F
More than that I cannot say, though. :|
UMC Story Images — Story images for your campaign!

User avatar
cookie
Posts: 170
Joined: December 21st, 2010, 6:57 am

Re: Defence strategies? (for the AI)

Post by cookie » December 5th, 2012, 1:23 pm

Hey Crend; Could you go on "irc" on the channel where we usually talk? ...
Let the topic go back to the original purpose of this thread~
Bye says the cookie.

User avatar
Alarantalara
Art Contributor
Posts: 782
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Defence strategies? (for the AI)

Post by Alarantalara » December 5th, 2012, 2:28 pm

cookie wrote:By the way how does the Ai behave in survival maps?
Generally poorly.
As the attacker it would be very similar to the current AI since survival maps tend to skimp on recruitment opportunities for the attacker, though it would capture villages more aggressively which may actually make it worse than before.
As the defender, it still has no way to know what will appear from the triggered events so would be continually losing units due to bad positioning when enemies appear on top of them. This can really only be solved by the creator of the survival map customizing the AI for that specific map since analyzing the WML for a map and using that to predict where enemies will appear and reacting to them is extremely hard.

User avatar
cookie
Posts: 170
Joined: December 21st, 2010, 6:57 am

Re: Defence strategies? (for the AI)

Post by cookie » December 5th, 2012, 2:46 pm

It seems really bothersome if people have to customise towards the new ai. Though aggressively collecting houses would make it harder for the players in maps where income is concerned and needed, which is a plus for difficulty if one would want it. Is it's not possible to have various selections of AI, I remember in a previous branch of Wesnoth the Ai had several (I think 3 including a brute ai?) selections of choice perhaps 1.6? The survival maps could automatically be programmed to pick the default ai instead? It would probably save effort with customisation and I generally think the wesnoth Ai is fine in survival's as the user is usually already constricted with resources and area. Most games ai also is in advantage with more resources too.
Maybe, its just an idea. Honestly i'm sure the new ai will be an excellent addition to wesnoth. :)
Bye says the cookie.

User avatar
Temuchin Khan
Posts: 1715
Joined: September 3rd, 2004, 6:35 pm
Location: Player 6 on the original Agaia map

Re: Defence strategies? (for the AI)

Post by Temuchin Khan » December 7th, 2012, 11:26 pm

cookie wrote:It seems really bothersome if people have to customise towards the new ai. Though aggressively collecting houses would make it harder for the players in maps where income is concerned and needed, which is a plus for difficulty if one would want it. Is it's not possible to have various selections of AI, I remember in a previous branch of Wesnoth the Ai had several (I think 3 including a brute ai?) selections of choice perhaps 1.6? The survival maps could automatically be programmed to pick the default ai instead? It would probably save effort with customisation and I generally think the wesnoth Ai is fine in survival's as the user is usually already constricted with resources and area. Most games ai also is in advantage with more resources too.
Maybe, its just an idea. Honestly i'm sure the new ai will be an excellent addition to wesnoth. :)
I agree. Much as I like the idea of having more challenging AI, we must ensure that Wesnoth can still be beginner-friendly. So keep the RCA AI as an option, while adding the Ron AI. But I think that's what the developers intended to do anyway.

Locked