<refentry id="reference-gtpadapter">

<refmeta>
<refentrytitle>gtpadapter</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source-name">GoGui</refmiscinfo>
<refmiscinfo class="version">GoGui &version;</refmiscinfo>
<refmiscinfo class="manual">GoGui Reference</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gtpadapter</refname>
<refpurpose>
Go Text Protocol adapter for logging or protocol translations.
</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>gtpadapter</command>
<arg><option>-config</option> <replaceable>file</replaceable></arg>
<arg><option>-emuhandicap</option></arg>
<arg><option>-emuloadsgf</option></arg>
<arg><option>-fillpasses</option></arg>
<arg><option>-gtpfile</option> <replaceable>file</replaceable></arg>
<arg><option>-log</option> <replaceable>file</replaceable></arg>
<arg><option>-lowercase</option></arg>
<arg><option>-name</option> <replaceable>name</replaceable></arg>
<arg><option>-noscore</option></arg>
<arg><option>-resign</option> <replaceable>score</replaceable></arg>
<arg><option>-size</option> <replaceable>n</replaceable></arg>
<arg><option>-verbose</option></arg>
<arg><option>-version1</option></arg>
</cmdsynopsis>

<cmdsynopsis>
<command>gtpadapter</command>
<arg choice="plain"><option>-help</option></arg>
</cmdsynopsis>

<cmdsynopsis>
<command>gtpadapter</command>
<arg choice="plain"><option>-version</option></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsection>
<title>Description</title>
<para>
Go Text Protocol adapter for logging or protocol translations.
The argument <replaceable>program</replaceable> is a command line
for the Go program .
</para>
</refsection>

<refsection>
<title>Options</title>
<variablelist>

<varlistentry>
<term>
<option>-config</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
Read command line options and arguments from file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-emuhandicap</option></term>
<listitem>
<para>
Emulate the commands <command>set_free_handicap</command> and
<command>place_free_handicap</command> by using standard fixed handicap
locations (if existing) and sending the stones to the program using
play commands.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-emuloadsgf</option></term>
<listitem>
<para>
Emulate the command <command>loadsgf</command> by
<command>play</command> commands.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-fillpasses</option></term>
<listitem>
<para>
Fill non-alternating moves with pass moves (for programs that
can only handle move sequences with alternating color).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-gtpfile</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
Send GTP commands from file to program at startup.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-help</option></term>
<listitem>
<para>
Display help and exit.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-log</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
Log the GTP stream to a file
(the stream of the adapter program,
not the one from the adapter to the Go program).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-lowercase</option></term>
<listitem>
<para>
Translate move commands to lower-case.
The GTP standards requires case-insensitive parsing of moves,
but some programs can handle only lower-case.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-name</option> <replaceable>name</replaceable>
</term>
<listitem>
<para>
Name used for answering the <command>name</command> command.
If the name contains a colon, the part after the colon
is interpreted as a version and used for answering the
<command>version</command> command.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-noscore</option>
</term>
<listitem>
<para>
Hide the <command>final_score</command> and
<command>final_status_list</command> commands, even if the program supports
them.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-resign</option> <replaceable>score</replaceable>
</term>
<listitem>
<para>
Send an <command>estimate_score</command> to the program before
each <command>genmove</command> command and resign, if the estimation
is below the given score (to the disadvantage of the side to move).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-size</option> <replaceable>n</replaceable>
</term>
<listitem>
<para>
Only accept this board size, even if the program accepts other sizes.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-verbose</option></term>
<listitem>
<para>
Print the GTP stream from the adapter to the Go program to standard error.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-version</option></term>
<listitem>
<para>
Print version and exit.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>-version1</option></term>
<listitem>
<para>
Sets, whether GtpAdapter reports protocol version 1 in response to the
<command>protocol_version</command> command.
GtpAdapter can handle both versions of the commands for playing moves,
generating moves, and starting a new game; it will translate them
correctly to the GTP version of the Go program.
</para>
</listitem>
</varlistentry>

</variablelist>
</refsection>

<refsection>
<title>GTP Extensions</title>
<para>
<variablelist>

<varlistentry>
<term><command>gtpadapter_showboard</command></term>
<listitem>
<para>
Show the internal Go board.
This is different from the <command>showboard</command> command,
which is forwarded to the Go program, if it supports it.
</para>
</listitem>
</varlistentry>

</variablelist>
</para>
<para>
<!-- Empty paragraph to enforce some space in JEditorPane (Java 1.5.0) -->
</para>
</refsection>

</refentry>
