This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Map-related deja-vu


Lincoln Peters wrote:

I just had the weirdest thing happen when I was testing knightmare.g. Although the module is set up to produce a new random map every time I
load it, the last time I ran it, it produced a map that, as far as I can
tell, is identical to a map it produced when I was testing a few days
ago, down to the layout of independent units!


Since the world-size is set to 240x120 (circumference 1440), I would
think that the chance of getting the exact same map twice would be
astronomically low. Has anyone else experienced this kind of behavior? Could it be a bug in Xconq? Is it more likely a bug in my computer's
random-number generator? Or should I consider it to be a sign and buy a
pair of lottery tickets?


It certainly could be a duplicate. I thought about the possibility
when deciding how studly the randomization needed to be, but you
would likely only see the exact dup if you started up hundreds of
games with exactly the same size map, same number of players, same
options, etc., and if the world wasn't seen, you couldn't be sure it
was a dup until nearly the end of the game. If the world was seen and
you really didn't want the dup, you'd just kill it off and start
another game. Given the length of time a game takes, for a normal
player it would likely be years before a dup appeared, assuming
Xconq was not updated in the meantime.

On the flip side, one of my concerns back then was computational
efficiency, which seems rather quaint. One could seed from a bigger
number and do 64-bit arithmetic, will likely be unnoticeable to
performance.

Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]