Sunteți pe pagina 1din 11

Problem formulation

Involves 4 steps
1. Define the problem precisely. The definition must
comprise of precise specification of the initial
situation as well the final situation with acceptable
solutions to the problem.
2. Analyse the problem.
3. Isolate and represent the task knowledge which is
required to solve the problem.
4. Choose the best problem-solving technique(s)
and apply it (them) to the particular problem.

Problem Definition
Done as a State Space Search
Chess Game, Water Jug Problem

Chess Game
Legal Moves
Position that represents a win
It is not only the play but also the winning condition
which terminates the game

Chess Game

Chess Game
Goal
Opponent does not have a legal move
King is under attack
Practical Difficulties
No person could ever supply a complete set of such rules. It
would take too long and could certainly not be done without
mistakes.
No program could easily handle all those rules. Although a
hashing scheme could be used to find the relevant rules for
each move fairly quickly, storing is in fact a difficulty.
5

Chess Game

Chess Game
White pawn at
Square(file e, rank 2)
AND
Square(file e, rank 3)
is empty
AND
Square(file e, rank 4)
Is empty

Move pawn from


Square(file e, rank 2)
to Square(file e, rank 4)

Advantage of State Space Search


It allows for a formal definition of a problem as the need to convert
some given situation into some desired situation using a set of
permissible operations.
It permits us to define the process of solving a particular problem as a
combination of known techniques and search. Search is a very
important process in the solution of hard problems for which no more
direct techniques are available.
7

Water Jug Problem


Problem
You are given two jugs, a 4-litre one and a 3-litre one. Neither has any
measuring markers on it. There is a pump that can be used to fill the
jugs with water. How can you get exactly 2 litres of water into 4-litre
jug?

Water Jug Problem

Water Jug Problem

10

Problem Description
Therefore, in order to provide a formal description of a problem,
one need to do the following:
1.Define a state space that contains the possible configurations of
the relevant objects.
2.Specify one or more states within that space that describe
possible situations from which the problem solving starts, which
are termed the initial states.
3.Specify one or more states that would be acceptable as
solutions to the problem, which are termed the goal states.
4.Specify a set of rules that describe the actions/operators
available.
The problem can be solved using the rules which can be
combined with appropriate control strategies.
11

S-ar putea să vă placă și