<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
  <!ENTITY legal SYSTEM "legal.xml">
  <!ENTITY appversion "0.16.1">
  <!ENTITY manrevision "0.16.1">
  <!ENTITY date "ส.ค. 2010">
  <!ENTITY app "<application>GRhino</application>">
  <!-- Information about the entities
       The legal.xml file contains legal information, there is no need to edit the file. 
       Use the appversion entity to specify the version of the application.
       Use the manrevision entity to specify the revision number of this manual.
       Use the date entity to specify the release date of this manual.
       Use the app entity to specify the name of the application. -->
]>
<!-- =============Document Header ============================= -->
<article id="index" lang="en">
<!-- please do not change the id; for translations, change lang to -->
<!-- appropriate code -->
  <articleinfo> 
    <title>&app; Manual V&manrevision;</title>       

    <copyright> 
      <year>2004</year> 
      <year>2005</year> 
      <year>2006</year> 
      <holder>Kriang Lerdsuwanakij</holder> 
    </copyright> 

<!-- translators: uncomment this:
    <copyright>
     <year>2002</year>
     <holder>ME-THE-TRANSLATOR (LANGUAGE translation)</holder>
    </copyright>
   -->

    &legal;

    <!-- This file  contains link to license for the documentation (GNU FDL), and 
	 other legal stuff such as "NO WARRANTY" statement. Please do not change 
	 any of this. -->

    <authorgroup> 
      <author> 
	<firstname>Kriang</firstname> 
	<surname>Lerdsuwanakij</surname> 
	<affiliation> 
	  <address> <email>lerdsuwa@users.sourceforge.net</email> </address> 
	</affiliation> 
      </author>

<!-- This is appropriate place for other contributors: translators,
     maintainers,  etc. Commented out by default.
      <othercredit role="translator">
	<firstname>Latin</firstname> 
	<surname>Translator 1</surname> 
	<affiliation> 
	  <orgname>Latin Translation Team</orgname> 
	  <address> <email>translator@gnome.org</email> </address> 
	</affiliation>
	<contrib>Latin translation</contrib>
      </othercredit>
-->
    </authorgroup>


<!-- According to GNU FDL, revision history is mandatory if you are -->
<!-- modifying/reusing someone else's document.  If not, you can omit it. -->
<!-- Remember to remove the &manrevision; entity from the revision entries other
-->
<!-- than the current revision. -->
<!--
    <revhistory>
      <revision> 
	<revnumber>xxx</revnumber> 
	<date>xxx</date> 
	<revdescription> 
	  <para role="author">xxx
	    <email>xxx</email>
	  </para>
	</revdescription> 
      </revision> 
    </revhistory> 
-->

    <releaseinfo>This manual describes how to use &app; &appversion;.
    </releaseinfo>

    <legalnotice> 
      <title>Feedback</title> 
      <para>To report a bug or make a suggestion regarding the &app; or
	this manual, please use the &app;
	<ulink url="http://sourceforge.net/tracker/?group_id=13362" 
        type="http">bug tracker</ulink>
        at the &app; web page.
      </para>
    </legalnotice> 

  </articleinfo> 

  <indexterm zone="index"> 
    <primary>GRhino</primary> 
    <secondary>Using</secondary> 
  </indexterm> 

<!-- ============= Document Body ============================= -->
<!-- ============= Introduction ============================== -->
<!-- Use the Introduction section to give a brief overview of what
     the application is and what it does. -->
  <sect1 id="grhino-introduction"> 
    <title>Introduction</title> 
    <para>
    &app;, or <application>Rhino</application> its former name, 
    is a reversi game.
    What distinguishes &app; from most other reversi games is
    that &app; will be targeted for experienced reversi players.
    Strong AI is the main focus with some additional good, 
    useful features is planned.
    The ultimate target strength of the AI is that it should be able to
    beat the best human player at the highest difficulty level.
    </para> 
  </sect1>

<!-- =========== Getting Started ============================== -->
<!-- Use the Getting Started section to describe the steps required
     to start the application and to describe the user interface components
     of the application. If there is other information that it is important
     for readers to know before they start using the application, you should
     also include this information here. 
     If the information about how to get started is very short, you can 
     include it in the Introduction and omit this section. -->

  <sect1 id="grhino-getting-started"> 
    <title>Getting Started</title> 
    <para>
    You can start <application>&app;</application> from a command line
    by typing the following command, then press <keycap>Return</keycap>:
    </para>
    <para> 
	<command>grhino</command> 
    </para> 

    <para>
    When you start <application>&app;</application>, a window similar to 
    the following is displayed.  This figure shows the window using
    small theme, with board border and toolbar turned on.
    The actual display varies depending on Preferences settings.
    </para>

    <!-- ==== Figure ==== -->
      <figure id="mainwindow-fig"> 
	<title>&app; Start Up Window</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/mainwindow.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/mainwindow.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows &app; main window. Contains title bar, menubar, board border,
	      game board, and statusbar.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

    <para>
    The &app; window contains the following elements:
    </para>

    <variablelist>
      <varlistentry>
	<term>Menubar. </term>
	<listitem>
	<para>The menus on the menubar contain all of the commands you can use in
	<application>&app;</application>.
	</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Toolbar. </term>
	<listitem>
	<para>The toolbar contains a subset of the commands that you can access from the menubar.
        This can be turned on and off via the 
	<menuchoice> 
	  <guimenu>View</guimenu> 
	  <guimenuitem>Toolbar</guimenuitem> 
	</menuchoice> menu.
	</para>

	<para>
	You can right click on the empty area of the toolbar
	to select if text and icons of the buttons are displayed.
	Furthermore, the size of icons on the toolbar can be chosen in the 
	<guilabel>Preferences</guilabel> 
	dialog box opened by
	<menuchoice> 
	  <guimenu>Settings</guimenu> 
	  <guimenuitem>Preferences</guimenuitem> 
	</menuchoice> menu.  The relevant setting is the 
	<guilabel>Toolbar icon size</guilabel> configuration in the <guilabel>Theme</guilabel>
	tab.
	</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Board Border. </term>
	<listitem>
	<para>This can be turned on and off using
	<guilabel>Show board border</guilabel> setting in the <guilabel>Theme</guilabel>
	tab in the <guilabel>Preferences</guilabel> dialog.
	</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Game Board. </term>
	<listitem>
	<para>This is the place where the game is played.  
	Simply clicked on a square to place your move.
	</para>

	<para>
	In certain game mode, such as in backward or forward through the
	game history, the mouse cursor changes from arrow
	to other symbols when you move the mouse over game board and border.  
	You need to exit that mode first to continue playing.
	</para>

	<para>The board graphics may be changed via the
	<guilabel>Theme directory</guilabel> setting in the <guilabel>Theme</guilabel>
	preferences tab.
	&app; comes with a default board and another board using small
	graphics.
	</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Statusbar. </term>
	<listitem>
	<para>The information here varies depending on the
	game status.  When the game is in progress, the current player shown.
	When the game ends, the scores are displayed.
	</para>
	</listitem>
      </varlistentry>
    </variablelist>

    <tip>
    <para>
    Throughout this manual, various actions are described using commands
    from the menubar.  You can simply click on the corresponding 
    button in the toolbar to achieve the same result.
    </para>
    </tip>
  </sect1>


<!-- ================ Playing ================================ -->
  <sect1 id="grhino-playing"> 
    <title>Playing GRhino</title>
    <para>
    This section describes game playing with &app;.
    The rules of reversi are not provided here but
    you can find those kinds of information from the Internet.
    Strategy guide to help beating &app; can be found at
    <ulink url="http://rhino.sourceforge.net/link.php" type="http">Links section
    of GRhino web page</ulink>.
    </para>

    <!-- ================ Playing Subsection ================================ -->
    <sect2 id="grhino-basics"> 
      <title>Basics</title> 
      <para>To start a new game, choose 
	<menuchoice> 
	  <guimenu>Game</guimenu> 
	  <guimenuitem>New game</guimenuitem> 
	</menuchoice> menu command.
	By default, the game starts from the beginning.  
	You may choose to start from any opening by setting 
	<guilabel>Opening</guilabel> option in the <guilabel>Board</guilabel>
	tab of <guilabel>Preferences</guilabel> dialog box.
	This is a good way to learn different reversi openings.
	The name of the opening, when matches the current board position,
	is displayed inside a pair of bracket "[...]" in the statusbar.
	</para>

	<para>
	To choose the computer player, use the 
	<guilabel>Computer player</guilabel> option in the <guilabel>AI</guilabel>
	tab of <guilabel>Preferences</guilabel> dialog box.  You can quickly
	change the computer color between black and white using
	<menuchoice> 
	  <guimenu>Settings</guimenu> 
	  <guimenuitem>Switch computer color</guimenuitem> 
	</menuchoice> menu.
	</para>

	<para>
	After the game has been started, click on the board square to
	place a move.  If the move is valid, a disc appears and captured
	pieces are flipped.  AI's move is placed immediately without user
	involvement.  Similar applies when a player has to pass, the other player
	just makes consecutive moves.  
	At higher AI level, AI may take a long time before
	placing a move.  You can see whose turn it is by looking
	at the statusbar at the bottom of the window.
	</para>

	<para>
	When the game ends, the final score is displayed on the statusbar.
	You can start another game by via
	<menuchoice> 
	  <guimenu>Game</guimenu> 
	  <guimenuitem>New game</guimenuitem> 
	</menuchoice> menu.
	</para>

	<para>
	During the game, you may undo your move using
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Undo move</guimenuitem> 
	</menuchoice> menu.  
	If you decide to repeat the previous move, the
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Redo move</guimenuitem> 
	</menuchoice> menu is available.
	The number of times you can undo is unlimited.
	Depending on the
	<guilabel>Redo also repeat same AI moves</guilabel> setting in the 
	<guilabel>Board</guilabel> tab in the <guilabel>Preferences</guilabel> dialog,
	the AI may choose a different move from the previously made one before undo.
	</para>

    </sect2> 


    <!-- ================ Playing Subsection ================================ -->
	 <sect2 id="grhino-history"> 
      <title>Game History</title> 
	<para>You may look at different stages of the current game by
	using the following menu commands:</para>
	<variablelist> 
	<varlistentry> 
	<term> 
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Previous move</guimenuitem> 
	</menuchoice>
	</term>
	<listitem>
	<para>
	View board position of the previous move regardless of whether the
	player is human or computer.  Repeatly use this command to
	go backward through the game history.
	</para>
	</listitem>
	</varlistentry>
	<varlistentry> 
	<term> 
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Next move</guimenuitem> 
	</menuchoice>
	</term>
	<listitem>
	<para>
	View board position of the next move regardless of whether the
	player is human or computer.  Repeatly use this command to
	go forward through the game history.
	</para>
	</listitem>
	</varlistentry>
	<varlistentry> 
	<term> 
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Begin of game</guimenuitem> 
	</menuchoice>
	</term>
	<listitem>
	<para>
	Jump to the initial board position of the game.
	</para>
	</listitem>
	</varlistentry>
	<varlistentry> 
	<term> 
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	  <guimenuitem>Last move</guimenuitem> 
	</menuchoice>
	</term>
	<listitem>
	<para>
	Jump to the last board position of the game.  This allows the game to
	continue.
	</para>
	</listitem>
	</varlistentry>
	</variablelist>
	<para>
	Although these commands are similar to undo and redo, they do not
	affect the current game.  You can go backward and forward as many
	time as you want.
	</para>

	<para>
	When you want to continue the current game,
	simply use the
	      <menuchoice> 
		<guimenu>Edit</guimenu> 
		<guimenuitem>Last move</guimenuitem> 
	      </menuchoice> command to show the last board position.
	The mouse cursor, when move on the game board, shows "X" symbol
	instead of the usual arrow as a reminder
	when the board does not show the last
	position.
	</para>

	<para>
	Another convenient way to navigate through game history is via
	the <guilabel>Game History</guilabel> window.  It can be
	opened via
	<menuchoice> 
	  <guimenu>View</guimenu> 
	  <guimenuitem>Game history...</guimenuitem> 
	</menuchoice> menu.
	</para>

    <!-- ==== Figure ==== -->
      <figure id="history-fig"> 
	<title>Game History Window</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/history.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/history.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows Game History window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

	<para>
	Three columns are displayed in the window: move number, 
	player, and position.  Click on any row to display board
	position as the result of that move.  Pressing
	<keycap>Up</keycap>, <keycap>Down</keycap>, <keycap>Page Up</keycap>,
	<keycap>Page Down</keycap>, <keycap>Home</keycap>, and <keycap>End</keycap>
	there also works.
	</para>

    </sect2> 


    <!-- ================ Playing Subsection ================================ -->
	 <sect2 id="grhino-savedgame"> 
      <title>Saved Games</title> 
	<para>Currently GRhino supports IOS and GGS game formats.
	Game files can be opened using the menu
	<menuchoice> 
	  <guimenu>Game</guimenu> 
	  <guimenuitem>Open</guimenuitem> 
	</menuchoice>.
	</para>

	<para>
	If the game file contains one game, the game is displayed on
	the board immediatly.  Then you can use various commands in the
	<menuchoice> 
	  <guimenu>Edit</guimenu> 
	</menuchoice>
	menu to navigate through the game.
	If multiple games exist in the file, 
	the <guilabel>Game List</guilabel> window opens.
	Click on a row to bring the game to the board.
	</para>

    <!-- ==== Figure ==== -->
      <figure id="gamelist-fig"> 
	<title>Game List Window</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/gamelist.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/gamelist.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows Game List window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

	<para>
	Five columns are displayed: game number, black player name,
	white player name, game type, and result of the game.
	In the <guilabel>Type</guilabel> column, <guilabel>Std</guilabel>
	indicates standard game, i.e., game starts from initial position,
	while <guilabel>Rand</guilabel> indicates
	random game with the specified number of pieces on the board.
	The format of the <guilabel>Result</guilabel> column
	varies depending on the file format.
	</para>

	<para>
	You can sort the games by clicking on any column header.
	By default, games are sorted in the order that appear in the
	file.
	</para>

    </sect2> 


    <!-- ================ Playing Subsection ================================ -->
	 <sect2 id="grhino-edit"> 
      <title>Editing board</title> 
	<para>You can start a game from arbitrary board position by using
	Edit board feature.  It can be accessed from the menu
	<menuchoice> 
	  <guimenu>Game</guimenu> 
	  <guimenuitem>Edit board</guimenuitem> 
	</menuchoice>.
	</para>

	<tip>
	<para>
	This feature only works when Toolbar is displayed. If not, select
	the menu
	<menuchoice> 
	  <guimenu>View</guimenu> 
	  <guimenuitem>Toolbar</guimenuitem> 
	</menuchoice>
	to activate the toolbar.
	</para>
	</tip>

	<para>
	When inside editing mode, an additional toolbar appears as
	seen in the below figure.
	</para>

    <!-- ==== Figure ==== -->
      <figure id="edit-toolbar-fig"> 
	<title>Game Window</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/toolbar-edit.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/toolbar-edit.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Game window showing edit toolbar.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

	<para>
	The first three buttons select the color to place on the board:
	empty, black, and white.  You can place them on the board by
	clicking on the desired position.  You can place a rectangular
	block by dragging on the board similar to drawing a rectangle
	in a paint program.  The fourth button select the player who will
	have the first move when the game begins.  The last button accept
	the edit and start game from the current board.
	</para>

	<para>
	Mouse shortcuts are provided in this mode.  Right clicking cycles
	through the three colors: empty, black, and white.  Middle clicking
	alternate the player to start game.
	</para>

    </sect2> 


    <!-- ================ Playing Subsection ================================ -->
    <sect2 id="grhino-ai"> 
      <title>AI Implementation</title> 
	<para>
	The current &app; AI is based on open book, pattern and
	parity-based evaluator, and final disk count.  The choice depends
	on the stage of the game.  All parameters related to AI can be
	found in the <guilabel>AI</guilabel> tab of the 
	<guilabel>Preferences</guilabel> dialog.
	</para>

	<para>
	During begining of the game, an open book is used.  
	The chosen move
	is based on move popularity of IOS and GGS game database.  
	It is controlled by the parameter 
	<guilabel>Open book variation</guilabel>.
	There are 6 possible values:
	<guilabel>None</guilabel>, <guilabel>Very low</guilabel>, 
	<guilabel>Low</guilabel>, <guilabel>Medium</guilabel>,
	<guilabel>High</guilabel>, and <guilabel>Very high</guilabel>.  
	&app; always uses the same opening with the <guilabel>None</guilabel> 
	option while more choices of moves are made with higher settings.
	</para>

	<para>
	During mid game, a pattern-based evaluator is used.
	The pattern was trained from IOS and GGS games using win-loss
	percentage as a score.  There is also score adjustment based on
	parity situation on the board.  The difficulty depends on the search
	depth.  The deeper search, the stronger the AI.
	</para>

	<para>
	&app; also relies on searching during end game.  But disk
	count score is used instead.  The setting
	<guilabel>Winning move search empties</guilabel> determines
	when to look for a move that guarantee a win for computer
	and places moves based on the search result.  This is also
	known as win-loss-draw search.  
	On the other hand,
	<guilabel>Perfect end game search empties</guilabel> controls
	when to search for a move that maximize computer's score.
	Searching earlier in the game when there are plenty of empty
	squares (or simply empties) produces better AI play.
	</para>

	<para>
	Usually winning play search is a lot faster than perfect
	search, so
	<guilabel>Winning move search empties</guilabel>
	can be set a few empties higher than
	<guilabel>Perfect end game search empties</guilabel>.
	When
	<guilabel>Winning move search empties</guilabel>
	is set to less than <guilabel>Perfect end game search empties</guilabel>,
	winning move search is disabled altogether.
	</para>

	<para>
	There are 5 default levels of difficulty available during
	mid to end game where AI parameters are fixed.  They are set according
	to the table below.  The AI parameters can be changed freely in the 
	custom level.
	</para>

	<table frame="all">
	<title>AI Default Parameters</title>
	<tgroup cols="6" align="center" colsep="1" rowsep="0">
	<colspec colnum="2" colname="c2"/>
	<colspec colnum="6" colname="c6"/>
	<spanspec spanname="level" namest="c2" nameend="c6" align="center"/>
	<thead>
	<row>
	<entry morerows="1" valign="middle">Setting</entry>
	<entry spanname="level">Level</entry>
	</row>
	<row>
	<entry>
	1
	</entry>
	<entry>
	2
	</entry>
	<entry>
	3
	</entry>
	<entry>
	4
	</entry>
	<entry>
	5
	</entry>
	</row>
	</thead>

	<tbody>
	<row>
	<entry align="left">
	Mid game search depth
	</entry>
	<entry>
	2
	</entry>
	<entry>
	4
	</entry>
	<entry>
	6
	</entry>
	<entry>
	8
	</entry>
	<entry>
	10
	</entry>
	</row>

	<row>
	<entry align="left">
	Winning move search empties
	</entry>
	<entry>
	6
	</entry>
	<entry>
	8
	</entry>
	<entry>
	12
	</entry>
	<entry>
	16
	</entry>
	<entry>
	20
	</entry>
	</row>
	<row>
	<entry align="left">
	Perfect end game search empties
	</entry>
	<entry>
	4
	</entry>
	<entry>
	6
	</entry>
	<entry>
	10
	</entry>
	<entry>
	14
	</entry>
	<entry>
	18
	</entry>
	</row>
	</tbody>

	</tgroup>
	</table>

    <tip>
    <para>
    Currently, a search tree pruning is not yet implemented.
    So playing AI level 5 is not practical.
    </para>
    </tip>
    </sect2>

    <!-- ================ Playing Subsection ================================ -->
    <sect2 id="grhino-pattern"> 
      <title>Pattern Evaluation Window</title> 
	<para>
	You can view the score of current board position without
	move look ahead from
	the <guilabel>Pattern Evaluation</guilabel> window.  This can be
	opened via
	<menuchoice> 
	  <guimenu>View</guimenu> 
	  <guimenuitem>Pattern evaluation...</guimenuitem> 
	</menuchoice> menu.
	The score used during mid game is the
	<guilabel>Total score</guilabel> but from searching all
	possible future moves up to the specified mid game search depth.
	Although it is intended for AI development and debugging, 
	this provides an idea of what AI thinks about the current 
	board position.
	These information, however, is AI implementation dependent
	and may change in future version of &app;.
	</para>

    <!-- ==== Figure ==== -->
      <figure id="pattern-fig"> 
	<title>Pattern Evaluation Window</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/pattern.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/pattern.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows Pattern Evaluation window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

	<para>
	The main part of window is a table listing all different
	patterns used by &app; and its score.  They are simply
	summed together and added with <guilabel>Parity score</guilabel>
	to produce the <guilabel>Total score</guilabel> for AI.
	Positive score means black has an advantage while
	negative score favors white.
	</para>

	<para><guilabel>Parity score</guilabel> is the AI idea of
	current parity situation.  This is very important toward
	the end of the game as the player who can play the last
	move of any hole can flip a lot of pieces that are never 
	flipped back again.
	</para>

	<para><guilabel>Move index</guilabel> represents just the stage
	of the game.  The AI uses different pattern tables at
	different game stages.
	</para>
    </sect2>
  </sect1>


  <!-- ============= Customization ============================= -->
  <!-- Use this section to describe how to customize the application. -->
  <sect1 id="grhino-prefs"> 
    <title>Settings</title> 
    <para>To configure &app;, choose 
      <menuchoice> 
	<guimenu>Settings</guimenu> 
	<guimenuitem>Preferences</guimenuitem> 
      </menuchoice>. The 
      <guilabel>Preferences</guilabel> dialog contains the following tabbed
      sections:</para> 
    <itemizedlist> 
      <listitem> 
	<para> 
	  <xref linkend="grhino-prefs-ai"/></para> 
      </listitem> 
      <listitem> 
	<para> 
	  <xref linkend="grhino-prefs-board"/></para> 
      </listitem> 
      <listitem> 
	<para> 
	  <xref linkend="grhino-prefs-theme"/></para> 
      </listitem> 
    </itemizedlist>
    <para>
	Note that the changed settings only last until you exit from &app;.
	To make them apply to all future sessions, use the
	<menuchoice> 
	  <guimenu>Settings</guimenu> 
	  <guimenuitem>Save settings</guimenuitem> 
	</menuchoice> menu.
	In UNIX systems, the configurations is stored in the file
	<filename>~/.gnome2/GRhino</filename>.
    </para>


    <!-- =============== Customization Subsection ================ -->
    <!-- Use a new section to describe different tabbed sections on the Settings or Preferences
	     dialog. -->
    <sect2 id="grhino-prefs-ai"> 
      <title>AI</title> 

    <!-- ==== Figure ==== -->
      <figure id="prefs-ai-fig"> 
	<title>Preferences Dialog - AI Tab</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/prefs-ai.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/prefs-ai.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows &app; AI tab of Preferences window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

      <variablelist> 
	<varlistentry> 
	  <term> 
	    <guilabel>Computer player</guilabel> </term> 
	  <listitem> 
	    <para>
		Select the color of the AI player.  You can have AI playing
		against itself by setting this to <guilabel>Both</guilabel>.
		The AI player can be changed automatically in each new game
		when it is set to <guilabel>Alternate</guilabel> or
		<guilabel>Random</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Computer level</guilabel> </term> 
	  <listitem> 
	    <para>
		This setting provides an easy control for various other AI options below
		to a predefined value.
		Due to some flaws in the current AI, the AI strength appears
		to peak at some point and does not increase with the level settings is higher.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Mid game search depth</guilabel> </term> 
	  <listitem> 
	    <para>
		This controls the number of lookahead move the AI search
		is performed during the mid game stage.
		During this stage, the AI evaluates the position using
		pattern and parity score.
		It can be configured only when the option <guilabel>Computer level</guilabel>
		is set as <guilabel>Custom</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Winning move search empties</guilabel> </term> 
	  <listitem> 
	    <para>
		This controls when to use winning move search
		instead of mid game search.
		This search is started if the number of empty squares
		on the board reach the specified number.
		The AI tries to find a move that always results in a win for AI
		and terminates the search if one is found.
		It can be configured only when the option <guilabel>Computer level</guilabel>
		is <guilabel>Custom</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Perfect end game search empties</guilabel> </term> 
	  <listitem> 
	    <para>
		This controls when to use perfect end game search.
		The AI evaluates the board using final disk counts as
		search criterion.
		It can be configured only when the option <guilabel>Computer level</guilabel>
		is <guilabel>Custom</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Randomness</guilabel> </term> 
	  <listitem> 
	    <para>
		It adds the amount of randomness to board scores
		during mid game and end game search.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Open book variation</guilabel> </term> 
	  <listitem> 
	    <para>
		It effects AI during opening stage of the game.
		The open book is based on move popularity.
		With <guilabel>None</guilabel>, the AI plays the same opening every game,
		with the most popular moves always chosen.
		For higher settings, the choice of openings becomes more varied.
		But the strength of AI is weaken if the setting is too high.
	    </para>
	  </listitem> 
	</varlistentry> 
      </variablelist> 
    </sect2>


    <!-- ============= Customization Subsection ===================== -->
    <!-- Another tabbed section on the Preferences dialog. -->
    <sect2 id="grhino-prefs-board"> 
      <title>Board</title> 

    <!-- ==== Figure ==== -->
      <figure id="prefs-board-fig"> 
	<title>Preferences Dialog - Board Tab</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/prefs-board.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/prefs-board.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows &app; Board tab of Preferences window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

      <variablelist> 
	<varlistentry> 
	  <term> 
	    <guilabel>Log game moves</guilabel> </term> 
	  <listitem> 
	    <para>
		If checked, all games played are logged into the file <filename>~/grhino.log</filename>.
		It is a GGS format and can be opened by
		<menuchoice> 
		  <guimenu>Game</guimenu> 
		  <guimenuitem>Open</guimenuitem> 
		</menuchoice> menu,
		processed by <command>gen_book</command> 
		and <command>gen_pattern</command> programs.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Redo also repeat same AI moves</guilabel> </term> 
	  <listitem> 
	    <para>
		If checked, when using redo command AI always makes the same moves 
		as the original game sequence.
		Setting this option on has an advantage that game may be undo 
		several times and then redo as many times to get back to the last
		board position.
		Otherwise AI may choose to try an alternative position 
		thus making further redo impossible.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Animate opening</guilabel> </term> 
	  <listitem> 
	    <para>
		This controls whether the game should animate the opening
		moves for the selected <guilabel>Opening</guilabel> option below.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Animation delay</guilabel> </term> 
	  <listitem> 
	    <para>
		This controls how much delay before computer makes a move, the
		larger number the longer delay.  The unit is 0.1 second.
		This is useful when <guilabel>Animate opening</guilabel> is selected.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Start game from</guilabel> </term> 
	  <listitem> 
	    <para>
		This selects the board when you start a new game.
		<guilabel>Initial board</guilabel> starts the game with 
		the standard four disc in the center of the board.
		<guilabel>Random board</guilabel> starts the game with pieces
		randomly placed, beginning from center of the board, with
		equal number of pieces for black and white.
		When playing with computer, AI open book is disabled with
		<guilabel>Random board</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Opening</guilabel> </term> 
	  <listitem> 
	    <para>
		This allows you to play games beginning from a particular opening
		instead of the default &app; open book.
		The openings are taken from Robert Gatliff opening list
		July 15, 1995 version.
		This option only applies when <guilabel>Start game from</guilabel>
		is <guilabel>Initial board</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Random game pieces</guilabel> </term> 
	  <listitem> 
	    <para>
		This chooses the number pieces on the board
		when <guilabel>Start game from</guilabel>
		is <guilabel>Random board</guilabel>.
	    </para>
	  </listitem> 
	</varlistentry> 
      </variablelist> 
    </sect2>


    <!-- ============= Customization Subsection ===================== -->
    <!-- Another tabbed section on the Preferences dialog. -->
    <sect2 id="grhino-prefs-theme"> 
      <title>Theme</title> 

    <!-- ==== Figure ==== -->
      <figure id="prefs-theme-fig"> 
	<title>Preferences Dialog - Theme Tab</title> 
	<screenshot> 
	  <mediaobject> 
	    <imageobject><imagedata
		fileref="figures/prefs-theme.png" format="PNG"/> 
	    </imageobject>
	    <!-- EPS versions of the figures are not required at the moment. -->
            <!-- 
		    <imageobject>
      		<imagedata fileref="figures/prefs-theme.eps" format="EPS"/>
    		    </imageobject>
	    -->
	    <textobject> 
	      <phrase>Shows &app; Theme tab of Preferences window.</phrase> 
	    </textobject> 
	  </mediaobject> 
	</screenshot> 
      </figure>
    <!-- ==== End of Figure ==== -->

      <variablelist> 
	<varlistentry> 
	  <term> 
	    <guilabel>Show possible moves</guilabel> </term> 
	  <listitem> 
	    <para>
		When selected, all possible move is shown as small dots
		on the game board.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Show last move</guilabel> </term> 
	  <listitem> 
	    <para>
		When selected, the disk placed in the previous move is
		shown together with a small cross.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Show board border</guilabel> </term> 
	  <listitem> 
	    <para>
		When selected, graphics for board borders are also shown.
		The actual content depends on the theme chosen.
		For themes coming with &app;, labels indicating board position
		are displayed.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Theme directory</guilabel> </term> 
	  <listitem> 
	    <para>
		This chooses the set of board graphics used by &app;.
		The <guilabel>DEFAULT</guilabel> option selects the images compiled
		into &app; binary.
		Other choices correspond to image files stored in the specified 
		subdirectory inside the &app; 
		<filename class="directory">theme</filename> directory.
		By default this is 
		<filename class="directory">/usr/local/share/grhino-0.16.1/theme</filename>.
		New themes may be added by creating image files named
		<filename>black, white, empty,
		hint_black, hint_white, black_last, white_last,
		left, right, top</filename>,
		and <filename>bottom</filename> with either <filename>.png</filename> or <filename>.xpm</filename>
		extension and placing them inside a new subdirectory of 
		<filename class="directory">theme</filename>.
	    </para>
	  </listitem> 
	</varlistentry> 
	<varlistentry> 
	  <term> 
	    <guilabel>Toolbar icon size</guilabel> </term> 
	  <listitem> 
	    <para>
		This control the size of icons in the toolbar when it is visible.
	    </para>
	  </listitem> 
	</varlistentry> 
      </variablelist> 
    </sect2>
  </sect1>


<!-- ============= Bugs ================================== -->
<!-- This section is optional and is commented out by default. 
     You can use it to describe known bugs and limitations of the 
	  program if there are any - please be frank and list all
     problems you know of. 
  
  <sect1 id="grhino-bugs">
  <title>Known Bugs and Limitations</title>
  <para> </para>
 </sect1>
-->


<!-- ============= About ================================== -->
<!-- This section contains info about the program (not docs), such as
      author's name(s), web page, license, feedback address. This
      section is optional: primary place for this info is "About.." box of
      the program. However, if you do wish to include this info in the
      manual, this is the place to put it. Alternatively, you can put this information in the title page.-->
  <sect1 id="grhino-about"> 
    <title>About &app;</title> 
    <para>
    &app; was written by Kriang Lerdsuwanakij
    (<email>lerdsuwa@users.sourceforge.net</email>). To find more information about
    &app;, please visit the 
    <ulink url="http://rhino.sourceforge.net" type="http">GRhino Web
    page</ulink>.
    </para>

    <para>To report a bug or make a suggestion regarding the &app; or
	this manual, please use the &app;
	<ulink url="http://sourceforge.net/tracker/?group_id=13362" 
        type="http">bug tracker</ulink>
        at the &app; web page.
    </para>

    <para>
    This program is distributed under the terms of the GNU
    General Public license as published by the Free Software
    Foundation; either version 2 of the License, or (at your option)
    any later version. A copy of this license can be found at this
    <ulink url="ghelp:gpl" type="help">link</ulink>, or in the file
    COPYING included with the source code of this program.
    </para>

  </sect1> 
</article>
