Knowledge based systems. Knowledge-based systems and expert systems

3. Knowledge acquisition strategies

1. Knowledge, types of knowledge, knowledge bases, knowledge banks

There are various definitions of the concept of "knowledge".

Knowledge is the basic patterns of the subject area that allow a person to solve specific production, scientific and other tasks, that is, facts, concepts, relationships, estimates, rules, heuristics (otherwise actually knowledge), as well as decision-making strategies in this area (otherwise strategic knowledge). )

By "knowledge" is meant formalized information that is referred to or used in the process of solving a problem.

Knowledge about the subject area includes a description of objects, their environment, necessary phenomena, facts, as well as relationships between them. The complexity of the concept of "knowledge" lies in the multiplicity of its carrier and inseparability from the concept of "data".

There are several levels of formalization of knowledge about the subject area:

Knowledge in human memory;

Knowledge in the form of a language model of the subject area, used by a person and recorded on physical media using context-sensitive languages, graphic images, etc.;

Knowledge formalized for their representation when used in a computer;

Factual information or data.

Knowledge is usually divided into 2 broad categories: facts and heuristics. The first category (facts) indicates well-known circumstances in a particular subject area. Such knowledge is also called textual, meaning their sufficient coverage in specialized literature and textbooks. The second category (heuristics) is based on the individual experience of a specialist (expert) in the subject area, accumulated as a result of many years of practice. This category often plays a decisive role in the construction of intellectual programs.

The knowledge base is a collection of models, rules and factors (data) that generate analysis and conclusions to find solutions to complex problems in a certain subject area.


2. Knowledge representation models

The most common knowledge representation models are:

production systems;

Logical models;

semantic networks.

In production systems knowledge is represented as a set of special information units having the following structure. In general, a production system includes the following components:


A database containing many facts;

Rule base containing a set of productions;

Interpreter (inference engine) or rules for working with products.

The rule base and the database form the knowledge base.

The facts in the database are short-term information and can in principle change over the course of the product system as experience is gained.

Rules are more long-term information and are designed to generate hypotheses (new facts) from what is already known.

Products in comparison with other forms of knowledge representation have the following advantages:

Modularity;

Uniformity of the structure (the main components of the production system can be used to build intelligent systems with different problem orientations);

Naturalness (the conclusion of a conclusion in a production system is in many respects similar to the expert's reasoning process);

The flexibility of the generic hierarchy of concepts, which is supported only as links between rules (changing a rule entails changing the hierarchy).

However, production systems are not free from disadvantages:

The inference process is less efficient than in other systems, since most of the inference time is spent on overhead checking the applicability of the rules;

This process is difficult to manage;

It is difficult to imagine a generic hierarchy of concepts.

Logical models of knowledge representation are implemented by means of predicate logic.

A predicate is a function that takes only two values ​​- true and false - and is intended to express the properties of objects or the relationships between them.

An expression that asserts or denies the existence of any properties of an object is called a proposition.

frame most often defined as a data structure for representing stereotyped situations. Frames (literally - "frame") is a unit of knowledge representation, the details of which can change in accordance with the current situation. The frame at any time can be supplemented with various information regarding the ways of using this frame, the consequences of this use, etc.

The semantic web describes knowledge in the form of network structures. The nodes of the network are concepts, facts, objects, events, etc., and the arcs of the network are the relationships by which the nodes are connected to each other.

3. Knowledge acquisition strategies

There are several strategies for gaining knowledge. The most common:

  1. extraction;
  2. acquisition;
  3. discovery (formation).

Figure 1 - Three strategies for gaining knowledge

Knowledge extraction is a procedure for the interaction of a knowledge engineer with a source of knowledge, as a result of which the process of reasoning of experts-experts when making a decision and the structure of their ideas about the subject area become clear.

Figure 2 - Classification of knowledge extraction methods

Knowledge acquisition is understood as a method of automated construction of a knowledge base through a dialogue between an expert and a special program (in this case, the knowledge structure is pre-programmed into the program). This strategy requires significant pre-development of the subject area. Knowledge acquisition systems do acquire ready-made pieces of knowledge according to the structures laid down by the system designers. Most of these tools are specifically focused on specific expert systems with a strictly defined subject area and knowledge representation model, i.e. are not universal.

The term discovery (formation) of knowledge has traditionally been assigned to an extremely promising and actively developing field of knowledge engineering, which develops models, methods and algorithms for data analysis for knowledge acquisition and learning. This area includes inductive models for generating hypotheses based on training samples, learning by analogy, and other methods.


4. Properties of knowledge-based systems

Figure 3 - Properties of knowledge-based systems

5. Criteria for the expediency of solving problems with the help of knowledge-based systems

Figure 4 - Criteria for the expediency of solving problems using knowledge-based systems

6. Applications of knowledge-based systems

The areas of application of knowledge-based systems are very diverse:

Production;

Military applications;

The medicine;

Sociology;

Geology;

Agriculture;

Control;

Jurisprudence;

7. Types of problems solved with the help of knowledge-based systems

Types of tasks solved with the help of knowledge-based systems:

Interpretation of symbols or signals - compilation of a semantic description according to the input data;

Diagnosis - identification of malfunctions (diseases) by symptoms;

Monitoring - observation of the changing state of the object and comparison of its indicators with the established or desired ones;

Design - development of an object with specified properties while observing the established restrictions;

Forecasting - determining the consequences, observed situations;

Planning - determining the sequence of actions leading to the desired state of the object;

Control - the impact on the object to achieve the desired behavior;

Training is an explanation or consultation in a particular field of knowledge.

Knowledge-based systems are implemented based on the following intelligent algorithms:

Expert systems;

Neural networks;

Fuzzy logic;

Genetic algorithms.

Because knowledge-based systems use intelligent algorithms, such systems are sometimes referred to as artificial intelligence systems.

Expert systems (ES) are computer programs that use the principles of artificial intelligence and formalized knowledge of an expert to process operational information and make informed decisions in the analyzed subject area.

In expert systems, specialized knowledge is widely used to solve problems at the level of a human expert. The term "expert" refers to a person who has expert knowledge in a particular area. This means that the expert has knowledge or special skills that are unknown or inaccessible to most people. An expert is able to solve problems that most people are not able to solve at all, or solve them much more efficiently. Once expert systems were first developed, they contained only expert knowledge. However, nowadays the term " expert system" is often applied to any system that uses expert system technology. Expert system technology may include special expert system languages, as well as software and hardware designed to support the development and operation of expert systems.

As knowledge in expert systems, either expert knowledge or ordinary public knowledge can be used, which can be obtained from books, magazines and from well-informed people. In this sense, ordinary knowledge is considered as a concept of a lower level compared to rarer expert knowledge. Terms " expert system", "knowledge based system", and " knowledge-based expert system" are often used interchangeably. But most people only use the term " expert system" simply because it is shorter, even though in expert system in question, not expert, but only ordinary knowledge can be presented.

There are two fundamentally different classes of ES: "knowledge-based" and "example-based". The first class of ES is used to work with well-systematized elements of knowledge and a priori known patterns expressed by various methods, instructions, rules, etc. Work principles expert system based on knowledge, are illustrated in Fig.11.15.


Rice. 11.15.

In addition, useful knowledge-based systems have been developed that are intended to be used as an intelligent assistant for a human expert. These intelligent assistants are designed on the basis of expert systems technology, since such technology provides significant development advantages. The more knowledge is entered into the knowledge base of an intelligent assistant, the more his actions will resemble those of an expert. The development of an intelligent assistant can be a useful intermediate step before creating a full-fledged expert system. In addition, the intelligent assistant allows you to free up more useful time for the expert, since its use contributes to the accelerated solution of problems.

Expert knowledge refers to only one subject area, and this is the difference between methods based on the use of expert systems and general methods for solving problems. A subject area is a special problem area, such as medicine, finance, science and technology, in which only a certain expert can solve problems very well. Expert systems, like human experts, are generally intended to be used as experts in one subject area. For example, an expert in chess cannot usually be expected to have expert knowledge related to medicine. Expertise in one subject area does not automatically transfer to another area.

An expert's knowledge concerning the solution of specific problems is called the expert's area of ​​knowledge. The relationship between the subject area and the knowledge area is shown in Figure 11.16.

In this figure, the knowledge area is fully included in the subject area. The part that goes beyond the area of ​​knowledge symbolizes the area in which there is no knowledge about any of the tasks related to this subject area.

In the field of knowledge expert system conducts reasoning or draws logical conclusions on the same principle as an expert - a person would argue or come to a solution of a problem in a logical way.


Rice. 11.16.

This means that on the basis of certain facts, by reasoning, a logical, justified conclusion is formed, which follows from these facts.

ES are successfully used in those areas where, in addition to the use of standard algorithmic methods based on precise calculations, the knowledge and experience of specific experts-analysts are essentially used, and decision-making is formed in conditions of incomplete data and depends more on qualitative than quantitative assessments. These subject areas include, first of all, the area of ​​analysis of financial activity, where the effectiveness of decisions made depends on the comparison of many different factors, taking into account complex cause-and-effect relationships, the use of non-trivial logical reasoning, etc.

classical expert system embodies the unwritten knowledge that must be obtained from an expert through interviews conducted by a knowledge engineer over a long period of time. This process of creating expert system called knowledge engineering and carried out by a knowledge engineer. knowledge engineering refers to the acquisition of knowledge from a human expert or other sources and the subsequent presentation of knowledge in expert system(fig.11.17).


Rice. 11.17.

First, the knowledge engineer establishes a dialogue with a human expert to bring out the knowledge of the expert. This step is analogous to the work done by a systems designer in conventional programming when discussing system requirements with the client for whom the program is being created. The knowledge engineer then exposes the knowledge explicitly for inclusion in the knowledge base. The expert then evaluates expert system and conveys criticisms to the knowledge engineer. This process is repeated again and again, until the expert evaluates the results of the system as satisfactory.

Generally speaking, the process of creating expert systems is much different from the process of developing ordinary programs. In expert systems, problems are considered that do not have a satisfactory algorithmic solution, so a logical conclusion is used to achieve an acceptable solution. Since the basis of functioning expert system lies a logical conclusion, such a system must be able to explain its reasoning so that it can be tested. Therefore, an integral part of any complex expert system is a means of explanation. In fact, sophisticated explainers can be developed to allow the user to explore multiple lines of questions like "What happens if..." called hypothetical reasoning.

Consequently, knowledge engineering- This is the field of information technology, the purpose of which is to accumulate and apply knowledge not as an object for processing them by a person, but as an object for processing them on a computer. To do this, it is necessary to analyze the knowledge and features of their processing by a person and a computer, as well as to develop their machine representation. Unfortunately, a precise and undeniable definition of what knowledge is has not yet been given. However, the goal knowledge engineering– to ensure the use of knowledge in computer systems at a higher level than hitherto is relevant. The possibility of using knowledge is feasible only when this knowledge exists, which is quite understandable. The technology of accumulating and summarizing knowledge goes "side by side" with the technology of using knowledge, where they complement each other and lead to the creation of one technology, the technology of knowledge processing.

The second class of ES is used in situations where there are no obvious connections and patterns between the elements of knowledge, and the knowledge itself is presented in the form of lists of examples describing the implementation of certain events. If the first class of ES works with well-defined data and knowledge extracted from experts - analysts by knowledge engineers, then the second class forms its knowledge by adapting to the subject area represented by examples, and both training and analyzed information can be distorted and incomplete. In the first case, inference mechanisms, as a rule, are based on classical strategies of inheritance and inference, in the second case, various methods of inductive generalization by examples, in particular, the properties of artificial neural networks used for this.

In a rule-based system, the domain knowledge required to solve problems is encoded in the form of rules and contained in a knowledge base. Of course, rules are most widely used to represent knowledge. Elements of a typical expert system, based on the rules, are shown in Figure 11.18.


Rice. 11.18.

Expert system consists of the components described below.

  • User interface. The mechanism by which user and expert system.
  • means of explanation. A component that allows you to explain to the user the course of the system's reasoning.
  • working memory. The global base of facts used in the rules.
  • Inference machine. A software component that provides inference generation (deciding which rules facts or objects satisfy). Prioritizes running rules and executes the rule with the highest priority.
  • Working list of rules. An inference engine-generated and prioritized list of rules whose patterns match facts or objects in working memory.
  • A means of acquiring knowledge. An automated method that allows the user to enter knowledge into the system, rather than involving a knowledge engineer in the solution of the problem of explicitly coding knowledge.

Many systems have an optional knowledge acquisition tool. This tool in some expert systems is able to learn by inductive rule derivation from examples and generate rules automatically. Other methods and algorithms have also been used to generate rules in machine learning, such as artificial neural networks and genetic algorithms. The main problem with using machine learning to generate rules is that there is no explanation as to why the rules were created. Unlike a human being able to explain the reasons why a particular rule was chosen, machine learning systems have never been able to explain their actions, and this can lead to unpredictable results. However, in general, examples presented in the form of simple tables are best for creating decision trees. General rules prepared by a knowledge engineer can be much more complex than simple rules derived by inductive rule derivation.

AT expert system, based on rules, the knowledge base is also called production memory. As a very simple example, consider the problem of making a decision to cross a road. The following are productions for two rules, in which the arrows mean that the system will perform actions to the right of the arrow if the conditions to the left of the arrow are true:

red light on -> stop

green light on -> move

Production rules can be expressed in the equivalent IF-THEN pseudocode format as follows:

Rule: red_light

IF the red light is on THEN stand

Rule: green_light

IF the green light is on THEN move

Each rule is identified by a name. Following the name is the IF part of the rule. The section of the rule between the IF and THEN parts of the rule is referred to by various names, such as the antecedent, conditional part, template part, or left-hand-side (LHS). A single condition such as

"red light on" is called a conditional element, or pattern.

In a rule-based system, the inference engine determines which rule antecedents (if any) are executed according to the facts. As strategies for solving problems in expert systems, two general methods of inference are commonly used: direct inference and reverse inference. Other methods used to perform more specific methods may include ends and means analysis, problem simplification, backtracking, plan-work-check, hierarchical planning and least contribution, and constraint handling.

Direct logical inference is a method of forming reasoning from facts to conclusions that follow from these facts. For example, if before leaving the house you find that it is raining (fact), then you should take an umbrella with you (conclusion).

Reverse inference involves the formation of reasoning in the opposite direction - from a hypothesis (a potential conclusion that must be proven) to the facts that confirm the hypothesis. For example, if you do not look outside, but someone enters the house with wet boots and an umbrella, then you can accept the hypothesis that it is raining. To confirm this hypothesis, it is enough to ask this person if it is raining. In the case of a positive answer, it will be proved that the hypothesis is true, so it becomes a fact. As mentioned above, a hypothesis can be regarded as a fact, the truth of which is in doubt and must be established. In such a case, the hypothesis can be interpreted as a goal that must be proven.

Depending on the project expert system in an inference engine, either forward or reverse inference is performed, or both forms of inference. For example, CLIPS is designed for forward inference, PROLOG provides reverse inference, and Paul Haley's version of CLIPS, called Eclipse, performs both forward and reverse inference. The choice of inference engine depends on the type of problem. Diagnostic tasks are best solved using backward inference, while prediction problems, current control and controls are easiest to solve using direct logical inference.

Working memory may contain facts about the current state of the traffic light, such as "green light on" or "red light on". Either or both of these facts may be present in working memory. If the traffic light is working properly, then only one fact will be in working memory. But it is also possible that both facts will be present in working memory if the traffic light is out of order. What is the difference between knowledge base and working memory? Facts do not interact with each other. The "green light on" fact does not affect the "red light on" fact. On the other hand, knowledge about the operation of traffic lights suggests that if both facts are present at the same time, then the traffic light is faulty.

If there is a "green light on" fact in working memory, the inference engine detects that this fact satisfies the conditional part of the green_light rule and places that rule in the working list of rules. And if a rule has multiple templates, then all of these templates must be satisfied at the same time in order for the rule to be placed in the working list of rules. As a condition for satisfying certain patterns, one can even specify the absence of certain facts in working memory.

A rule, all of whose templates are satisfied, is called activated, or implemented. Several activated rules can be present in the working list of rules at the same time. In this case, the inference engine must choose one of the rules to run.

Following the THEN part of the rule is a list of actions that must be performed after the rule is run. This part of the rule is called the consequent, or the right side (Right-Hand Side - RHS). If the red_light rule is fired, its "stand" action is executed. Similarly, once a green_light rule is run, its action becomes "move". Specific actions usually include adding or removing facts from working memory, or outputting results. The format for describing these actions depends on the syntax of the language. expert system. For example, in CLIPS, the action to add a new fact to working memory, called "stop", takes the form (assert stop).

The inference engine operates in the mode of implementation of cycles "recognition - action". Other terms such as the fetch-execute cycle, the situation-response cycle, and the situation-action cycle are also used to describe this mode of operation. But whatever the name of such a loop is, the inference engine executes certain groups of tasks over and over again until certain criteria are found that cause the execution to stop. This performs the common tasks identified in the pseudocode below as conflict resolution, action, negotiation, and checking of break conditions.

WHILE the work is not finished

Conflict resolution. If there are activated rules, then select the rule with the highest priority; otherwise, the job is done.

Action. Consistently carry out the actions indicated in the right part of the selected activated rule. In this cycle, the direct influence of those actions that change the contents of working memory is manifested. Delete the newly launched rule from the working list of rules.

Coordination. Update the working list of rules by checking if the left side of any rules are being executed. If yes, activate the corresponding rules. Delete activated rules if the left side of the corresponding rules is no longer satisfied.

Stop conditions check. If the halt action is performed or the break command is given, then the work is finished.

Accept new user command.

During each cycle, multiple rules can be activated and placed on the work list of rules. In addition, the results of activation of rules from previous cycles remain in the working list of rules, unless these rules are deactivated due to the fact that their left parts are no longer executed. Thus, during program execution, the number of activated rules in the working list of rules changes. Depending on the program, previously activated rules may always remain in the working list of rules, but never be selected to run. Likewise, some rules may never become enabled. In such cases, you should recheck the purpose of these rules, because either such rules are not needed or their templates are not well designed.

The inference engine executes the actions of the activated rule with the highest priority from the working list of rules, then the actions of the activated rule with the next highest priority, and so on, until there are no more activated rules in the list. Various priority systems have been developed for expert systems tools, but generally speaking, all tools allow the knowledge engineer to prioritize rules.

Conflicts occur in the work list of rules if different rules that are fired have the same priority and the inference engine must decide which of these rules to run. Different shells use different methods to solve this problem. Newell and Simon took the approach that the rules entered into the system first are given the highest priority by default. In CLIPS, rules have the same priority by default unless one of them is assigned a different priority by a knowledge engineer.

After all rules have been executed, control returns to command interpreter top-level so that the user can issue to the shell expert system additional instructions. Running in top-level mode corresponds to the default mode in which the user interacts with expert system, and is designated as an "Accept a new user command" task. New commands are received at the top level.

The top level is the user interface to the shell while the application is being developed. expert system. But usually more complex user interfaces are developed to make it easier to work with expert system. In reality, designing and implementing a user interface can take more effort than building a knowledge base. expert system especially at the prototype stage. Depending on the capabilities of the command interpreter expert system the user interface can be implemented using rules or using statements in another language called from expert system.

Main Feature expert system is its explanation facility, which enables the user to ask questions about how the system came to a certain conclusion and why it needs certain information. A rule-based system can easily answer the question of how a certain conclusion was reached, because the history of the activation of the rules and the contents of working memory can be stored on the stack. But this possibility is not so easily achievable when using artificial neural networks. genetic algorithms or other systems that are still under development. Of course, attempts have been made to provide for the possibility of explanation in some systems, but the means of explanation created in this case cannot be compared in their clarity with the means of any expert system designed by man. Developed explanation tools can enable the user to ask "what if" questions and explore alternative ways of forming hypothetical reasoning.

Some knowledge-based systems are called expert systems when the standard for their use must be determined by a human specialist. There are many systems that are based on the knowledge of experts. The ultimate goal of knowledge-based systems is to replace the human decision maker, but in reality, this goal exceeds the real capabilities of the systems. They can take on only part of a person's work, but cannot completely replace it. It will be some time before knowledge-based systems can replace managers, if ever. In this regard, knowledge-based systems are sometimes overestimated.

Each of the four types of information systems we have considered is suitable for a specific purpose. None of them is suitable for all types of information used at all levels of management.

Although transaction and transaction systems are not as attractive as decision support or knowledge-based systems, they are quite powerful in that they feed data into a common information system, keep data organized and updated, and ensure that data moves to where it is needed. But by themselves, these systems are limited to the use of specific data.

The types of management information systems discussed in this section expand the capabilities of transaction and transaction systems. They manipulate data about known and recurring issues to make it usable for stimulating exceptional information. This information is used most frequently at the operational level, less frequently at the divisional level, and least frequently at the strategic level.

Decision support systems help managers solve less structured problems. They are more suitable than UIS for the production of control, distribution and guidance information. DSS are more complex to create and maintain systems than management information systems. And although DSS can solve the problem of stimulating and exclusive information, MIS allows you to do this more economically.

Decision support systems provide easy and flexible access to many components. When they are well designed, it becomes easier to change and add new components. Like other powerful tools, the effectiveness of WBS G is largely determined by the skill of their use.

Knowledge-based systems, on the other hand, are designed to support mastery. Now, however, these systems have limited and narrowed the focus on craftsmanship. At present, knowledge-based systems are powerful but limited tools for controlling, distributing and guiding decisions.

Information systems are not always immediately usable, and managers often must create individual information systems.

Building information systems

At the beginning of the use of computer systems, especially in simple organizations, the development of computer programs was an unsystematic affair. For example, many programmers started coding software as quickly as possible - often before it became clear what the program to be developed was. Because of this, problems arose, and the designers began to restore some order in this process. This gave rise to a model called the system development life cycle.

A. Defining Stage

The defining stage provides an opportunity to outline the information system. The argument suggestion phase is critical because the first description of the problem determines much of what the software needs to formalize. The assessment implementation phase includes two basic tasks.

The first is the problem of definition.

The second is in deciding whether it is possible to build a system at all. The implementation of the assessment in the life cycle of the system development is done, as a rule, when there is a minimum of information. This can cause problems such as missing important concepts.

During system analysis, time is spent determining what information the user wants from the system. The next step is to determine what data is needed to provide this information. During this process, procedures evolve, making it necessary to obtain data and make use of the information. Finally, it examines where the data will come from and how it will flow through the system.

The task of the next phase, the logical systems design, is to develop the concept of the system, which includes how data will be collected, what will be done with this data, and what reports will be issued by the system. With the completion of the logical system project, the defining stage also ends. The defining stage is critical to the success of system design and evolution. its implementation is difficult. During system analysis, a lot of things seem abstract and it is difficult to imagine how it all will look after it is rebuilt.

Would. Development stage

The stage of development is also decisive, but with the following difference. A weak stage of development can destroy good work in the defining stage, but even outstanding work done in the development stage cannot save bad work in the defining stage. In the physical system design phase, the logical design translates into specifications for subsystems, programs, procedures, files, and databases. Physical systems design requires well-developed technical skills. If the tasks of the defining stage have been performed well, then there is no need for extensive user involvement in the design of the physical system.

During software development, the design team develops programs specialized in physical system design. She also writes programs and checks them.

Procedural development includes the design and description of procedures by which users will collect and prepare data for entry into a reporting system, as well as procedures for interpreting reports. Once the programs are written and tested, it's time for system testing. System testing has two parts: making sure the individual programs work together and checking that the procedures are followed by the computer system.

Stage of establishment and implementation

During the installation and commissioning phase, the project moves from design to implementation. The conversion and install phase is usually the most critical time. The conversion process creates the files needed for the new system. This often requires a special subsystem that translates the data from the old system's format into the new format. Temporarily deprived of any computer system, employees can write out a large amount of data manually, validating it as much as possible and placing it in new format files. During this time it is also possible to train the user in the procedures for using the new system.

The installation process moves computer programs from computer libraries used by programmers to computer libraries used during actual system operation. This process may also involve the physical installation of new terminals or computers.

If the system has been successfully converted and installed, then the development of the project is completed and the phase of use and support begins. During the operation of the system, users provide input and use the original data. However, even if the system is developed, the work is not finished yet. Systems contain bugs and need fixing, and changing circumstances often dictate changes to the system. Thus, work on the system continues, and it is called support.

Knowledge based systems

Living beings, depending on their position on the evolutionary ladder, have greater or lesser intellectual abilities. The intellectual capabilities of bees, birds, dolphins and humans differ many times over. Nevertheless, each of these beings can be said to have the ability to make individual choices and make their own decisions. This is one of the signs of intelligence.

In applications built on the basis of artificial intelligence, an attempt is made to reproduce the behavior of living beings by means of computer systems. At the same time, a knowledge engineer solves a rather difficult task: he must build into computer programs the behavior inherent in living beings.

Using a range of methodologies that include expert systems, neural networks, case-based systems, genetic algorithms, intelligent agents, and data mining, we can make computer systems act like living beings by reproducing a small number of aspects of intelligent behavior, such as

□ decision making, diagnostics, planning of systems and situations using expert systems or neural networks;

□ forecasting the development of complex systems using genetic algorithms;

□ studying previous experience (sometimes a single example) and making a decision based on it on the current situation by means of systems based on precedents;

□ recognition of handwriting or graphic image by modeling in neural networks;

□ Establishing causal relationships between datasets using data extraction mechanisms (thus identifying causal relationships in the real world from which the data came from);

□ simulation of the independent behavior of a computer program, implemented using the technology of intelligent agents.

For example, legal information systems can offer appropriate decisions based on examples from past experience using case-based reasoning (such systems will work effectively in a case-based legal system in which decisions are made based on past court decisions in similar cases).

Knowledge-based systems are computer programs designed to reproduce the work of experts in given areas of knowledge.

There are seven main types of knowledge-based systems.

1. Expert systems model the decision-making process inherent in the human brain. They are used to act like human experts, helping managers or specialists make decisions based on expert knowledge. Typical applications of expert systems are planning, scheduling, diagnostics. Although expert systems serve to mimic the human decision-making process, the algorithms and rules that guide decisions are static. This means that the expert system cannot independently modify the logic of its work and is not self-learning.

2. Neural networks simulate the work of the human brain at the biological level (at the level of behavior of individual brain cells, neurons). This means that neural networks have a built-in self-learning capability: they can learn to recognize patterns and then, based on the patterns, recognize patterns. Due to the ability to self-learn, neural networks can be used to some extent to solve forecasting problems based on past experience (for example, to predict the daily distribution of electricity costs in the power system).

3. Case-based systems model the human ability to make decisions by analogy with existing precedents. Such systems are often used in technical support services, where similar problem situations are repeated many times with different clients.

4. Systems based on genetic algorithms, as the name implies, model the process of development of biological organisms at the cellular level. Algorithms of this kind are designed to find one best of many acceptable solutions to problems with a large number of defining parameters. Since a biological organism in the process of development continuously solves the problem of optimizing all its parameters and establishing equilibrium with the environment, systems based on genetic algorithms can be used to solve problems of optimizing complex multifactorial systems and predicting options for their development.

5. Intelligent agents are programs for which the ultimate goal is set, but they can independently choose ways to achieve this goal, flexibly changing the algorithm of their behavior. Most intelligent agents are background programs that do the dirty work and come to the fore only when they need to deliver the result to the user. Examples of intelligent agents include web search engine robots that continuously sift through millions of pages of various sites to keep search engine data up to date.

6. Data mining systems. The term "data mining" is used to describe the process of discovering knowledge by finding previously unknown relationships between data. In databases that store large amounts of data, implicit patterns can be identified that are of practical use. For example, analyzing sales in a supermarket, you can find out that in the summer, at the same time interval, the sale of lemonade, ice cream, and seeds increases sharply. These goods must be placed on the trading floor nearby and ensure their uninterrupted supply. Such measures will significantly increase the sale of these products.

3.4.1. Expert systems

Expert systems must have some specific characteristics: for its work, the expert system uses knowledge that it must be able to store in the knowledge base, extract and process in a certain way to solve the problem. In other words, the expert system should completely replace the human expert in any specific field of activity.


Expert systems are created using programming languages ​​that support rule-based programming. Prolog and Lisp usually act as such languages.

Two requirements are especially important for expert systems:

□ Rather narrow subject area. The narrower the subject area in which the functions of the expert system are implemented, the easier it is to create a set of rules for it and the more effective the issued expert opinion.

□ The possibility of reverse inference (see the example of the production model earlier) allows you to track on the basis of which initial data the expert recommendation was developed.

The main elements of the expert system are (Fig. 3.5):

□ knowledge storage module (knowledge base), in which knowledge is stored in various presentation formats;

□ an inference engine that uses a knowledge base to solve problems;

□ user interface through which the user applies the expert system, formulates the problem and receives its solution;

□ a mechanism for obtaining knowledge, with the help of which knowledge bases for various purposes are formed (for various subject areas).

Rice. 3.5. Elements of an expert system

The advantages of expert systems include:

□ the decision-making process takes place on the basis of predetermined rules;

□ separate use of the knowledge base and the inference engine allows you to modify both separately;

□ the opportunity to find out how the decision was received;

□ speed of obtaining a decision;

□ availability of a standard withdrawal procedure;

□ the ability to repeatedly solve typical problems with the release of human experts from this work;

□ Empowerment of users to the capabilities of experienced experts in a certain field.

Disadvantages of expert systems:

□ focus on a narrow field of knowledge, on solving problems with limited specifics;

□ the need for experts to acquire knowledge;

□ frequent need for an expert for a final opinion;

□ high degree of formalization, inability to use "simple common sense" in reasoning;

□ high cost of development and maintenance;

□ high degree of mechanistic conclusions, lack of “creativity”;

□ the need for constant replenishment of the knowledge base in accordance with changes in the expert area;

□ the complexity of obtaining knowledge from experts and the special requirements for a knowledge engineer (the process of translating an expert's intuition into symbols and expressions of formal logic can take a long time and be very expensive).

Expert systems are used where

□ the problems being solved are so important that the use of an expert system saves time and money, or both;

□ Examination rules are stable and well known (in other words, there are available experts from whom it is easy enough to get knowledge, which makes it possible to build an expert system designed for repeated and long-term use);

□ it is cheaper to create and maintain an expert system than to employ human experts;

□ there are many consumers who need just such an expert system (in this case, once created, an expert system can be repeatedly reproduced and applied by different consumers);

□ it is easier and cheaper to create an expert system than to train staff in a new field of activity;

□ the decision is easily formalized and is made on the basis of stable rules (without introducing intuition or poorly formalized knowledge).

Expert systems differing in cost, power, knowledge base volume and hardware implementation are used to make decisions, obtain additional information, increase reliability or reduce the cost of solving problems in various fields of science, technology, economics, medicine, etc. In fig. 3.6 shows the classification of expert systems according to various criteria.


Expert systems


- Education - Supercomputer - Autonomous

__ On character ____ Hybrid

Chapter 1. Knowledge based systems.

Chapter 2 Introduction to knowledge engineering.

CHAPTER 1. Systems based on knowledge.

^ 1.1. Knowledge and Data

If you have a problem or a task that cannot be solved on your own, you turn to knowledgeable people, or to experts, to those who have KNOWLEDGE. The term "knowledge-based systems" appeared in 1976 simultaneously with the first systems that accumulate the experience and knowledge of experts. These were expert systems MYCIN and DENDRAL for medicine and chemistry. They made a diagnosis of infectious blood diseases and deciphered the data of mass spectrographic analysis.

Expert systems appeared as part of research on artificial intelligence (AI) at a time when this science was going through a serious crisis, and a significant breakthrough was required in the development of practical applications. This breakthrough occurred when researchers replaced the search for a universal algorithm for thinking and solving problems with the idea of ​​modeling the specific knowledge of specialist experts. So in the USA the first commercial knowledge-based systems or expert systems (ES). These systems rightfully became the first intelligent systems, and so far the only criterion for intellectuality is the availability of mechanisms for working with knowledge.

Thus, a new approach to solving problems of artificial intelligence appeared - representation of knowledge.

More details about the history of artificial intelligence can be found in [Pospelov, 1986; Jackson, 2001; Gavrilova and Khoroshevsky, 2001; Andrew, 1985|.

When studying intelligent systems, the question traditionally arises - what is knowledge and how does it differ from ordinary data processed for decades on computers. Several working definitions can be proposed in which this becomes clear.

Definition 1.1

Data- this is information obtained as a result of observations or measurements of individual properties (attributes) characterizing objects, processes and phenomena of the subject area.

Otherwise, the data is specific facts, such as air temperature, building height, employee's last name, website address, etc.

When processed on a computer, the data is transformed, conventionally passing through the following stages:


  • D1 - data as a result of measurements and observations;

  • D2 - data on material media (tables, protocols, directories);

  • D3 - data models (structures) in the form of diagrams, graphs, functions;

  • D4 - data in the computer in the data description language;

  • D5 - databases on machine storage media.
Knowledge is based on data obtained empirically. They are the result of a person's experience and mental activity aimed at generalizing this experience obtained as a result of practical activity.

So, if you arm a person with data that he has a high temperature (the result of observation or measurement), then this fact will not allow him to solve the problem of recovery. And if an experienced doctor shares his knowledge that the temperature can be reduced with antipyretic drugs and plenty of fluids, then this will significantly bring the solution of the problem of recovery closer, although in fact additional data and deeper knowledge are needed.

Definition 1.2

knowledge- these are connections and patterns of the subject area (principles, models, laws) obtained as a result of practical activities and professional experience, which allows specialists to set and solve problems in this area.

When processed on a computer, knowledge is transformed similarly to data:


  • Z1 - knowledge in human memory as a result of the analysis of experience and thinking;

  • Z2 - material carriers of knowledge (special literature, textbooks, teaching aids);

  • Z3 - field of knowledge - a conditional description of the main objects of the subject area, their attributes and patterns connecting them;

  • Z4 - knowledge described in knowledge representation languages ​​(production languages, semantic networks, frames - see below);

  • Z5 - knowledge base on machine storage media. The following definition of knowledge is often used:
Knowledge is well-structured data, or data about data, or metadata.

The key stage in working with knowledge is the formation of a knowledge field (the third stage Z3), this non-trivial task includes the identification and definition of objects and concepts of the subject area, their properties and relationships between them, as well as their presentation in a visual and intuitive form. This term was first introduced during the practical development of the AUTANTEST expert system for psychodiagnostics [Gavrilova, 1984] and is now widely used by ES developers.

Without a thorough study of the knowledge field, there can be no question of creating a knowledge base.

Essential to understanding the nature of knowledge are the ways in which concepts are defined. One of the widely used methods is based on the idea of ​​intension and extension.

Definition 1.3

Concept Intension- this is its definition through correlation with the concept of a higher level of abstraction with an indication of specific properties.

For example, the intension of the concept "FURNITURE": "objects designed to ensure a comfortable stay for a person and clutter up the house."

Definition 1.4

An extension is a definition of a concept by enumerating its specific examples, i.e., concepts of a lower level of abstraction.

Extension of the concept "FURNITURE": "Wardrobe, sofa, table, chair, etc."

Intensions form knowledge about objects, while extensions combine data. Together they form the elements of the knowledge field of a particular subject area.

Databases are used for data storage (they are characterized by a large volume and relatively small unit cost of information), for knowledge storage - knowledge bases (small, but extremely expensive information arrays).

Knowledge base - the basis of any intellectual system, where knowledge is described in a certain language of knowledge representation, close to natural.

Knowledge can be divided into:


  • deep;

  • superficial.
Surface - knowledge about the visible relationships between individual events and facts in the subject area.

deep- abstractions, analogies, diagrams that reflect the structure and nature of the processes occurring in the subject area. This knowledge explains phenomena and can be used to predict the behavior of objects.

Superficial knowledge

"If you enter the correct password, a desktop image will appear on the computer screen."

Deep Knowledge

"Understanding how the operating system works and knowledge at the level of a qualified system administrator".

Modern expert systems work mainly with superficial knowledge. This is due to the fact that at the moment there are no universal methods that allow you to identify the deep structures of knowledge and work with them.

In addition, AI textbooks traditionally divide knowledge into procedural and declarative. Historically, procedural knowledge was primary, i.e. knowledge "dissolved" in algorithms. They managed the data. To change them, it was necessary to change the text of the programs. However, with the development of computer science and software, an increasing part of knowledge was concentrated in data structures (tables, lists, abstract data types), i.e., the role of declarative knowledge increased.

Today, knowledge has acquired a purely declarative form, i.e., knowledge is considered to be sentences written in knowledge representation languages ​​that are close to natural language and understandable to non-specialists.

One of the pioneers of AI, Alan Newell, illustrated the evolution of human-computer communication as a transition from machine codes through symbolic programming languages ​​to knowledge representation languages ​​(Fig. 1.1).

^ 1.2. Knowledge Representation Models

Currently, dozens of models (or languages) of knowledge representation for various subject areas have been developed. Most of them can be reduced to the following classes:


  • production models;

  • semantic networks;

  • frames;

  • formal logical models.
In turn, this set of classes can be divided into two large groups (Fig. 1.2):

  • modular;

  • network.
Modular languages ​​operate on separate (unrelated) elements of knowledge, whether they are rules or axioms of the subject area.

Network languages ​​provide the ability to link these elements or pieces of knowledge through relationships into semantic networks or networks of frames.

Let us consider in more detail the most popular knowledge representation languages ​​(KRPs) among developers.

^ 1.2.1. production model

Rule-based RPLs are the most common and more than 80% of ESs use them.

Definition 1.5

The production or rule-based model allows knowledge to be represented as sentences like "If (condition), then (action)".

Under the "condition" (antecedent) is understood a certain sentence-sample, according to which the search is carried out in the knowledge base, and under the "action" (consequent) - the actions performed upon the successful outcome of the search (they can be intermediate, acting further as conditions, and terminal or target, terminating the system).

Most often, the conclusion on such a knowledge base is straight(from data to target search) or back(from the purpose for its confirmation - to the data). Data is the initial facts stored in the fact base, on the basis of which the inference engine or rule interpreter is launched, sorting through the rules from the production knowledge base (see section 1.3).

The production model is so often used in industrial expert systems because it attracts developers with its clarity, high modularity, ease of additions and changes, and the simplicity of the inference mechanism.

There are a large number of software tools that implement the production approach (for example, high-level languages ​​CLIPS and OPS 5; "shells" or "empty" ESs - EXSYS Professional and Carra, instrumental systems KEE, ARTS, PIES [Khoroshevsky, 1993]), as well as industrial ES based on it (for example, ES created by means of G2 [Popov, 1996]). See [Popov, Fominykh et al., 1996; Khoroshevsky, 1993; Gavrilova and Khoroshevsky, 2001; Durkin, 1998].

^ 1.2.2 Semantic networks

Term "semantic" means"semantic", and semantics itself is a science that establishes relationships between symbols and the objects they designate, that is, a science that determines the meaning of signs. The semantic network model was proposed by the American psychologist Quillian. Its main advantage is that it corresponds more than others to modern ideas about the organization of human long-term memory [Scragg, 1983].

Definition 1.6

Semantic web is a directed graph whose vertices are concepts and the arcs are relationships between them.

Concepts are usually abstract or concrete objects, and relations these are relationships of the type: "this" ("AKO - A-Kind-Of, "is" or "class element"), "has part", "belongs", "likes".

We can offer several classifications of semantic networks related to the types of relationships between concepts.

By the number of relationship types:


  • homogeneous (with a single type of relationship);

  • heterogeneous (with different types of relationships).
-By type of relationship:

  • binary (in which relations connect two objects);
N-ary (in which there are special relations connecting more than two concepts).

The following relationships are most often used in semantic networks:


  • class element (rose this is flower);

  • attribute relationships / have a property (memory has the property- volume);

  • meaning properties (color has the meaning - yellow);

  • class element example (rose, for example - tea room);

  • connection type "part-whole"(bike includes steering wheel);

  • functional connections (usually defined by the verbs "produces", "influences" ...);

  • quantitative (greater than, less than, equal to...);

  • spatial (far from, close to, behind, under, over ...);

  • temporary (earlier, later, during ...);

  • logical connections (and, or, not) and etc.
The minimum composition of relations in the semantic network is as follows:

  • class element or ACO;

  • attributive links / have a property;

  • property value.
The disadvantage of this model is the complexity of organizing the procedure for organizing inference on the semantic network.

This problem is reduced to the non-trivial task of finding a network fragment that corresponds to some subnet that reflects the query to the database.

On fig. 1.3 shows an example of a semantic web. The concepts of "man", "comrade Smirnov", "Audi A4", "car", "mode of transport" and "engine" serve as peaks here.

Rice. 1.3. Semantic web

For the implementation of semantic networks, there are special network languages, for example, NET [Tseytin, 1985], the language for implementing SIMER + MIR systems [Osipov, 1997], etc. Expert systems that use semantic networks as a knowledge representation language are widely known - PROSPECTOR, CASNET, TORUS [Hayes-Roth et al., 1987; Durkin, 1998].

1.2.3. Frames

Term frame(from English. frame-"skeleton" or "frame") was proposed by Marvin Minsky [Minsky, 1979], one of the pioneers of AI, in the 70s to refer to the knowledge structure for the perception of spatial scenes. This model, like the semantic network, has a deep psychological basis.

Definition 1.7

A frame is an abstract image for representing a stereotype of an object, concept or situation.

It is intuitively clear that an abstract image is understood as some generalized and simplified model or structure. For example, pronouncing the word "room" aloud gives the listeners the image of a room: "a living room with four walls, a floor, a ceiling, windows and a door, with an area of ​​6-20 m2". Nothing can be removed from this description (for example, removing the windows, we will get a closet, not a room), but there are "holes" in it or "slots" - these are empty values ​​of some attributes - for example, the number of windows, wall color, ceiling height, floor covering, etc.

In frame theory, such an image of a room is called a room frame. A frame is also called a formalized model for displaying an image.

Distinguish sample frames or prototypes, stored in the knowledge base, and instance frames, which are created to display real actual situations based on incoming data. The frame model is quite universal, since it allows you to display all the diversity of knowledge about the world through:


  • frames-structures, used to designate objects and concepts (loan, pledge, promissory note);

  • role frames(manager, cashier, client);

  • script frames(bankruptcy, meeting of shareholders, celebration of name days);

  • situation frames(alarm, accident, operating mode of the device), etc.
Traditionally, a frame's structure can be represented as a list of properties:

^ (FRAME NAME:

(1st slot name: 1st slot value),

(2nd slot name: 2nd slot value),

…………….

(Nth slot name: Nth slot value)).

The same entry can be presented in the form of a table (see Table 1.1), supplementing it with two columns.

Table 1.1. frame structure


frame name

Slot name

Slot value

How to get the value

Attached procedure

In the table, additional columns (3rd and 4th) are intended to describe how a slot receives its value and can be attached to one or another slot of special procedures, which is allowed in frame theory. The value of a slot can be the name of another frame, which is how networks of frames are formed.

There are several ways for a slot to receive values ​​in an instance frame:


  • by default from the reference frame (Default value);

  • through the inheritance of properties from the frame specified in the AKO slot;

  • according to the formula specified in the slot;

  • through an attached procedure;

  • explicitly from the dialogue with the user;

  • from the database.
The most important property of the theory of frames is borrowing from the theory of semantic networks - the so-called inheritance of properties. In both frames and semantic networks, inheritance occurs along AKO links (A-Kind-Of = this). The ACO slot points to a frame of a higher level of the hierarchy, from where the values ​​of similar slots are implicitly inherited, i.e. transferred.

For example, in the network of frames in Fig. 1.4 the concept of "student" inherits the properties of the frames "child" and "person", which are at a higher level of the hierarchy. To the question "Do students like sweets?" the answer is "yes", since all children have this property, which is indicated in the "child" frame. Property inheritance can be partial: age for students is not inherited from the "child" frame, since it is explicitly specified in its own frame.


Rice. 1.4. Frame network

The main advantage of frames as a knowledge representation model is that it reflects the conceptual basis of the organization of human memory [Shenk, Hunter, 1987], as well as its flexibility and visibility.

Special knowledge representation languages ​​in frame networks FRL (Frame Representation Language) [Baydun, Bunin, 1990], KRL (Knowledge Representation Language) [Waterman, 1989], frame "shell" Kappa [Strelnikov, Borisov, 1997] and other software tools allow effectively build industrial power plants. Widely known are such frame-oriented expert systems as ANALYST, MODIS, TRISTAN, ALTERID [Kovrigin, Perfilyev, 1988; Nikolov, 1988; Sisodia, Warkentin, 1992].

^ 1.2.4. Formal Logic Models

Traditionally, in knowledge representation, there are formal logical models based on the classical calculus of predicates of the 1st order, when the subject area or task is described as a set of axioms. In reality, the first-order predicate calculus is practically not used in industrial expert systems. This logical model is applicable mainly in research "toy" systems, since it imposes very high requirements and restrictions on the subject area. In industrial expert systems, its various modifications and extensions are used, the presentation of which is beyond the scope of this book. See [Adamenko, Kuchukov, 2003].

^ 1.3. Conclusion on knowledge

As already stated in sec. 1.2 The most widely used production model of knowledge representation. When it is used, the knowledge base consists of a set of rules, and the program that manages the enumeration of rules is called output machine.

Definition 1.8

output machine(rules interpreter) is a program that simulates the logical conclusion of an expert using this production knowledge base to interpret the data entered into the system.

It usually performs two functions:

Viewing existing data (facts) from working memory (database) and rules from the knowledge base and adding (as far as possible) new facts to working memory;

Determine the order in which rules are viewed and applied. This mechanism controls the consultation process, storing information about the conclusions received for the user, and requests information from the user when there is not enough data in the working memory to trigger the next rule [Osuga, Saeki, 1990].

In the vast majority of knowledge-based systems, the inference mechanism is a small program and includes two components - one implements the actual inference, the other controls this process.

Action output component based on the application of a rule called modus ponens:"If statement A is known to be true, and there exists a rule of the form IF A THEN B, then statement B is also true."

Thus, the rules work when there are facts that satisfy their left side: if the premise is true, then the conclusion must also be true.

The output component must function even if there is a lack of information. The resulting solution may not be exact, but the system should not stop because any part of the input information is missing.

^ control component determines the order in which rules are applied and performs four functions:


  1. Matching- the sample rule is matched against the available facts.

  2. Choice - if in a particular situation several rules can be applied at once, then one of them is selected that is most suitable according to a given criterion (conflict resolution).

  3. Operation - if the pattern of the rule, when compared, coincided with any facts from the working memory, then the rule is triggered.

  4. Action - working memory is modified by adding the conclusion of the triggered rule to it. If the right side of the rule contains an indication of any action, then it is performed (as, for example, in information security systems).
The production interpreter works cyclically. In each cycle, it looks through all the rules to identify those whose premises match the currently known facts from working memory. After the selection, the rule is triggered, its conclusion is entered into working memory, and then the cycle is repeated from the beginning.

Only one rule can work in one cycle. If several rules are successfully compared with facts, then the interpreter selects, according to a certain criterion, the only rule that works in this cycle. The cycle of the interpreter is schematically shown in fig. 1.5.

Information from working memory is sequentially matched against the rule submissions to determine a successful match. The set of selected rules is the so-called conflict set. To resolve the conflict, the interpreter has a criterion by which it selects a single rule, after which it works. This is expressed in entering the facts that form the conclusion of the rule into the working