XOR AI activation not safe to use?

Started by Seravy, April 02, 2009, 10:34:20 PM

Previous topic - Next topic

Seravy

I was playing with Kurogane's Patchouli today, and noticed the AI turning itself on suddenly. I also suspect the reason (as it happened against a character I made), is the endcmdbuftime parameter in the Pause controller. The AI also turned on randomly when the cmd.buffertime was not 1 in the cmd file, however that is not a problem, as you don't set it to the wrong value if you know you used an XOR Ai ativation. But if it can get turned on from the opponent's code, then it is not safe to use such AI at all. Anything like that happened to anyone? As much as I don't like to say that, but if this is true, then the XOR AI is a mistake to use, and is unsafe. (After removing the XOR Ai activation code the AI doesn't get turned on anymore)
(Yeah, endcmdbuftime is rarely used, but it's actually very important. Without that the opponent's input gets messed up if pauses are frequent enough, and a time slowdown spell does use a pause for every second tick)
Please test it if you can, if this proves to be true, then people should stop using XOR Ai activations...

PotS

IIRC, the only AI method safe on its own is the IsHomeTeam one. The reason Winane used two or three of them at the same time was to cover each other's flaws.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

Bastard Mami

even while in theory the helper's command and the parent's commands are exactly the same if both are being controlled by a player, hitpauses mess that up.

Seravy

ewww...then I have to Null out all xor ai activations in my installed Kurogane characters. I hope other authors didn't use it.
IsHomeTeam? Which one is that? Is the normal (human impossible commands) method not safe?

Cyanide

You detect arcade mode, and ishometeam says that you're not player 1. In arcade mode player 2 is almost always the PC. It's possibly a good thing no one ever plays arcade using player 2's keys, or this method would probably be unsafe too.

humanly impossible commands is unreliable more than anything. You can't be sure it will activate over the course of the match. I generally allow the commands to kick in at any time, so, the only requirement is that the command was done. In addition, don't let your AI variable get wiped between rounds, if it turned on in round 1, keep it that way.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Seravy

My fried is ALWAYS using P2 to play....he doesn't like my settings for P1 keys. This AI detection seems to be the riskiest of them all.

Yeah human impossible is the slowest...but it won't activate when it doesn't need to. So I use that for my stuff (and keep the variable for the next round as well). Works quite good because the characters have few commands of their own (thanks to the card system).

Bastard Mami

Just make sure the commands are really impossible, a command like press x 5 times in one tick sounds safe at first, but then you can have a long hitpause or something that actually makes it possible.

PotS

Player side has no effect on the IsHomeTeam method. Come on, seriously, you'd think someone would've noticed that all these years, especially considering Winane thoroughly tested it. ;P

Its only problem is not activating on one-match-only fights, thus not working in Versus and Watch and whatever. If it did it'd pretty much be the perfect code since it only uses a few triggers in a pretty straightforward way.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

aokmaniac13

Another thing I want to bring up, Winane's activation method also includes a couple of failsafes to make sure that false positives are corrected quickly.  If people don't include the failsafes or do not implement them correctly, bad things happen.  I only recently found out that I've been accidentally mixing code from the 3 variable method and the 2 variable method which ended up causing problems.

Jesuszilla

Quote from: P.o.t.S. on April 03, 2009, 08:11:48 PM
Player side has no effect on the IsHomeTeam method. Come on, seriously, you'd think someone would've noticed that all these years, especially considering Winane thoroughly tested it. ;P

Its only problem is not activating on one-match-only fights, thus not working in Versus and Watch and whatever. If it did it'd pretty much be the perfect code since it only uses a few triggers in a pretty straightforward way.

Then what does it mean? I've never quite understood any method TBH, but I'd like to. I want one that's not only quick, but safe.

Bastard Mami

Quote from: Jesuszilla on April 04, 2009, 12:16:54 AM
what does it mean? I've never quite understood any method TBH, but I'd like to. I want one that's not only quick, but safe.

What do you mean by it ? I don't get your question.

Jesuszilla


Seravy

I checked Winane's code...so basically :
-the XOR method is safe in Winane's version, but Kurogane messed up by not including the variables for detecting pauses? (His one only checked for commands)
-The Ishometeam method is safe, fast, but doesn't work under some conditions? What conditions?
-The helper method is also safe if it is implemented correctly (Winane's version)?
-The mentioned "place the commands in the front for compatibility" is only required for Simul mode? (there are partner,command triggers, but no enemy,command ones)
-All three works independently without each other, in case I don't want to include one of them?
-Basically all the AIs that get false positives, only do so because the codes to detect pauses and custom states are not included properly?

I could use a faster AI activation than the human impossible one, but only if it never, ever, under no circumstances, gives a false positive. If Winane's code can do that, I'll consider using it.

Bastard Mami

I don't remember what's the exact set of triggers but,

IsHomeTeam

------------------------------------------------------------



Returns 1 if the player's team is considered the "home team". In arcade modes, the computer is always considered the home team. In versus modes, P1's side (left) is the home team.

PotS

Quote from: Seravy on April 04, 2009, 01:10:59 AM
-the XOR method is safe in Winane's version, but Kurogane messed up by not including the variables for detecting pauses? (His one only checked for commands)
Possibly.

Quote-The Ishometeam method is safe, fast, but doesn't work under some conditions? What conditions?
It's not only fast, it's instant, as in it activates even before the chars move. Doesn't work in modes that consist of one single match, like Versus.

Quote-The helper method is also safe if it is implemented correctly (Winane's version)?
I think so.
In my chars it never gives a false positive, and if I had used the other methods of Winane's version it wouldn't have false negatives either.

Quote-The mentioned "place the commands in the front for compatibility" is only required for Simul mode? (there are partner,command triggers, but no enemy,command ones)
Yes. As far as I recall at least, haven't read the txt in years.

Quote-All three works independently without each other, in case I don't want to include one of them?
Yes, but none of them is perfect on its own I think.

Quote-Basically all the AIs that get false positives, only do so because the codes to detect pauses and custom states are not included properly?
Possibly.

QuoteI could use a faster AI activation than the human impossible one, but only if it never, ever, under no circumstances, gives a false positive. If Winane's code can do that, I'll consider using it.
At least you could add the IsHomeTeam method to the command one, so it's instant in Arcade and Survival.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

DEMAN


trigger27 = (IsHomeTeam && TeamSide = 2)

this is what I use to make sure in arcade if CPU is P2 AI will alway active.

and it have no effect to player that play as P2

also with this code, some of my work have secret that will appear only when you find them in arcade. ;D


† Today you beg for your life, but one day you will beg me for your death †

Bea

Quote from: Frederica Bernkastel~ on April 03, 2009, 04:57:16 PM
Just make sure the commands are really impossible, a command like press x 5 times in one tick sounds safe at first, but then you can have a long hitpause or something that actually makes it possible.

Usually, a safer command is one that requires the player to press all directions and buttons at once. It is impossible to do in a joystick due to the direction keys, and impossible in a keyboard because that overflows the keyboard buffer, so there's no way for all the key presses to register.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.

c001357

what if you mod a joystick replacing a dpad with buttons?

Bea

You'd need 11 fingers to press all the buttons still.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.

c001357