cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/05/15:18:23

From: Charles Krug <charles AT pentek DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP's random functions.
Date: Mon, 05 Apr 1999 09:40:23 -0400
Organization: Pentek Corporation
Lines: 27
Message-ID: <3708BD47.D114C165@pentek.com>
References: <3705018e AT news DOT ismi DOT net>
NNTP-Posting-Host: mail.pentek.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.5 [en] (WinNT; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Ike Gingerich wrote:

>    I noticed that the functions that come with DJGPP for
generating random numbers always spit out the random numbers in
>the same sequence each time the program is run.

Ike:

What you're seeing is a consequence of using a computer.  In
general, this is, in fact a Very Good Thing (tm).  Most of us
first encounter pseudo random numbers in the context of rolling
dice or some such thing.  To us at that time, we see the
deterministic pattern of p-random numbers as "bad."  However,
this is not the case.

Suppose that you are doing an AI to play Blackjack.  How do you
know how well it does, in comparison to your previous versions?
The best way is to feed the various versions the same shoe
(usually 8 decks of cards), which you generate by (surprise)
using the system's p-random generator.  That way, you can compare
your simulation using a predictable dataset, so that you can make
meaningful comparisons regarding performance.



Charles

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019