File: install.html

package info (click to toggle)
cl-aima 20020509-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,188 kB
  • ctags: 1,574
  • sloc: lisp: 6,593; makefile: 57; sh: 28
file content (110 lines) | stat: -rw-r--r-- 4,535 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<TITLE>Downloading and Installing Lisp Code for AIMA</TITLE>
<!-- Changed by: Peter Norvig, 24-Jul-1996 -->
<BODY bgcolor=#ffffff>
<H1>Downloading and Installing Lisp Code for AIMA</H1>

This page gives instructions for retrieving the code for the book, and
installing it on your local system.  This installation procedure need
only be followed once.  If you are using the book in a course, your
instructor (or an assistant) will probably do this for you, and you
can move on to <A HREF="user.html">using the code</A>.

<H2>Downloading the Code</H1>

To download the code, follow these steps:

<OL> 

<LI> <b>Create a directory</b> where you want the code to reside, and change to that directory.
On Unix, this might be "<tt>mkdir aima; cd aima</tt>".

<li> </b>Download the source code</b>. The easiest way is to click on
this link to get <a href="../code.tar">code.tar</a> (973KB).  If you
are on a very slow connection to the Internet, you can get
<a href="../code.tar.gz">code.tar.gz</a>
(188KB) instead and then on Unix do <tt>gunzip code.tar.gz</tt> or on Windows
drag the file to the WinZip icon, or similar archiving tool (e.g. PKunzip).
Make sure you download the file to the
correct directory (in most browsers, this is done by clicking the right mouse
button and choosing the "save as file" option).  

<li> Execute the command <tt>tar xf code.tar</tt> to unpack the
archive of files.  (Or drag the code.tar file to a program such as
WinZip, Stuffit Expander or PKunzip.)
</OL>

<H2>Installing a Lisp Interpreter/Compiler</H2>

There are many available Lisp compilers that you can use.  We
have tested the code and know it works on the following:
<ul>
<li> <a href="http://www.franz.com/downloads/">Franz
Allegro Common Lisp</a> for Linux or Windows.
<li> <a href="http://www.digitool.com/download.html">Digitool Macintosh
Common Lisp</a> for Macintosh.
</ul>
Both of these products are available in a no-cost demo version and
a more powerful commercial version.  You should be able to do the
exercises in the book with the demo versions.  So if you are about
to install a Lisp, we recommend one of these.  If you already have 
a Lisp installed, chances are you can get the code to run, but you
may have to make some minor changes.

<H2>Installing the Code</H1>

<OL>
<LI> Make sure you have both read-permission and write-permission for
the directory where the code is kept.

<P><LI> Edit the file "aima.lisp" and change the value of the
parameter *aima-root* on line 9 to reflect the location of the files.
Make sure to use the proper syntax for a directory, not a regular
file.  For example, on a Unix file system, you want something like
"/usr/local/aima/", or "/home/yourname/aima/", where the final "/"
indicates that /usr/local/aima is a directory.  For a Windows file
system, you'd have something like "c:\\aima\\".  Note that you have to
use double backslashes, because backslashes are treated specially in
Common Lisp strings.  In most versions of Windows you can also use
forward slashes: "c:/aima/", but check to see if this works on your
system before you try it.  For most installations, this will be the
only edit you need to make.

<P><LI> For some unusual Lisp compilers, you may need to edit the parameter
*aima-binary-type* to indicate the type of files created by your Lisp
compiler.  If the compiler creates files of the form "name.bin", then set
this parameter to "bin".  Do include the double-quote marks.

<P><LI>Start up your Common Lisp, and enter the following four forms:
<PRE>
    (load "aima.lisp")
    (aima-load 'all)
    (aima-compile)
    (test 'all)
</PRE>

The compiler will compile all the files, and the test mechanism
will test the resulting code.  Look for "0 errors" in the output
and a 0 as the return value.

<P><LI> Most versions of Lisp provide a way to dump out an image -- an
executable file that contains all the code that has been loaded so far.  If
your Lisp has this feature, it might be a good idea to create such an image
at this point, and save it for later use.
</ol>

<h2>Running the Code</h2>

The steps above need be done only once;
you  are now ready for the easier process of
<A HREF="user.html">using the code</A>.

<P>

<HR>
<table border=0 cellpadding=4 cellspacing=4>
<tr>
<td bgcolor=cccccc><b><a href="../../aima.html">AIMA Home</a></b>
<td bgcolor=cccccc><A HREF="../../contact.html"><b>Contact Russell &amp; Norvig</b></A>
<td bgcolor=cccccc><A HREF="../../new.html"><b>What's new</b></A> 
<td><font size="-2">Changed 3/13/97</font>
</TABLE></BODY></HTML>