Index of /~nreed/lisp/sssearch

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [   ] 15p.cl 13-Mar-2009 16:41 498 [TXT] 16PuzIN1.txt 07-Apr-1995 09:58 116 [TXT] 8PuzIN1.txt 07-Apr-1995 09:59 38 [TXT] 8PuzIN2.txt 07-Apr-1995 10:00 37 [TXT] 8PuzIN3.txt 07-Apr-1995 10:00 46 [TXT] 8puzIN4.txt 18-Oct-2010 16:33 45 [   ] 8puzIN5.cl 18-Oct-2010 16:50 160 [TXT] 8puzIN5.txt 18-Oct-2010 16:36 24 [   ] best-8puzz.out 13-Mar-2009 16:41 2.5K [   ] best.cl 13-Mar-2009 16:41 2.2K [   ] best2.cl 13-Mar-2009 16:41 2.3K [   ] breadth-8puzz.out 13-Mar-2009 16:41 5.1K [   ] breadth.cl 13-Mar-2009 16:41 1.5K [   ] depth-1-10.out 13-Mar-2009 16:41 15K [   ] depth.cl 13-Mar-2009 16:41 2.5K [   ] depth2.cl 13-Mar-2009 16:41 2.5K [TXT] filelist.html 13-Mar-2009 16:41 351 [TXT] filelist.txt 13-Mar-2009 16:41 1.2K [   ] fwgc.cl 13-Mar-2009 16:41 3.1K [   ] fwgc.out 13-Mar-2009 16:41 2.0K [   ] fwgx.cl 13-Mar-2009 16:41 3.1K [   ] mc.cl 13-Mar-2009 16:41 4.2K [   ] mc.out 13-Mar-2009 16:41 2.6K [   ] n-puzz.cl 18-Oct-2010 16:50 7.9K [TXT] puzz5out.txt 18-Oct-2010 19:01 4.7M [   ] searches.cl 13-Mar-2009 16:41 5.6K [   ] searches2.cl 13-Mar-2009 16:41 8.5K
;;; README file for Common Lisp examples of searches on state spaces
;;; ;;; N. E. Reed  

Source files:
searches.cl - Global variables and common functions used in searches.
best.cl - Best-first search function.
breadth.cl - Breadth-first search function.
depth.cl - Depth-first search function.

Search space files:
n-puzz.cl - State definitions, move functions, and heuristic evaluation 
             functions for the n-puzzle problem.
fwgc.cl  - functions for the farmer, wolf, goat, and cabbage problem

mc.cl    - functions for the missionaries and cannibals problem 

How to run the programs:
Load the general functions in search.cl
(load "search")
Load a search type - depth, breadth, or best -first
e.g. (load "depth")
Load a problem definition - n-puzz, fwgc, mc, or 16-puzz

Start the search with 
(<search-name> *start* *goal* *moves*)

where <search-name> will be either depth-first, breadth-first, or best-first
and 
*start* has a start state configuration, 
*goal* has a goal state configuration
and *moves* is a list of possible moves in the search space


Some output traces:
Example start state: (2 8 3 1 6 4 7 0 5)
Example goal state: (1 2 3 8 0 4 7 6 5)
Order of moves: (BLANK-LEFT BLANK-UP BLANK-RIGHT BLANK-DOWN)
best-8puzz.out - An example best-first search using the start, goal and
	move order (shown above) from the handout given out in class.
breadth-8puzz.out - An example breadth-first search using the start, goal and
	move order (shown above) from examples shown in class.
depth-8puzz.out - An example depth-first search on the same problem shown above
	 using a depth limit of 10.