Assume I am a complete moron, and tell me exactly what the rules of the game are in painful detail, you still have not provided enough information for a solution. By four digits you mean that a random process will generate some number between 0 and 9999 and you need to guess it correctly?