23
INFORMATION SCIENCES 13, 1 l-33 (1977) 11 An Integrated Model of Problem Solver GIOVANNI GUIDA, DIN0 MANDRIOLI, and MARCO SOMALVICO Milan Polytechnic Artificial Intelligence Project, Milan, Ita& Communicated by Axriel Rosenfeld ABSTRACT The purpose of this paper is to propose an unitary formal model, comprehensive of both the classical state-space and problem-reduction approaches, in order to define a new structure of problem solver. In particular, the model we propose, which is strictly related in its formal aspects to the graphs and AND/OR graphs theory, is primarily intended to aIlow the problem solver to choose, at each step during the solution process, the beat representation for the problem (state-space or problem-reduction) and, hence, the optimal expected search strategy. In the paper, the basic functions and the fundamental structure of a problem solver are first presented. The formal definition of the integrated approach is then introduced, together with explanatory examples, and the new model is critically discuased in detail. The formal notions are globally illustrated by a complete example dealing with all the aspects of the solution process. A problem solver model, baaed on the new approach, is ahso proposed. Implementation of systems to support an integrated problem solver and the related linguistic problems are not discussed in the paper. 1. INTRODUCTION The studies about the theory of problem solving, to which belongs the new model presented in this paper, are intended to achieve the following main goals: 1. the precise understanding of human behavior in problem solving; 2. the definition of the basic functions and of the fundamental structure of an automatic problem solver; 3. the critical comparison between the theoretical possibilities of an abstract Kq, work Artificial Intelhgence, Problem Solving Graphs, AND/OR Graphs, Learning.

An integrated model of problem solver

Embed Size (px)

Citation preview

INFORMATION SCIENCES 13, 1 l-33 (1977) 11

An Integrated Model of Problem Solver

GIOVANNI GUIDA, DIN0 MANDRIOLI,

and

MARCO SOMALVICO

Milan Polytechnic Artificial Intelligence Project, Milan, Ita&

Communicated by Axriel Rosenfeld

ABSTRACT

The purpose of this paper is to propose an unitary formal model, comprehensive of both the classical state-space and problem-reduction approaches, in order to define a new structure of problem solver. In particular, the model we propose, which is strictly related in its formal aspects to the graphs and AND/OR graphs theory, is primarily intended to aIlow the problem solver to choose, at each step during the solution process, the beat representation for the problem (state-space or problem-reduction) and, hence, the optimal expected search strategy.

In the paper, the basic functions and the fundamental structure of a problem solver are first presented. The formal definition of the integrated approach is then introduced, together with explanatory examples, and the new model is critically discuased in detail. The formal notions are globally illustrated by a complete example dealing with all the aspects of the solution process. A problem solver model, baaed on the new approach, is ahso proposed. Implementation of systems to support an integrated problem solver and the related linguistic problems are not discussed in the paper.

1. INTRODUCTION

The studies about the theory of problem solving, to which belongs the new

model presented in this paper, are intended to achieve the following main goals:

1. the precise understanding of human behavior in problem solving; 2. the definition of the basic functions and of the fundamental structure of

an automatic problem solver; 3. the critical comparison between the theoretical possibilities of an abstract

Kq, work Artificial Intelhgence, Problem Solving Graphs, AND/OR Graphs, Learning.

12 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

problem solver and the actual requirements of a tool useful for practical applications;

4. the definition of formal models for the representation of problems; 5. the design of high-level representation languages (goal-oriented lan-

guages), intended to communicate problem descriptions to the computer; 6. the implementation of special-purpose problem solvers devoted to opera-

tion in semantic domains of actual interest.

This paper is devoted to presenting new contributions and results in fields 2, 3, and 4.

State-space and problem-reduction approaches to problem solving are widely discussed in the literature [l-3]. Moreover, graphs and AND/OR graphs are often used as models for the aforementioned approaches [2, 4-6, 131, and a number of search algorithms are available which fit quite well to such formal structures [ 1, 7, 111.

The purpose of this paper is to propose a unitary formal model, comprehen- sive of both the state-space and problem-reduction approaches, in order to define a new structure of problem solver.

In fact, the problem-solver models proposed in the literature [l, 8, 91 are all conceived as search algorithms acting inside a fixed framework which strictly defines the representation method chosen at the beginning of the solution process for the problem to be solved. The assumption underlying all these approaches is that the representation chosen is the best fit for the problem. Moreover, the problem solver must carry on its own solution process only within the considered representation.

These quite restrictive hypotheses are always verified in the toy-problems, often chosen as examples in problem-solving discussions. Such toy-problems, in fact, can always be solved by the man himself in the best way. Nevertheless, in more actual problems, arising, e.g., from the decision sciences, adequate representations and good solution strategies are not known a priori. Therefore, for such problems, which are in fact the most natural ones for processing by an automatic problem solver, new, more flexible models and more powerful problem-solver structures are needed.

The model we propose, which is strictly related in its formal aspects to the graphs and AND/OR graphs theory, is primarily intended to allow the problem solver to choose, at each step during the solution process, the best representation for the problem (state-space or problem-reduction) and hence the optimal expected search strategy.

The solution process of the problem solver is then somewhat more intelli- gent than just the trivial execution of a search algorithm, even if heuristically guided, in a path problem, as it has been in all of the problem-solver models so far proposed. Moreover, this new model implies that the problem solver will be

AN INTEGRATED MODEL OF PROBLEM SOLVER 13

capable of taking advantage of quite a large set of supplementary information and past experiences on the problem domain in order to set up changes in the problem representation and solution strategy.

In the paper, the basic functions and the fundamental structure of a problem solver are first presented. The formal definition of the integrated approach is then introduced, together with explanatory examples, and the new model is critically discussed in detail. The formal notions are globally illustrated by a complete example dealing with all the aspects of the solution process. A problem-solver model based on the new approach is also proposed. Implementation of systems to support an integrated problem solver and the related linguistic problems are not discussed in the paper.

2. A PROBLEM-SOLVER MODEL

Computer science is centered around a unitary and global goal: man-com- puter interaction in solving problems. This interaction can be graphically represented (see Fig. 1) as a path connecting the following basic concepts:

l Intuitive problem; 0 Represented problem; 0 Solved problem.

The path itself is comprised of the three activities of formalization, automatic resolution, and matching.

The intuitive problem is an entity which independently faces the man and can be viewed as an undefined and unlimited source of information. From it, through the activity of formalization, the man operates an extraction of a finite

Fig. 1. Problem-solving activity.

14 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

and precisely described amount of information which constitutes the repre- sented problem. This information is choosen as valuable and sufficient to provide, through automatic or interactive computation, the construction of the solvedproblem (i.e., the solution of the problem).

It is clear that, in principle, the solution construction can be performed in an artificial and completely automatic way by means of a general-purpose computational tool that we call an automatic problem solver. On the other hand, the activities of formalization and matching belong exclusively to the man.

The formalization activity, i.e., the invention of the represented problem, consists of the precise description of a finite quantity of information which the man formulates by means of the observation of two distinct entities, namely, the intuitive problem and the automatic problem solver. Moreover, it is necessary that the man perform two basically different activities. The first activity is devoted to the specification of the methods and ways which “tune” the automatic problem solver, considered as an originally general-purpose tool, into a highly precise special-purpose system, which is oriented by the semantic domain from which the intuitive problem is originated.

The information, described by consequence of this first activity, is called control information and it is the first part of the information contained in the represented problem. The second activity is dedicated to the selection from the intuitive problem of a finite quantity of information which is considered by the man as useful and, hopefully, sufficient, in order to allow the special problem solver to achieve its goal of providing an automatic solution of the problem. The information, described by consequence of this second activity, is called problem information and it is the second part of the information contained in the represented problem.

It is conceptually important to observe that both the previously described activities are done by the man with the conscience of being faced by unknowns of two different types, namely,

0 What part of the problem information is actually relevant to the computer and shall be utilized in order to solve the problem;

0 What is the actual way in which this relevant information shall be processed in order to construct the solved problem.

These two types of unknowns are useful to point out two functions performed by the automatic problem solver which are intended to give artificial answers to these unknowns.

The first function, which is devoted to producing an automatic answer to the first type of unknown consists of an appropriate selection of one part of the information contained in the represented problem, and is considered by the automatic problem solver as useful and relevant for its activity of solving

AN INTEGRATED MODEL OF PROBLEM SOLVER 15

problems. This activity is performed by a first part of the automatic problem solver, called selector, as is shown in Fig. 2, where the block structure of an automatic problem solver is illustrated. Therefore, we wilI call global repre- sented problem the input of the selector and selected represented problem the output of the selector.

The second function, which is devoted to producing an automatic answer to the second type of unknown, consists of a skillful search of the cooperation process, embracing the already selected information, which essentially makes up the solution algorithm, and thus yields the solution of the problem. This activity is performed by a second part of the automatic problem solver, calIed searcher, as is shown in Fig. 2. Therefore, while the input of the searcher will be the selected represented problem, the output of the searcher will be the solved problem.

As has been previously illustrated, the control information is the informa- tion which enables the man to specify the special configuration of the problem solver oriented toward a particular semantic domain. Therefore, by means of the control information, the structures of the selector and searcher are com- pletely defined and specified.

This definition of the structure of the selector and of the searcher by the man can be considered just as an initial specification which, during the ongoing solution process, can possibly be changed and improved. This modify- ing and enhancing activity is the typical activity of learning which is able to provide a dynamic evolution of the structure of the selector and of the searcher. This self-changing activity is performed by a third part of the

t SELECTED

- REPRESENTED --I]- SOLVED

SEARCHER PROBLEM PROBLEM

t I

Fig. 2. Block structure of an automatic problem solver.

16 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

automatic problem solver, called learner, as is shown in Fig. 2. Therefore, the learner’s inputs are comprised of the global represented problem, the selected represented problem, and the solved problem, while the learner’s outputs are the automati~lly constructed and modifiable specifications of both selector and searcher.

Thus the kernel of an automatic problem solver appears to be an arfificiial metasystem which is initiated by the man, and which afterwards can evolve itself in a way appropriate to enhance its artificial performances in solving problems. Therefore, learning can be viewed as the ability of self-awareness of the whole automatic problem solver.

In Section 6, after having introduced the integrated approach, the model of problem solver above presented will be further discussed and the internal structure of the blocks of Fig. 2 will be precisely defined.

3. BASIC DEFINITIONS

In this section we present the formal definitions of the two classical state-space (SS problem, Definition 3.3) and problem-reduction (PR problem, Definition 3.6) approaches [1, 4, 51.

The adopted formalism is homogeneous for the two models in view of the integrated approach we shall introduce in the next sections.

DEFINITION 3.1. An SS pr~~~ern schema M is a pair M = (S, G) where

S is a set of states; G is a set of functions from S into S, called the operators of M.

DEF~I~ON 3.2. Given an SS problem schema M = (S, G), a path p from a state so E S to a state s, E S is a finite sequence:

ss.:

s,g,=s,,s,gl=s,,...,s,-,g,-,=sk.

Moreover, we say that the path p has length k, and write IpI= k.

DEFINITION 3.3. An SS problem (state-space problem) is a quadruple P = (S, G, i,j) where:

(S,G) is an SS problem schema; i E S is cahed the initiai state; f E S is called the final state.

AN INTEGRATED MODEL OF PROBLEM SOLVER 17

Moreover, a solution of P is a path x of (S, G) from i to f, and the solution set X, of P is the set of all the solutions of P.

We do not consider, for the sake of brevity, the generalization of this definition to extended SS problems having a set of final states [4].

DEFINITION 3.4. A PR problem schema N is a pair N = (Z, I) where:

I: is a set of problems; r is a set of functions from Z into Z+‘, called the operators of N. We assume that I’ always contains the “identity” functions 0, which map

each UEI: into UEZ+.

DEFINITION 3.5. Given a PR problem schema N =(&I’), a coueringpath q from a problem u. to a finite set of problems Z,= { u,,u~,...,u,,} ~2 is a finite sequence:

4= ((Xo9Yo)9 (%YI), * * -9 (xilYi),...,(xk-l,Yk-l),xk)

where

s.t.:

Xi EZ+y for i=O,l,...,k

YiEr+, for i=O,l,...,k- 1

x0= a,

for each i=O, l,...,k- 1:

and

xi=~,l”i,2’ * '"ii,h,q,h,+l'. 'q,h,+h," ' bi,h,+h,+...+&,

where, for t-l,2 ,..., r;, with ri=Ixi_,l=Iyi_,l=h,+h2+--. +h,,_,

ui.h,+ . ..+hr+1 “’ ui,hI+...+&+, ‘“i-l.t+17i-l.r+l if

Yi-1’7i-1.1’ ’ * Yi-l,tYi-l,f+l’ * * Yi-1,q

{XIX is a symbol of xk} SZ,.

‘A l denotes the free monoid on the set A, and A + = A* - (X), where h is the empty string.

21xl denotes the length of the string x.

18 G. GIJIDA, D. MANDRIOLI, AND M. SOMALVICO

Moreover, we say that the covering path q has depth k, and write 11qj1= k.

DEFINITION 3.6, A PR problem (problem-reduction problem) is a quadru- ple Z = (C, I’, Pa, ps) where

(&IT) is a PR problem schema; P,E Z is called the initia~prob~em; +C I: is called the set of the final problems.

Moreover, a solution of Z is a covering path x of (Z, I’) from P, to +; ccp, and the solution set X, of Z is the set of all the solutions of Z.

The validity and the limits of the approaches (state-space in Definition 3.3 and problem-reduction in Definition 3.6) presented are widely discussed in the literature [l-3, 61.

Let us only illustrate these basic definitions by means of two abstract examples.

EXAMPLE 3.1. Figure 3 shows the graph representation of the SS problem --__ P= (S, G, i,f) where

G= { gldr2&3)

g1= { (w2))

g2 = { (s234) >

g3- { (W3M~2~4)

A solution of P is x=(&g,), (s2,g3), s5), ]x]=2. The solution set of F is x,-= {xl.

AN INTEGRATED MODEL OF PROBLEM SOLVER 19

Fig. 3. Graph representation of the SS problem i?

EXAMPLE 3.2. Figure 4 shows the AND/OR graph representation of the PR problem z= (E, F, p,, 6) where

E={uuuuuuuuuu} It 2, 3, 4, 5, 6, 7, 8, 9, 10

YI = {(Q1,~2~3),(~2,~3),(~~9,,0)}

Y3= {(“77,u8)}

20 G. GUIDA, D, MANDRIOLI, AND M. SOMALVICO

Fig. 4. AND/OR graph representation of the PR problem z

where

4. SYNTAX AND SEMANTICS

Let us now introduce some criticism in the above proposed formalization. A brief reflection on some significant examples (e.g., the Tower-of-Hanoi ptie [I] or the ~issio~~es-~d-Ca~b~s problem [ 1OJ) shows that the definitions given so far only take into account the syntax of a problem description, fully

AN INTEGRATED MODEL OF PROBLEM SOLVER 21

independently of the meaning of the formal framework. In fact, the syntax and the semantics of a problem description are two conceptually different entities. They can be considered as coincident in some elementary models (e.g., in the state-space approach), but must be taken well distinct in other more general ones (e.g., in the problem-reduction approach).

The definition of the PR problem (Definition 3.6) represents quite well the syntax of the problem-reduction approach, but takes into account in no way the semantic aspects. In fact, the PR problem model states only that certain problems can be reduced to some others and how they can be reduced, but does not tell in which way the reduced problems are related to the original one, i.e., how from their solutions the solution of the original problem can be constructed.

Let us then present in detail the formal definition of the semantics of the problem-reduction approach (implicance network, Definition 4.3).

DEFINITION 4.1. An implicant of a problem P is a couple L = (I&#) where

II= P,Pz* * * Pk is a string of problems; J, is a function from Xp, X Xp, X . + + x Xp, into Xp (Xp, denotes the set of the

solutions of Pi).

DEFINITION 4.2. An i~~iea~e dzerna is a triple t\ = (P, l-I,+) s. t. P is a problem and (II,+) is an implicant of P.

DEFINITION 4.3. An implicance network is a set T of implicance schemas. Moreover, we define the set Q, related to a given implicance network as

Qr= { x~(3h)((A=(P,II,J/))~((x=P)V(x is a symbol of II)))}.

The reader can test the validity of this fo~al~ation of the semantics of the problem-reduction approach on some particular examples from the literature [1,3,10]. We shall present in the next section a global example. Some particu- larly important and usual cases of implicants can be found in [4].

Let us now match together the syntax and the semantics of the problem-re- duction approach (Definitions 3.6 and 4.3), in order to obtain a complete formulation of the basic concepts we need for introducing, in the next section, the new integrated approach.

DE-ON 4.4. A PR problem 2 = (Z, P, P*+) represents exactly an impli- cance network T iff Z = Q2,, and for each A = (P, II,+) E T there exists exactly one y EI’ s.t., Py = II, and for each y El? and for each P E Domy, there exists exactly one A = (P, Il,#) E T s.t., II = Py.

3Domf denotes the domain of the function J

22 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

DEFINITION 4.5. We say that a problem P is solved iff a nonempty subset of Xp is assigned.

THEOREM 4.1. Given a PR problem Z = (Z, I?, PO, +) and a solution x of Z, if all the problems of +; are soloed and Z represents exactb an itnplicance network T, it is possible to construct a solution y of the problem Pw

We omit the proof of this theorem which is quite straightforward, and present an abstract example illustrating the last definitions given and the meaning of Theorem 4.1.

EXAMPLE 4.1. Consider the PR problem z of Example 3.2 graphically represented in Fig. 4. Consider the implicance network T- {h,, &, ----- &, A,, A,, &, A,} where

x3 = (02, % #2)

115 = (u7su8, #Z)

;ib = ((77, u9~ $2)

X7=( ~9AoP~z)

& ( wl, w2) = w,w, (concatenation)

$w,)=wP (reverse string)4

Figure 5 show8 a graph representation of the implicance network E It is easily verified that the PR problem Zrepresents exactly the implicance

network E Consider the solution of z:

x = ((~,,y,),(u,u,,y,yz), (“,u6u7, oa50.eY3)&u6u8);

AN INTEGRATED MODEL OF PROBLEM SOLVER 23

Fig. 5. Graph reprewntation of the impli~~ce network F

Assume that the problems u5, us, 0s are solved (i.e., that x5 EX_, x6 EXo6, xs E X0, are assigned). Let us construct, according to Theorem 4.1, a solution y of P()=q.

Following backwards the covering path x and applying at each step the appropriate implicance schema, we have (denoting by xi a solution of the problem a,):

xs known

x6 known

x5 known

x3 = x6x! by &

x,=x; by&

R- x, =.&x8 -y by&

The reader can easily infer from this example that the condition stated in Theorem 4.1 is quite restrictive. In fact, it is not necessary for constructing the

24 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

solution y of PO, following the procedure illustrated in Example 4.1, that 2 represent exactly an implicance network T, i.e., that the syntax and the semantics are fully coincident, which is a quite singular case in actual prob- lems.

In more general and actual cases the syntax and the semantics have different extensions and coincide only on a restricted intersection area.

Let us then state, before concluding this section, a more general condition.

DEFINITION 4.6. A covering path q= ((xe,ya), (x,,y,), . . . ,xk) of a PR prob- lem schema N =(&A) represents partiaily an implicance network T iff:

{ at(3xJ (a is a symbol of xi)} oft,. For each (xj,yi) in q if xi=a~u~* - + ui and yi= yfy:+ * + ~4:‘. there exist

A,,&,..., A,,, in T s.t., forj=1,2 ,..., hi, if Aj = (4, I$, $$, then II) = piyi.

THEOREM 4.2. Given a PR problem Z = (2, I’, PO, I#B) and a solution x of Z, if ail the problems of tp: are solved and x represents partia~~ an implicance network T, it is possible to contact a solution y of the problem Pw

We leave the proof of this theorem to the reader, and illustrate its meaning by means of the following example.

EXAMPLE 4.2. Consider the PR problem 2 and its solution x of Example ---_ ---- 3.2. Consider the implicance network p = { Ai, A3, A,, A,} (A,, As, Ae,A, as defined in Example 4.1) represented in Fig. 6. It is easily verified that z does not represent p exactly, but x represents !?’ partially. Moreover, the proca dure followed in Example 4.1 for constructing y is still valid.

Let us explicitly outline, before concluding this section, that both the syntax and the semantics of the problem-reduction approach (Definitions 3.6 and 4.3)

Fig. 6. Graph representation of the implicance network T’.

AN INTEGRATED MODEL OF PROBLEM SOLVER 25

presuppose some preceding definition of problem. Any possible definition can be adopted; however, we shall assume as the definition of the problem that one of SS problem in order to set up an integrated (state-space and problem-reduc- tion) approach, as we shall show in detail in the next section.

5. THE INTEGRATED APPROACH

By the expression integrated approach we mean a unified approach to problem solving which takes into account both the state-space and problem-re- duction approaches and which allows changes of representation, and hence of search strategy, at each step during the solution process of the problem. Precisely, inside a background problem-reduction approach, we want to allow the problem solver to decide in a dynamic way between the following two possibilities:

0 To reduce the problem following a problem-reduction strategy [ 111; 0 To solve it following a state-space search algorithm [7].

Therefore, the problems of the background problem-reduction representa- tion must be defined as state-space problems (SS) and the final (i.e., trivial) problems must not be a priori assigned. Let us then introduce the following definition.

DEFINITION 5.1. An Zproblem (integrated problem) is a quadruple R = (B, I’, P,,, T) where:

B is a set of SS problems; (B, lJ is a PR problem schema; POE B is called the master problem; T is an implicance network s.t., 9, n B # 0.

Moreover, a solution of R is a solution of the SS problem PO

Theorems 4.1 and 4.2 allow us to state the following property, which illustrates the dynamic meaning of solution of an I problem.

THEOREM 5.1. Giuen an I problem R = (B, r, PO, T): if a covering path x of (B, IJ from PO to a set $J’ c B is found, if the problems of Z are sohxd, and if x represents partial& the implicance network T, then R is so&d.

Let us present, before examining in detail the implications of the I problem model on the design of an automatic problem solver, an illustrative example.

EXAMPLE 5.1. Let us consider the well-known Tower-of-Hanoi puzzle [ 11. There are three pegs 1, 2, and 3 and three disks of different sizes A, B, C. The disks have holes in their centers so that they can be stacked on the pegs.

26 G. GUIDA, D. ~NDRIOLI, AND M. SOMALVICO

Initially the disks are all on peg 1; the largest, disk C, is on the bottom, and the smallest, disk A, on the top. It is desired to transfer all of the disks to peg 3 by moving disks one at a time. Only the top disk on a peg can be moved, but it can never be placed on top of a smaller disk. The initial and goal configura- tions are shown in Fig. 7. For the sake of brevity, we assume the classical fo~al~~on of the states and the operators suggested by Nilsson [l]. The notation Q+k describes a ~o~i~ration in which disk C is on peg i, disk B on j, and disk A on k. The notation x& represents an action in which disk x is moved from peg i to peg j.

Let us now represent the puzzle by means of the I problem model. ==I -.

Consider the I problem i= (B, I’, PO, 2’) where

B==(PPPPPPPPPP) 0% ,, 2, 3, 4~ 5, 0 7r 8, 9

f= {A,,A*,A3}.

The SS problems i Ic.o,I ,ft pS are defined in the following way. Consider the SS problem schema M = (s, c), represented in Fig. 8.

p,=(s=,c=,111,333), P,=(s,zJ11,122), -- --

P,+,G,322,333), = = P4=(S,G, 111,113), -- -- --

Pa=(S,G, 123,122 ), P7 =(s,G,322,321), -- --

P,=(S,G,331,333).

1 z 3 1

-- P2 = ( f, t$l22,322),

P,=(@,l13,123), --

Ps=($,G,321,331),

Fig. 7. The Tower-of-Hanoi puzzle.

AN INTEGRATED MODEL OF PROBLEM SOLVER 27

A11 A3!

Fig. 8. The SS problem schema % of the Tower-of-Hanoi puzzle.

The PR problem schema N=(i, ?) is represented in Fig. 9. The implicance

network ? is represented in Fig. 10 and we have

A3 = (P3, p,psp9~+)

where

~(xI~x2~x3)=xIx2x3 (concatenation).

Let us now introduce some criticism in this example. First, the reader can easily verify that the I problem model allows the problem solver to choose

G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

Fig. 9. The PR problem schema &of the Tower-of-Hanoi puzde.

either a state-space or a a problem-redEtion solution strategy. E.g., it is possible to solve directly the SS problem P, by means of a state-space seagch

m&od [ ?1, or to solve by a reduction algorithm [ 1 I] the- PR problem Z= -- 1 (8, A, P,,, s), where 4 = (P4, P,, P6, P,, Ps, P9) is assumed as a set of primitive (i.e., immediately solvable) problems [ 1, 1 I].

In fact, both the state-space and the problem-reduction approaches can be considered as just two particular cases of the integrated approach.

Furthermore, the problem solver can change the representation model and the solution strategy even during the solution process, whenever the need arises of doing such a change. E.g., it can reduce P, to P,, P2, and P,, and then solve these problems by means of a state-space search method. Moreover, the problem solver is allowed to carry on several solution strategies on different representations as parallel coroutines, by keeping constant at each step the compu~tional effort done in each direction, in order to avoid following too long a bad solution method.

Fig. 10. The implicance network ? of the Tower-of-Hanoi puzzle.

AN INTEG~TED MODEL OF PROBLEM SOLVER 29

In fact, the problem solver is quite free in the choice of the representation and solution method, and therefore it must be able to take advantage of all the informations available on the problem domain in order to set up a good solution strategy. E.g., in the Tower-of-Hanoi puzzle, the knowledge that P, and P3 are similar problems and that Pz is quite trivial should suggest the good solution strategy of reducing first PO to P,, Pz, and P3, and solving then P, (and hence P3) and Pz by a state-space search method.

Let us emphasize that the capability of finding out a good solution strategy, i.e., a solution process requiring a reasonable amount of run time and memory storage, is crucial in the design of a problem solver. In fact, a problem solver is required to operate just on those problems which are not effectively solvable by means of the most usual representation and solution methods. E.g., the chess game can easily be represented in a state-space approach, but no program could be based on this model without e~aus~ng memory storage and run time limits of the computer.

Note that the goodness of a solution strategy is in no way related, at least from a theoretical point of view, to the goodness, i.e., the cost, of the solution it finds out. E.g., a good solution strategy can construct a very expensive solution, but this is an optimality problem that we shall not discuss in this paper.

6. AN INTEGRATED PROBLEM SOLVER

This section is devoted to outlining an application of the new formal model presented in the paper to the design of a problem solver. In fact, we shall apply the I problem model for the definition of the internal structure of the blocks of the problem-solver schema introduced in Section 2.

Let us recall, in Fig. 11, the block structure (presented in Fig. 2), where the different roles of the problem information and of the control information are also explicitIy outlined. The basic assumption of the modei of the integrated problem solver we are going to introduce is that the global represented problem can be correctly represented just by an I problem. The selected represented problem is therefore either an SS or a PR problem, and the solved problem is any significant result obtained during the solution of the selected represented problem.

In this way the i~o~tion structures processed by the problem solver and the content of the problem information are precisely defined. Before defining the internal structure of the blocks which are primarily devoted to perform information processing, i.e., selector, searcher, and learner, let us briefly describe the mode of operation of the whole system.

The problem solver performs its activity in a cyclic way. In Fig. 12 a flow chart which shortly summarizes the activity of the system is presented. The

30 G. GUIDA, D. ~ANDRIOLI, AND M. SOMALVICO

Co!mDL I#FORuAmlW PRDBLtM IYFORMATION

Fig. 11. Revised block structure of an automatic problem solver.

problem solver must be initially supplied by two distinct types of ~fo~ations: problem information, represented by the global represented problem (I prob- lem), and control information, which defines the internal structure of the learner. The learner defines first an internal configuration for the selector, which generates a selected represented problem (SS or PR problem), and then an internal configuration for the searcher, which starts its solution activity on the selected represented problem. The activity of the searcher is monitored in a continuous way by the learner, which decides when the output of the searcher can be considered as a si~~icant result and hence its activity can be sus- pended. At this point the learner decides which of the following three situation occurs:

l A successful solution strategy is found, and hence the solution of the global represented problem can be constructed;

*A new searcher must be defined and hence a new search algorithm for the selected represented problem is adopted;

*A new selector co~i~ration must be chosen and a new solution strategy for the global represented problem is started.

Moreover, the learner controls the global activity of the whole system by means of the management of different solution strategies for the global represented problem and search algorithms for the selected represented prob- lem, which are activated and suspended alternatively, as parallel coroutines,

AN INTEG~TED MODEL OF PROBLEM SOLVER

I I I I I 1 I c

SLOBAL REPRESMWI

SOLVED

PROKEM PROBLEM

I I soLuTIon

31

Fig. 12. Flow chart of the problem-solver activity.

according to the complexity and computational effort measures executed by the learner.

After this short illustration of the basic functions of the different blocks of our model, we are able to propose an internal structure for the selector, the searcher, and the learner. All these blocks can be considered as constituted by three different algorithm schemas, i.e., by three formal structures on which several different ~go~~rns can be defined by means of only a few elementary operations.

Simple examples of algorithms schemas are:

l A collection of different algorithms, in which it is possible to choose, at any step, the most appropriate one; l A parametric definition, in which at any step the appropriate values are

inserted and the desired algorithm is generated; l A nondeter~nistic definition, which allows the choice between different

ways depending on the results of appropriate tests.

The definition of the required algorithm from these algorithm schemas, i.e., the specification of the actual internal structure of the blocks, is performed by the learner, in the case of the selector and the searcher, and by the control information, in the case of the learner.

32 G. GUIDA, D. MANDRIOLI, AND M. SOMALVICO

The design of the problem solver, once the information structures are defined, consists then only of the definition of these three algorithm schemas, the complexity of which strictly depends on the complexity of the information structures they must be able to process. In our case, in which quite simple information structures are chosen (I problem, and SS and PR problems), no particular difficulty must be overcome for defining such algorithm schemas; structures more complex than those outlined above are not required.

Let us now briefly discuss the role of the control information in the design of a problem solver. In our model the only function assigned to the control information is to specify, at the beginning of the problem-solver activity, the internal structure of the learner. Clearly, this is not the only way of defining the function of the control information; a less important and also a more important role can be assigned to it. E.g., the control information can be taken into account not at all, defining the learner in a fixed way by choosing a particular algorithm. On the other hand, a problem-solver model can be designed in which the control information has a direct action also in the definition of the selector and the searcher. Moreover, the control information can be supplied to the system in an interactive way; at each step the problem solver communicates to the user the results obtained and it receives new control information, and hence a possibly different specification of the selec- tor, searcher, and learner.

The problem of defining a structure of problem solver from the point of view of the role of the control information can receive an adequate answer only if the actual purpose of the system and the semantic domain on which it is requested to operate are taken into account. From a general and theoretical point of view there are no valid reasons for preferring just one of the above outlined structures.

7. CONCLUSIONS

In Section 1 the motivations for an integrated approach and its main characteristics are outlined. In Section 2 a model of abstract problem solver is introduced. Sections 3 and 4 are devoted to the detailed presentation and discussion of the formal definitions needed for introducing in a mathematically correct way the integrated approach, which is precisely defined and critically discussed in Section 5. Illustrative examples of the formal definitions and properties are introduced throughout the whole paper whenever necessary. In Section 6 a problem-solver model, reflecting the structure outlined in Section 2 and based on the integrated approach, is proposed.

Many questions are raised and left unanswered. Let us recall the linguistic problems arising when the integrated approach is assumed as a theoretical base for a problem representation language [4, 51, and the problems related to the

AN INTEGRATED MODEL OF PROBLEM SOLVER 33

actual ~plemen~tion of an integrated problem solver. Nevertheless, the notions presented should be adequate for experienced systems programmers to visualize several approaches. Moreover, we hope that the model here pre- sented, although strictly related from a formal point of view to already well-known and deeply investigated approaches, can show clearly the new ideas on which it is based and can contribute to further progress in this field.

REFERENCES

1. N. J. N&son, P~~e~-~~~~ Methods in Artificiial Znteliigenee, McGraw-Hill, New York, 1971.

2. 0. J. VandcrBurg and J. Mhker, Stataspace, problem-reduction, and theorem proving. Some problem-rchction relationships, CACM X8, No. 2, 107-l 15 (February 1975).

3. G. Levi and F. Sirovich, A problem-reduction model for noxhiepcndcnt subproblems, Proc. 4th IJCAI, Tbili@ USSR, Scptcmbcr 1975.

4. G. Guida, D. Mandrioli, A. Paci, and M. Somalvicq A formal framework for a unitmy approach to the theory of problem-sol&g, Proc, ZZASA Work?@ on Artificabi Zntelli- [email protected] Amwering @stems? Laxenburg Schkws, Austria, June 1975.

5. G. Guida, D. Mandrioli, A. Paci and M. Somalviw, An integrated theory of problems as an algebraic base for complexity understanding and automatic problem-solving, &UC. 7th ZFZP Conference on Optimization Techniqws, Nice, France, September 1975, Springer Vcrlag, Heidelbcq, 1975.

6. G. Levi and F. Sirovich, Generalized AND/OR graphs, Artl$ciai ZnteNigence 7, 243-259

(1976). 7. I. Pohl, Heuristic search viewed as path fmding in a graph, Artifieiol Znteilligence 1,

193-204 (1970). 8. R B. Banqji, 7?~ory of Probkm Solving, an Approach to Artijkiai Intelligence, American

J?kwier, New York, 1%9. 9. G. W. Ernst and A. Newell, GPS: A Case St@ in Genera@ and Problem Soloing,

Academic Press, New York, 1%9. 10. S. Amarcl, On representation of problems of reasoning about actions, h&&re Zntelli-

gence 3, 131-171 (1%8). 11. C. L. Chang and J. R. Slaglc, An admissible and optimal algorithm for searching

AND/OR graphs, ArtificiaI Intelligence 2, 117-128 (1971). 12. A. Saagiovanni Vincertt&i, D. Mamirioli, and M. Somalvico, A general approach to

learning in problem soh&& Proc. Cowurer Oriented Learnitig prwesses, Bonas,France, 1974.

13. G. Guida and M. Somalvico, Semantics in problem representation and scar&, Znfomu- tion Processing L&tern, 5, No. 5 (November 1976).

Receiecd Febrwy 1976; revised mariu.wr$t receitmzd February 1977

o &avier North-Holland, Inc., 1977