Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI_OVERHAUL_PLACE* #780

Open
white-haired-uncle opened this issue Apr 24, 2024 · 8 comments
Open

AI_OVERHAUL_PLACE* #780

white-haired-uncle opened this issue Apr 24, 2024 · 8 comments

Comments

@white-haired-uncle
Copy link
Collaborator

I often see this:

        {AI_OVERHAUL_PLACE 5}
        {AI_OVERHAUL_PLACE_2 5}

Which seems to set ai aggression to 1.0, twice, ignoring the side argument. I can't say that it's broken in any way, but it looks strange enough to wonder if there's something not happening that should (or used to ?).

#define AI_OVERHAUL_PLACE SIDE

    [ai]
        aggression=1.0
    [/ai]
    # The micro AI is added elsewhere

#enddef
#define AI_OVERHAUL_PLACE_2 SIDE

    [ai]
        aggression=1.0
    [/ai]

#enddef

@white-haired-uncle
Copy link
Collaborator Author

white-haired-uncle commented Apr 24, 2024

I do have to wonder if aggression=1 is such a good idea. Is this why enemies sacrifice themselves by the dozens when they have no hope of survival?

Is it necessary due to some fast_ai quirk?

If 'aggression=1', no negative contributions are added to the score. Thus, the AI disregards damage done to its own units and selects attacks based solely on the damage it can do to enemy units. If the AI can inflict 1 damage and take 0, or inflict 2 damage and take 20, it will take the latter option.

@Dugy
Copy link
Owner

Dugy commented Apr 24, 2024

I think that's some kind of leftover from before the time when the micro_ai_fast became part of Wesnoth.

Aggression 1.0 means that enemies will try to maximise the damage they inflict, rather than some ratio of damage inflicted to damage taken. The AI generally doesn't know how to play without high aggression setting. On the other hand, I don't know if 0.9 would be enough by now. You can try to set it and see what happens. The problem I am afraid of is that enemy units will not attack, they will swarm your units but decide against attacking because it would be too costly, letting your units attack them under their own conditions.

@white-haired-uncle
Copy link
Collaborator Author

The problem I am afraid of is that enemy units will not attack, they will swarm your units but decide against attacking because it would be too costly, letting your units attack them under their own conditions.

I'm not sure if that's a bad thing. It's not good, but it might be better than what we have now. If they swarm, you would be forced use your army to help force you way through or lose on turns. Too many scenarios currently involve some form of "send E towards enemy X so they will all kill themselves, while L takes out side Y using fairie fire, then clean up".

Of course, if the AI thinks it can kill him by throwing two dozen units at him, each doing a little damage, while not realizing he'll heal it all back there may not be much we can do about it.

@Dugy
Copy link
Owner

Dugy commented Apr 24, 2024

I understand the problem, but it looks really weird when the enemies are simply moving around and not attacking. And it's equally exploitable, you can maximise damage to act as deterrent and use a massive AoE attack to kill many of them per turn.

That is why I am considering the option to slightly reduce armour per any hit, so that defeating several enemies in retaliation would reduce defences enough to make further retaliators deal noticeably more damage.

@white-haired-uncle
Copy link
Collaborator Author

Looks like it might be time to dust off an old forgotten project...
prefs

@Dugy
Copy link
Owner

Dugy commented Apr 25, 2024

Interesting. Are these things annoying just to you or to everyone?

@white-haired-uncle
Copy link
Collaborator Author

I don't know. I quit working on it when I realized that I couldn't think of more than a few options, and I didn't get any response when I asked if there were any suggestions. And I have no idead what to do with things like AI settings which change from scenario to scenario (I only put in aggression so that I could have an easy way of adjusting it on the fly without having to edit and f5 reload all the time).

I considered a fast_ai option, for those who would prefer long turns with a better AI. However, I now know that other decisions have been made based on the assumption that it is turned on, so just being able to disable it does not provide a "pure" result.
And I'm not yet convinced the AI would be much better without it. Not that I've gotten a look at all the work that has gone into the AI, making it configurable, the micro_ai, etc, I have a new respect, and some hope, for it, but I still think it plays rather poorly.

@Dugy
Copy link
Owner

Dugy commented Apr 25, 2024

You can try to remove the block that enables fast_ai and see what it does in areas with lots of attacks, abilities and weapon specials. I think you will be less than pleased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants