random?

How are game numbers assigned? Evidently, the cards are not shuffled for the next game because entering an arbitrary number twice or copying the game number and re-entering it replays the same game. I have noticed that some games seem very familiar which suggests the "new game" command sometimes selects a game previously played.

Comments

  • daviddavid REGISTERED, ADMINISTRATORS

    Yes, the number is a "seed" to the random number generator—that way everyone who plays a particular game# gets the exact same shuffle of the cards.

    We have some reports here of duplicate games, but we've never been able to track down the cause. If you think it is happening to you, I'd love to see the game numbers you had before and after clicking "New Game".

  • I get a repeat game occasionally when I move between computers, when the page is left open on both computers. On my home computer I'll play a game only to find that I've already played it within the past 24 hours on my work computer. Sorry, I don't have game numbers; I'll try to remember to record them next time it happens.

  • daviddavid REGISTERED, ADMINISTRATORS
    edited December 2015 23.241.25.146

    Ah, that can definitely happen. The games numbers are actually random numbers based on a fixed seed that changes every hour †. In the code we call this a "seed chain" and how far along the chain you are is stored in a cookie on your computer. So if you switch computers within an hour and start playing again, you definitely will get duplicate games. We opted for this method because (a) it was easy and (b) it puts no extra load on our server, allowing us to server more people with our limited hardware. We knew this would be a hole, but we figured it wouldn't affect too many people.

    We could do a couple things to fix it. Storing your place in the chain on the server instead of on the computer would be one thing, though that would only work for registered users. Anonymous users (which dwarf registered users) would still have the issue.

    We could also lower the seed chain time from an hour to a half hour or so. This might affect how busy the site looks so I'd have to think about it more.

    † This is so that people who are playing random games see other people who are playing random games instead of blank high scores that would be pervasive if true random games were used. Basically it makes the site feel like there are lots of other people around.

  • I think the system works fine. I don't mind a repeat. If I see one, I just pop "new game" five or six times and I'm sure to get a fresh one (if I pop it too many times, I end up out in the wilderness, where no other players have been -- I win 100% of those!).

    By the way, there are a zillion different places to play Forty Thieves online, but yours is light-years ahead of the rest. If I rate the best of the rest at a one, Greenfelt rates at approximately eleventy-jillion. There is simply no comparison. Not only it is the best solitaire site, it's one of the best sites OF ANY KIND -- in the functionality, the game play, the ease of use, and, most unusually, in the responsiveness of the developers to users. You guys are superstars. ¡Viva Greenfelt! ¡Viva David and Jim! And a very Merry Christmas (or the ecumenical holiday of your choice) to you and everyone here!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Attach file
Attach image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Home General DiscussionComment As ...