State Space and Search Tree

4.1 State Space and Search Tree

In Sect. 2.1 the basic ideas of state space search have been introduced. In this section we discuss two of them: state space and solving problems by heuristic search. Let us present them using the following example.

Let us imagine that we are in the labyrinth shown in Fig. 4.1 a and we want to find an exit. (Of course, we do not have a plan of the labyrinth.) If we want to solve this problem with the help of search methods, we should, firstly, define an abstract model of the problem. The word abstract means here taking into account only such

aspects of the problem that are essential for finding a solution. 1 Let us notice that in the case of a labyrinth the following two elements, shown in Fig. 4.1 b, are essential: characteristic points (crossroads, ends of paths) and paths. After constructing such

a model, we can abstract from the real world and define our method on the basis of

1 Deciding which aspects are essential and which should be neglected is very difficult in general. This phase of the construction of a solution method is crucial and influences both its effectiveness

and efficiency. On the other hand, an abstract model is given for some problems, e.g., in the case of games.

© Springer International Publishing Switzerland 2016 31 M. Flasi´nski, Introduction to Artificial Intelligence, DOI 10.1007/978-3-319-40022-8_4

32 4 Search Methods the model alone (cf. Fig. 4.1 c). 2 We assume that the starting situation is denoted by

a small black triangle and the final situation with a double border (cf. Fig. 4.1 c). After constructing an abstract model of a problem, we can define a state space. As we have discussed in Sect. 2.1 , it takes the form of a graph. Nodes of the graph represent possible phases (steps) of problem solving and are called states. Graph edges represent transitions from one phase of problem solving to another. Some nodes have a special meaning, namely: the starting node represents a situation in which we begin problem solving, i.e., it represents the initial state of a problem, and final nodes represent situations corresponding to problem solutions i.e., they are goal

states . 3 Thus, solving a problem consists of finding a path in a graph that begins at the starting node and finishes at some final node. This path represents the way we should go from one situation to another in the state space in order to solve the problem.

A state space usually contains a large number of states. Therefore, instead of constructing it in an explicit way, we generate and analyze 4 step by step only those states which should be taken into account in the problem-solving process. In this way, we generate a search tree that represents only the interesting part of the state

space. For our labyrinth a fragment of such a tree is shown in Fig. 4.2 a. Let us notice that nodes of a search tree represent the possible phases of problem solving (problem states) defined by an abstract model of a problem. Thus, each node of a search tree, being also a node of a state space, corresponds to a situation during

movement through a labyrinth. This is denoted 5 in Fig. 4.2 a with a bold characteristic point corresponding to the place we are at present and a bold path corresponding to our route from our initial position to our present position. Thus, the first (uppermost)

node 6 of the search tree corresponds to the initial situation, when we are at a point A of the labyrinth. We can go along two paths from this point: either right 7 to a point

B (to the left node of the tree) or left to a point C (to the right node of the tree), etc. Till now we have considered the abstract model of the problem based on the labyrinth plan (from the “perspective of Providence”). Let us notice that firstly, we do not have such a plan in a real situation. Secondly, we like to simplify visualizing a state space, and in consequence visualizing a search tree. In fact, wandering around in the labyrinth we know only the path we have gone down. (We assume that we make signs A, B, C, etc. at characteristic points and we mark the path with chalk.)

Then, a fragment of a search tree corresponding to the one shown in Fig. 4.2 a can be

2 Of course, in explaining the idea of an abstract model of problem, we will assume a “perspective of Providence” to draw a plan of the labyrinth. In fact, we do not know this plan - we know only

the types of elements that can be used for constructing this plan. 3 The remaining nodes correspond to intermediate states of problem solving.

4 According to Means-Ends Analysis, MEA, discussed in Sect. 2.1 .

5 Again, from the “perspective of Providence”, not from our perspective. 6 Let us recall that such a node is called the root of the tree.

7 Let us remember that a “black triangle” is behind us, cf. Fig. 4.1 a.

4.1 State Space and Search Tree 33

(a)

(b)

(c)

Fig. 4.1 An abstract model of a problem—a representation of a labyrinth

depicted as in Fig. 4.2 b. Now, the path we have gone through till the present moment, i.e., the sequence of characteristic points we have visited, is written into each tree node, and the place we are in at present is underlined.

34 4 Search Methods

(a)

A A …….

(b)

(c)

A-B

A-C

path A-B

A-B-D A-B-C

path A-B-D

Fig. 4.2 Construction of a search tree for the labyrinth problem

In fact, we can simplify the labels of the nodes of the search tree even more. Let us notice that a label A-B-D means that we have reached the node D visiting (successively) nodes A and B. On the other hand, such information can be obtained by going from the root of the tree to our current position. Thus, we can use the

tree shown in Fig. 4.2 c instead of the one depicted in Fig. 4.2 b. We will use such a representation in our further considerations.

4.1 State Space and Search Tree 35 In the remaining part of this chapter, we discuss basic methods of generating a

search tree. The specificity of these methods consists in the order in which nodes of such a tree (representing states of a corresponding state space) are generated and looked through. This order determines the so-called search strategy, and it is a criterion of the taxonomy of techniques of state space searching.

In general, we can divide these techniques into two basic groups: blind search methods and heuristic search methods. In the first group we mainly use information concerning the structure of the state space, i.e., information about possible transitions between states. Knowledge concerning the specifics of the problem to be solved is used in a minimum degree. In the second group such knowledge is used to define a heuristic function assessing the quality of a state. The heuristic function says how far

a given state is from a goal state. These two groups of search methods are discussed in the following two sections.

Dokumen yang terkait

Hubungan pH dan Viskositas Saliva terhadap Indeks DMF-T pada Siswa-siswi Sekolah Dasar Baletbaru I dan Baletbaru II Sukowono Jember (Relationship between Salivary pH and Viscosity to DMF-T Index of Pupils in Baletbaru I and Baletbaru II Elementary School)

0 46 5

Institutional Change and its Effect to Performance of Water Usage Assocition in Irrigation Water Managements

0 21 7

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

the Effectiveness of songs to increase students' vocabuloary at second grade students' of SMP Al Huda JAkarta

3 29 100

The effectiveness of classroom debate to improve students' speaking skilll (a quasi-experimental study at the elevent year student of SMAN 3 south Tangerang)

1 33 122

Kerjasama ASEAN-China melalui ASEAN-China cooperative response to dangerous drugs (ACCORD) dalam menanggulangi perdagangan di Segitiga Emas

2 36 164

The Effect of 95% Ethanol Extract of Javanese Long Pepper (Piper retrofractum Vahl.) to Total Cholesterol and Triglyceride Levels in Male Sprague Dawley Rats (Rattus novergicus) Administrated by High Fat Diet

2 21 50

Factors Related to Somatosensory Amplification of Patients with Epigas- tric Pain

0 0 15

The Concept and Value of the Teaching of Karma Yoga According to the Bhagavadgita Book

0 0 9

Pemanfaatan Permainan Tradisional sebagai Media Pembelajaran Anak Usia Dini untuk Mengembangkan Aspek Moral dan Bahasa Anak Utilization of Traditional Games as Media Learning Early Childhood to Develop Aspects of Moral and Language Children Irfan Haris

0 0 11