-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprotocol.tex
136 lines (108 loc) · 4.15 KB
/
protocol.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
\documentclass[a4paper,12pt]{article}
\usepackage{url}
\usepackage{color}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{indentfirst}
\usepackage{graphicx}
\usepackage{mathrsfs}
% \\
% \clearpage
\begin{document}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem*{myproof}{Proof}
\newtheorem*{myexercise}{Exercise}
\newtheorem*{myproblem}{Problem}
%\setlength{\parindent}{0em}
\author{Kai Sun}
\title{Yixin Protocol}
\maketitle
\section{Introduction}
Yixin protocol is a protocol derived from Gomocup protocol~\cite{gomocup-protocol}. Firstly used by Yixin~\cite{yixin}, it supports more commands than Gomocup protocol. This document describes extensions and modifications of Yixin protocol compared with Gomocup protocol. For detail implementation of Yixin protocol, readers are recommended to refer Yixin Board~\cite{yixin-board} which has implemented all the extensions and modifications described in this document.
\section{Modification}
Compared with Gomocup protocol, Yixin protocol makes the following modifications:
\begin{itemize}
\item The old protocol used by Gomocup~\cite{old-gomocup-protocol} which uses files for communication is no longer supported. Therefore the name of brain is no longer required to begin with prefix ``pbrain-".
\item Yixin protocol no longer supports continuous game, that is, \textbf{INFO rule [value]} with \textbf{value} equals 2 or 3 does not represent continuous game any more. Instead, renju is supported by Yixin protocol and \textbf{INFO rule 2} represents renju rule.
\end{itemize}
\section{Extension}
Compared with Gomocup protocol, Yixin protocol adds the following extensions:
\begin{itemize}
\item \textbf{yxboard}
After this command the data forming the playing field are send. Every line is in the form:
\fbox
{
\textbf{[X],[Y],[field]}
}
where \textbf{[X]} and \textbf{[Y]} are coordinates and \textbf{[field]} is either number 1 (own stone) or number 2 (opponent's stone). The manager should send these lines in the same order as moves are made. Data are ended by \textbf{DONE} command.
Example:
The manager sends:
\fbox
{
\shortstack[l]
{
yxboard \\
10,10,1 \\
10,11,2 \\
11,11,1 \\
9,10,2 \\
DONE }
}
The brain answers:
\fbox
{
\textit{[No Answer]}
}
The difference between \textbf{yxboard} and \textbf{board} is that the brain is required not to answer \textbf{yxboard} with a move.
\item \textbf{yxstop}
When the brain receives this command, it should stop thinking immediately and output its move.
Example:
When the brain is thinking, the manager sends:
\fbox
{
yxstop
}
The brain answers:
\fbox
{
6,7
}
\item \textbf{yxshowforbid}
This command may be used only if renju rule is set. When the brain receives this command, it should output all the forbidden moves on the board. The format of output is in the form:
\fbox
{
FORBID [$X_1Y_1X_2Y_2\ldots X_NY_N$].
}
where $N$ is the number of forbidden moves and $(X_1,Y_1)$, $(X_2,Y_2)$, $\ldots$, $(X_N,Y_N)$ are the coordinates of each forbidden move. To avoid ambiguity, leading zero is added to every $X_i$ and $Y_i$ so that every $X_i$ and $Y_i$ is represented with a 2-digit number.
Example:
The manager sends:
\fbox
{
yxshowforbid
}
The brain answers:
\fbox
{
FORBID 09121011.
}
In the above example, there are two forbidden moves, one is $(9,12)$ and the other is $(10,11)$.
\item \textbf{yxhashclear}
When the brain receives this command, it should clear its hash memory.
\item \textbf{INFO max\_depth [value]}
The brain should stop thinking when its searching depth is over \textbf{[value]}.
\item \textbf{INFO max\_node [value]}
The brain should stop thinking when it has searched over \textbf{[value]} nodes. %In particular, -1
\item \textbf{INFO hash\_size [value]}
The brain should use at most $\textbf{[value]}$ KB hash memory.
\item \textbf{INFO thread\_num [value]}
The brain should use at most \textbf{[value]} threads for thinking.
\item \textbf{INFO thread\_split\_depth [value]}
The minimum depth at which work can be split between threads.
%\item \textbf{INFO caution\_factor [value]}
\end{itemize}
\bibliography{protocol}
\bibliographystyle{plain}
\end{document}