Random issues with Random

Started by hjk, November 25, 2007, 03:43:44 AM

Previous topic - Next topic

hjk

Quote from: P.o.t.S. on November 25, 2007, 01:51:55 AM
In before Tee Hee Hee's post of random bogus bugs. :wacko:

I knew it would be you.


Random REAL Bugs... just a correction...  ;)   
(You're like a big brother... I actually consider you one of my Big Brothers  ;D )

See this video...:
http://www.youtube.com/watch?v=RVaCLIk3zrs


Guile's Combo code is not random at all. Each of the "movecontacts" for each different state are the exact same and yet, he switches between them with no "random" sets at all  ;)




Quote from: The Inmortal Pirate on November 24, 2007, 11:52:25 PM
Also, I didn't see a thread like this existing already.

I've created a lot of threads like this... The sucky thing about it is that I'm the only one testing, checking, recording, and doing god knows what else... posting my codes (only to have people say "There's nothing wrong with what you've coded/posted Tee Hee Hee," then to have it said every time, there must be some other mistake you've made. I just wish everyone could be right next to me, IN PERSON, so everything was direct instead of over the IIINTEEEEERRRNNNEEETTT!!!! :omg:

By reputation, I hope, that it can be said that I try to be a s thorough as possible. In the forum I have read entire 14 page topics before making my posts, I doubt that it would be different for me while coding AI (mind you I code it in the simplest, of simplest manners  ;), but somehow a foot gets shoved up my rectum... somehow :gonk:... without me actually getting proved wrong :wall:
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Cyanide

How is that a bug though. (here we go again XD) I mean, as has been stated before, the default cmd statechanges still have an effect and mugens AI will still make use of them even if you haven't put codes in place for them. None of my AI's would walk or jump if that was the case.

All thats happening is mugen's AI is picking every second or 3rd state. As far as i can tell the combo is almost always STARTING with the same move. It's not picking a random one out of a hat to begin the combo. So that's where your no random comes in. Whats happening next is mugen winds up using a default state, possibly because some of your conditions aren't met but there's enough there for mugens button jam AI to kick in and your next one will trigger normally. Now if the trigger for your combo was solid movehit with no dist triggers involved (or animelemtime not sure if you're using that) it would probably just run through the same combo every time like dragonclaw does.

Lack of random in an AI isn't a good plan either.


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.

hjk

#2
Quote from: Cyanide on November 25, 2007, 06:49:12 AM
How is that a bug though. (here we go again XD) I mean, as has been stated before, the default cmd statechanges still have an effect and mugens AI will still make use of them even if you haven't put codes in place for them. None of my AI's would walk or jump if that was the case.

You don't remember what I said do you  ?_?   >:(

I SAID THAT WE DISABLE THE DEFAULT STATE CHANGES USING:

"triggerall = !var(59)"


Geez, please, please, (mind you I am kind of upset), if you're gonna make a post with a reference to the past, GO BACK AND CHECK WHAT I SAY!!!

I mean, look at KOD's Terry, Look at my AI Patches, you will find that exact code... it wouldn't kill ya to look now would it  ;)


For the rest of the responses... I'll be back later to reply



Quote from: Cyanide on November 25, 2007, 06:49:12 AM
Lack of random in an AI isn't a good plan either.

And This... WHAT THE HECK IS THIS!!!  >:(  (just getting more angry... I don't like to hide how I feel if it is honest...)

Download my patches or at least watch the videos that I launch (the ones with "hjk post" in the descriptions)...
Winane and I already discussed my random coding BTW if you want to say it's flawed at all...
THE RESULTS of what is coded rule over what is thought, if you say that I am wrong  ;D... but I dunno, I still could be wrong even though the chars I code are extremely random (esp. KOD's Terry... the newest update is coming BTW  ;) )
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Byakko

QuoteI SAID THAT WE DISABLE THE DEFAULT STATE CHANGES USING:

"triggerall = !var(59)"
Right, you even disable the inbuilt statechanges like jump and walk ? Oh wait, you can't. They're inbuilt !
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Jesuszilla

[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = Var(59)
flag = NoWalk


For walk, anyway.

Byakko

I know, but he spoke about disabling "the default cmd statechanges". This isn't one :P
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

hjk

#6
Quote from: Baiken on November 25, 2007, 11:30:37 PM
QuoteI SAID THAT WE DISABLE THE DEFAULT STATE CHANGES USING:

"triggerall = !var(59)"
Right, you even disable the inbuilt statechanges like jump and walk ? Oh wait, you can't. They're inbuilt !

No Baiken, of course I didn't... this is what I mean by reading the post.... maybe I should add in a properly.

This is not a discussion of whether the jump or anything like that is triggering, the subject of this discussion was how the combos were activating randomly!!!

This discussion is really for the people who were involved in the past topics. To come in now means that you were uninformed about the situation. You would have to go back and see the old topics first, then reply. (Also, notice that I isolated certain parts of that response and replied... because they were directly in response to my point...  ;)  )

Please, read the old topics and my post again  ;D .
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Cyanide

Well downloaded your latest AI for charlie and the character itself (after some painful searching, fucking youtube) I'm going to have to wait for the newer AI. Looked through the CMD and saw all the original state changes without the !var(59) on them, so currently cannot provide any useful input other than charlie is a bit crap. No givepower on any moves and he gains 150 for blocking. I was wondering why it went up so bllody fast.

I will await the latest release and at least look at what's occuring.


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.

hjk

#8
Quote from: Cyanide on November 27, 2007, 08:41:27 PM
Well downloaded your latest AI for charlie and the character itself (after some painful searching, fucking youtube) I'm going to have to wait for the newer AI. Looked through the CMD and saw all the original state changes without the !var(59) on them, so currently cannot provide any useful input other than charlie is a bit crap. No givepower on any moves and he gains 150 for blocking. I was wondering why it went up so bllody fast.

I will await the latest release and at least look at what's occuring.

With Charlie I think I copied and pasted the old disabling code I used (I just checked him)...:

"triggerall = var(59) != 1"

For each of the states I wanted supressed.  ;D




I used to use that because of the way I activated the AI and just coded in a from derived from the activation


[State -1, AI]
type = VarSet
triggerall = var(59) != 1
trigger1  = command = "cpu1"

...

trigger50  = command = "cpu50"
var(59) = 1



OK, same effect, different code... I wonder if Haohmaru and Hinata still use "triggerall = var(59) != 1" :thinking:... well that will for sure be updated if not.  ;)
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Cyanide

Don't have it on me right now but, and we're going back in the thread here. Due to your reaction to me saying this
QuoteLack of random in an AI isn't a good plan either.
which was my comment in reaction to
QuoteGuile's Combo code is not random at all. Each of the "movecontacts" for each different state are the exact same and yet, he switches between them with no "random" sets at all

Are you still using random > 40 && random < 80 on one move then on the next random > 80 && random < 120 for eg, you have a 1 random gap there that could allow a different move to fire off.

I've been meaning to test random to see if it stays the same throughout a pass of state -1 or state -2 or if it changes as it goes. If it stays the same then if 1 attack is missed all will be missed until the next pass. Using the 0.948 currently available on the webiste give btw.

I may have a couple of blanks in my memory here. I don't know what you've discussed with winane but at this point this sounds like a reasonable explanation for a random combo that's set up in such a way that it shouldn't be random, or something. Will look again when i have the chance. Or if this is occuring in a newer AI patch, when you release it.


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.

PotS

So that's what you meant by "no random in AI"? :omg:
Each time you use random it generates a new number from 0 to 999, so specifying intervals to trigger each move like you did  does nothing, it's still entirely random.
It's not like Mugen creates a number that will be used during the whole tick everytime you use the random trigger, in that case it'd work, but again like I said it simply creates a new number everytime you use the trigger.

I have the feeling you won't buy this, so have some proof:


Spoiler (click to show)
[State -2, Debug]
type=displaytoclipboard
trigger1=1
text="Random=%d Random=%d Random=%d Random=%d Random=%d"
params= random, random, random, random, random
ignorehitpause=1
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.

Cyanide

Err, is that addressed to me? If so, makes perfect sense. I'm having more trouble understanding what teeheehee is speaking of than how random works.

He's got GIANT random gaps in that case, and any move could be triggering equally. Or i've got lost in translation somewhere.

Either he's not using random and the combo is just going straight through like dragonclaw for basics (slash>slash>slash>special) or he IS using random in which case all moves have = or almost = ability to be activated based on triggers.

If he's not using random, he's disabled the default states with a triggerall so AI can't access them and the combo is still random during this time, then we have a bug. Which implies the cmd isn't read from top to bottom, although we know it is because otherwise i wouldn't get new creators asking why their super isn't activating. More clarification needed.


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.

hjk

#12
Quote from: Cyanide on November 29, 2007, 11:17:48 PM
Are you still using random > 40 && random < 80 on one move then on the next random > 80 && random < 120 for eg, you have a 1 random gap there that could allow a different move to fire off.

I'm sort of using that kind of random coding and here is where the discussion that Winane and I comes in.

I use a code that ios more like:

value = Y1
trigger1 = random > 40
trigger1 = random < 80

value = Y2
trigger1 = random > 80
trigger1 = random < 120

Now, here's the thing.
Winane told me that this would register values that were not precisely what I coded for and were instead only leaving out 40 values that couldn't be triggered out of the 999.
He had said he would recommend that I use:

value = Y1
trigger1 = random = [40,80]

My reply was that I had already tested that and it came out pretty much the same way, BUT, if what he said about the original way I coded for random states was true, then how is it that "Ultimate Terry" in particular was able to be so random (in both combos and initial attacks) as well as some of my other AI patched chars:

Reference This Video (in particular):
Ultimate Terry:
http://www.youtube.com/watch?v=h55Ucwt_9ZY



Quote from: Cyanide on November 29, 2007, 11:17:48 PM
I may have a couple of blanks in my memory here. I don't know what you've discussed with winane but at this point this sounds like a reasonable explanation for a random combo that's set up in such a way that it shouldn't be random, or something. Will look again when i have the chance. Or if this is occuring in a newer AI patch, when you release it.

Take Ultimate Terry and view the Results over anything else.
BTW, there is a newer update that hasn't been released yet, where I made his combo code more random... based on the results I got



Quote from: P.o.t.S. on November 29, 2007, 11:42:10 PM
So that's what you meant by "no random in AI"? :omg:
Each time you use random it generates a new number from 0 to 999, so specifying intervals to trigger each move like you did  does nothing, it's still entirely random.
It's not like Mugen creates a number that will be used during the whole tick everytime you use the random trigger, in that case it'd work, but again like I said it simply creates a new number everytime you use the trigger.

I have the feeling you won't buy this, so have some proof:
http://img441.imageshack.us/img441/7144/randomzk0.png

I think you should have waited until I had actually replied before you made that post  ;)

I know that each time you use random a new number from 0 to 999 is triggered. Winane taught me that about a year ago.

Besides that Winane also showed me a piece of info I had been reading up on in my programming class before. Mugen tends to be "Pseudo" Random (... I Love You with that last convo Winane  ;D )... that is the values it registers, I believe, are plugged into an equation and will come out sometimes in a series of either similar or recurring values.

I really started to notice this while making the Haohmaru Patch, which I believe I added some notes to (within the CMD file), about what effects changing certain values will have.

When I am done modifying Cammy, I want to demonstrate that there is actually a HUGE DIFFERENCE between coding "random > 990" and "random > 989".




Quote from: Cyanide on November 30, 2007, 12:20:58 AM
Err, is that addressed to me? If so, makes perfect sense. I'm having more trouble understanding what teeheehee is speaking of than how random works.

Or i've got lost in translation somewhere.

Either he's not using random and the combo is just going straight through like dragonclaw for basics (slash>slash>slash>special) or he IS using random in which case all moves have = or almost = ability to be activated based on triggers.

If he's not using random, he's disabled the default states with a triggerall so AI can't access them and the combo is still random during this time, then we have a bug. Which implies the cmd isn't read from top to bottom, although we know it is because otherwise i wouldn't get new creators asking why their super isn't activating. More clarification needed.

Note - Part of quote deleted:

I will explain what is happening in the video I originally posted with Guile in a while, Right Now HW, you guys kind of misinterpretted what I was saying  ;D...

LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

Byakko

#13
Quotetrigger1 = random > 40
trigger1 = random < 80

value = Y2
trigger1 = random > 80
trigger1 = random < 120
Erm. Comments on that...

First line, random > 40 ? There's a fat chance it will be true. Second line... That's 80 possible values out of 1000.
In total, the odds of Y1 being triggered is 96% x 8%, which is ~7.7%. Whereas random = [40,80] is 4% chance. Not quite the same. Basically, every tick, you have a ~7.7% chance of it being triggered. Not huge, but if the interval of time lasts long enough, it probably will be triggered.

Use random = [40,80] instead, really, because this doesn't make all that much sense. The number generated changes between each of your 4 lines, you're probably not going to get what you want.

Similarly, for Y2, it's not really useful to use [80,120] as if they were following each other, it's just that there's 40 values out of 1000 that will have it triggered. The fact that those 40 values start at 40 or 80 doesn't change anything.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

PotS

Quote from: Cyanide on November 30, 2007, 12:20:58 AMErr, is that addressed to me?
No, at Tee Hee Hee now that you've mentioned what he meant.

And the Random trigger is perfectly random, I've already tested it. If you do something like:

type= varadd
trigger1= time<1000
trigger1= random<R
var(1)=1

var(1) will be approximately R.
So there is no advantage in using stuff like random=[500,600] over stuff like random<=100.
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.

Cyanide

Based on POTS test, and the fact that random is re-evaluated on a per trigger basis, using < # for every random in an AI would probably be the best way to go. You could set very definitive %'s there and it would be rather faster than plugging in [#,#] and <= > things.


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.

Bastard Mami

varX = random

the use var X, there is no cahcne of it changing until the next tick, and you will avoid a lot of headaches. personally i use varX = random%100 to manage probabilities in the percent range.

hjk

#17
Quote from: P.o.t.S. on November 29, 2007, 11:42:10 PM
So that's what you meant by "no random in AI"? :omg:

Quote from: Cyanide on November 30, 2007, 12:20:58 AM
Err, is that addressed to me? If so, makes perfect sense. I'm having more trouble understanding what teeheehee is speaking of than how random works.

Or i've got lost in translation somewhere.

Either he's not using random and the combo is just going straight through like dragonclaw for basics (slash>slash>slash>special) or he IS using random in which case all moves have = or almost = ability to be activated based on triggers.

If he's not using random, he's disabled the default states with a triggerall so AI can't access them and the combo is still random during this time, then we have a bug. Which implies the cmd isn't read from top to bottom, although we know it is because otherwise i wouldn't get new creators asking why their super isn't activating. More clarification needed.

Quote from: P.o.t.S. on November 30, 2007, 02:03:55 AM
Quote from: Cyanide on November 30, 2007, 12:20:58 AMErr, is that addressed to me?
No, at Tee Hee Hee now that you've mentioned what he meant.


@ The Three Quoted Replies...

Uh, Uh. :no:

What I meant by "No Random AI" concerning qwerwgrebew's Guile AI patch is that qwer did not know anything about random at the time he was creating that patch and so literally coded:

Within the spoiler is the code... below it is further explanation

Spoiler (click to show)
value = Y1
trigger1 = stateno = 200
trigger1 = movecontact
trigger2 = stateno = 210
trigger2 = movecontact
triegger(n) ...

value = Y2
trigger1 = stateno = 200
trigger1 = movecontact
trigger2 = stateno = 210
trigger2 = movecontact
triegger(n) ...

value = Y3
trigger1 = stateno = 200
trigger1 = movecontact
trigger2 = stateno = 210
trigger2 = movecontact
triegger(n) ...

.....

value = YN
trigger1 = stateno = 200
trigger1 = movecontact
trigger2 = stateno = 210
trigger2 = movecontact
triegger(n) ...


While disabling the original Mugen AI.

As you can see, everything was identical and somehow his combos were still coming out randomly; when they shouldn't have

As for me, I started to really pick up in the fact that Mugen sometimes missed it's values while I tested qwer's Kim AI Patch. I found that combos sometimes DID NOT OCCUR when we coded teh contact/hit for exactly 1 tick (as stated in previous topics). I also noticed that in some CNS Changestates (even though there was ctrl = 1 while transferring from the state), they should have changed 100% of the time but instead did not always (as some of you will see later).

Basically, these are the things I have been saying were wrong. I really feel as though Guile especially is an interesting case. (why is it that I feel as though I deleted his update from my computer :omg:... Oh well, I can just recode what I remember  ;) )





Quote from: Baiken on November 30, 2007, 02:01:15 AM
Quotetrigger1 = random > 40
trigger1 = random < 80

value = Y2
trigger1 = random > 80
trigger1 = random < 120
Erm. Comments on that...

First line, random > 40 ? There's a fat chance it will be true. Second line... That's 80 possible values out of 1000.
In total, the odds of Y1 being triggered is 96% x 8%, which is ~7.7%. Whereas random = [40,80] is 4% chance. Not quite the same. Basically, every tick, you have a ~7.7% chance of it being triggered. Not huge, but if the interval of time lasts long enough, it probably will be triggered.

Use random = [40,80] instead, really, because this doesn't make all that much sense. The number generated changes between each of your 4 lines, you're probably not going to get what you want.

Similarly, for Y2, it's not really useful to use [80,120] as if they were following each other, it's just that there's 40 values out of 1000 that will have it triggered. The fact that those 40 values start at 40 or 80 doesn't change anything.

I see... very interesting.
The funny thing is, then, that I have put so muych time into figuring out how to code to get what I want out of my way random coding (which took forever).

The multiplication you showed for my random triggering ~7.7% of the time is new to me, but that might have been what Winane was trying to say (I dunno though  :S )




Quote from: Cyanide on November 30, 2007, 02:49:42 AM
You could set very definitive %'s there and it would be rather faster than plugging in [#,#] and <= > things.

Yep, that's exactly the advice R[E]ika gave me when we discussed it in a previous topic.  ;D
I still code random my way, just so there can be further analysis of what is going on.
I really wanted to have this issue fully figured out.




Quote from: R[E]ika on November 30, 2007, 05:17:48 AM
varX = random

the use var X, there is no cahcne of it changing until the next tick, and you will avoid a lot of headaches. personally i use varX = random%100 to manage probabilities in the percent range.

Yep, I noticed that, that works really well for Warusaki3's Groove mode and it is really good advice.
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.

PotS

I really want to see that cmd now. :thinking:
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.

hjk

Quote from: P.o.t.S. on November 30, 2007, 06:55:09 AM
I really want to see that cmd now. :thinking:

Thought So  ;)

You can pretty much try it yourself and see what comes out.

It's a really simple code  ;D
LOL, Caddie's the man!! ;)

I'm as real as the runnin, I just happen to rap, Nigaas London, Japan, and i'm scared of dat tap.

I suggest extending my banning, cuz when I come back, it's gonna be hell. You think I was annoying before, oh man, it's on now :)
hjk vs. 99% of MFG. I will win.

RIP Poo Bear Tell my Dead Homie isson, for the year my partner.