-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve how AI chooses damaging moves #3199
Conversation
What do you think about removing this switch block?
Your PR takes care of a lot of edge cases and this block looks unnecessary with it. You would just get score increases for the sake of increasing it. Also how valuable are these checks?
Since you made the AI pick the best damaging move in
/Edit: resolved in discord |
I did some testing and my suggestion generally would be to only decrease the score when compared to a better move.
If the comparison from this PR are applied it ends up like this
My suggestion would be to decrease the bad moves only
Same result but you don't inflate the score The problem gets worse if there are 2 different bad moves present, like a less accurate move and a recoil move. /Edit: I just noticed the decreases are somewhat inconsistent in the PR. Sometimes it increases and decreases, sometimes it only increases. Like I said my suggestion would be to only decrease but regardless I would make it consistent across the board. |
Despite the issue you Alex mentioned I still think this PR does more good than evil. Would it be fine to merge it to upcoming and then improve it? The thing is even if it's not perfect with this PR, it is still worse without it. Also, I hope to have AI tests soon, so it'll be easier to catch these issues. |
@AsparagusEduardo Should be ready to merge. |
Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>
Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>
Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>
This reverts commit b59556a.
Fixes #3130
Fixes #3153
The general flow should be like this(assuming there are no special effects which would otherwise be more preferable):
if can faint -> choose the move without side effects(e.g. recoil, recharge, loading turn), and with better accuracy(e.g. Tackle over Mega Punch if both are 1hko)
if can't faint -> choose the move which takes the least no of hits to KO, but only if the other move doesn't have any advantages(otherwise it's a toss-up and depends on the battle conditions).
Also fixed Taunt's score to be minus 10 and improved handling of Solar Beam.
Before:
After: