swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query: Spatially uncorrelated reproducible random values


From: Nigel Gilbert
Subject: Re: Query: Spatially uncorrelated reproducible random values
Date: Wed, 2 Aug 2000 23:50:51 +0100

Thanks, Paul. That's certainly the kind of thing that I have in mind: coordinates in, random value out. However, I am not sure that conventional random number generators generate values that are uncorrelated with their seeds. The usual tests for randomness are tests of the non-correlation of successive values generated using the _same_ seed. Do you know that there is no correlation between a seed and the (next) generated value, or is this just an assumption you've made?

Nigel



Nigel Gilbert wrote:

 Thus what I need is a function that
 has the location coordinates as inputs and the fitness value as the
 output, where the fitness value is a random number with no 'spatial'
 correlation with the coordinates.

 Conventional discussions of random number generators assume that what
 you want is a random number stream, rather than a random mapping. Any
 ideas?
Hello, Nigel!

Here is what I would do.  First, get a unique integer for each possible
position in the multidimensional space.  I was looking at Swarm's Grid2d
today and you can see the way they do it there, which is supposed to be
a bit faster.
But for clarity, if you just say, for a point (x,y) the location is
(x+y*ysize), you will get a unique integer, call it INTEGER.

Then, when you need a random number uncorrelated to  the coordinates,
use the value INTEGER as the seed of a random number generator.  Reseed
with INTEGER whenever you need to sample. That way, for each location,
you always get exactly the same number back, and it will be what you
want.

--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700


                  ==================================
   Swarm-Modelling is for discussion of Simulation and Modelling techniques
   esp. using Swarm.  For list administration needs (esp. [un]subscribing),
   please send a message to <address@hidden> with "help" in the
   body of the message.
                  ==================================

--
______________________________________________________________________________
Prof Nigel Gilbert, PhD, FREng, Department of Sociology, University of Surrey,
     Guildford GU2 5XH, UK. Tel: +44 1483 259173 Fax: +44 1483 259551


                 ==================================
  Swarm-Modelling is for discussion of Simulation and Modelling techniques
  esp. using Swarm.  For list administration needs (esp. [un]subscribing),
  please send a message to <address@hidden> with "help" in the
  body of the message.
                 ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]