CS3361 Spring 1996

Introduction to Artificial Intelligence

Lecture Notes for Search: 3/29/96, 4/1/96


A: Accessing audio links
V: Accessing video links
A V 8 puzzle demo (11:00:00)
A V 3/29/96 lecture starts (11:05:55)
A V 8 puzzle program demo (4/1/96 11:00:00)
A V 4/1/96 lecture starts (4/1/96 11:01:53)


Assignment 2
Due Friday April 5, 1996 at 11am.

See CS2360 Fall 95: Assignment 5
See also CS2360 Fall 95: Assignment 5 update
And see CS2360 Fall 95: Coding guidelines


Readings (useful for assignment):


Relevant stuff in previous courses:


Example solutions from http://www.gamelan.com/ (some with example code, be sure to credit these authors if you base your solution on their code). Java Applets can be run in some versions of Netscape 2.0.


More 8 puzzle programs and related materials:


A C example (K&R C)


Elements of Search Problems:


States/Situations

In puzzles the state of the puzzle is usually easy to define. In real life things are more subtle, but we will get to that later.


Actions/Operators

In each state there are a set of actions that could be taken. These actions can be described in a number of ways. For example, in the 8-puzzle:


Opponent Models

In the 8-puzzle and in most puzzles there is no opponent and nothing happens unless the searcher takes an action, so opponent models are not an issue.


Possible ways to do the assignment:


Random Search:


Exhaustive Search (Breadth First):


Heuristic Search I:


Heuristic Search II:


Heuristic Search III:

  1. Invent/learn an evaluation function that ranks states:
    f(state) -> goodness
  2. Search ahead D steps, considering on each step the moves which lead to the N best next states.
  3. Make a single move.
  4. Goto 2


    Use a Database of "End Games"

    • As you are doing any of the above methods, build a database of states and the number of steps to solution.
    • Whenever you are evaluating a state, if it is in the database, use that value instead of any evaluation function.