Re: Seeds in games



On Fri, 10 Sep 2004, David Hoover wrote:

> Also, when you mention going back to a game after logging out, what do
> you mean? Are you just planning on saving the seed & restarting that
> same game, or actually storing the game state? I'm probably more lax
> than some card players, but I would think that unless I had a full
> restored state (and even then, you can't restore my memory of what was
> coming up in the card queue, etc), I don't think I could even tell you
> that this was the same deal of cards I had been playing with yesterday.
My intention is to make "saves state across sessions" a common feature
of gnome-games. Like the resizeable graphics feature (and it will probably
take longer). As you point out there are many subtleties when doing this.

> These two bring up a question in my mind: how reliable is the random
> number generator? I know the games call g_random_int() or similar, but
> is that guaranteed to always generate the same value from the same seed
> across all different architectures, byte-orderings, pointer-sizes,
> different revs of glib, etc? If not, it seems a little bit shakey to be
> depending on it for two random people to have matching systems at any
> given point in time (well, beyond the fact that there are however many
> intel boxes running the same rev of a particular linux distro at a time)
glib's random number generator is, I believe, stable across platforms
and architectures. However it gets changed every few years. Also, I think
that some games use libc's random number generator which is highly
variable across platforms. This is another reason why the seed doesn't
make sense.
 
> If the random number generator IS reliable (or if gnome-games shipped
> its own for this particular reason), I could see one interesting thing
> coming out of it; I've heard tell that in the freecell game for windows,
> they actually weeded out the games that are impossible to win. Certain
> games have setups like that (I know I've started games of Scorpion
> before only to look at a particular stack of three cards, realize it's
> impossible to win, and his the new-game button), so if we had a reliable
> random number generator, it would be possible to write some scripts to
> play through certain card games looking for impossible setups and then
> black list them. That, of course, would be odd with visible seeds,
> though, since someone might say 'I want to play game 12345' and then it
> goes 'Nope', or shifts to a different seed, or something.
Mahjongg, for instance, already does this. It generates a game that is 
guaranteed to be winnable. In aisleriot this will be a lot harder and
best implementeed on a game-by-game basis. I'm not in a hurry to do it
though. Some aisleriot games, like clock, are completely random, there is
no skill at all. Making that sort of game automatically winnable defeats
the entire purpose of it.

> So I guess I would be partially inclined to suggest keeping the seeds,
> but hiding them from the user, since in aisleriot, at least, there's
> room to do some neat things with it if the card deal can be reliably
> predicted from the seed.
I'm playing with the idea of having a command-line option for really
hard-core people. In the end though there is nothing that you can do with 
the seed that can't be done easier just by looking at what you get after
running the random number generator (if you are serious about making
guaranteed solvable games, you rig the game generator routine so that it
works regardless of the random numbers you get).

> Other than that, though, I'd say the seeds are ugly and should go away,
> since random large numbers sprinkled across my card games tends to scare
> me.
I agree. Large integers have no place in a good UI.

 - Callum





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