From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4883 invoked by alias); 1 Oct 2004 05:42:39 -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 4873 invoked from network); 1 Oct 2004 05:42:38 -0000 Received: from unknown (HELO smtp813.mail.sc5.yahoo.com) (66.163.170.83) by sourceware.org with SMTP; 1 Oct 2004 05:42:38 -0000 Received: from unknown (HELO ?192.168.1.101?) (sampln@sbcglobal.net@64.175.251.169 with plain) by smtp813.mail.sc5.yahoo.com with SMTP; 1 Oct 2004 05:42:38 -0000 Subject: Re: Map-related deja-vu From: Lincoln Peters To: Eric McDonald Cc: Xconq list In-Reply-To: <415CA434.9060904@phy.cmich.edu> References: <415CA434.9060904@phy.cmich.edu> Content-Type: text/plain Message-Id: <1096609511.4050.17763.camel@localhost> Mime-Version: 1.0 Date: Fri, 01 Oct 2004 05:45:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg01302.txt.bz2 On Thu, 2004-09-30 at 17:26, Eric McDonald wrote: > mskala@ansuz.sooke.bc.ca wrote: > > > Is this a problem? If so, we could easily put in a better seeding rule > > and/or a better random number generator. > > As I recall from looking at the 'util.c' code once upon a time, Xconq > uses a simple LCRNG. If we wanted something with a much longer cycle > length, we could go for a Mersenne Twister or some such. Of course, that > would not be suitable for cryptographic work, but neither is the current > one. I don't know much about the logic (?) behind generating random numbers. But I did find it rather surprising when the map looked exactly like the map I had played on just a few days ago. I doubt that an algorithm suitable to cryptographic work would be necessary for any game, but if I ever find myself playing the exact same "random" game more than once after the random-number generation code is upgraded, we'll know that the it still needs work. > > But, better seeding would probably be a good first step. Agreed. I'm a bit surprised that nobody reported this before. Perhaps that is because: 1. Anyone else who experienced this problem didn't realize that the maps were actually identical. 2. Anyone else who experienced this problem neglected to report it (this doesn't seem as uncommon as we would like). 3. I just got lucky. --- Lincoln Peters Between grand theft and a legal fee, there only stands a law degree.