• No results found

Goal  Context | Body

5.3 Case-Based Reasoning

The second major reasoning subsystem of MRCHIPS is the Case-Based Reasoning (CBR) engine. Like BDI, case-based reasoning is a method of problem solving inspired from a theoretical model of how humans reason. It is the CBR module of the agent that is concerned with the domain

68

knowledge about the Python language, novice errors and where identification of anomalies with novice errors is done. In general symbolic reasoning mechanisms can be classified into two general categories: deductive reasoning and inductive reasoning approaches. Although there are many varied types of deductive reasoning the most established method is typified by rule-based reasoning as used in production systems. A rule-based reasoning system uses existing domain knowledge in the form of rules to make inferences about new problems and is considered an effective reasoning mechanism when the theory of the underlying problem domain can be well defined and easily encoded into rules. Deductive reasoning in a rule-based system works by progressively rewriting the problem state in working memory so it more closely resembles the solution space (Jackson 1999). The major weakness with using rules is the relative expense of the knowledge elicitation process for developing the rule-base.

One alternative to rule-based reasoning is Case-based reasoning, which records knowledge in terms of entire diagnostic situations and reasons inductively to draw inferences for new cases based on the experiences learned from previous encountered cases – if the experience is not quite sufficient for the new problem then they are often able to make adaptations to likely strategies to achieve their goals. Case-based reasoning attempts to solve problems by making analogous links to similar problems that may have been encountered before. In CBR knowledge is represented in schemas of information containing attributes and values known as cases and reasoning is performed by comparing cases against each other to find similar historical episodes. CBR systems are concerned with finding the best match to a solution rather than an exact match and cases are selected by searching for an appropriate match to a current problem. Once one or more candidate cases have been selected various attributes of the case may be adapted to make it more appropriate to the problem being addressed. However rather than being a single solution CBR describes a family of information processing techniques that attempt to solve new problems from prior experience rather than first principles.

69

A CBR system involves storing and recalling previous examples of similar problems. New cases (that have proved to be successful) may be stored and can be used for solving later problems; this is in effect a form of machine learning. The primary reason for using CBR is that it appears to be particularly well suited to representing the knowledge about the learner errors; the literature describes a number of typical characteristics for suitable problems for case-based systems:

a) Problems for which the domain knowledge is broad but shallow; b) Where the primary source of information is based on experience

rather than theory;

c) For problems where the requirement is for the best available solution, rather than a guaranteed exact solution;

d) For domains where solutions are reusable, rather than unique to each situation;

e) The search space for cases has a mechanism that draws similar cases together;

f) The similarity metric (for the domain) exploits this similarity.

Case-based problem solving is acknowledged to be an attractive alternative to rule-based solutions if the knowledge available is already organised in cases (Tanimoto 1995) and where there does not exist any accepted set theory or set of rules that can be used to solve new problems directly.

Irrespective of the details of implementation a case-based reasoning system consists of two components: a library of prior/historical cases, which forms a knowledge base – the case-base, and a reasoning mechanism to select and apply the most applicable case. Cases are defined as being a complete description of a diagnostic situation; they contain a description of the symptoms of the case, information about the failure or cause of the failure and a strategy to repair the case. The reasoning mechanism consists of a means of using the key elements of the present problem to find and retrieve the most similar case (or cases) from the case library. This is called indexing, a method for modifying the

70

selected solution to make it applicable to the current problem and finally a mechanism for storing the modified case in the case-base.

Aamodt and Plaza defined the reasoning mechanism in CBR as a four major step process called the four REs (Aamodt & Plaza 1994), as illustrated in figure 5.3. They are:

1. RETRIEVE the most similar case(s);

2. REUSE the case(s) to attempt to solve the problem; 3. REVISE the proposed solution if necessary; and 4. RETAIN the new solution as a part of a new case.

The retrieval process is concerned with using the features of a case describing the current problem to help select the best matching previous case. In retrieval the case engine identifies features of cases to make a comparison, matches features against other cases and selects the closest match.

It is likely that the problem case and the selected case still contains differences. The reuse process is concerned with making a copy of the selected case and adapting to apply to the current problem. Different strategies may be used to transform the selected case depending on the requirements of the CBR. A domain-dependent model such as rule-base

71

is used to govern the transformation of the solution into a new case. The effect of the adaptation process may be to adjust parameters values in the solution, to reorder the sequence of operators or insertion or removal of operators.

After reuse the case is applied to the domain but there are circumstances where the selected solution fails, so CBR provides a mechanism to assess the effectiveness of the new case and revise it if necessary. Both the assessment of the solution and the revision itself may require the intervention of a human operator or the use of some external reasoning system. The use of revision allows CBR to make use of failure as a learning mechanism.

The final process of the reasoning cycle allows the CBR to automatically add to its knowledge base by retaining the new case. One of the major tasks of the retain process is to ensure the new case is indexed on features that allow the case to be selected should the appropriate problem features arise. Depending on the implementation the whole of a new case may be retained or only those parts that differ as a result of reuse and revision. It may be required to retain even those cases that failed after revision as it can be a useful indication to situations that have no solutions.

The earliest development of CBR was credited to Roger Schank and associates at Yale University in the 1980s, it was based on the proposition that when faced with a new situation humans are able to plan and make decisions based on lessons from prior experience rather than the first principles as modelled in the knowledge-based technology of the time. To model this type of reasoning they developed a frame-like knowledge representation scheme called a Memory Organisation Package (MOP), where each MOP was used to represent a concept, an entire case or some facet of a case. The MOPs could be as simple as a single value but usually represented more complex values such as a sequence of events or a relationship. The MOPs are linked together to form a network of abstract and instance data to represent the case-base. The

72

use of MOPs as a knowledge representation scheme has the advantage that a different granularity of features of a case may be represented. The features may be easily manipulated for revising cases and MOPs may be inherited from the memory efficiency of storage and searching (Riesbeck & Schank 1989). Although efficient the difficulty with working with MOPS is that individual cases are distributed across many frames and it is not always intuitive how the granularity and hierarchy of each MOP should be representation and organised. The first CBR system based on Schank’s work was a question-answering system with knowledge about diplomatic missions called CYRUS and developed by Janet Kolodner (Kolodner 1983). A number of other prototype CBR systems were developed at that time, such as CHEF, which demonstrates case-based planning in the cookery domain; JULIA, a case-based designer; CASEY, a hybrid CBR diagnostic program, using case-based and model-based reasoning; SWALE, a case-based explainer for anomalies in stories; HYPO, which provides CBR in the legal domain; and CLAVIER, a CBR used to layout composite components in an autoclave. Other knowledge representation schemes such as a flat file, relational databases and program objects have also been used to represent cases (Chi & Kiang 1991). Prodigy/Analogy is a CBR planner that, like CHEF, integrates rule-based reasoning to allow multiple strategies to be used when solving problems (Veloso 1994). At the core of Prodigy/Analogy is a domain-independent, non-linear planner that uses means-ends analysis and backward chaining to find solutions. The amount of searching performed by the planner is reduced by the CBR that records decisions, their contexts and outcomes at given points during planning to form cases. When similar circumstances reoccur the cases may be recalled to save the amount of planning required from first principles.