X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=strategies.lisp;h=b18a7c391b861a4feb7fa524ccf6f1c2ffa948ea;hb=dc49a130877a2c968a74a000e8425189bc7c3ad5;hp=785009ace75234352ad20d8a24bb0e57ef98716b;hpb=1758cfb593196dd65c70199aa1ebd90cbd6e7ee5;p=reversi.git diff --git a/strategies.lisp b/strategies.lisp index 785009a..b18a7c3 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.2 2002/10/25 09:23:39 kevin Exp $ +;;;; $Id: strategies.lisp,v 1.3 2002/10/25 12:39:15 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2001-2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1998-2002 Peter Norvig @@ -21,7 +21,6 @@ (in-package :reversi) (declaim (optimize (safety 1) (debug 3) (speed 3) (compilation-speed 0))) - (defun random-strategy (player board) "Make any legal move." (declare (type player player) @@ -51,8 +50,8 @@ (make-move move player (copy-board board)))) moves)) - (best (apply #'max scores))) - (declare (fixnum moves best)) + (best (apply #'max scores))) + (declare (fixnum best)) (elt moves (position best scores))))) (eval-when (:compile-toplevel :load-toplevel :execute) @@ -235,9 +234,9 @@ (defstruct (node) - (square nil :type square) - (board nil :type board) - (value nil :type integer)) + (square(missing-argument) :type square) + (board (missing-argument) :type board) + (value (missing-argument) :type integer)) (defun alpha-beta-searcher2 (depth eval-fn) "Return a strategy that does A-B search with sorted moves."