Architect Archive

Thread: Multiple Critical Failures: Try This

TGPO
Thu Sep 18, 2003 6:31 am
#1

I've posted this before, but never in its own thread, I'm hoping a few of you will read this, comprehend and give it a try in a semi-scientific test. I'm going to make my best attempt to explain this as simply as possible, I hope I don't fail...


[There are numerous ways to use and generate random numbers, this is not an in-depth look at random number generation, but just a quick glance at some popular ways of using/generating them. The point of this post is my belief that the difficulty of generating a true or nearly true random number is the cause of multiple critical failures. I may be nuts, but I thought I'd share.]


I have heard all kinds of arguments on whataffects multiplecritical failures, from crafting station quality, to crafting tool quality, to resource quality. While it may be true that higher qualitites of each of these things may cut down on the number or frequency of critical failures I am certain that the key to multiple critical failures lies in the random seed.


Critical failures are apparently supposed to be random. Somehow, our assembly skill modifier and the quality of our tools and some other factors should affect how often we can expect to fail, but at the base level critical failures are based on a "roll of the dice".


If you have even a basic programming background and have messed with random numbers, you'll know that in consumer computer environments there is no such thing as a purely random number. It's just not possible (at least not easily, we're not getting into complex functions in an attempt to generate a purely random number, this is a game and they're not wasting computing power on trying to get a purely random number).


Every "random" number is based on some other object or event, most often "random" numbers are generated using the system clock of your CPU. This doesn't allow for truly random numbers, in fact, numbers generated this way can often be predicted. Okay, no long discourse into random numbers, but consider this next paragraph:


If, when loading the game, in order to keep the code as efficient as possible (and this is most-likely a HUGE goal of the developers in a game with this much happening), you're assigned a random seed from the system clock. At some point during start-up, between clicking the shortcut to actually connecting to the game the game grabs some number for you that will be used to generate "random" numbers for the rest of the game-session.


This random seed will be used to pull a pseudo-random number out of the system for you for the rest of the session, and quite often, it will select the same number many times during that session, owing to the not-really-random nature of the number.


This can be a good thing, or it can be a bad thing.


Let's say that you have a 1 in 100 chance of failure, also, just to make this easier, let's assume that the game spits out a whole number between 1 and 100 anytime we ask for one (most common random numbers are generated using a number between 0 and 1, exclusive).


If 1 through 99 = success and 100 = failure then you've got a very good chance to avoid failure, but, suppose the seed you've been given is prone to coughing-up 100's? Now you're in for some rough times. On the other hand, what if the system is prone to coughing-up 58's? Hey, you'll be cooking with NO problems! Quit often you'll get a number other than 100 or 58, but more often than SHOULD happen with a truly random number you may see the 100 or 58. (Okay, you don't actually "see" the number, but you see its effects.)


This is my theory of why critical failures can be so non-existant one day and the next run rampant.


One evening I failed 7 in 20 attempts (making structure modules). Normally I stop after two or three in a row, but I decided to keep on going, to see if some pattern developed. I logged-out of the game after the 20th piece was made and completely shut SWG down. I went and got a drink and came back and restarted.


With the same exact resources, using the same tools and stations, sitting in the same chair, with the same HAM, the same fatigue, with every single thing the same, I proceeded to make 50 to 100 more structure modules (I forgot exactly how many I made, I know it was an awful lot). I failed one time in one hundred (or 50, but still a very small ratio compared to 35%).


I have seen this pattern time and again. Multiple failures within a few minutes? Close the game and restart and, voila, problem solved.


While I think that the quality of tools and resourcesprobably dohave something to do with how often you SHOULD fail, I believe that the way in which the game generates random numbers has more to do with multiple failures (or very long strings of zero failures) than any other single thing.


Try this yourself. If you're making things and you notice multiple criticals in a very short time span, log completely out of the game and restart. Continue crafting and see if the failures don't go away. I bet they do, it's all about pseudo-random numbers...


[There are numerous ways to use and generate random numbers, this is not an in-depth look at random number generation, but just a quick glance at some popular ways of using/generating them. The point of this post is to share my belief that the difficulty of generating a true or nearly true random number is the cause of multiple critical failures, not to argue how random numbers work or how they are generated.]





��Alfred Lederhosen��
Bulk Power Broker
Fusion Power �� 1.0c per unit �� 10,000 unit minimum
Shop located 700m southwest of Mos Entha on Eclipse: 630 2860


Cheddarion
Thu Sep 18, 2003 6:50 am
#2

*clap* I know I certainly hate random numbers in programming and want to hurt them, but it never occured to me that this could be causing crit fails Great post



Cheddario the Yellow (that wears Orange)
Master Architect - Weee I build stuff!
Not-so-fearless leader of FUN!
Visit Cheeseland at www.cheeseland.net!
TGPO
Sat Sep 20, 2003 4:32 pm
#3

Too much to read, I guess






��Alfred Lederhosen��
Bulk Power Broker
Fusion Power �� 1.0c per unit �� 10,000 unit minimum
Shop located 700m southwest of Mos Entha on Eclipse: 630 2860


SWGRolly
Sun Sep 21, 2003 12:03 pm
#4

The random numbers must be generated on the server side, otherwise they could be hacked.

Rolly
Page 1 of 1
Previous Next