From c090fe80e307758da62ceb1a5371fbf0f8fa603c Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Thu, 12 Jun 2003 13:28:55 +0000 Subject: [PATCH] r5107: Auto commit for Debian build --- base.lisp | 7 +++---- debian/changelog | 6 ++++++ edge-table.lisp | 4 ++-- io.lisp | 5 +++-- strategies.lisp | 20 ++++++++++---------- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/base.lisp b/base.lisp index cffba2e..8a6dd14 100644 --- a/base.lisp +++ b/base.lisp @@ -8,7 +8,7 @@ ;;;; Programer: Kevin Rosenberg based on code by Peter Norvig ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: base.lisp,v 1.5 2003/06/12 13:08:43 kevin Exp $ +;;;; $Id: base.lisp,v 1.6 2003/06/12 13:28:55 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig @@ -185,8 +185,7 @@ (declare (type board board) (type move move) (type player player) - (optimize speed (safety 0)) -) + (optimize speed (safety 0) (space 0))) (if (= (bref board move) empty) (block search (let ((i 0)) @@ -281,7 +280,7 @@ (let ((c (+ move dir))) (declare (type square c)) (and (= (the piece (bref board c)) (the player (opponent player))) - (find-bracketing-piece (+ c dir) player board dir)))) + (find-bracketing-piece (the fixnum (+ c dir)) player board dir)))) (defun find-bracketing-piece (square player board dir) "Return the square number of the bracketing piece." diff --git a/debian/changelog b/debian/changelog index f02f032..81bfa92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-reversi (1.0.7-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Thu, 12 Jun 2003 07:28:39 -0600 + cl-reversi (1.0.6-1) unstable; urgency=low * New upstream diff --git a/edge-table.lisp b/edge-table.lisp index 9b2f949..c8a648e 100644 --- a/edge-table.lisp +++ b/edge-table.lisp @@ -7,7 +7,7 @@ ;;;; Programer: Kevin M. Rosenberg based on code by Peter Norvig ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: edge-table.lisp,v 1.4 2003/06/12 12:42:13 kevin Exp $ +;;;; $Id: edge-table.lisp,v 1.5 2003/06/12 13:28:55 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig @@ -205,7 +205,7 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (let ((stable 0) (semi-stable 1) (unstable 2)) - (declaim (type fixnum stable semi-stable unstable)) + (declare (type fixnum stable semi-stable unstable)) (defun piece-stability (board sq) (declare (type board board) diff --git a/io.lisp b/io.lisp index 1d3d2c8..57940c4 100644 --- a/io.lisp +++ b/io.lisp @@ -8,7 +8,7 @@ ;;;; Programer: Kevin Rosenberg based on code by Peter Norvig ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: io.lisp,v 1.4 2003/06/12 12:42:13 kevin Exp $ +;;;; $Id: io.lisp,v 1.5 2003/06/12 13:28:55 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig @@ -26,6 +26,7 @@ (cross-product #'concat-symbol '(? A B C D E F G H ?) '(? 1 2 3 4 5 6 7 8 ?)))) + (declaim (type list square-names)) (defun h8->88 (str) "Convert from alphanumeric to numeric square notation." @@ -35,7 +36,7 @@ (defun 88->h8 (num) "Convert from numeric to alphanumeric square notation." (if (valid-p num) - (elt square-names num) + (nth num square-names) num))) (defun moves-to-string (moves) diff --git a/strategies.lisp b/strategies.lisp index e0e108d..e310140 100644 --- a/strategies.lisp +++ b/strategies.lisp @@ -8,7 +8,7 @@ ;;;; Programer: Kevin Rosenberg based on code by Peter Norvig ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: strategies.lisp,v 1.7 2003/06/12 13:08:43 kevin Exp $ +;;;; $Id: strategies.lisp,v 1.8 2003/06/12 13:28:55 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig @@ -284,8 +284,7 @@ (defun negate-value (node) "Set the value of a node to its negative." - (declare (fixnum node) - (optimize (speed 3) (safety 0) (space 0))) + (declare (optimize (speed 3) (safety 0) (space 0))) (setf (node-value node) (- (node-value node))) node) @@ -349,7 +348,7 @@ (declare (type board board) (type player player) (type fixnum achievable cutoff ply) - (type move killer) + (type (or null move) killer) (optimize (speed 3) (safety 0) (space 0))) "A-B search, putting killer move first." (if (= ply 0) @@ -400,13 +399,10 @@ (defun alpha-beta-searcher3w (depth eval-fn) "Return a strategy that does A-B search with killer moves." - (declare (fixnum depth)) #'(lambda (player board) - (multiple-value-bind (value move) - (alpha-beta3w player board losing-value winning-value - depth eval-fn nil) - (declare (ignore value)) - move))) + (nth-value 1 + (alpha-beta3w player board losing-value winning-value + depth eval-fn nil)))) (defun put-first (killer moves) "Move the killer move to the front of moves, @@ -490,6 +486,7 @@ (defun iago (depth) "Use an approximation of Iago's evaluation function." + (declare (fixnum depth)) (alpha-beta-searcher3 depth #'iago-eval)) ;; Maximizer (1-ply) @@ -525,12 +522,15 @@ (defun ab3w-df (ply) + (declare (fixnum ply)) (alpha-beta-searcher3w ply #'count-difference)) (defun ab3w-wt (ply) + (declare (fixnum ply)) (alpha-beta-searcher3w ply #'weighted-squares)) (defun ab3w-md-wt (ply) + (declare (fixnum ply)) (alpha-beta-searcher3w ply #'modified-weighted-squares)) -- 2.34.1