METHOD OF FUNCTIONING OF INTELLIGENT AGENTS, DESIGNED TO SOLVE ACTION PLANNING PROBLEMS BASED ON ONTOLOGICAL APPROACH

Scientific research in the field of development and operation of intelligent agents (IA) implies creation of mathematical models and methods of building information systems in weakly structured subject domains. These domains are focused on such fields of human activity that require logical reasoning, specific skills and experience, that is, based on knowledge. The class of such applied problems includes planning and monitoring of activity, prediction and classification of phenomena, etc. Among IA, agents of activity planning deserve special attention. A significant part of applied problems comes down to the problem of planning (optimal allocation of resources, rational behavior, economic development of an object in time, enhancing the operation of particular tools etc.). Analysis of basic approaches, methods and means of constructing intelligent agents of activity planning shows that in the structure of such systems, not all possibilities of ontologies are used, especially during the simulation of functionality of such systems. Behavior of such systems comes down to finding an optimal path in the space of states, but it is not clear how to perform such a search. Searching for an optimal way should be based on rules (laws) that are assigned within a specific subject domain. For the formalization of such rules, it is proposed to use ontologies. There arises the task of development and implementation of unified methods for constructing intelligent agents of activity planning with the use of the ontological approach to enhance efficiency of the processes of functioning of such systems. The solution of such task is given as theoretically grounded models of operation and methods of building IA of activity planning based on ontologies. The essence of these models lies in the adaptation of knowledge bases to the specifics of the problems of respective subject domain. Thus, the proposed approach can serve as a methodology for building intelligent agents of activity planning based on ontologies. The essence of IA activity is to find a path from the original state to the goal state Goal with satisfaction of certain criteria. As a rule, such criteria define the rational behavior of IA. Their essence consists in finding such a Path that tranMETHOD OF FUNCTIONING OF INTELLIGENT AGENTS, DESIGNED TO SOLVE ACTION PLANNING PROBLEMS BASED ON ONTOLOGICAL APPROACH V . L y t v y n Doctor of Technical Sciences, Professor* E-mail: vasyl.v.lytvyn@lpnu.ua V . V y s o t s k a PhD, Associate Professor* E-mail: victoria.a.vysotska@lpnu.ua P . P u k a c h Doctor of Technical Sciences, Associate Professor** E-mail: petro.y.pukach@lpnu.ua M . V o v k PhD, Associate Professor** E-mail: mira.i.kopych@gmail.com D . U h r y n PhD, Associate Professor Department of Information Systems Chernivtsi faculty of the National Technical University "Kharkiv Polytechnic Institute" Holovna str., 203A, Chernivtsi, Ukraine, 58000 *Department of Information Systems and Networks*** **Department of Mathematics*** ***Lviv Polytechnic National University S. Bandery str., 12, Lvіv, Ukraine,79013 Досліджується застосування онтологій для задачі планування дій інтелектуальних агентів у слабкоструктурованих предметних областях. Використовуючи мову запитів до онтологій, будується простір станів, в якому функціонує інтелектуальний агент. Для зменшення розмірності простору використано оцінку до джерел інформації, на основі яких будується онтологія. Здійснено апробацію функціонування інтелектуального агента в області матеріалознавства Ключові слова: онтологія, інтелектуальний агент, опрацювання природної мови, концепт, простір станів, планування дій


Introduction
Scientific research in the field of development and operation of intelligent agents (IA) implies creation of mathematical models and methods of building information systems in weakly structured subject domains.These domains are focused on such fields of human activity that require logical reasoning, specific skills and experience, that is, based on knowledge.The class of such applied problems includes planning and monitoring of activity, prediction and classification of phenomena, etc.
Among IA, agents of activity planning deserve special attention.A significant part of applied problems comes down to the problem of planning (optimal allocation of resources, rational behavior, economic development of an object in time, enhancing the operation of particular tools etc.).Analysis of basic approaches, methods and means of constructing intelligent agents of activity planning shows that in the structure of such systems, not all possibilities of ontologies are used, especially during the simulation of functionality of such systems.Behavior of such systems comes down to finding an optimal path in the space of states, but it is not clear how to perform such a search.Searching for an optimal way should be based on rules (laws) that are assigned within a specific subject domain.For the formalization of such rules, it is proposed to use ontologies.
There arises the task of development and implementation of unified methods for constructing intelligent agents of activity planning with the use of the ontological approach to enhance efficiency of the processes of functioning of such systems.The solution of such task is given as theoretically grounded models of operation and methods of building IA of activity planning based on ontologies.The essence of these models lies in the adaptation of knowledge bases to the specifics of the problems of respective subject domain.
Thus, the proposed approach can serve as a methodology for building intelligent agents of activity planning based on ontologies.
The essence of IA activity is to find a path from the original state to the goal state Goal with satisfaction of certain criteria.As a rule, such criteria define the rational behavior of IA.Their essence consists in finding such a Path that tran-
The complexity of the search for a solution to the formulated problem directly depends on the number of alternatives of transition between two states, which IA can enter.The sets of alternatives of transitions between states set the search space Path.To narrow the search space and to determine the relevant transition between states, one uses knowledge, possessed by IA, given in the form of ontology.

Literature review and problem statement
Scientific research into the use of ontology during IA development and functioning, which started at the end of the previous century, has been intensively developing.The basic theoretical principles of formal mathematical models of ontologies were developed in paper [1].This paper proposed to consider ontology as a three-dimensional tuple that contains concepts, relationships between concepts and interpretation of particular elements of ontology.Article [2] considers the problem of presenting relationships in ontology and their classification.Research [3] shows isomorphism between ontology and a conceptual graph.This allows us to use the known methods and algorithms of the graph theory for processing ontologies.
The way ontology can be used in combination with a database is described in article [4].This approach has its pros and cons.The advantage of it is the combination of two paradigms in a single data storage.However, on the other hand, it is necessary to develop a new language of requests to the data storage.The use of ontologies during operation of applied information systems is described in paper [5].This work describes a process of formation of requests to the ontology.However, such an approach may be used only to ontologies of small volume.Research [6] considers the use of ontologies for solving medical problems.This approach is linked to a subject domain.It is necessary to develop a unified approach to constructing the intelligent agents of activity planning based on ontologies.
The problem of construction of decision support system based on ontological monitoring of medical data is presented in paper [7].This approach is of narrow specialization.In article [8], the problem of integration of knowledge bases into one ontology to support decision-making is examined.Paper [9] proposes an approach to the development of a separate module to support decision-making.The approach is interesting and is still at the stage of experimentation [10].Intelligence of such systems provides the use of descriptive logic.However, in order to use such ontology in practice, it is necessary to remember its structure and content, which is difficult to implement for the ontologies, which contain a significant number of elements.
Thus, at present, there is no a unified approach to using ontologies during operation of intelligent agents that are intended for solving problems of action planning.The present work proposes one of the possible variants of this approach.

The aim and objectives of the study
The aim of present research is to improve effectiveness of functioning of intelligent agents of action planning through the use of ontologies.
To achieve the set goal, the following tasks had to be solved: -to develop a method for planning actions of specialized intelligent agents using ontological approach; -to develop a method for the evaluation of information sources that are used for automated filling of ontologies; -to verify the obtained results through development and implementation of the applied specialized intelligent agents of action planning.

Mathematical model of operation of intelligent agents of activity planning based on ontology
By a formal model of ontology O, it is understood [1]: where С is the finite set of notions (concepts, terms) of software, assigned by ontology О; R : C C → is the finite set of relationships between notions (terms, concepts) of the assigned software; F is the finite set of interpretation functions (axiomatization, restrictions), assigned on concepts or relationships of ontology O.
The problem of action planning ZP has three components: a set of states S, a set of actions A, a set of states of goal Goal, that is, ZP S,A,Goal .= For effective action planning, IA must be able to assess states and actions.For this purpose, we shall use the model of adaptive ontology, which is described in detail in [11].Such ontology is defined as follows: where Ĉ C,W , = R R,L , = W is the weight of importance of concepts, C, L are the weights of importance of relationships R [12,13].
The essence of the proposed method of narrowing the search space Path is as follows: particular ontology concepts that assign alternatives of transition between states will be assigned weight W i , i=1, 2,…, m.Over time, this weight will change, that is, to increase depending on the degree of confidence s in the source, on the basis of which this alternative was added to ontology.The concepts, an increase in weight of which in a certain period of time would not exceed a certain threshold l, will be removed from set C  .This method is described further in the work, which considers the problem of ontology construction.We shall note that there are alternatives to transitions between states that may not be removed from the ontology, that is, Such elements of ontologies are determined by software experts.In addition, experts determine what concepts of ontology pass from set C  to C¢ and vice-versa.
Once the search space Path has been narrowed, we shall consider the problem of choosing a transition path between two neighboring states.As it was noted above, this problem is two-criterial.First, we shall consider each criterion separately and shall reduce a two-criterial problem to one criterion.
Let the set of concepts С be described by characteristics (properties) Х={x 1 , x 2 ,…, x M }; D i is the property domain x i ; the property value x i will be designated as ) be the state assessment S k ; kl j a is the transition from state S k to state S l , with the use of alternative a j ; ( ) kl j v a is the action assessment kl j a .The state of goal Goal is defined by the fact that a subset of attributes X has to attain certain values z (x,Goal) x X.
∀ Î In order to choose actions, we shall rely on the rational behavior of IA, that is, on striving to minimize costs of resources to achieve the state of goal.Each action kl j a is determined by cost of resources kl j g (cost of transition from state to state).Thus, in the problem of physical-mechanical diagnostics of durable products, each of the alternatives is characterized by the cost of resources and the period of operation.Information on alternatives, cost of resources, as well as the operation life cycle is stored in the ontology.It is obvious that new alternatives may appear, so a module of ontology supplement is necessary.
Evaluation of an action is directly proportional to the costs of resources, that is, ( ) where E is the scalar value.The task of IA is to minimize the magnitude where i=(k,l) determines the path of transition from state S k to state S l , j i is the number of alternatives, chosen for such transition.
To assess reaction of external environment to the behavior of IA, we shall use stimulating learning [12].Formally, the problem takes the following form.Assume that at every step the agent is in state s from a certain set of states S. At every step, it chooses action a from the existing set of actions A. In response to this, the environment informs the agent what reward it received and in which state.In a general case, the agent must explore the environment and choose the optimal behavior.
Let us designate the expected winning of IA in state S as ( ) * Q S , the encouragement function as Y : S A Y × → , the function of transition between states as T : S A S × → ¢.The problem is to maximize the win.It is clear that in a real situation, at the beginning of the process the agent has absolute ignorance -the reaction of system to any actions, including transitions between states, is not known.However, we shall assume that the model of the problem that is solved by IA is known.
According to [12], the optimal value of the state is a reward we receive, if the IA acts in the best way.This value can be defined as a solution to equations If it is known, the choice of the optimal strategy will be made to according to formula: This problem is solved by iteration method [12,13].
Taking into account ( 4) and ( 5), we receive a two-criterial problem.To solve it, we chose the method of the main component, if objective functions (4) or ( 5) can be estimated, respectively, from the bottom or from the top; if it is impossible to estimate them, we use the method of complex criterion.Thus, we receive one of three problems: Problems ( 6)-( 8) are multi-step optimization problems, that is, problems of dynamic programming.Using the methods for solving such problems (e.g., functional equations), we find a path of transition from the original state to the goal state [12].

Automatic development of ontology based on the assessment of reliability of information sources
Automatic development of ontology is realized by means of Java API Protege-OWL.These tools include a library of classes, which implement practices of working with OWL-structures: their reading and additions.Thus, software tools for developing ontologies are functioning in interaction with the OWL-ontology.From the ontology, we take patterns of grammatical-semantic structures for recognition of affirmations (predicates of descriptive logic) in the studied and/or academic texts.As a result of this recognition, new elements are added to it.To do this, Link Grammar Parcer (LGP) is applied, which splits an affirmative sentence, written in grammatically correct English, into semantically related word pairs.LGP contains the table of correspondence between grammatical structures of English and types of syntactically-semantic relationships between words (concepts).API LGP allows linking this table to the OWL-ontology, thanks to which the table can dynamically adapt to assigned software in process of learning [14,15].
Separate classes of concepts put restrictions on the properties of their instances by means of descriptive logic.Such restrictions can be grouped into three main categories: -quantor restrictions (existence, generalities); -restriction of the number of admissible values (minimum ≤, exactly=, maximum ≥); -restrictions of "may take the meaning from a set" type.Restriction of existence describes the class of instances that have at least one link of the specified semantic meaning with the instance of the specified class.In this case, the quantor of existence is applied to a set of links of an instance (and not to the set of instances of the class as it may seem).Therefore, the quantor of existence indicates that this class contains only those instances, a set of links of which has a particular connection: x r,r x,y .∃ Quantor of generality indicates that this class contains only those instances, the set of all links of which contains clearly exceptional list of links, specified here: The method of ontology development makes sense only as part of some intelligent system [17].This solution became an intelligent system of information search based on adaptive ontologies, knowledge base in the field of materials science and database of scientific publications in this field [16].In addition, we not only develop ontology, but also remove from it all elements that became not relevant in terms of a problem, which IA solves [18][19][20][21].
Let at some moment of time t, the weight of concept k C  of ontology О be equal to t k W .For an increase in weights of concepts, electronic natural language documents T are used.Every document T belongs to a particular source of information U (scientific journal, website, etc.).That is, there is a set of sources { } and each source contains a set of text documents U T ,T ,...,T .= Measure of confidence in such source i U will be designated as i 0,1 , s Î    i 0 s = is the complete lack of confidence in source U i , i 1 s = is the maximum confidence in source U i .Above all, we believe that a measure of confidence for all sources is equal to 0.5.In the course of filling the ontology with concepts from text documents, measure of confidence in the source is changing.
The following method of changing in measure of confidence was suggested: a new measure of confidence s H in a source is equal to  C , s = s − s if an expert did not include any text document from this source for filling ontology.If s H <1, such source of information is not subsequently considered.In other words, if 6 times in a row, no document was taken from a certain source for filling ontology, its H 0,099 s ≈ and this source is excluded from subsequent viewings.
Then weights of concepts k C  are changing according to the following formula: means that text T ij was used for filling of ontology.
The concepts, for which < ∆ are excluded from the ontology.Such method makes it possible to reduce the search space Path.
We shall obtain the following sequence of steps of operation of system of automated ontology development.
Step 1.To form a set of information sources U.
Step 2. To recalculate confidence s I in information source U i .
Step 3. To calculate weight W of concept С of ontology.
Step 4. To perform editing of ontology depending on increments in concept weight.
The developed system has two basic functions: 1) interactive automated construction of ontology of the given problem domain; 2) search, retention and classification (ranking) of scientific publications both in interactive semi-automatic and automatic mode.
Each of these functions is implemented by its basic set of functional modules, but some of these software modules have a dual purpose.The system is implemented in the programming language Java.Most modules have graphic interface Swing and AWT libraries.All connected libraries have the status of open and are distributed free of charge.Due to their use, the project is fully functional and has all the necessary tools for development [22,23].
The proposed architecture of the system of planning actions of specialized intelligent agents is shown in Fig. 1.Architecture of the system consists of the ontology that contains ontology of a problem, that operation of specialized IA is aimed to solve, and the ontology of the subject domain, which specifies alternative solutions of particular subtasks.The database stores instances of individual concepts of ontology, as well as the history of operation of a specialized IA.The central module is a module of construction of problem solving plan, which functions based on the ontology and instances of ontology concepts (database).After construction of the search space of effective action plan for IA, a module of solving the problem of dynamic programming by the method of functional equations is run.As a result, we receive a plan of activity of IA.To develop and edit the ontology, we use the module of preprocessing text documents, software tool LinkGramParser to search for concepts of a subject domain in text documents that are relevant to a subject domain, as well as utility Wget to download files using protocols HTTP, HTTPS and FTP.
Taking into account the method described above, we obtain a diagram of activity of functioning of the system of intelligent agents' actions planning, which is shown in Fig. 2. Functioning of the system includes five stages.Between stages 2 and 3, there is an intermediate stage, which lies in the automated development of the ontology.The diagram of activity of this stage is shown in Fig. 3.
As an example, consider a product of durable operationa pipe (gas or water).The problem is formulated as follows: at minimum costs, to extend the pipeline resource to the maximum.Taking into account that: 2) assigned estimated economic effect that IA receives from the pipeline operation and possible losses from termination of operation; 3) costs for anti-corrosion protection are known and are defined by technology of such protection; 4) estimated terms of trouble-free operation of the pipeline if we take common (assigned) measures of its anti-corrosion protection, known from expert assessments, standards, data of non-destructive testing and technical diagnostics.

Fig. 2. Diagram of activity of functioning of system of planning actions of intelligent agents
The general rule of coating replacement and restoration is formulated as follows:

IF ((It is time to restore the coating) OR (The event of coating damage occurred) OR (Measured parameters exceed the permissible threshold, established previously)) I (Resources to recover the coating are available) THEN (Replace the coating).
Knowledge base specifies this rule through the system of specifying production rules [24][25][26].For IA of information search, information that allows achievement of success in solving this problem is considered valuable.That is information about new types of anti-corrosion protection, which provide for extended terms of trouble-free operation; information about refined assessment of pipeline resource; information about effective technology of coating application.

Fig. 3. Diagram of activity of the stage of automated of ontology
To complete each stage, alternative solutions are used.Thus, for the stage of removal of protective coating, it is possible to use one of three alternatives: mechanical, chemical, or thermal.All this information is stored in the relevant ontology.

Discussion of results of examining a Web mining approach for defining keywords in the Slavic language texts
The basic ontology of software for materials science was built based on [27].Automated development of ontology was carried out based on the following sources of information: -Open Access Materials Science Journal (U1); -Journal Materials & Design (U2); -Journal Nature Materials (U3); -Materials science (U4); -Surface Technology/Functional Coating (U5); -Journal Surface and Coatings Technology (U6); -Protective Coatings and Compounds (U7).The purpose of the ontology is to implement a certain IA based of rational behavior.Such rational behavior consists of four components: a) set of actions that make up the stages of the plan; Axioms of terms of the dictionary and atomic statements about instances of concepts were recorded.After that, the KB was set.Wrong axioms were revealed based on the fact that they represent wrong statements about the world.
The ontology contains more than 3000 concepts, 40 % of concepts are defined.
The number of alternatives for each stage with and without use of ontologies and the values of corresponding functions are given in Table 1.
Use of methods for automatic filling of ontologies allows us to expand the number of alternatives (column 4) of solving certain stages of the problem "processing" compared with patterns (column 3) from [24].Thereby, the cost of processing decreases and warranty period of operation of product increases.The number of alternatives may be reduced through the use of evaluation of confidence in information sources (column 5).Although objective function increased in this case, on expert level, the alternatives were removed as irrelevant to the conditions within which the product operates.Thus, we can conclude about effectiveness of the proposed approach.The shortcoming is the process of development of ontology, its adequacy and completeness of the subject domain, within which an intelligent agent operates.Such problem of quality assessment of ontology requires separate scientific research.

Conclusions
1. Mathematical support of functioning of intelligent agents of action planning based on ontologies was developed.To do this, the notion of adaptive ontology, which made it possible to formalise behavior of such agents in the space of states, was introduced.The problem of planning activity of an intelligent agent comes down to the problem of dynamic programming, where the objective function is the composition of two functions that define competitive criteria.Thus, as a result, we receive a two-criterial problem.To solve it, we chose the method of the main component, if objective functions may be evaluated or the method of complex criterion, if these functions are impossible to estimate.. 2. Automatic ontology development is realized by means of Java API Protege-OWL.These tools contain libraries of classes, which implement practices of working with OWL-structures: their reading and supplementing.Thus, software tools of ontology development function in interaction with the OWL-ontology, taking from it the patterns of grammatical-semantic structures for recognition of affirmations (predicates of descriptive logic) in the studied and/or educational texts and adding new elements to it as a result of such recognition.In the course of development of ontologies, there was an assessment of confidence in sources of information, on the basis of which the ontology is constructed.This allows us to narrow the search space from the original state to the goal state, rejecting irrelevant alternatives.
3. Based on the ontology of material science [16], we constructed the space of states for solving the problem of diagnosis and use of products of durable operation.We also compared the developed method with the used of ontology to the pattern of performed works for extending operation term of products of durable usage.The developed method makes it possible to increase operating efficiency of the intelligent agent, which is displayed in minimal value of objective function.
− s if an expert included a text document from this source for filling ontology, where s C is the old measure of confidence.

Fig. 1 .
Fig. 1.Architecture of the system to plan actions of intelligent agents Comparative table of methods with and without use of ontologies