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 gets easily protect/switch baited #3346

Open
DizzyEggg opened this issue Sep 26, 2023 · 7 comments
Open

AI gets easily protect/switch baited #3346

DizzyEggg opened this issue Sep 26, 2023 · 7 comments
Labels
bug Bug category: battle-ai Pertains to Battle Engine Upgrade's AI status: confirmed This bug has been confirmed to exist in the codebase

Comments

@DizzyEggg
Copy link
Collaborator

Description

I knew our AI was easy to exploit, but this is ridiculously bad. AI is too predictable with its move selection when switching is involved. Here's a gif which illustrates the issue perfectly.

Ai protect switch bait

I have some ideas on how to fix it, but I'm open to hear what you guys have in mind. I also plan to have AI tests in the near future, so we would have more control over different AI scenarios, without the need to test everything by hand.

Version

1.5.3 (Default)

Upcoming Version

No response

Discord contact info

No response

@DizzyEggg DizzyEggg added bug Bug status: unconfirmed This bug has not been reproduced yet category: battle-ai Pertains to Battle Engine Upgrade's AI status: confirmed This bug has been confirmed to exist in the codebase and removed status: unconfirmed This bug has not been reproduced yet labels Sep 26, 2023
@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Oct 5, 2023

As far as I know most hacks that have some form of anti abuse AI work with counters (that are increased on switching/no damage taken). Once it reaches a certain number, the player will be punished for it.

@DizzyEggg
Copy link
Collaborator Author

As far as I know most hacks that have some form of anti abuse AI work with counters (that are increased on switching/no damage taken). Once it reaches a certain number, the player will be punished for it.

Yeah, counters are a good idea. There's already a switch-in counter which I added back in(though it's never used at this point) #2230.
As for punishing it depends what you mean by it. Ideally I'd want AI to 1) predict this may happen and 2) react appropriately.
Maybe something like using a move which hits hard the predicted switch mon. Or AI would themselves switch to a different mon, or use Roar. Obviously, it would need to be random, so the player couldn't predict what AI does.

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Oct 5, 2023

As for punishing it depends what you mean by it.

An example from the CFRU would be that it reads the switch in and changes it's move accordingly. I guess it's similar to what you described but in this case it will always know what mon is switching in. Even if you know it will read the switch, there is not much you can do so besides protect. Protect reduces the switch counter (not sure by how much).

An idea I had is to use a switch counter for every mon on your team. Once a threshold is reached, enemy mon will start using random moves against the mons that reached the threshold (reset once enemt mon dies). Might be overkill though and one counter is enough.

@ShadowzLmao2
Copy link

I think that being able to abuse the AI is key to making good strategies in difficult ROMHacks. An AI like Radical Red where it punishes you after enough switches as Alex mentions is a good idea. One change to RR's AI is that protect turns shouldnt count as turns between switches. Personally, in the scenario above, I would EQ the stunfisk and tbolt the pelipper but after player switches back into stunfisk, i would then make a safe play and pick the move that does the most to stunfisk while hitting pelipper and worse case there is no move that hits both, go for the hard predict into pelipper. It would have to be done in a realistic fashion and not based on % chances to do something otherwise playing a ROMHack would no longer be fun and only luck dependant. if the ai is manipulatable, it makes good videos

@AlexOn1ine
Copy link
Collaborator

I think that being able to abuse the AI is key to making good strategies in difficult ROMHacks. An AI like Radical Red where it punishes you after enough switches as Alex mentions is a good idea. One change to RR's AI is that protect turns shouldnt count as turns between switches.

I don't think we should port the CFRU (RR) behavior at all and come up with our own ideas.

@hedara90
Copy link
Collaborator

This might've been fixed, or at least mitigated.
The AI no longer gets completely manipulated when switching around.
switches

@pkmnsnfrn
Copy link
Collaborator

In the recent poll, this specific issued was mentioned twice, once by Pawkkie and once by Awakeon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: battle-ai Pertains to Battle Engine Upgrade's AI status: confirmed This bug has been confirmed to exist in the codebase
Projects
None yet
Development

No branches or pull requests

5 participants