  We study the hat chromatic number of a graph defined in the following way:
there is one player at each vertex of a loopless graph $G$, an adversary places
a hat of one of $K$ colors on the head of each player, two players can see each
other's hats if and only if they are at adjacent vertices. All players
simultaneously try to guess the color of their hat. The players cannot
communicate but collectively determine a strategy before the hats are placed.
The hat chromatic number, $\mu(G)$, is the largest number $K$ of colors such
that the players are able to fix a strategy that will ensure that for every
possible placement of hats at least one of the guesses correctly.
  We compute $\mu(G)$ for several classes of graphs, for others we establish
some bounds. We establish connections between the hat chromatic number, the
chromatic number and the coloring number. We also introduce several variants of
the game: with multiple guesses, restrictions on allowed strategies or
restrictions on colorings. We show examples how the modified games can be used
to obtain interesting results for the original game.
