From: Bryan Glennon
Subject: Newbie question - AIMA Example Problems
Date: 
Message-ID: <MPG.1b44c584a49c3f12989680@news.supernews.com>
Hi all -
    I have downloaded the source for the examples in "Artificial 
Intelligence: A Modern Approach" and I am having problems getting them 
to run. They fail using the trial editions Corman Lisp and Allegro CL. 
They run under LispWorks, but quickly exceed the heap limits in the 
personal edition. 

    Here's what I see when I load the initial file under Corman:

?(load "c:/Projects/AI/aima/aima.lisp")
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\utilities\utilities.lisp"" but have 
not yet been defined:
;;;     MAKE-BROADCAST-STREAM
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\utilities\cltl2.lisp"" but have not 
yet been defined:
;;;     SPECIAL-FORM-P
31
?
                                                                            
I realize that they are just warnings, but as I go through the next 
several steps, I get more and more and then when I run the test, it 
fails. Here's the rest of the results:

?(aima-load 'all)
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\agents\environments\basic-
env.lisp"" but have not yet been defined:
;;;     MAKE-AGENT-BODY
;;;     INITIALIZE-AGENT-NAMES
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\agents\environments\grid-env.lisp"" 
but have not yet been defined:
;;;     HEADING->STRING
;;;     MOVE-OBJECT-TO
;;;     ADD-LOCS
;;;     FIND-OBJECT-IF
;;;     PLACE-IN-CONTAINER
;;;     PLACE-OBJECT
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\agents\environments\wumpus.lisp"" 
but have not yet been defined:
;;;     FIND-OBJECT-OR-NEIGHBOR-IF
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\search\algorithms\iterative.lisp"" 
but have not yet been defined:
;;;     CSP-GOALP
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\search\algorithms\minimax.lisp"" but 
have not yet been defined:
;;;     GAME-OVER?
;;;     MAKE-MOVE
;;;     LEGAL-MOVES
;;;     GAME-STATE-SCORES
;;;     GAME-STATE-PLAYERS
;;;     GAME-WORST
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\search\environments\games.lisp"" but 
have not yet been defined:
;;;     GAME-AGENT-ALGORITHM
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\search\environments\prob-
solve.lisp"" but have not yet been defined:
;;;     PROBLEM-SOLVING-AGENT-ALGORITHM
;;;     MAKE-PROBLEM-SOLVING-AGENT
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\logic\algorithms\tell-ask.lisp"" but 
have not yet been defined:
;;;     LOGIC
;;;     SUBST-BINDINGS
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\logic\algorithms\normal.lisp"" but 
have not yet been defined:
;;;     ->PREFIX
;;; Warning: Symbol ??? assumed special
;;; Warning: Unused variable R in function PROVE-BY-REFUTATION, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 81
;;; Warning: Unused variable CLAUSE in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: Unused variable LITERAL in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: the following function(s) are called from forms
;;; in file "#P"c:\Projects\AI\aima\uncertainty\agents\mdp-agent.lisp"" 
but have not yet been defined:
;;;     POLICY-CHOICE
;;;     MDP-PERCEPT-STATE
;;; Warning: Symbol G assumed special
T
?(aima-compile)
;;; Warning: Symbol ??? assumed special
;;; Warning: Unused variable R in function PROVE-BY-REFUTATION, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 81
;;; Warning: Unused variable CLAUSE in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: Unused variable LITERAL in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: Symbol ??? assumed special
;;; Warning: Unused variable R in function PROVE-BY-REFUTATION, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 81
;;; Warning: Unused variable CLAUSE in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: Unused variable LITERAL in function RESOLVE, File c:
\Projects\AI\aima\logic\algorithms\fol.lisp, line 109
;;; Warning: Symbol G assumed special
;;; Warning: Symbol G assumed special
T
?(test 'all)
Testing System AGENTS
;;; Test agents in the vacuum and wumpus worlds.
;;; Here is how to run an environment, in this case the vacuum world.
;;; We specify the maximum number of steps, but that is optional:
> (RUN-ENVIRONMENT (MAKE-VACUUM-WORLD :MAX-STEPS

                                                                                                                         
10)
)
;;; An error occurred in function (SETF GRID-CONTENTS):
;;; Error: Wrong number of arguments
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1   Abort to top level.

Any insight will be appreciated...

Thanks,
Bryan

From: JP Massar
Subject: Re: Newbie question - AIMA Example Problems
Date: 
Message-ID: <lmamd0t98tvr53td82ecfaiimtfifpe1en@4ax.com>
On Thu, 24 Jun 2004 12:04:39 -0500, Bryan Glennon
<·············@bpgc.com> wrote:

>Hi all -
>    I have downloaded the source for the examples in "Artificial 
>Intelligence: A Modern Approach" and I am having problems getting them 
>to run. They fail using the trial editions Corman Lisp and Allegro CL. 
>They run under LispWorks, but quickly exceed the heap limits in the 
>personal edition. 
>
>    Here's what I see when I load the initial file under Corman:
>
>?(load "c:/Projects/AI/aima/aima.lisp")
>;;; Warning: the following function(s) are called from forms
>;;; in file "#P"c:\Projects\AI\aima\utilities\utilities.lisp"" but have 
>not yet been defined:
>;;;     MAKE-BROADCAST-STREAM
>;;; Warning: the following function(s) are called from forms
>;;; in file "#P"c:\Projects\AI\aima\utilities\cltl2.lisp"" but have not 
>yet been defined:
>;;;     SPECIAL-FORM-P
 
>
>Any insight will be appreciated...
>
 
Corman Lisp is not a full implementation of ANSI Common Lisp.
Last I looked, some functions like MAKE-BROADCAST-STREAM weren't
implemented.

SPECIAL-FORM-P is an old name for SPECIAL-OPERATOR-P.
Some Common Lisps may keep SPECIAL-FORM-P around for compatibility.
From: Karl A. Krueger
Subject: Re: Newbie question - AIMA Example Problems
Date: 
Message-ID: <cbfqg0$si3$1@baldur.whoi.edu>
JP Massar <······@alum.mit.edu> wrote:
> Corman Lisp is not a full implementation of ANSI Common Lisp.
> Last I looked, some functions like MAKE-BROADCAST-STREAM weren't
> implemented.

Wow, I would have difficulty doing without MAKE-BROADCAST-STREAM, or
specifically being able to call it without arguments to get a null
stream.  It's quite useful for debugging things that expect a stream.

Is there a different way to get a null output stream without doing
something OS-specific like opening /dev/null (or, I guess, NUL: on
DOS/Windows)?

-- 
Karl A. Krueger <········@example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews