+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 28 of 28

Thread: Combat Table and Random Numbers

  1. #21
    Join Date
    May 2009
    Posts
    61
    I dont understand why one would care. As long as the distribution is approximately uniform then you are able to operate off the combat table. Its not like players are seeing the rolls and then acting off of them. This might be an issue in something such as online poker where knowing your next roll is a huge deal but I really don't see how it matters here.

    Because high-randomness is not as big a concern as spatial and temporal concerns the LCG algorithm would work fine.

  2. #22
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    Randomness is always important to some degree. The basic question is what is the unit of randomness: Does each character get its own RNG? A group? An instance? A region? A server? A server cluster? Even if the scope that a random number generator covers is broad, if you have a fairly simple algorithm like LCG there's a potential for exploit. Well, there's always a potential for exploit no matter what you use, but choosing well can minimise that risk a lot. (Of course an individual does not get their own RNG, but you get the idea.)

    You're thinking combat table and it's true that there's not much you can do there, but random covers a lot more than that. For example, suppose I go into an instance with a scheme where I kill a mob every X seconds without fail. If I can find X such that I will always get a green from that mob, or even if I get a green item from every third mob, it's all good. The scope and randomness of the generator dictate how that works. If the RNG is on the instance scope then that's a lot easier than on a server scope for sure, but it's not necessarily impossible to do on a larger scale, particularly if you stumble across a code flaw that you can use to facilitate or if you can consistently apply some sort of frequency analysis to the results you get. If you can do that, maybe you can massage your scheme to now get "random" epics. Even if you can only pull it off once a week, it's worth it.

    Even better, if you can manage to approximate the serial correlation of an RNG you can start trying predictive stuff based on estimates of consumption of the sequence. This is particularly true of LCG since the period of its low-order bits is very short. If you can find a cycle period, maybe at off-peak server times when demand is lower, you can use that. Again, you don't need to get it right every time to make it worthwhile.
    Last edited by Satrina; 07-01-2009 at 11:20 PM.
    Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

  3. #23
    Join Date
    Oct 2008
    Posts
    4,930
    It's a funny thing many less computer savvy folk don't realize. There is no truly random number generated by a computer program. The best routines make apparently very random numbers, but even that is not a match for real-world probability.

    Random divergence because I can, probability is a VERY misleading item in our day to day life. We (the US anyway) have wrapped our lives around a core ethic of fear. Fear being a drive based on the worry of what could happen next for the negative. We get wrapped up in the concept of cause-and-effect, and we hope that based on what happens we can predict (through probability) what will happen next, then we won't have to be afraid. The truth of course is that probability is an alluring lie. Sometimes we guess correctly, but everything is an extrapolation and anything can happen, even beyond the scope of things we think are possible outcomes. I could digress for pages, I'll stop. =)
    The (Old) Book on Death Knight Tanking
    The New Testament on Death Knight Tanking
    -----------------------------------------
    Quote Originally Posted by Horacio View Post
    Who f-ing divided by zero?!?

  4. #24
    Join Date
    Mar 2009
    Posts
    4
    This is so offtopic. Oh well.


    Lets consider the most basic RNG I can possibly imagine that retains some semblance of randomness; It's shared across all random rolls on a realm, it starts at 1 and every time a new number is requested it increments by 1. When it reaches 10,000, the next number starts over at 1.

    How many rolls are made in a given second? In a given minute? We don't know. Lets assume 5,000 players are online performing one roll-requiring action every second (Some people are furiously in combat, others are AFK in Dalaran). In addition, some 10,000 mobs are making their own calculations one per second, be it in response to people fighting them or fighting amongst themselves in various locations on the server. That means every second we run through 15,000 numbers or one number every .000067 seconds.

    What's your latency? Lets say it fluctuates between 100 and 200 milliseconds, that's between .1 and .2 seconds. That's a gap of 1,493 numbers.

    So even with our extremely terrible useless rotating RNG you can't be extremely accurate. Using an even remotely acceptable RNG, or even changing the increment from 1 to 3 would mean you have zero chance of predicting the outcome of a given roll. The key thing to keep in mind is that as long as the RNG isn't per character the only way you can guarantee an outcome is by accurately predicting the latency to the server in addition to knowing the current index and the algorithm.

    Anything is possible in the world of computing, but I highly doubt you will be able to break the RNG of WoW in even remotely reasonable time.

  5. #25
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    I think you'd be pretty surprised how fast that sort of thing can be done, even on a system such as WoW. It isn't a quick process, but it isn't like breaking a 1024-bit cypher by any stretch.

    I actually once implemented a proof of concept system where we did ineed just put a 16-bit counter on a 32.somethingMHz clock and then you'd read a specific memory location to get a random number. The math guys were able to apply frequency analysis to break that pretty quickly. Granted that they didn't have to contend with latency, but you can't say that the speed of generation was slow =) It's some pretty freaky math that is way beyond me as a simple engineer, but very cool nonetheless.
    Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

  6. #26
    Join Date
    Mar 2009
    Posts
    4
    Well, you're confronted with a series of problems; For one, the only reasonable way to pull multiple numbers and get a real result is via /roll which I doubt is using the same RNG as the game engine. So there isn't a reasonable way to perform an action and check your roll; If you know the setup of the combat table and what is where, you can get a range, probably on the order of "between 1 and 17,000" or "Between 17,001 and 25,000". Second, you don't know how many times the RNG is being accessed between attempts. Combined, that turns it into a pretty tricky problem.

    As I said, pretty much anything is possible but I sincerely doubt you'll manage to do anything useful with WoW's RNG in reasonable time >_>

  7. #27
    Join Date
    May 2009
    Posts
    61
    Do you think player rolls are performed locally? This would clearly be a huge help to the load on the server but that would generate a huge chance for exploit.

  8. #28
    Join Date
    Jul 2007
    Location
    Canadia
    Posts
    3,523
    They are definitely not local since it would be completely trivial to exploit without even worrying about the algorithm being used. You'd just use a substitution attack to replace any outgoing packets with randoms in them with whatever you wanted.

    Not to mention network latency would absolutely destroy performance.
    Got a question? Try here: Evil Empire Guides and here: Tankspot Guides and Articles Library first!

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts