Online Dominion

screenshot of game in progress

This is my implementation of the game Dominion (and all its various expansions). You can play against other people on the internet (there's no AI).

Where do I go to play?
http://dominion.isotropic.org/
Why do I have to log in?
You don't, you can click the play without logging in button on the login screen. Logging in offers some benefits, though:

The login system uses OpenID, so you log in with existing credentials (currently a Google or Yahoo account) rather than creating a username and password specific to this site. I don't get to see the username and password you log in with; those are sent directly to the provider (Google or Yahoo). I do see a contact email address (the provider will make you approve sending that to me) but that's only used in case I need to contact you about a problem. Your login info is not shown to other players; they only see the nickname that you choose on this site.

I don't get my username when I log in anymore!
  1. Click 'exit' if you're on the site.
  2. On the entry page (the one with the google & yahoo logos), hit ctrl-reload or shift-reload. (Which it is depends on your browser; you can try both.)
  3. Then click the google or yahoo logo to log in again.
What's the number before the in front of someone's name?
That's their level on the leaderboard. Note that levels are only updated once a day, so when you come back to the lobby right after a game your number won't have changed (unless daily update happens to have run during your game).
How do I start a game?
Once you've entered your name, you'll be in one of the "lobbies", where you can see the names of other players not currently in a game. Check the boxes next to some names of other players, set any constraints you want used in choosing the kingdom cards, and click the propose game with button. Chat is available in the lobby, and you can set a status string next to your name in the player listing by typing something like "/me is waiting for a friend" into the chat box.
What's this "request auto-match" thing?
Instead of choosing opponents and proposing a game to them (or waiting for someone to propose one to you), you can check the auto-match buttons for the game sizes you're interested in and wait. The system will look for other players requesting the same game sizes and propose a game to you. (How long this will take depends on how many other players are using the feature.)

No constraints are used for auto-match games, you always get the "default" selection (which is a random set of 10 chosen from all the available cards). You can bias the selection in favor of certain sets by checking the boxes (and you can effectively bias away from certain sets by checking all the others). Checking the box for a set will make it more likely that cards from that set are used in the game.

What's "veto mode"?
Veto mode is an alternative way of starting a game and selecting cards. It works like this:

Quitting the game during the veto phase will count as resigning (ie, a loss) for the leaderboard.

Platinum and Colony are determined according to the rulebook suggestion after the ten kingdom cards are decided — one of the ten is chosen at random; if it's from Prosperity then Platinum and Colony are added to the game.

If Young Witch is in the selected set of ten, then a Bane is chosen at random from the remaining $2- and $3-cost cards. Cards that were vetoed won't be chosen as the Bane.

How many players are supported?
You can have up to eight players in a game. It's not very fun above 5 or so, but you're welcome to try if you want. You can play a solitaire game by clicking propose game with without any other players checked.

The server as a whole is currently limited to 600 simultaneous players. If you sit in the lobby a long time without playing a game, you may get booted out to make room for new users. Play games!

Which cards are implemented?
All of the published cards are implemented (Dominion, Intrigue, Seaside, Alchemy, Prosperity, Cornucopia, and the three promotional cards).

Lobbies

What are the different lobbies?
The server now has two different lobbies, in the hopes that this makes it easier to find good opponents. You pick your initial lobby on the nickname selection screen, and can move between lobbies by using the dropdown on the upper right. The two lobbies are named for Dominion cards:
How does this affect the leaderboard?
It doesn't (other than indirectly, via who you end up playing against). Any game between two or more registered players is counted toward the leaderboard, no matter what lobby it was started in.

Using the interface

Why aren't the images right?
They aren't the ones from the real published game — I don't have permission to use RGG's art — but Donald X. kindly provided the images he used on the original prototype versions of all the cards, so this is how it used to really look. The basic card images (basic treasures and victory cards and curses) I made myself.

The older text mode (no card images) is still available. You can switch back and forth by using the "text" or "image" link in the bottom right corner (next to the speaker icon for toggling sound). Text mode looks like this.

The cards go off the top of the screen. How do I scroll up?
You can't. The smallest screen size I even try to support is 1024 × 768. Things just barely fit on the screen at that size, but they do fit, even with all the extra piles you could possibly have in the game.

However, if you find they don't fit in your browser, possibly because you've installed a bunch of toolbars or something, there are a few things you can try:

What's with the little avatars?
This server now uses images from Gravatar. If you're not logged in you'll appear as the mystery man icon: . If you are logged in, by default you'll get a little colorful pattern based on your email address, like this: . You can upload a custom image for yourself by going to http://www.gravatar.com/ and uploading one for the email address associated with the account you use to log in.
How does chat work?
The text box at the bottom is for chat. Anything you type there will be visible to other players in your game if you are in a game, or to everyone in the lobby if you're in the lobby.
How do I see ... during the game?
Normally you're shown just your hand and the size of your draw and discard piles. Clicking the info button near your hand will bring up a window with everything (I believe) the rules entitle you to see:
How do I know what all the cards do?
Hovering your mouse over a card name in the supply will bring up a popup window with the text of the cards. At the bottom of the supply there's a button that opens all the card descriptions in a new browser window.

If you are playing with Black Market or Tournament, the info button window lists the additional cards that those kingdom cards bring into the game. The card text popups work in the info window for those cards, so you can read the text of the black market and Prize cards.

What does the +$number button do?
It's a shortcut that plays all of the treasure cards for which play order doesn't matter and there are no possibly unwanted side effects (the basic treasures, Harem, Royal Seal, etc.). The value in the button reflects the total value of all the treasures it will play.

Here, clicking the +$4 button will play the 2 Coppers and the Silver (which you could also play individually by clicking them, if you want). If you want to play the Contraband, you should click the card explicitly (when you do that is up to you; typically you'd play Contraband before any other treasure).

Why do buttons sometimes turn red?
It's meant to be a lightweight way of protecting you from misclicks. If you try to do something that seems unusual (like ending your turn when you could play or buy more cards), the game will pause a second and turn the thing you clicked red. If you really want to do that, just click it again.

Here I clicked +$2 when I could have played either of two actions. If playing the treasure is really what I wanted to do, I just have to click the +$2 button again to confirm it.

What's ""?
That symbol represents a potion.
Why can't I reorder my cards when I'm supposed to be able to?
Some cards, like Scout, let you return cards to the top of your deck in an order you choose. When this implementation asks you to put some cards back on your deck, it may not be obvious that you can drag the cards around to rearrange them:

Once they're in the order you want, press the done button.

A similar drag-and-drop interface is also used to arrange Stash cards in your deck when you reshuffle.

What's the red dot that's sometimes next to some cards?

The red dots (to the left of Ghost Ship and Militia in this image) mark Attack cards.
What about the yellow dollar sign?

Those are the tokens for Trade Route; they start the game on all Victory card piles in the supply. They're removed from a pile the first time a card is gained from that pile. (If these markers appear and Trade Route isn't in the Supply, then it's because it's in the Black Market deck.)
And the purple diamond?

That's an Embargo token (on the Pirate Ship pile, in this case).
And the blue diamond?

That's the Bane card for Young Witch. (It's the same color as Reaction cards because it acts as a kind of Moat, but only for Young Witch.)

When proposing a game, you can explicitly specify the Bane by entering it in the "require card(s)" box, with an asterisk in front of it. (Note that a Bane is only needed if Young Witch is one of the chosen kingdom cards; you should require it as well if you want to guarantee playing with Young Witch.)

What's the buy phase button for?
Normally this button does not appear; playing treasure or buying a card (by clicking it in the supply) implicitly moves you to the buy phase of the turn. However, some situations involving buying Peddler need a way for you to move to the buy phase without doing either of those things. Clicking buy phase will cause the cost of Peddler to drop according to how many actions you've played, so you can then buy it if you have enough coins.
I'm losing badly. How do I quit?
If you're really behind and want to abandon a game, you can. It's probably best to ask other players if it's okay with them; people have widely varying opinions on the topic. Especially in a game with 3 or more players, your opponents may have chosen their strategies based on the number of players (eg, buying attack cards that are more effective with more players), so dropping out could be viewed as a form of kingmaking.

Anyway, if you decide you want to resign, wait for the start of your turn, before you've played any cards, and click the end turn button:


The resign button will appear along with the confirmation of end turn. If you really want to quit, click resign:


You'll have to click resign?! again to confirm:


If there's only one player left when you drop out, the game will end.


If at least two players are left, you can return to the lobby and the remaining players can continue the game without you.

When ranks are assigned at the end of the game, the first person to resign is put in last place (regardless of how many VPs are in their deck). The second person to resign gets next-to-last place, and so on. Anyone who finishes the game will be ranked ahead of anyone who resigns. Resigning does not change the Supply or the victory conditions: if one player in a 3-player game drops out, there are still 12 of each Victory card available. If one player in a 5-player game drops out, the ending condition is still 4 stacks empty, not 3.

Disconnecting from the server (clicking the "exit" link, closing your browser, etc.) is now treated as resigning, when possible. (Depending on what's going on at the time, it may still cause the game to abruptly abort for all the players. If you must drop out, be kind to your fellow players and wait for the start of your turn.)

My opponent is intentionally playing slowly.
Some people have figured out that when they're losing, they can just stop playing, leaving their browser window open in hopes that their opponent will eventually give up and close his window, thus giving the game to the currently-losing player.

To thwart this, the system now times you out if it's your turn to play (or respond to an opponent's attack, etc.) and you don't respond for a while. All your opponents are presented with a prompt like this:


Here it's Bob's turn but he's not doing anything. His opponent Alice gets this prompt. If she clicks the "make Bob resign" option, Bob will immediately be resigned from the game. If she is happy to wait (maybe she and Bob are playing a friendly game while both are doing other things as well), she can just ignore this prompt — it will go away whenever Bob plays his turn.

My opponent is being mean / rude / nasty / annoying in the chat window.
You can mute them, so you will no longer see what they say. In a two-player game, type "/mute" into the chat window to mute them (and "/unmute" to see their chats once again). In a game with more than 2 players, you specify which player you want to mute by their position in turn order relative to you: "/mute before" mutes the player who comes before you, and "/mute 2 after" mutes the player who comes 2 after you (ie, after the person who plays after you).

Muting is one-way: it only prevents you from seeing their chat messages. It does not stop them from seeing yours (though of course they can choose to mute you too), and it doesn't stop what any other players in the game see.

Muting only works in games, not in the lobby, and it's not preserved from game to game. (Though really, if you find someone so annoying that you don't want to listen to them any more, why would you want to play another game with them?)

Why can't I log in twice, using a second browser window/tab?
Your session is stored in cookies, which are shared between the two. If you do this, both windows will become very confused. If you really want to play against yourself (or at two different tables simultaneously) you can use an incognito window in Chrome, or a (I think) a separate profile in Firefox.

Dominion rules

I played a Goons with a King's Court and it didn't work right.
Yes, it did. At least, if you were expecting 3 VP per buy and only got 1, that is correct. Actions "in play" is different from actions "played". See the entry for Goons in the Prosperity rulebook.
I played an Outpost and didn't get an extra turn, but I still only got 3 cards.
That's correct. You do as much of the card as you can. If you play Outpost in a situation where it would cause you to take a third consecutive turn (eg, on the extra turn from another Outpost, or on your normal turn after a turn where you were Possessed), then you'll draw only 3 cards in the cleanup phase, but the extra turn won't happen.
I found a bug with reaction cards.
No, you really can reveal a reaction card like Moat or Secret Chamber multiple times. They are designed to be idempotent so there's no point in doing so, but allowing this avoids strange corner cases having to do with Secret Chamber drawing other reaction cards.
My opponent put a Treasury back on his deck, and my Saboteur / Swindler / Sea Hag / etc. didn't hit it!
He put the Treasury back on his deck, and then he drew it into his hand at the end of his turn.

Leaderboard

Where is it?
http://dominion.isotropic.org/leaderboard/
How do I get on the leaderboard?

All users who have played a game while logged in should show up there. Your statistics are accumulated under the account you use to log in, not the nickname you choose, so even if you change your nickname you won't lose your stats. (They'll show up in the leaderboard under the nickname you've used most recently.)

If you don't play for a week, you'll disappear from the leaderboard. All your stats are still tracked, though, so if you come back and play some more your old games (within the 30-day window) will still count towards your rank.

What games count?
A game counts in the leaderboard if:
What do the numbers mean?
In the grand scheme of things, not much. Play for fun.
Okay, I promise not to take it too seriously. But really, how do I interpret the numbers?
I use the TrueSkill™ ranking system to estimate player skills. It's similar to the commonly-used Elo system, but is more advanced in that it explicitly models the uncertainty about each player's skill, can handle games of more than two players, and can handle games where teams of players compete [though of course that's not needed for Dominion]. (Thanks to user rspeer for introducing me to TrueSkill and producing some interesting rankings based on the data prior to adding registration, which you can see here.)

In a nutshell: skill is measured on a scale that goes from roughly 0 to 50 points. (Actually skill can be any number, but 99.8% of players should fall in the 0–50 range.) The skill range column is a 99.8% confidence interval — the system is 99.8% sure your true skill lies somewhere in that range. New players are assigned a skill of "25 ± 25", which is to say, we don't really have any idea what that person's skill is. As you play more, your mean skill moves up or down and the range gets smaller as the system believes it has a better estimate of your skill.

The level column is the low end of your range, rounded down to an integer and clamped to the range [0, 50]. If we ignore the clamping, it is a conservative skill estimate in the sense that we are 99.9% confident that you are at least that skillful.

Because Dominion has a lot of randomness (it's not uncommon for a low-skill player to beat a high-skill player, through fortunate shuffling), it takes a relatively long time to change your skill — the system needs to see a lot of examples of you winning before it accepts that it's not just due to luck. (For those interested in the details, I've set β = 25 and the draw probability at 5%.)

I won a bunch of games and my ranking didn't change! What's wrong?
The leaderboard is only updated once a day (shortly after midnight US Pacific time).
All the rankings suddenly changed (again)!
On 24 November 2011 I changed the leaderboard to count only the past 30 days worth of games. I've tried a couple of other schemes in the past to account for the fact that player skills vary over time, but neither one was particularly well-justified mathematically and they were hard to understand. Counting only a trailing 30-day window is at least simple to explain.
Who's better, Alice, who is ranked "30 ± 5" (Level 25); or Bob, who is ranked "30 ± 20" (Level 10)?
Use whichever of these arguments seems most appealing to you:

Tech details

What is it written in? Can I get the source?
The server is Python 3. The client-side javascript uses the Closure library and is compiled with the Closure compiler.

I'm not currently making the source available.

The source for my implementation of TrueSkill is available on github.

I made my own expansion set. Can you add it?
Sorry, but there are a lot of fan-made expansions out there and I don't really have the time or the inclination to implement them all, and I don't really want to pick and choose whose I do. (If I run out of other things to do I may change my mind about this...)
Can I download all the game logs?
First, you might be interested in rrenaud's site councilroom.com, which does various analyses of and searches over the games logs collected from this site.

The CSV file with a summary of all the completed games is no longer produced. There's a replacement being generated but I haven't documented it yet. Coming soon.

If you want more details on each game, you have to download the daily tarball of complete game logs and be prepared to do a bit of simple HTML parsing (regex matching should work well enough). For 11 October 2010:

http://dominion.isotropic.org/gamelog/201010/11/all.tar.bz2
These can be quite large (in recent days they've had ~6200 games and are around 6 MB). Each day's file should be available by about 15-20 minutes after midnight US Pacific time. Note that the daily tarball will contain logs for all games, even those that aren't finished due to a player aborting or some kind of error. Be prepared to filter those out as appropriate if you're doing some kind of analysis on the games.

There is a monthly transfer cap on the server, and if we start to hit it I will take these down. To avoid that, please:

I found a different bug.
Email dougz+dominion@isotropic.org with questions, problems, comments, etc.