Announcement

Collapse
No announcement yet.

Wonders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    A TRUE random number generator is impossible to program. You can always with full complete input reproduce the same results by setting them to the same seed.
    (For those that automaticly figure out a seed, it's then just a matter of reverse engenering to figure out how it's duing so, a classic way being some manipulation of what the machine perceives as being the current time.)

    For TRUE randomness, you need to do something like roll dice or the powerball machine (or a host of other physical items.)

    One example of a game shows that used exceptionaly poor RNGs were: "Press Your Luck", where one contestant memorized a specific patern to win over $100,000.

    Soren's Random Generator is definately much better than any found in any C or C++ standard library. But those used in security are even better as far as being "more random", but at the cost of being slower.
    1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
    Templar Science Minister
    AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

    Comment


    • #77
      Originally posted by snoopy369
      I'm only calling rng() once in version B... ? Maybe I coded it badly, but it goes:
      * Create new outcomes set with only valid outcomes
      * Generate random number from 1 to max_valid_outcomes
      * Take that outcome from valid outcomes subset.
      Sorry, I skimmed your algorithm and misread it before. Yes, that's more efficient than mine, though still less efficient (in terms of expected runtime) than simply rolling until you get a hit.

      Comment


      • #78
        A TRUE random number generator is impossible to program.


        A pRNG is sufficiently random for this analysis that we can assume it's truly random.

        For those that automaticly figure out a seed, it's then just a matter of reverse engenering to figure out how it's duing so, a classic way being some manipulation of what the machine perceives as being the current time.


        Thank you, I've written a pRNG before (a decent one takes about 4-8 lines of code if you break it up into one op/line - go look at the source of the Java libraries for a good example). By the way, that sort of attack is fairly hard to do with a cryptographic pRNG.

        Soren's Random Generator is definately much better than any found in any C or C++ standard library.


        Present evidence please.

        Comment


        • #79
          For TRUE randomness, you need to do something like roll dice or the powerball machine (or a host of other physical items.)


          Or a temperature sensor in the CPU... or a card with a quantum RNG (these exist).

          Comment


          • #80
            That should be simple to demonstrate, replace the calls of getSorenRandomNumber(x) or something similar with calls to the RNG function of your own choosing.

            But actually, I'm really doubting any PRNG function can be truely secure in any game that allows unlimited saving & reloading. Even if you preserve the random number seed, then thru a series of reloads anyone can find the optimum order of their attacks for that turn.

            Originally posted by Kuciwalker

            Soren's Random Generator is definately much better than any found in any C or C++ standard library.


            Present evidence please.
            1st C3DG Term 7 Science Advisor 1st C3DG Term 8 Domestic Minister
            Templar Science Minister
            AI: I sure wish Jon would hurry up and complete his turn, he's been at it for over 1,200,000 milliseconds now.

            Comment


            • #81
              joncnunn, you do know what Soren's RNG is right?
              Code:
              m_ulRandomSeed = ((1103515245 * m_ulRandomSeed) + 12345);
              It's not bad, but it's certainly textbook .

              Comment


              • #82
                But actually, I'm really doubting any PRNG function can be truely secure in any game that allows unlimited saving & reloading.


                Secure? Why would you bother with a cryptographic pRNG for a single-player game?

                Comment


                • #83
                  Ah, so calls to rng() are really cheap, then. Should only be ~15 cycles + call overhead (unless its inlined), so call it 20 cycles.

                  Comment


                  • #84
                    Originally posted by darrelljs
                    I suggest wandering over to RB when this event is complete. My guess is someone will manage to get all the wonders.
                    Not surprisingly, Kylearan managed to grab them all. Too bad he doesn't have his full report up yet, they are always well written. I'll post the link if he ever gets around to writing it.

                    edit: Looks like Mortius got them all as well. You can read his report here.

                    Darrell

                    Comment

                    Working...
                    X