I have been reading a lot about Reinforcement Learning lately, and I have found "Reinforcement Learning: An Introduction" to be an excellent guide. The author's helpfully province source code for a lot of their worked examples.
Before I begin the question I should point out that my practical knowledge of lisp is minimal. I know the basic concepts and how it works, but I have never really used lisp in a meaningful way, so it is likely I am just doing something incredibly n00b-ish. :)
I have been trying to run the code on a Linux machine, using both GNU's CLISP and SBCL but have not been able to run it. I keep getting a whole list of errors using either interpreter. In particular, most of the code appears to use a lot of utilities contained in a file 'utilities.lisp' which contains the lines
(defpackage :rss-utilities (:use :common-lisp :ccl) (:nicknames :ut)) (in-package :ut)
The: ccl seems to refer to some kind of Mac-based version of lisp, but I could not confirm this, it could just be some other package of code.
> * (load "utilities.lisp")
> > debugger invoked on a
> SB-KERNEL:SIMPLE-PACKAGE-ERROR in
> thread #<THREAD "initial thread"
> RUNNING {100266AC51}
>: The name
> "CCL" does not designate any package.
> > Type HELP for debugger help, or
> (SB-EXT:QUIT) to exit from SBCL.
> > restarts (invokable by number or by > possibly-abbreviated name): 0:
> [ABORT] Exit debugger, returning to > top level.
> > (SB-INT:%FIND-PACKAGE-OR-LOSE "CCL")
I tried removing this particular piece (changing the line to
(:use :common-lisp)
but that just created more errors.
> ; in: LAMBDA NIL ; (+ > RSS-UTILITIES::*MENUBAR-BOTTOM* ; > (/ (- RSS-UTILITIES::MAX-V > RSS-UTILITIES::V-SIZE) 2)) ; ; caught > WARNING: ; undefined variable: > *MENUBAR-BOTTOM* > > ; (- > RSS-UTILITIES::*SCREEN-HEIGHT* > RSS-UTILITIES::*MENUBAR-BOTTOM*) ; ; > caught WARNING: ; undefined > variable: *SCREEN-HEIGHT* > > ; (IF RSS-UTILITIES::CONTAINER ; > (RSS-UTILITIES::POINT-H ; > (RSS-UTILITIES::VIEW-SIZE > RSS-UTILITIES::CONTAINER)) ; > RSS-UTILITIES::*SCREEN-WIDTH*) ; ; > caught WARNING: ; undefined > variable: *SCREEN-WIDTH* > > ; (RSS-UTILITIES::POINT-H > (RSS-UTILITIES::VIEW-SIZE > RSS-UTILITIES::VIEW)) ; ; caught > STYLE-WARNING: ; undefined function: > POINT-H > > ; (RSS-UTILITIES::POINT-V > (RSS-UTILITIES::VIEW-SIZE > RSS-UTILITIES::VIEW)) ; ; caught > STYLE-WARNING: ; undefined function: > POINT-V
Anybody got any idea how I can run this code? Am I just totally ignorant of all things lisp?
UPDATE [March 2009]: I installed Clozure, but was still not able to get the code to run.
At the CCL command prompt, the command
(load "utilities.lisp")
results in the following error output:
;Compiler warnings : ;
In CENTER-VIEW: Undeclared free variable *SCREEN-HEIGHT* ;
In CENTER-VIEW: Undeclared free variable *SCREEN-WIDTH* ; In CENTER-VIEW: Undeclared free variable *MENUBAR-BOTTOM* (2 references)
> Error: Undefined function RANDOM-STATE called with arguments (64497 9) .
> While executing: CCL::READ-DISPATCH, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Retry applying RANDOM-STATE to (64497 9). > Type :? for other options. 1 >
Unfortunately, I'm still learning about lisp, so while I have a sense that something is not fully defined, I do not really understand how to read these error messages.