]> code.delx.au - gnu-emacs-elpa/commitdiff
* doc/chess.texi: Document chess-ai-quiescence-depth and chess-ai-best-move.
authorMario Lang <mlang@delysid.org>
Thu, 5 Jun 2014 17:31:51 +0000 (19:31 +0200)
committerMario Lang <mlang@delysid.org>
Thu, 5 Jun 2014 17:31:51 +0000 (19:31 +0200)
* chess-{ai,crafty,glaurung,gnuchess,sjeng,stockfish}.el: Add custom-manual links to customisation groups.

chess-ai.el
chess-crafty.el
chess-glaurung.el
chess-gnuchess.el
chess-sjeng.el
chess-stockfish.el
chess.info
doc/chess.texi

index b0a0bcf6a40195e8d8b186d1e937a912eaea709a..d3a1e5ca9510af9fbe7f5d874e41426dee9cf47c 100644 (file)
@@ -42,7 +42,8 @@
 
 This module does not allow to configure search time used to calculate
 reply moves.  You can only specify the search depth (see `chess-ai-depth')."
-  :group 'chess)
+  :group 'chess
+  :link '(custom-manual "(chess)AI"))
 
 (defcustom chess-ai-depth 2
   "The default search depth used to prune the search tree.
@@ -312,8 +313,7 @@ DEPTH defaults to the value of `chess-ai-depth'."
       (setq chess-engine-opponent-name "Emacs AI")
       t)
 
-     ((eq event 'new)
-      (chess-engine-set-position nil))
+     ((eq event 'new) (chess-engine-set-position nil))
 
      ((eq event 'move)
       (when (= 1 (chess-game-index game))
@@ -329,11 +329,11 @@ DEPTH defaults to the value of `chess-ai-depth'."
          (funcall chess-engine-response-handler 'move
                   (or (and (bufferp chess-polyglot-book)
                            (buffer-live-p chess-polyglot-book)
-                           (chess-polyglot-book-ply chess-polyglot-book position))
+                           (chess-polyglot-book-ply chess-polyglot-book
+                                                    position))
                       (chess-ai-best-move position))))))
 
-     (t
-      (apply 'chess-common-handler game event args)))))
+     (t (apply 'chess-common-handler game event args)))))
 
 (provide 'chess-ai)
 ;;; chess-ai.el ends here
index ea78090d3d7f5429b53ff9c4b390e8fa7c9e0572..24265ed92f834ce66057f7dbd42063d87b258daa 100644 (file)
@@ -27,7 +27,8 @@
 
 (defgroup chess-crafty nil
   "The publically available chess engine 'crafty'."
-  :group 'chess-engine)
+  :group 'chess-engine
+  :link '(custom-manual "(chess)Crafty"))
 
 (defcustom chess-crafty-path (or (executable-find "crafty")
                                 (executable-find "wcrafty"))
index 8bee9b6f752ba2d8ba9c194e7056f086bea4ff28..04e5c3f8a2267cdf4103e657d02ab8cdb5962fd1 100644 (file)
@@ -25,6 +25,7 @@
 (defgroup chess-glaurung nil
   "The publically available chess engine 'glaurung'."
   :group 'chess-engine
+  :link '(custom-manual "(chess)Glaurung")
   :link '(url-link "http://www.glaurungchess.com/"))
 
 (defcustom chess-glaurung-path (executable-find "glaurung")
index 81d71524152fc338fa694815af9a26a46a1d3fe3..248267c8afd612be0c4ea974d84c3add1d3f83f0 100644 (file)
@@ -26,7 +26,9 @@
 
 (defgroup chess-gnuchess nil
   "The publically available chess engine 'gnuchess'."
-  :group 'chess-engine)
+  :group 'chess-engine
+  :link '(custom-manual "(chess)GNU Chess")
+  :link '(url-link "http://www.gnu.org/software/chess/"))
 
 (defcustom chess-gnuchess-path (let ((exec-path (cons "/usr/games" exec-path)))
                                 (executable-find "gnuchess"))
index 88fec05cdef64d96bd6509a5c83efc96e265f5c1..a0422582145f6b03435adf75120919514eb7045f 100644 (file)
@@ -26,6 +26,7 @@
 (defgroup chess-sjeng nil
   "The publically available chess engine 'sjeng'."
   :group 'chess-engine
+  :link '(custom-manual "(chess)Sjeng")
   :link '(url-link "http://sjeng.sourceforge.net"))
 
 (defcustom chess-sjeng-path (executable-find "sjeng")
index 160fc1613e76d289f5baa907f3a79d39e0605584..9a4480aca87c978b262123110cf4a8bfe0f3d787 100644 (file)
@@ -25,6 +25,7 @@
 (defgroup chess-stockfish nil
   "The publically available chess engine 'stockfish'."
   :group 'chess-engine
+  :link '(custom-manual "(chess)Stockfish")
   :link '(url-link "http://www.stockfishchess.com"))
 
 (defcustom chess-stockfish-path (executable-find "stockfish")
index d9d2cd980ddc806e04f135aa39e0647134f01550..7d480da34eedc13cdebdf01b822c8b6e106fe24c 100644 (file)
@@ -1341,6 +1341,18 @@ does not require any external programs to be installed.
  -- User Option: chess-ai-depth
      Defines the default search depth for this engine.
 
+ -- User Option: chess-ai-quiescence-depth
+     Defines the number of plies to search for a quiet position.  This
+     is in addition to 'chess-ai-depth'.
+
+   If you'd like to employ the search and evaluation functions provided
+by this module programmatically, the following function is the top-level
+entry point.
+
+ -- Function: chess-ai-best-move position &optional depth eval-fn
+     Find the supposedly best move (ply) for POSITION.  DEPTH defaults
+     to the value of 'chess-ai-depth'.
+
 \1f
 File: chess.info,  Node: Crafty,  Next: Fruit,  Prev: AI,  Up: Engines
 
@@ -1587,7 +1599,9 @@ Function and Variable Index
 \0\b[index\0\b]
 * Menu:
 
+* chess-ai-best-move:                    AI.                   (line 24)
 * chess-ai-depth:                        AI.                   (line 13)
+* chess-ai-quiescence-depth:             AI.                   (line 16)
 * chess-algebraic-regexp:                Algebraic notation.   (line 33)
 * chess-algebraic-to-ply:                Algebraic notation.   (line 17)
 * chess-coord-to-index:                  Position coordinates. (line 22)
@@ -1838,19 +1852,19 @@ Node: Graphical displays\7f47463
 Node: Engines\7f47617
 Node: Common functions\7f48142
 Node: AI\7f49178
-Node: Crafty\7f49653
-Node: Fruit\7f50384
-Node: Glaurung\7f51230
-Node: GNU Chess\7f51820
-Node: Phalanx\7f52656
-Node: Sjeng\7f53238
-Node: Stockfish\7f53927
-Node: Internet Chess Servers\7f54692
-Node: Connecting to a server\7f55779
-Node: Seeking an opponent for a new game\7f56455
-Node: The sought game display\7f56907
-Node: Concept Index\7f57885
-Node: Function and Variable Index\7f58128
-Node: Key Index\7f70817
+Node: Crafty\7f50145
+Node: Fruit\7f50876
+Node: Glaurung\7f51722
+Node: GNU Chess\7f52312
+Node: Phalanx\7f53148
+Node: Sjeng\7f53730
+Node: Stockfish\7f54419
+Node: Internet Chess Servers\7f55184
+Node: Connecting to a server\7f56271
+Node: Seeking an opponent for a new game\7f56947
+Node: The sought game display\7f57399
+Node: Concept Index\7f58377
+Node: Function and Variable Index\7f58620
+Node: Key Index\7f71455
 \1f
 End Tag Table
index 4e1948d03b9c7951a76bd23523df93ab7c145245..5b15a9cbe1bc1c607c52323eeffd5ea72b780b39 100644 (file)
@@ -1587,6 +1587,20 @@ use @kbd{C-u M-x chess @key{RET} ai @key{RET}}.
 Defines the default search depth for this engine.
 @end defopt
 
+@defopt chess-ai-quiescence-depth
+Defines the number of plies to search for a quiet position.
+This is in addition to `chess-ai-depth'.
+@end defopt
+
+If you'd like to employ the search and evaluation functions provided
+by this module programmatically, the following function is the top-level
+entry point.
+
+@defun chess-ai-best-move position &optional depth eval-fn
+Find the supposedly best move (ply) for @var{position}.
+@var{depth} defaults to the value of `chess-ai-depth'.
+@end defun
+
 @node Crafty, Fruit, AI, Engines
 @section Crafty