Staredit Network

Staredit Network -> UMS Assistance -> Randomize Systems
Report, edit, etc...Posted by The.Warchief on 2007-02-08 at 11:32:33
My Smartass Theory.
I'll give a short example for randomize system as most of people do it, with 4 possibilities
There will be 2 switches in that case:

00 - Possibility one
01 - Possibility two
10 - Possibility three
11 - Possibility four

The problem with this system is that, statistically, it is more likley to have possibilities two and three. It is less likely to get possibilities one and four, because there are less chances to get the same result twice.
I mean, lets think of a coin. my chances to get Heads are 50%. But my chances to get heads twice straight are 25%, and for 3 times it'll be 12.5% etc.

I suggest a system which is a little bit more complecated, but may give more accurate and fair result.
I'll draw it as a graph to make it clear and simple, with also, 4 possibilites.
sorry for the dots, space wont work :/

......................[switch1]
...................../............\
...............[switch2].....[switch3]
.............../..........\........./.........\...,
.......[First]..[Second][Third]..[Fourth]

Anyway this is more like a discussion but it should go in ums so dunno...
But tell me what you think!
Report, edit, etc...Posted by spinesheath on 2007-02-08 at 11:45:51
Switches, not Triggers (3rd line).

And you are wrong. You are mixing up experiments with distinctable results and undistinctable ones. Of course it is more likely to get 1 "set" and 1 "cleared", but the single combinations 00, 01, 10, 11 have equal chances.

Go inform yourself about combinatorics, for example here.
Report, edit, etc...Posted by The.Warchief on 2007-02-08 at 11:56:37
QUOTE(spinesheath @ Feb 8 2007, 06:45 PM)
Switches, not Triggers (3rd line).

And you are wrong. You are mixing up experiments with distinctable results and undistinctable ones. Of course it is more likely to get 1 "set" and 1 "cleared", but the single combinations 00, 01, 10, 11 have equal chances.


Fixed.

What do you mean 'single combinations'?
00, 01, 10, 11
Each one of them is a combination of 2 switches isn't it?


Report, edit, etc...Posted by rockz on 2007-02-08 at 12:04:35
Is this what you are trying to say?:

if 1 is set, randomize 2
if 1 is clear, randomize 3
if 2 is set and 1 is set, action 1
if 2 is clear and 1 is set, action 2
if 3 is set and 1 is clear, action 3
if 3 is clear and 1 is clear, action 4
so you have 3 switches and 4 actions? You'd do better to use binary death counters.

Also, I thought if you consider 2 switches as 4 outcomes, it's a permutation, whereas a combination is 2 switches as 3 outcomes. Either way, it's all names, and we all can figure this stuff out with a little thought.
Report, edit, etc...Posted by T-a-r-g-e-t on 2007-02-08 at 12:04:43
you obviously have some degree of knowledge about randomizing, but i think you are a little confused. you are right in that the chances decrease of getting the same result as the previous result, but a new random system is not required, as each possibility has an equal chance. think it through.

00 - 25% chance
11 - 25% chance
01 - 25% chance
10 - 25% chance

you should look out for my tutorial soon, as im posting an advanced binary formula, allowing editors to create potentially thousands of binary results using minimal triggering. its basicaly multiplying binary by binary. very effective.
Report, edit, etc...Posted by JaFF on 2007-02-08 at 12:10:17
Warchief, I think you're wrong. The chances of each of the two switches becoming 1 or 0 after randomization individually are 50%. I think you won't argue with this. So we have 0.5[sup]2[/sup] chances of getting each of the four results. The example taht you gave with a penny would describe one switch being randomized twice.
Report, edit, etc...Posted by The.Warchief on 2007-02-08 at 12:16:37
QUOTE(rockz @ Feb 8 2007, 07:04 PM)
Is this what you are trying to say?:

if 1 is set, randomize 2
if 1 is clear, randomize 3
if 2 is set and 1 is set, action 1
if 2 is clear and 1 is set, action 2
if 3 is set and 1 is clear, action 3
if 3 is clear and 1 is clear, action 4
so you have 3 switches and 4 actions?  You'd do better to use binary death counters.

Also, I thought if you consider 2 switches as 4 outcomes, it's a permutation, whereas a combination is 2 switches as 3 outcomes.  Either way, it's all names, and we all can figure this stuff out with a little thought.
[right][snapback]624666[/snapback][/right]


Thats exactly what i mean.

Does the binary death counters work differently from what I've been showing in the first example?
Report, edit, etc...Posted by spinesheath on 2007-02-08 at 13:03:35
QUOTE(rockz @ Feb 8 2007, 01:04 PM)
Also, I thought if you consider 2 switches as 4 outcomes, it's a permutation, whereas a combination is 2 switches as 3 outcomes.  Either way, it's all names, and we all can figure this stuff out with a little thought.
[right][snapback]624666[/snapback][/right]


Yeah that might be, I don't care about the names as all, and especially not if I have to translate them wink.gif

Anyways, when randomizing 2 switches, we look at ordered pairs of 1s and 0s. There are 4 possibilities, all with a chance of 25%.
What you were mixing up is the number of 1s or 0s. If you throw your coin twice, or two coins - it does not matter - and count the number of 1s, 1 "1" will be the result most likely. But this is different from what we do with our switches.
Report, edit, etc...Posted by rockz on 2007-02-08 at 14:56:13
I'll try to explain what I mean by binary death counters, but it's essentially a way to store all the data you want in 1 area, rather than scattered across 40 switches. What you would do is have one switch control the single digits, then another switch control the doubles, and so on and so forth, so you could have a binary number like 1111 0000 1011 1001. As you can see, that's 16 switches, and all of them can be stored in binary, but you will have to convert them into decimal for any practical use in starcraft. Those 12 digits in binary happen to be 61625 in decimal, so that would be your death counter.

Now, what's nice about this way is that you now have a decimal number based on those switches. Now you can detect a RANGE of values (in decimal) and have their weights based off of the range/total number of outcomes. This way, you can have a 5% chance, along with a 17% chance, and a .3% chance of doing 3 different things.

I'll give one more example much easier. With your 3 switch example:
We will randomize all 3 switches somehow, then:
if 1 is set, add 1 to DC
if 2 is set, add 2 to DC
if 3 is set, add 4 to DC
As you can see, we now have a total of 8 possibilities, 0-7.

So with 3 switches, I can get 8 random actions, and by storing it in a death counter, I can can make a trigger with only 1 condition, rather than the 3 it would require by simply calling each switch individually. Not to mention, it is very easy to calculate the odds by using a death counter, as well as adding in something like an "or" into the conditions.

If you don't get it, I can try to explain it further. In all honesty, it's something I just came up with, but it's really nothing new, as I'm sure other people have documented this in some other way.

In fact, the game Baldur's Gate uses the same concept to determine what type of damage is being used, like whether it's straight fire, fire percent, magical fire, or straight bludgeoning etc... It's not uncommon for the call number for each of these to be 4294967296 or above.
Report, edit, etc...Posted by PCFredZ on 2007-02-08 at 22:36:40
Let's postpone discussions of switches and death counts until the thread starter figures out just what his map making assistance question is.
Report, edit, etc...Posted by rockz on 2007-02-09 at 14:09:52
QUOTE(The.Warchief @ Feb 8 2007, 11:32 AM)
The problem with this system is that, statistically, it is more likley to have possibilities two and three. It is less likely to get possibilities one and four, because there are less chances to get the same result twice.

Anyway this is more like a discussion but it should go in ums so dunno...
[right][snapback]624653[/snapback][/right]

There's his "question", and he said it was a discussion. I was under the assumption that this should go under concepts.
Next Page (1)