Computer Program Competition CROQUAR-95
Official Rules
Based On The Arithmetic Croquette Game By Lewis Carroll
Anyone can take part in the competition: undergraduate and
graduate students, teachers, professors, scientists, presidents, etc.
of any age, gender, religious beliefs, etc. And it is free.
The winner will be awarded a prize!
Rules Of The Game
There are two players. In the beginning each of them has a
natural number zero. The players take turns making their moves. The
goal is to make one's number greater than 100. The player, who
manages to achieve this first, is declared a winner. If first player
does it first, the second player is still allowed to make one more
move. If he/she also gets over 100 after this move, draw is
declared.
Every move is being done by adding to player's number any integer
from 1 till 8 except for the number that the adversary added on
his/her last move and the difference between 9 and that number.
For example, if your opponent added 2, you are not allowed to add 2
or 7 on this move.
Numbers 10, 20, ..., 100 are called hoops. When taking a hoop the
"distances" between the hoop and your positions before the hoop and
after it must be the same. For example when taking hoop 20, you may
go 17 - 23, or 18 - 22, but not 19 - 25.
If this rule is observed,
the hoop is said to be taken. If a hoop was passed incorrectly, the
player must on his/her next move subtract from his number an integer
from 1 to 8 (with the same limitations: if opponent used 2, then 2
and 7 cannot be subtracted) in order to get back and take the hoop
correctly. If during the game a player twice passes hoops
incorrectly, his/her opponent is immediately declared a winner.
It is allowed to take hoops in two steps, for example: 17 - 20 -
23, or 18 - 20 - 22. Although, if you are in a hoop, your opponent
is not limited in selecting his/her numbers and may choose any
integer from 1 to 8. In particular he/she can pick the integer
necessary for your next move (or the difference between 9 and that
integer), and you will have to skip moves until these integers are
free.
If you are not in a hoop, you are not allowed to skip moves.
Every player is working only with his/her number and cannot
change the opponent's number in any way.
How To Participate
- You need to write in C or C++ a module named MOVE.C or MOVE.CPP.
This module must contain functions for making moves:
int move1 (int score1, int score2, int lastmove);
int move2 (int score1, int score2, int lastmove);
Meaning of the arguments:
- score1 - the first player's current number
- score2 - the second player's current number
- lastmove - the opponent's last move
The functions should return the next move (number from -8 till 8).
Function move1() is called for the first player and move2() for
the second player. They do not necessarily have to be different.
If incorrect move is returned, the game ends and the opponent is
declared a winner. The modules must not contain any input/output
operators.
- You need to create a text file named PLAYER.TXT, which contains in
its first line your name; below your institution; and (optionally)
your address and/or any other coordinates or information about
you. Your name length must not exceed 24 symbols. If it does,
you have to either abbreviate it or use a pseudonym.
- Both files (MOVE.C/CPP and PLAYER.TXT) must be saved on a blank
diskette 3.5" in
IBM PC
format and given to the organization
committee before November 25th, 1995. After the end of the
competition, your diskette will be returned to you containing
protocol files for all the games played by your modules.
- Alternatively, you may send both files by email. Unfortunately,
in this case organization committee cannot guarantee that it will
be able to send you all the game protocols, although we will try
to do our best. Participants from cities other than Ekaterinburg
will have priority in receiving game protocols by email.
Additional Limitations On The Modules
- During the competition the following participants will be
disqualified:
- Those, whose modules will not compile under Borland C/C++
used by organization committee.
- Those, whose modules use non-standard libraries and/or
header files.
- Those, whose modules contain input/output operators of any
kind.
- Those, whose files contain offensive text regarding the
competition and/or organization committee.
- Those, whose programs "think" about ONE move for more than
one minute. (Organization committee uses
IBM PC AT
not worse
than 386, 40 Mhz)
- Those, whose modules generate run-time error for any reason
(e.g. division by zero)
- Those, whose modules cannot be compiled because of too much
static data declared.
- In case of lack of dynamically allocated memory during the game,
the program, which allocated less memory is declared a winner.
- Time limit for a game is one minute for each player. If a module
exceeds the limit, then the game is stopped and the opponent is
declared a winner. To find out the remaining time, your module
may call the function
int timeleft(void);
which returns the remaining time in seconds.
- One participant may submit no more than two versions of the
modules. In case of two versions he/she should add to his name
correspondingly "-1" and "-2" for each of the versions. Every
version must be submitted on separate diskette or in separate
email message.
Organization Committee Coordinates
The Urals State University,
4 Turgenev St.
Ekaterinburg, Russia
(Wednesday, 2:50pm, room 509), (Thursday, 4:45pm, room 622)
(Saturday, 8:55am, room 601), (Saturday, 2:25pm, room 611)
Additional Information
Winning a game gives one point, losing gives zero points, draw
gives 0.5 points. A competitor whose modules collect the maximum
number of points is declared a winner of the competition. In case of
two programs having equal number of points, the result of the game
between them is taken into account. In case of draw they both may be
declared winners.
This document is a translation of the Russian version.
October 31, 1995.
Organization Committee
Back to CROQUAR-95 Index Page
Send your comments to Sergey Gershtein