[comp.sys.apple2] The signifigance of the seeds in Accrete

reeder@reed.UUCP (Doug Reeder) (12/17/90)

    The seed numbers that Accrete uses are the seeds to the improved
pseudo-random number generator in Kyan Pascal's "System Utilities" toolkit.
As such, they have no direct relationship to size of star or other
parameters.  I added the seeding to the program to enable the recreation of
systems, and thereby the exchange of the seeds of system of interest.  (I
encourage you to post the seeds of any particularly interesting systems you
find to this newsgroup/mailing list.  They may be incomprehensible to many,
but take up trivial amounts of bandwidth.)  However, I also wished to
implement seeding in a way that every time one ran the program, one could get a
different system.  The four default seeds are therefore:

1) The ProDOS date word, interpreted as an integer
2) The ProDOS time word, interpreted as an integer
3) GetLn's random number.
4) The contents of the zero page location A1 ($3C)
GetLn's random number seems to be different every time, whereas
variability of date and time depend on having a clock or setting the time.
A1 turned out not to be variable, meaning that the program initialization
code uses it.
    This algorithm is therefore fairly succesful.  Does anyone know of a
better way to generate seeds, guarranteed to be different each time, on any
Apple II, independant of the use of GetLn, and which does not require the
program to keep track of the last seed?

Doug Reeder                                   USENET: ...!tektronix!reed!reeder
from ARPA: tektronix!reed!reeder@berkeley.EDU BITNET: reeder@reed.BITNET
Romulan: Prepare to be destroyed, Enterprise!
Troi: I sense hostility, captain.
-- 
Doug Reeder                                   USENET: ...!tektronix!reed!reeder
from ARPA: tektronix!reed!reeder@berkeley.EDU BITNET: reeder@reed.BITNET
Romulan: Prepare to be destroyed, Enterprise!
Troi: I sense hostility, captain.

toddpw@nntp-server.caltech.edu (Todd P. Whitesel) (12/17/90)

reeder@reed.UUCP (Doug Reeder) writes:

>    This algorithm is therefore fairly succesful.  Does anyone know of a
>better way to generate seeds, guarranteed to be different each time, on any
>Apple II, independant of the use of GetLn, and which does not require the
>program to keep track of the last seed?

Umm.. ask the user to press a key, and do a GET a$ or something. This scrambles
the same location GetLn does (because GetLn calls the same key input routine
as GET, and the key input routine is what actually increments $4e and $4f).

Todd Whitesel
toddpw @ tybalt.caltech.edu

GRAY@ADMIN.HumberC.ON.CA (Kelly Gray) (12/25/90)

I've been playing with the Accrete program for a while now, and I thought
I'd share some of my results with the rest of the world.

using the following seeds, I get a planet that looks to be at least marginally
habitable.

   -19058 1572 13709 1550

In this system, Planet #3 is very close to earth in size, but a runaway
greenhouse effect has made the temperature somewhat higher at 463 degrees (!)
 Planet #4 is the interesting one though. The temperature is a tad chilly
at +10 degrees, but livable. Surface pressure is .318 Atm, and gravity at
.83 G. The world has large oceans, and a fair amount of cloud cover. There's
even small ice caps (2.78% of the planet's surface)

     <o_o>
 _________________________   ________________________________________
/                         \ /                                        \
|        Kelly Gray        |  The opinions expressed in the preceding |
|                          |  message are not guaranteed to represent |
| GRAY@ADMIN.HumberC.ON.CA |  any form of rational thought whatsoever |
\_________________________/ \_________________________________________/