Frequently Asked Questions
Here, you will find answers to some questions we received by email.
We will regularly update this page with new information.
If you have a question that is not answered here, please
mail to email@example.com.
2. What happens if my program exceeds the time limit ?
3. What should my program do if there is no possible move left ?
4. Is the time limit with respect to CPU time or real elapsed time ?
5. Can my program continue its calculations during the opponent's turn ?
6. Can my program find out how much time it has left for the rest of the game ?
7. Is there a limit for the size of my program source ?
Q: What happens if my program exceeds the time limit ?
The game will be aborted.
Your program will lose this game, the other program wins.
Additionally, the aborted game counts as a 'irregular loss'.
The total number of irregular losses is used to rank programs that
have the same number of normal contest points; the program with
less irregular losses has a better rank.
Q: What should my program do if there is no possible move left ?
That will never happen.
The CodeCup system will detect that the game has ended, and your program
will not be asked to make another move.
Q: Is the time limit with respect to CPU time or real elapsed time ?
The time limit is with respect to the real time spent by your program
to select a move (the wall clock time).
We don't specifically look at the time spent on actual CPU calculations.
Q: Can my program continue its calculations during the opponent's turn ?
No, it is not possible to continue your calculations in the turn of
your opponent (thinking in the time of your opponent).
While your opponent is thinking, your program is temporarily set to
an inactive state.
Q: Can my program find out how much time it has left for the rest of the game ?
Yes, but we don't recommend this.
Please, first try to make a working program which plays
well within the time limit.
It is possible to make very strong Caïssa players without using
all available time to the last bit.
If you absolutely want to use all available time, you can use the
Read the system clock just after reading the input, and again just
before writing your output. The difference between these clock values
is the amount of time you used for your move.
Note that you will find a slightly lower time than the CodeCup system,
because reading and writing the moves also takes some time.
You will have to compensate for this by adding a little extra time.
Make sure that you read the clock after reading your opponent's
move (to avoid including your opponent's time) and again before
writing your own move (else the CodeCup system may suspend your program
before you get a chance to read the clock).
To read the system clock, you can use the GetTime function
in Pascal, the gettimeofday function in C, or the
Date.getTime function in Java.
Q: Is there a limit for the size of my program source ?
Yes. Your program source file must not be larger than 1,000,000 bytes.