Help with testing Fred - Freelands MP Custom AI v0.14.9

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderators: Forum Moderators, Developers

Re: Help with testing Fred - Freelands MP Custom AI v0.14.8

Postby Maboul » December 1st, 2017, 12:14 am

Here a replay against Rebels

AI-Fred-vs-elves.gz
(28.76 KiB) Downloaded 12 times


Fred is a coward, a really big coward...

The begining was not so bad, I've waited for him to attack and got a good piece of luck. But when I came to his side, this was awful.
He's made something terribly wrong on turn 23, fleeing on first watch when he was outnumering me.
He gave me villages for free, he doesn't really use his assassins to poison me. He put them on hexes where I could ZoC with only one unit.

I've been able to take the right side with only 5 units. In fact, I recruited only 12 units in the whole game
Each time I advanced my units on good def he was moving back. I've been able to steal his castle without much of a fight.
His leader finally flee to my right side, alone, where I could kill him with 4 units, he didn't even use his sword :hmm:
In fact, he had an attack EV around 450 for a 42 turns game :shock:

As usual for an AI, Fred can't manage "1xp to level up" units.

Maybe, Fred is overrating defense. Just moving forward on good def and Fred moves back... He's not really holding a front line, just optimizing defense of each units.

I've downloaded the add-on today, so I guess I was up to date.
I didn't get lua errors, and, in the end, Fred took some time to play (when he had 17-18 units) but not particulary long (faster than some human player ;) )

Hope this will help you and good luck in your project. :)
User avatar
Maboul
 
Posts: 50
Joined: September 26th, 2007, 7:28 pm
Location: France

Re: Help with testing Fred - Freelands MP Custom AI v0.14.8

Postby mattsc » December 1st, 2017, 12:40 am

Hi Maboul,

Thanks for the comments and the replay. I have not watched it yet, but I will do so and I am sure I'll get something useful out of it. I always do and appreciate the effort. I likely won't have much time for a couple days, so I just wanted to reply with a couple quick comments (and I'll look into things in more detail later):

Yes, the last release version, v0.14.8, is way too defensive. If you're interested, there's been much discussion on this in this thread over the last few weeks, but the main reasons are:
  • The most recent work has concentrated on defensive positioning, which is therefore over-emphasized at the moment
  • Too much testing against the default AI, as rambled about here
The current work focuses on trying to get the balance worked out a bit better. Unfortunately, RL commitments mean that it is very slow going. It is probably not worth doing a lot more testing with the current version, but to wait for the next release instead.

Maboul wrote:Hope this will help you and good luck in your project. :)

Thanks. :)
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby mattsc » December 7th, 2017, 5:50 pm

Based on all your feedback, I changed the emphasis of the immediate operations layer work toward reducing Fred's exaggerated defensiveness. Unfortunately (as always?), I've not had as much time to work on this as I would like. I nevertheless decided to publish the next release now, because I will start traveling on the weekend and will have even less time than usual for at least a week or two. So:


Fred / AI-demos v0.14.9 is now available on the Wesnoth 1.12 and 1.13 add-ons servers


Take this release with the following caveats:
  • Consider this an intermediate development release with incomplete changes that (probably) introduce some new problems and (definitely) do not address all known issues.
  • The emphasis of this release was on improving time-of-day dependent behavior against lawful factions (and only against lawful factions). This probably also works to some extent against neutral factions, but I don't think it's sufficient against chaotic factions. The overall increased aggressiveness might help against the latter a little too, but more work definitely needs to be done for those.
  • Because of the limited time I had available (and one technical issue mentioned in the "ramblings" below), I have done even less testing than usual. Thus, it is quite likely that there's some new weird behavior that I do not know about yet.

If you want to help, a small number (really just a couple) of replays against lawful factions would be useful, together with some comments whether the overall behavior got better or worse or didn't change on average. Does Fred switch to offensive behavior better now or is it still not enough? Or too much so? Please don't spend too much effort on it though. I will keep working on this myself as well and publish the next release when there is more progress.

Status of and plan for the current work is here.

A few more of my usual ramblings on known problems and general observations
  • One of the biggest problem is still charging ahead too much with individual units and then leaving them stranded. If anything, this probably got worse. This will be worked on once the large-scale behavior seems about right.
  • One of the unfortunate side effects of porting to Wesnoth 1.13 in the v0.14.8 release is that replays from before 0.14.8 cannot be used for automatic test case creation any more. The replays themselves still work and are extremely useful, of course, but if I want to extract a test case from them, I have to do so manually (which is quite painful). In combination with me having had little time, this means that I've done even less testing than usual so far.
  • The more aggressive behavior definitely has some side effects that have not been dealt with yet. Expect some (new) weird moves that apparently make no sense. :P
  • I don't remember if I have mentioned this before, Fred currently does not know how to deal with the enemy leader moving significantly off the keep. Yes, it's trivial to have him move toward the enemy leader rather than the enemy keep, but that has some other repercussions that are definitely not trivial to deal with. One of those things that I just have not gotten to yet ...
  • Fred's always done worse against Drakes than against the other factions. I think I might have finally figured out why. The overly defensive behavior meant units tried to stay out of the enemy's way. Since Drakes generally have higher mobility than Northerners, this resulted in Fred's units being too far away when it comes to switching to attacks. Time will tell if this is the correct interpretation and if the behavior against Drakes has (will have) improved. Also Fred definitely has some issues dealing with skirmishers.


v0.14.9 complete changelog
Code: Select all
----- 0.14.9, 7 Dec 2017  (increased aggressiveness vs lawful factions) -----

This is the first in a series of releases aimed at improving Fred's operations
layers assessment and the application of the operations orders in the tactics
layer. Its emphasis is on increasing offensive forward movement during favorable
times of day, in particular against lawful factions. This is an intermediate
development release with incomplete (and incompletely tested) changes.

- Fred (Freelands AI for Northerners, Side 1):
  - Operations layer:
    - Increased overall aggressiveness
    - Increased time-of-day variation of aggressiveness
    - Added contribution of power ratio at next turn to current aggressiveness
    - Increased assigned units per zone when we there is power to spare
    - Added assessment of fronts in each zone
    - Improved determination of forward direction, separated by zone
  - Holding:
    - Added/improved current time-of-day dependent power ratio in all
      evaluations
    - More aggressive pushing into vulnerable areas, and forward in general,
      when power ratio is favorable
    - Fully separated hold location evaluation between protect and non-protect
      holds
    - Allowed non-protect holds as last resort when trying to protect assets
  - Retreating:
    - Made units' desire to retreat dependent on current power ratio
    - Discouraged retreating of barely injured units and only rest healing
    - More careful retreating of high-XP and leveled units
  - Village grabbing:
    - Made acceptable damage dependent on current power ratio
    - More careful village grabbing with high-XP and leveled units
    - Derated expected damage from enemy leader
  - Functionality and misc. other changes:
    - Moved AI configuration parameters into dedicated file
    - Fixed bug in how fearless trait effect is assessed
    - New functions 'smooth_cost_map' and 'fgumap_blur'
    - Lots of internal changes and refactoring to implement the above changes
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby Cold Steel » December 8th, 2017, 6:37 pm

Well 14.9 does seem a good deal more challenging against loyalists.

loyalists_vs_14.9_income+6.gz
(37.96 KiB) Downloaded 14 times

In general, I felt he put forward a good balance of offense and defense this time. He launched damaging attacks at times and places that were not ready for them and other times avoided attacking strong defensive lines that would have consumed his available attackers.

Also noticed Fred's assassins do not suffer bad luck silently. :D

mattsc wrote:One of the unfortunate side effects of porting to Wesnoth 1.13 in the v0.14.8 release is that replays from before 0.14.8 cannot be used for automatic test case creation any more. The replays themselves still work and are extremely useful, of course, but if I want to extract a test case from them, I have to do so manually (which is quite painful). In combination with me having had little time, this means that I've done even less testing than usual so far.


Oops, I should not have skipped upgrading to 14.8 for so long then, sorry about that. How many modern replays would you want to have on hand before dropping the troublesome older ones?
Cold Steel
 
Posts: 259
Joined: January 6th, 2008, 3:32 am

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby mattsc » December 8th, 2017, 8:51 pm

Hi Cold Steel — thank you for yet another replay and the quick turn around!

I kind of like what I saw. Sure, Fred made lots of mistakes and got a resounding beating in the end, but I like the overall dynamics of switching between offense and defense much better than in previous versions. Still lots of room for improvement there too, obviously, but I'm happy to see any progress at all and that the changes are at least going in the right direction.

None of the big problems I see in the replay surprise me. They are all on my list of things to work on. Given that, I think I will continue to work on improving things against lawful factions for now. Making it work against other factions is comparatively simple afterward, but if I tweak things to also work against chaotic factions right now, I'll have to do the whole thing again after fixing the other major problems.

Cold Steel wrote:Also noticed Fred's assassins do not suffer bad luck silently. :D

He he. Yeah, there are a couple little easter eggs hidden in Fred, but they are set to trigger only a small fraction of the time (even when the conditions for them occur). This is the most "common" one.

Cold Steel wrote:Oops, I should not have skipped upgrading to 14.8 for so long then, sorry about that. How many modern replays would you want to have on hand before dropping the troublesome older ones?

No need at all to be sorry, what you're doing is great. Another replay or so (also against loyalists or drakes) by you or others would be nice, just to see if the impressions from this one hold up. But quite honestly, this replay on its own gives me plenty to work with already. If I notice that other test cases would be good as I go along, I'll speak up here, but my guess is that even then it would probably make sense for me to release the next (dev) version before asking for more replays. (And I still can get test cases out of the old replays in much less time than it takes you to play another game, it just isn't automatic any more.)
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby Cold Steel » December 9th, 2017, 5:16 pm

Indeed, he is vastly improved. Tried another round (this time with drakes) and found I had to stick to more conservative strategies to win in the end. Also playing with drakes seemed no less challenging than with loyalists, so he may have overcome his fear of scaly creatures.

drakes_vs_14.9_income+6.gz
(31.44 KiB) Downloaded 13 times
Cold Steel
 
Posts: 259
Joined: January 6th, 2008, 3:32 am

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby mattsc » December 10th, 2017, 2:55 pm

Cold Steel wrote:Indeed, he is vastly improved.

Yay! I've been waiting for a long time for somebody to say that. More precisely, I've been waiting for Fred to give somebody a reason to say that. ;)
Now, looking at the replay(s), I don't have the offense/defense balance quite right yet and there's a serious issue with coordination of some actions between units or groups of units. But it's progress, so that's good. The work on the operations layer still has a long way to go and as I wrote, there's no way that I'll get this all right the first (or second) time around.

Cold Steel wrote:Also playing with drakes seemed no less challenging than with loyalists, so he may have overcome his fear of scaly creatures.

:)
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby Cold Steel » December 10th, 2017, 8:19 pm

Yeah, I imagine it should take several "feature" releases to check off all the operations layer tasks you have on the vast 0.14.10 blueprint, followed by or mixed in with the lighter "tweak" releases that adjust the utility weightings to compensate for these new features.

And while I know you want to manage expectations, I have to say I am really excited to watch the operations layer emerge from the development soup. Even if the first steps down this path are uncertain, as it matures, I think it will be a leap ahead of even where Fred is already.
Cold Steel
 
Posts: 259
Joined: January 6th, 2008, 3:32 am

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby mattsc » December 10th, 2017, 10:54 pm

Cold Steel wrote:And while I know you want to manage expectations,

Hah, yeah, I guess you're right, although mostly it's my own expectations. As you know, I've been at this for a long time, and for quite a large fraction of that it felt like I was moving in circles and Fred wasn't going anywhere. But it looks like the "recent" approach of concentrating on the individual actions first and now trying to bind them all together might finally be starting to pay off. So, I'll counter your "excited" with a "cautiously optimistic". ;)
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby Cold Steel » December 14th, 2017, 4:53 pm

Fair enough. :)

Just for fun, I did a round with rebels. I thought they might be interesting because rebels are "offensively lawful" since their two main line breaker units are lawful, but they are otherwise mostly neutral. I guess you could say they are technically lawful and in the end what could be more lawful than bending the rules on a technicality?

rebels_vs_14.9_income+6.gz
(29.92 KiB) Downloaded 10 times
Cold Steel
 
Posts: 259
Joined: January 6th, 2008, 3:32 am

Re: Help with testing Fred - Freelands MP Custom AI v0.14.9

Postby mattsc » December 15th, 2017, 3:23 pm

Interesting. From a first quick run through the replay, I'd say both the overall behavior and the major mistakes are generally the same. I've had pretty much no time for Fred since the last release, but hopefully that'll change over the next few days. Trying to figure out how to coordinate actions better and not leave units stranded as much remains the highest priority at this time.
mattsc
 
Posts: 991
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Previous

Return to Multiplayer Development

Who is online

Users browsing this forum: No registered users and 4 guests