From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16632 invoked by alias); 1 Oct 2004 00:19:49 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 16614 invoked from network); 1 Oct 2004 00:19:48 -0000 Received: from unknown (HELO mailrouter3.execulink.net) (199.166.6.58) by sourceware.org with SMTP; 1 Oct 2004 00:19:48 -0000 Received: from diamond.ansuz.sooke.bc.ca (ppp19.ac2.56k.execulink.com [209.213.229.19]) by mailrouter3.execulink.net (8.11.6/8.11.6) with ESMTP id i910Jkb20676; Thu, 30 Sep 2004 20:19:46 -0400 Received: from localhost (mskala@localhost) by diamond.ansuz.sooke.bc.ca (8.10.2/8.10.2) with ESMTP id i910G2d08908; Thu, 30 Sep 2004 20:16:03 -0400 Date: Fri, 01 Oct 2004 00:26:00 -0000 From: mskala@ansuz.sooke.bc.ca To: Lincoln Peters cc: Xconq list Subject: Re: Map-related deja-vu In-Reply-To: <1096588332.4050.15389.camel@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004/txt/msg01296.txt.bz2 On Thu, 30 Sep 2004, Lincoln Peters wrote: > 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? As far as I can tell, XConq's random number generator, if not seeded from the command line with the -R option, automatically seeds itself with the system time modulo 100000. By the Birthday Paradox, you should expect to see a collision (i.e. two games starting with the same seed) if you play 316 games. (= sqrt(100000)) I think it's plausible that in heavy testing you might start that many games. The world-size isn't relevant because the generator only gets seeded once - so you aren't choosing maps from the space of all possible maps (which space gets bigger with bigger maps). There are 100000 maps that can ever be generated, and you get one of those more or less at random. Is this a problem? If so, we could easily put in a better seeding rule and/or a better random number generator. -- Matthew Skala mskala@ansuz.sooke.bc.ca Embrace and defend. http://ansuz.sooke.bc.ca/