Rules of the World Computer Shogi Championship

Computer Shogi Association
Last updated 2014.11.22

Preamble. The World Computer Shogi Championship is a
championship in which representatives of outstanding
technology compete against each other under set rules,
team members of entered programs meeting at the same venue
and demonstrating their technical achievements in the developing
field of computer shogi.
Each entered program should include ingenuity of a quality high
enough to warrant entry in a global competition, having been expressly
developed for that purpose by the team members. Any hardware/software
technique is admissible if it meets the criteria outlined in the rules below.
Members of the teams should be willing to disclose the techniques used in
a positive manner, thus contributing to the technological improvement of
computer shogi.
Those who agree with these points and observe the rules are eligible to enter the
championship.

Section 1 General provisions

Article 1 (Definitions)

1. The CSA: The Computer Shogi Association
2. The championship: The World Computer Shogi Championship
3. A game: Each game of the championship
4. Preliminary contest/the final: All games on a particular day
5. The championship server: The LAN server for the championship
that is under the CSA server protocol,
ver. 1.1.3, provided by the CSA
6. Entered programs: Programs that enter the championship
7. Move-generating part: The move-generating component of the program/
the move-generating hardware
8. Interface part: The complement of the move-generating component of
the program, such as communication, display of the
board position, and display of the total time spent
9. CSA module library: CSA-authorized shogi-specific program
module library as defined by the New Library Rules.
10. Thinking part: The part of the move-generating component of the
entered program that excludes the CSA module
library/modified library and opening data, and
well-known general-purpose routines
11. Program developer: Developer of the thinking part of the
entered program
12. The entrant: The team member of the entered program or the team
13. The representative entrant: The representative person of the team
14. The operator: The operator of the entered program on each day
of the championship.
15. The call: The unique decision according to the rules
16. The adjudication: The decision concerning any matter in question
by a referee or the chair of the operating committee

Article 2 (Purpose of the championship)

1. The championship is held to determine the most superior programs among
those entered.
2. The championship is an opportunity for technology exchange and
demonstration of skill by the members of the teams.

Article 3 (Championship operation)
1. The championship is organized by the CSA.
2. The operating committee that is the principal organ of the operation
consists of tournament administrators delegated by the CSA.
3. The CSA administrative board selects the tournament administrators
at a board meeting held within four months of the end of the previous
championship. The tournament administrators select the committee
chair by mutual vote and then prepare and operate the championship.
4. The CSA administrative board may select additional tournament
administrators.
5. The term of office of the tournament administrators lasts until the
following tournament is concluded. Reappointment is possible.
6. Correspondence concerning appeals and the remaining duties of the
previous championship are taken over from the previous operating
committee.
7. The operating committee acts to ensure that the championship fulfills its
purpose and is operated smoothly.
8. The chair of the operating committee is responsible for the overall
operation of the championship.

Article 4 (Adjudication)
1. The chief referee and the other referees are assigned by the chair of the
operating committee.
2. The referees are responsible for ensuring that the rules are strictly
observed by the entrants.
3. The referees call and may adjudicate win/lose/draw positions under
the rules.
4. The chief referee is the person ultimately responsible for adjudication by
the referees.
5. Entrants may appeal the adjudication of the chief referee to
the chair of the operating committee. The appeal must be lodged
within one month of the end of the championship.
6. Adjudication by the chair of the operating committee is the
final decision.

Section 2 Eligibility

Article 5 (Eligibility for participation)
Those who agree with the points of the preamble and observe the rules
are eligible to participate, but the operating committee
retains the discretion to decide whether each team may enter the
championship.

Article 6 (Entered program)
1. The entered program must run on a machine that is an artifact
and automatically generates a move under the rules of shogi.
2. The entered program may use any number of computers and any
peripherals.
3. Each machine must be prepared by the entrant.
4. The developer of the program may not develop two or more
thinking parts of the programs that enter the championship.
5. The entered program is a program that the developer made
expressly using some technical ingenuity, but it is possible to enter if
the developer expressly used the library for that purpose.
6. The entered program must have all the functions that are written
in the rules.

Article 7 (CSA module library)
1. An entrant may use the CSA module libraries that are registered
at the specified time point, for his/her program.
2. The entrant may modify and use the modules. In this case, it is
suggested that the entrant register a modified module as a library entry
after the championship.
3. If the entrant uses the CSA module libraries, he/she must disclose this
fact to the operating committee.

Article 8 (Required features)
An entered program must have the following features:
1. Be able to start/continue the game for any position, turn or time-spent.
2. Be able to quit at any point.
3. Display the current board position, pieces in hand, and the turn.
It is acceptable to display this information in text.
4. Measure the time spent on each individual move and display the
total time spent under Article 24.
5. Record the moves and the time spent on each move,
showing the recorded moves and the time spent on each move when
quitting the game.
6. Be able to play through a LAN server under CSA server protocol 1.1.3.
7. Be able to enter an opponent's move manually (without LAN).

Article 9 (Suggested features)
An entered program should have the following features, but is not ineligible
without them:
1. Be able to find perpetual moves.
2. Display the sending/receiving character string through LAN,
if needed.

Section 3 Application

Article 10 (Application to enter the championship)
1. The entrant must complete an application to enter the championship within
the period declared by the operating committee.
2. When applying, the entrant must disclose the full names of all the
developers and the full name of the representative entrant through the
web page indicated by the operating committee for the application to
enter the championship.
The operating committee will disclose all the full names of the
developers, together with the full name of the representative entrant.
3. The entrant must be approved by all of the developers to enter the
championship.
4. The entrant must pay the registration fee announced by the operating
committee before the deadline for payment.
Payment in cash will be accepted at the tournament itself if the entrant
lives outside Japan.
The operating committee will not refund any fees other than those of
championship cancellation.
5. The entrant must disclose the information of the program that the
operating committee specifies by the specified date. Specified
information will include the processors, memory, and CSA libraries used.
6. The entrant must submit documents to the operating committee by the date
specified, showing that the entered program satisfies Clause 5 of
Article 6.
7. The entrant must describe the modification to the documents of Clause 6 of
this Article in an easy-to-understand manner, if the entrant modifies
and uses the modified library.

Article 11 (Restriction of multiple machines, power, and/or noise)
1. If the entrant enters a program that has one
of the following properties, the entrant must make a request and receive
permission before the specified date from the operating committee.
 1. The entered program uses multiple machines at the venue.
2. The total power of the machine exceeds 1,000 watts.
 3. The total noise level exceeds 70dBs.
2. If the operating committee considers that it is difficult for that program
to be used at the venue, it will relocate the machine(s), and may
require remote participation (see Article 12, Clause 1).

Article 12 (Remote participation)
1. An entrant may place a machine (that does not have to communicate
with the CSA LAN server) outside the venue (such a machine
being called a 'remote machine' and this style of participation being
referred to as 'remote participation'), if any of the following is
satisfied:
1. The entrant requests and receives permission from the operating
committee before the specified date.
2. The operating committee makes a request following Article 11, Clause 2.
2. With remote participation, the entrant must prepare an extra
communication machine and bring the communication machine
to the venue on the entrant’s own responsibility (such a machine being
referred to as a 'machine in venue').
1. The machine in venue is able to communicate between the CSA LAN server
and the remote machine.
2. The machine in venue must have all the features described in Article 8.
3. Sending to/receiving from the remote machine is on
the machine in venue and must not be done manually. However, connection
and reconnection of communication to the remote machine may be
done manually.
4. The entrant must be in possession of the thinking report of the remote
machine (or, at least, the moves with the time spent of the remote
machine).
5. The entrants take responsibility for communication risks between
the remote machine and the machine in venue.

Article 13 (Front machine)
An entrant may put in place a machine which covers all or part of the
interface part (such a machine being called a 'front machine'), and
communicate the move manually between the machine which covers the
generating part (such a machine being called a 'move-generating machine')
and the front machine, if one of the following conditions is satisfied:
1. The entrant makes a request before the specified date to the operating
committee and the operating committee gives permission because the move-
generating machine has one or more special features.
2. The entrant reports the lack of a function under Article 8 on each day of
the championship, and the operating committee permits him/her to enter
for unavoidable reasons.

Article 14 (Successor to a program)
1. The entrant of a program may declare that the program is the
successor to any program that was made by the same team or a part of
the same team of any previous championship.
2. The entrant of a program may declare that the program is not
the successor to any program that was made by the same team or a part of
the same team of any previous championship.
3. The declaration in Clauses 1 and 2 of this Article must be made to the
operating committee before the specified date.
4. If the developers of the same team of any previous championship are
members of different teams in the championship, only one program
can be declared as the successor; the other programs will be treated
as newcomers. If more than one program is declared as a successor,
then the operating committee will arbitrate.
5. If the entrant does not declare the predecessor of the program as
shown in Clause 3, then the operating committee will decide which is the
predecessor of the program, or the program will be treated as a newcomer.
In this case, the program is usually treated as the successor to
the last entered program where the intersection of the members of the
program and the members of the predecessor is not empty.

Article 15 (Program eligibility)
1. If the entered program does not satisfy eligibility as defined in Section 2
or the entrant fails to make the application defined in Section 3, the
operating committee will forbid the program to enter the championship
unless it accepts that the reason is unavoidable.
2. The operating committee may request the source codes of the entered
program to adjudge Clause 1 of this Article.

Article 16 (Approval and confirmation procedures)
The entrant must show the operating committee the facts in Clauses 2 and 5
of Article 10 if there are any that have changed before the announcement of
the result on each day of the championship.

Section 4 (Tournament procedure)

Article 17 (Seeding order)
1. The seeding order of the entered programs is decided as follows:
1. The result of the final of the previous championship
2. The result of the second preliminary contest of the previous
championship (finalists being exempted)
3. The result of the first preliminary contest of the previous
championship (qualifiers of the second preliminary contests being
exempted)
4. The result of the second previous championship
5. The result of the third previous championship, and so on
6. Newcomers (order being determined by drawing)
2. The drawing for Item 6 of Clause 1 of this Article will be conducted
straight after the deadline for registration of the first preliminary
contest expires, i.e., straight after the final decision on the entrants
  for the first day is made.

Article 18 (Treatment of the seeds)
1. There are the first and second preliminary contests and then a final round
in this tournament.
2. Under the previous article, the top sixteen (16) entered programs
are seeded for the second preliminary contest. The other entered
programs enter the first preliminary contest.
3. The second preliminary contest seeded programs are decided at the
   end of March of the championship year, after being accepted for
   the championship by the operating committee and not being treated as
'unentered programs' (these cases occurring when applicants withdraw
and/or the operating committee refuses entry for some reason); such
programs are called 'planning-to-enter programs.'

Article 19 (Procedure for the preliminary contests and the final)
1. In the first preliminary contest, all entrants other than the second
preliminary contest seeded programs enter.
There are seven rounds. The top eight programs qualify for
the second preliminary contest.
2. In the second preliminary contest, twenty-four (24) programs that
consist of second preliminary contest seeded programs and the
qualifying programs of the first preliminary contest enter.
  There are nine rounds. The top eight programs qualify for the final.
3. In the final, eight programs that consist of the qualifying
programs from the second preliminary contest enter.
There are seven rounds.
4. In the first and second preliminary contests, the operating committee
will ask whether the qualifier wishes to enter the next day. If the
entrant quits or it is impossible to make sure that the entrant will
enter the next day, the qualifying position will go to the next program.
5. In the first and second preliminary contests, the total number of
games may be less than the numbers above, according to circumstance.
6. After the end of March of the championship year and before the
announcement of the results of the first preliminary contest by the
operating committee, if there are any unentered second preliminary
contest seeded programs, the operating committee will not admit
any program to the second preliminary contest as a seeded program
and permit the number of qualified programs to increase.
7. The procedures of Clauses 1, 2, and 3 of this Article apply if the number
of programs planning to enter is between 25 and 64 (on the last day of
March of the championship year). If the number of programs planning
to enter is less than 25, there will be no first preliminary contest.
If the number is greater than 64, the operating committee will increase
the number of programs that are seeded for the second preliminary
contest and of the qualified programs, one for each five teams.
8. If the number in the first or the second preliminary contest is
odd (the number is fixed when the entrants come to the venue or
communicate with the operating committee before the assembly time),
the operating committee will let a hypothetical program (such a
program being called an 'imaginary program') enter the contest.
The imaginary program will not qualify. If it achieves a qualifying
position, that position will go to a regular program.
9. The imaginary program is exempted from Articles 6 and 10.
10. All the games of the imaginary program are loss by default.

Article 20 (Treatment of late/refused programs)
1. If an applicant declines to enter the championship, the applicant
must contact the operating committee before the following deadlines:
Second preliminary contest seed applicants should contact the
operating committee before the announcement of the first preliminary
contest.
Others should contact the operating committee before the assembly
time of the first preliminary contest.
2. If there is a possibility that an entrant may arrive later than the
assembly time, he/she must inform the operating committee of this
before the assembly time.
3. In the first and second preliminary contests, if an entrant does
not register or contact the operating committee before the assembly
time to decline to enter or say that he/she will be late, then the
entrant will be considered as having given up the program and may
not enter the games on that day or afterwards.
4. In the final, even if an entrant does not register or contact the
operating committee before the assembly time to decline to enter
or report that he/she will be late, the entrant may enter the games
after registration if ready to play.
5. In the case of any entrant who has given up, who contacts the operating
committee too late to decline to enter, or who fails to contact the
operating committee about being late, the operating committee will
give such an entrant a warning and/or restrict that entrant from
entering subsequent championships. However, such penalty will not
apply if the operating committee judges that circumstances were beyond
the entrant's control (e.g., traffic accident or sudden illness).
6. An entrant may give up the games if the entrant declares a wish to do
so to the operating committee and the operating committee accepts the
declaration. In this case, the results of the game and the succeeding
games of the team are loss by default.
7. Despite Clause 10 of Article 19 and Clause 6 of this Article, the results
of the games between two teams that have given up and the games between
teams that have given up and the imaginary program are draws.

Article 21 (Swiss pairing method)
1. The perfect Swiss pairing method is defined as follows:
1. In each round, there is one win point for a win, a half-win point for
a draw, and zero win points for a loss, these to be combined with the
win points of the preceding rounds. Entrants who have the same win
points are paired where possible. If it is the first round, all
entrants have zero win points to start with.
2. If pairing fails on the rule above (if, for instance, the number
of entrants with the same points is odd), then entrants who have
nearly equal win points will be paired.
3. The same opponents are not paired twice.
2. The modified Swiss (accelerated Swiss) pairing method is like the
perfect Swiss pairing method. In each round, the win points of the
preceding rounds except for the previous round are totaled.
3. In the preliminary contest, the pairing is decided according to
the following:
1. By the perfect Swiss pairing method for the first round.
2. By the perfect Swiss pairing method, supposing the higher seeded
teams win, for the second round.
3. By the modified Swiss pairing method for the third round.
4. By the perfect Swiss pairing method for the fourth round and
thereafter.
4. The pairings and the first player for each game are decided by a
pairing system provided by the operating committee. If the pairing
system does not decide the pairing, the operating committee will decide.
5. The round-robin method is applied to the final. All orders of
games and first players of all games are decided by the operating
committee before the first round begins.

Article 22 (Championship results)
The championship results are determined by the following rules, in the order
given, where a draw is treated as a half win and a half loss (or a half-win
point):
1. Number of win points
2. Sum of all opponents' win points
3. Sum of all defeated opponents' win points
4. Sum of all defeated opponents' win points, except the top and the
bottom
5. Results of head-to-head competition; number of wins minus number of
losses, taking into account only those games involving the player
whose results are the same after 1 to 4 above
6. Order of seeding (for seeded teams) or position in a preliminary
contest (for the others)

Section 5 (Game process)

Article 23 (Process)
1. All games are played without handicap.
2. Each starting time is announced by the operating committee at least ten
minutes before the start of play.
3. All games are conducted through the championship server.
4. The message announcing the start of each game is given by the championship
server. If the championship server is not available, then a
referee will give a sign to start the game, but if both players
agree, they may start earlier than the referee's signal.
5. If it is impossible to start the game at the planned starting time,
the difference between the planned starting time and the
actual starting time will be subtracted from the playing time of the
side for which starting on time was not possible. If it is impossible
for both sides to start the game, the time difference will be subtracted
from both sides.
6. If the championship server is not available, then play will be
conducted manually.
7. After each game has started, no person may act in a way that affects the
generation of any move.
8. The following procedure must be carried out by the developer or the
representative entrant of the program. (If the entrant makes a request
to the operating committee before the planned starting time of the game
and the operating committee permits another person to act (such a person
being called an 'agent'), the agent may carry out the procedure.)
1. Start the entered program and establish communication with the
CSA LAN server at the last moment.
2. Enter an opponent's move when proceeding manually.
3. Quit the program when a referee requests.
4. Establish/re-establish communication between the machine in venue
and the remote machine when remote participation is in operation,
as in Article 12.
5. Carry out communications manually between the front machine and the
move-generating machine, as in Article 13.
9. If a game is aborted as a result of some accident after the start,
a referee may order the game to be played or replayed manually at that
point, or, in certain cases, a couple of moves before that point.

Article 24 (Time spent)
1. The time spent is counted in seconds, rounding fractions down if desired.
2. The total time spent is the sum of time spent.
3. Each program is allowed a total of ten (10) minutes plus ten (10) seconds
byoyomi of playing time. If one side runs out of time before it wins
or declares to win, then it loses the game, even if it mates on
the move made when the total time spent is greater than or equal to
the time limit.
4. The operating committee may reduce the time limit depending on
championship procedures.
5. When playing through the championship server, the server counts
the time spent for each move and manages the total time spent.
The time spent for a move is measured between the sending of the
opponent's last move (or the server's initial order to start the game)
and receiving the reply. The delay time is included in the time spent.
6. When playing manually, the time spent is counted according to the
time spent as counted by the program.
7. When playing manually and by remote participation, time spent is
counted on the machine in venue. The time spent includes the
communication time and the reconnection time (for communication breaks).
8. When playing manually and using a front machine, time spent is counted
on the front machine. The time spent includes the communication time
between the front machine and the move-generating machine.

Article 25 (Declaration of a win)
1. The program may declare a win (such a declaration being called
'declaration of a win') if the position satisfies all of the
following conditions. If the position does not satisfy one
or more conditions, then the declaring side loses:
1. It is the declaring side's turn.
2. The King of the declaring side is in the third rank or beyond.
3. The declaring side has 28 (the first player) or 27 (the second
player) piece points or more. Piece points are counted only
for pieces of the declaring side that are in hand or in the third
rank or beyond. Piece points are counted as follows: King: 0;
Rook, Bishop, Promoted Rook, or Promoted Bishop: 5; Other: 1.
4. The declaring side has 10 or more pieces other than the King
in the third rank or beyond.
5. There is no check on the King of the declaring side.
6. The declaring side has at least one second left.
2. The declaration of a win must be done by the program in the
following manner:
1. The program must display the declaration on the monitor.
2. The program must send an "@KACHI" command, too, when
playing through the championship server.

Article 26 (Outcome of the game)
1. The outcome of a game is determined by the following rules, in the
order given:
1. An adjudication or a decision by a referee.
2. A decision by the championship server.
2. After deciding the outcome, a referee displays the outcome at the
specified place. The outcome is fixed when the operating committee
announces the pairing or (for the last game) the operating committee
announces the results of each day. After such time, results cannot be
changed, even if errors are subsequently found.

Article 27 (Outcome of a game by decision of the referees)
1. The referees may decide which program loses when the following
conditions occur (except when both sides satisfy the conditions):
1. There are no legal moves left.
2. Total time spent has reached the time limit that is defined in
Clause 3 of Article 24.
3. There has been one or more illegal moves.
4. The opponent legally declares a win.
5. The declaration of a win has been unsatisfactory.
6. There has been illegal communication when playing through the LAN
(where illegality results from not following the CSA server protocol
ver.1.1.3).
7. It is impossible to input/output a move as a result of a program
stopping for any reason, such as problems with communication or
the operating system, after the start of thinking about the
fifth move. But the referee will not decide which program loses
if the program stops after an illegal character string has been
sent, displayed, and kept in the display after the program stops.
8. It is impossible to resume smoothly when a referee orders as such
at any point (position, turn, time spent).
9. A referee decides that the entrant has made an illegal action.
2. The position of perpetual repetition is a draw, except that if one
side's moves are checks only then that side loses the game. Perpetual
repetition is decided by the championship server if the game
is under LAN. It is decided by the perpetual repetition decision
program prepared by the operating committee after being declared
to the operating committee by referees, program developers,
representative entrants, or agents.
3. If the number of total moves reaches 256, the referees decide neither
program should lose, and the position is not perpetual repetition, then
the result of the game is a draw.
4. The referees will decide on an appropriate course of action (decide
the outcome (a win, a loss, a draw), replaying from the start, resuming
from a certain position, etc.) if a LAN cable causes trouble and/or
there is an accidental power shutoff.
5. The referees will decide the outcome (including a draw) even during
a game, in order to allow the tournament to proceed if the tournament
procedure does not go as planned.

Article 28 (Unexpected contingency)
1. If an unexpected contingency (for example, a disaster, a blackout,
a LAN server problem) happens to occur, the referees will resume the tournament
as just before the unexpected contingency insofar as possible.
2. Depending on the nature of the unexpected contingency, the operating committee chair
may decide the course of operation on a case-by-case basis thereafter.

Article 29 (Game record)
1. The operating committee may publish any game record at any time.
2. Entrants must bring the game record to the operating committee
immediately after the game if the game is played manually. A USB
flash memory should be used.
3. The file format for the game record (defined in the second clause)
must be the CSA standard game record file format.
4. In the file of the game record (defined in the second clause), the
entrant must record each amount of time spent.


Section 6 Program-keeping and appeals

Article 30 (Program-keeping period and appeals)
1. The entrant must keep the complete reproduction set
for the championship (such a set being called a 'program for the
championship') for one year from the last day of the
championship. This set must include all of the versions of
the executable program, data, all of the versions of the source codes
  that generate the executable programs, and so on, that entered
  the championship.
The entrant should keep the hardware for the championship for one
year from the last day of the championship.
2. For an entered program, any person may make an appeal to the operating
committee that the program does not satisfy one or more conditions of
entry. Such appeals must be made within six months of the last day of
the championship.
3. The operating committee will decide whether the appeal is valid or not
as soon as possible.
4. If the operating committee decides not to accept the appeal, the operating
committee will report the result to the person who appealed.
5. If the operating committee decide to accept the appeal, the operating
committee will assemble an investigation committee to investigate the
matter and submit an investigation report to the operating committee.
The operating committee will make the final decision based on the
investigating committee’s report, and report the final decision to
the person who appealed and the target(s) of the appeal.
The operating committee may disclose part or all of the investigating
committee’s results when the operating committee has decided on the
severity of the case.
6. In the case of Clause 5, the entrant will be required to show all or
part of the entered program for the championship, as well as the hardware.
7. If the entrant does not accept a request as outlined in Clause 6, or the
operating committee makes the judgment that the entered program does
not satisfy one or more conditions of entry to the championship following
investigation, the CSA may remove the seed and/or restrict entry in
subsequent tournaments.

Additional clauses
1. These rules are valid from November 22, 2014.
2. The rules and regulations are available in both Japanese and
English. In all questions of interpretation, the Japanese
version shall be regarded as authoritative.
3. (The operating committee for the 24th championship)
The tournament administrators for the 24th World Computer Shogi
Championship were selected at a CSA board meeting on December 1, 2013,
Article 3, Clause 3 notwithstanding.