Friday, November 21, 2014

has anyone seen the blank screen bug?

This morning, a player reported to me that they had tried to get to the site for about 1.5 hours, and were repeatedly met with a blank screen that looked like this:
blank page?

Is anyone else experiencing this? Please let me know. You can email me or post in the comments to this blog. I'm trying to get a feel for how frequently it happens.

[Edit: This bug should be fixed as of Dec 5, 2014. Please write me or post a comment if you see it again!]

Wednesday, November 19, 2014

server update - more bug fixes

The server was down for a brief time this morning to apply some bug fixes. I apologize for the disruption in your games!

Here's the summary of changes:

On occasion, the "Knock" button did not show up in Gin Rummy, when it should have. This is now fixed.

In Twenty-Nine, the "Accept" button became disabled when a new player entered the table. This is also fixed.

Some players have pointed out that the bots will waste a high trump card when defending a nil bid. They tended to use their high cards to trump, rather than bleed out trump cards. This is now fixed. Thanks to those who pointed this out, and helped to improve the bots!

Finally, your chat bubble has been shifted to the side a little further, so it will not obscure your cards anymore.

Tuesday, November 11, 2014

probability of no trump cards in a hand of the card game spades

[tl;dr: so far as I can tell, cards are dealt perfectly randomly at World of Card Games. If you think that the deck is stacked, it's probably an odd run of bad (or good) luck that you're seeing.]

Sometimes, players will tell me that they think the deck has not been properly shuffled. They've had an unusual run of bad luck. Perhaps in Euchre, they haven't seen a bower in their last 5 hands, and it looks suspicious. In Gin Rummy, their opponent was dealt a Gin hand immediately. Or in Spades, they've been dealt a hand with no trump cards too many times to be believable.

At World of Card Games, the cards are dealt randomly, and I see no way that the deck could be stacked. Here's how the deal of cards works in every game on the site:
  1. Every time that cards are dealt, an entirely new, ordered deck of cards is created by the system. It's as if I took a fresh pack of cards out of a sealed deck; the old deck is not re-used.
  2. Then, these cards are "shuffled" using a random number generator.
That's it! It's very simple. You may see odd results, just like you might see a long run of "heads" in a repeated coin toss. But it's just random.

For those who are curious, just what is the probability of getting a trump-less hand in Spades? Here's an explanation:

A hand in Spades consists of 13 cards from a deck of 52. The number of combinations of such cards is 52! / (13! * (52 - 13)! ). According to Google's calculator, that is 635,013,559,600 (over 635 billion). That number includes all trump-less hands, and all hands with trumps as well.

To be clear, this does not count combinations in which the cards are merely reordered. For example, this count includes an entire hand filled with Spades, but only one such hand - the order of cards in the hand does not matter. For those who are hoping, this means the chance of ever getting a hand completely filled with Spades is 1 in 635 billion. "Not very likely" would be an overstatement.
all spades - dream on!
Okay, so how many of these hands are there that exclude trumps (Spades)? That is computed by taking all combinations of cards from a trump-less deck. A trump-less deck contains 39 cards (52 cards minus 13 Spades suit cards). Applying the formula for combinations again, we get 39! / (13! * (39-13)!). Google's calculator says this is 8,122,425,444 - about 8 billion different combinations of non-Spades cards.

So, there are about 8 billion trump-less hands in all 635 billion possible hands of Spades. The probability of getting a trump-less hand is the ratio of trump-less hands to all hands, which is about 1.28%. Not very likely, but it happens.

To test all this out, I ran a million simulations of Spades cards being dealt exactly as they are done at World of Card Games (using the same computer code). Here are the results:
  • There were 4,000,000 hands dealt in total
  • There were a total of 51368 trump-less hands, which is, indeed, 1.28% of 4 million [100 * (51368 / 4000000) = 1.28%]
  • The count of trump-less cards for the first player was 12772, second player was 12790, third player was 12996, and fourth player was 12810.
In case you are wondering about that last bit, a certain amount of variation is expected between the different players. Notice the third player was getting slightly more of the trump-less hands in the above experiment. When I ran the experiment again, it was the second player who got most trump-less hands (12945). A little bit of variation is expected because of the random nature of the events.

Saturday, November 8, 2014

new features for private tables, and some bug fixes

Sometimes, you're in the middle of a card game with friends, and you need a break. You want to refill your drink, let in the cat, baste the turkey, etc. If you were all sitting around a table at home, you could do this. However, it hasn't been possible at World of Card Games... until now.

A "Pause" button was added, for private tables only, with this morning's update. Please chat amongst yourselves if you want to pause the game, to let people know your plan. You must recruit a majority of players for the pause to take effect. For example, if there are 4 (human) players at the table, at least 2 must hit the Pause button. If there are 2 players, then 1 player hitting the pause button is sufficient. When everyone is ready to continue, hit the "Continue" button.

Here's a screenshot of the new buttons, in the upper left corner:


I hope that using this new feature is relatively intuitive. If anyone has trouble with it, please write me with details. I may make changes to this in the future; it's experimental.

By the way, I did not add this to public tables, since I thought that most players, who are not really chummy with each other, would not take kindly to pausing a game.

There are some other, more minor changes.

I have increased the timeouts in 29 (Twenty-Nine) from 15 to 20 seconds for playing a card. It doesn't seem like much, but I hope it makes a difference. Timeouts at private tables are now 40 30 seconds, for all games. [Edit: 30 second timeout at private tables was applied Nov 19 2014 due to feedback.]

I've also deployed a few bug fixes. The site has had a problem with tables freezing in Hearts. I discovered a major bug that could cause that to happen, and it has been fixed. A big thank you goes out to the person who reported this to me most recently!

I've fixed a bug in Gin Rummy that allowed you to knock when you shouldn't be able to do so - another big thank you goes to the player who reported this (including a screenshot)!

Finally, I've added a small improvement to the Euchre bot strategy. This was suggested by a player who noticed that they could use a little fine-tuning. I'm no expert, but I think the bots are getting pretty difficult to beat in Euchre. This is largely thanks to a couple of very helpful Euchre players who have been great about giving me tips. Thanks to you both!

As always, let me know if you see any problems at the site. I'm constantly working to improve it.