How would you determine that the player is cheating in online chess? There are a lot of online websites, where players can play chess in real time with each other. Most of the games are 5-10 minutes long. With the availability of chess software one can take an advantage by using Fritz or Rybka to suggest a move for him.

For instance, I can just enter every move of my opponent and see what software will suggest for me.

I was thinking about a few features which can suggest that the player is cheating:


number of times he switches the screen
speed of play (in easy and in really hard positions)
accuracy of the game


Does anyone have any other ideas?

P.S.: It does not matter for me, which perspective you are thinking from (server or the client side).
This is actually a very complex question, and not one which has been solved in a satisfying way, to my knowledge.  Essentially, we're asking for an algorithm to perform a kind of reverse Turing-test, to differentiate between human players and computers.

First, client-side checks will always have weaknesses, unless you are in complete control of the client environment.  Let's take the first idea - checking for switching between windows, it sounds good.  Unfortunately, it's trivially worked around by running a chess engine on a separate computer, or integrating my engine with the client so that no "window switching" takes place, or changing the client to report 0 changes in window, or...  There's no real way to be sure that it's your code running on the client, really.

What we're left with is physically tightly controlled client environments (which isn't going to happen for any online games), or server-side checking, i.e. looking at the actual moves that were played (and perhaps the time between the moves, as you say), and trying to deduce the computer or human aspect.

Server-side checking can also split a couple of ways.  You could probably try a "top-down" approach, which would be something along the lines of "from past games in history, only 2% of humans made that move, while 50% of computers make it".  This would actually be a pretty good way to do it, if we had enough data for "any given position".  The search space of chess is so large, however, that even very large data sets will not have a significant number of games matching your position, once you get past the early mid-game.

Assuming that we don't have any reliable statistics on the human side of the equation, you could still present the position to a number of chess engines (with a number of different time settings each), and see how closely the players' moves match that of a computer.  By itself, this would also lead to many false-positives, however, repeated positives for the same chess engine and time settings would make it more and more probable that the player was cheating.  To further enhance this, I would probably look into a "bottom-up" approach of analysing chess positions; in short, trying to figure out why humans and computers play differently.  E.g. humans tend to recognise common patterns.  In a game with "odd" patterns, or unlikely situations, a human would be less likely to be able to play very accurately.  None of these, by itself, are particularly damning, but given large numbers of games, it would highlight trends to administrators.

To add a few specifics to your list, I would go along the lines of how professors detect plagarism in papers - by detecting a sudden change.  In chess, this is extremely difficult to define, but a sudden change in play style or play strength may indicate cheating.  Specifically, I'd look for uncharacteristically aggressive moves which tend to just "work out", and have no downside for the player (too accurate).  Forced mates in 4+ moves from a player who normally puts knights on the edge of the board, etc (it's possible... just not likely).  How exactly this would work sounds like it could take up an entire book (or more), however.

EDIT:  There was an article about cheating and detection in top-level chess recently.