Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: Random generator not random at all
Home

[Freeciv-Dev] Re: Random generator not random at all

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Freeciv Development Mailing List" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Random generator not random at all
From: "SamBC" <sambc@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Jul 2000 19:42:23 +0100
Reply-to: <sambc@xxxxxxxxxxxxxxxxxxx>

It's pretty hard to make a judgement on randomness with only two
possibilities!! Is there a striking pattern on a wider-range random
function?


SamBC

> -----Original Message-----
> From: hunter@xxxxxxxxxxxx [mailto:hunter@xxxxxxxxxxxx]On Behalf Of Jarda
> Benkovsky
> Sent: 18 July 2000 17:45
> To: freeciv-dev@xxxxxxxxxxx
> Subject: [Freeciv-Dev] Random generator not random at all
>
>
> Hi,
>
> this is a sequence of results you usually get (or s.t. similar)  when
> you call myrand(2) repeatedly:
>
> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
> 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
> 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1,
> 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1,
> 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
> 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
> 1, 0, 1, 0, 1, 0, 1, 0,
>
> It does not look good, I am afraid :(
>
> For bigger values of argument to myrand() the results look better, but
> ...
> I have stumbled upon this when trying to find out why some nations are
> suggested often and others are not. Of course, this sequence could be
> found really random when looking at 1E6 calls, but somehow I doubt it :)
>
>                                       Edheldil
>
>
>




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