Download presentation
Presentation is loading. Please wait.
Published byTimothy Collins Modified over 9 years ago
1
Problem Solving in Common Lisp Common Lisp J.E. Spragg May 1997
2
The Problem Space Model l People seem to handle adequately the notion of physical space. l It seems natural to extend our notions of physical space and use it as a topological metaphor for problems and problem solving. l The problem space model of problems and problem solving makes use of the ideas of location, shape, and distance that are so useful in reasoning about physical space.
3
Problem Space l A problem space is a set of states that represent distinct configurations of the objects and relationships of the domain. l And a set of operators which define how to move between states. l Operators typically have parameters.
4
Defining a Problem Space l Defining a problem in a given problem space requires two things: »an initial state »a goal l The initial state is a distinguished state that represents the starting point within the space. l The goal is a specification of the subset of the problem space which could serve as a solution to the problem.
5
Solving Problems l Solving a problem in this model is accomplished by finding a sequence of operators which, when applied to the initial state, allows one to reach a state satisfying the goal criterion. l In the Blocks World example, the solution is a sequence of transformations that represent a legal plan.
6
Search l It is easy to see why this is an attractive model of problem solving. l To solve a problem, all we have to do is define the problem space and then unleash a general-purpose search engine on it.
7
Classic Problem Solving Systems l The design of a classic problem solver consists of two parts: »an interface for user-supplied problem spaces, and a »search engine.
8
Interface l The interface requires the ability to manipulate states and operators. l What kinds of manipulations are needed? »Goal detection: Ascertain whether a given state satisfies the goal criterion. »State identity: Detect when two descriptions of states refer to the same state. »State display: Produce a human readable description of a given state.
9
l The importance of goal detection is obvious. l State identity is important because we make no progress by re exploring already examined states. l Displaying states allows us to observe and debug system behaviour.
10
Expanding a State l Identify what operators are available. l Determine whether a given operator is applicable to a particular state. l Given a state and an operator applicable to it, ascertain all the ways the operator can be instantiated on that state. l Figure out what new state results from applying an instantiated operator to a state.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.