METAKNOWLEDGE ============= Introduction ------------ Until now, all of the systems we have considered have had basically two levels: (1) an object knowledge level, normally represented as data structures which are either passive (such as facts in WM or a semantic network) or active (such as rules or ATN's), and (2) the inference engine itself, normally an opaque (to the program itself, not the developer!) collection of routines in a language such as LISP or POP11. The inference engine might embody a particular conflict resolution strategy, search algorithm or planning technique. In this scheme, the active knowledge is execute-by-interpretation only, and cannot be inspected by any system component other than the inference engine itself. Furthermore, it cannot be modified while it is running. Neither can the inference engine itself be modified without direct programmer intervention. This has the effect that the system would not be able to change its search strategy, for example. There are cases where more flexibility in runtime behaviour of an AI system is required, and this is where metaknowledge can be exploited. Metaknowledge adds an extra level, between the object knowledge and the inference engine, and enables an AI system to reason about its own reasoning process. Metaknowledge might be used for conflict resolution, enabling a system to reach its goal quicker. It could also be used to select the most suitable search strategy for a particular state space, or to select a planning strategy, or even to guide the knowledge acquisition process. Metaknowledge not only makes the runtime behaviour of systems more flexible; it also can allow simplification of their algorithmic structure. ---------- Metafacts --------- Suppose we have a particular search space, and we wish to find a path from a start node to a goal node. There are several search algorithms which could be used. If we know that the search space is a tree rather than a graph, it allows us to make simplifications to the search algorithm that we use. If we know that the search space is bushier forwards than it is backwards (i.e., on average, there are more arcs leaving a node than arriving at one), we could deduce that it would probably be quicker to search backwards from the goal to the start than search forwards. The facts the search space is a tree the search space is bushier forwards are metafacts. Just as facts can be tested in the conditions of object rules, and modified by their actions, so metafacts can be tested and modified by metarules. Other examples of metafacts are knowing that a particular value is actually a default, knowing how objects inherit attributes and values through hierarchies, and knowing the inverse of a slot. Lastly, it is often important to know where a particular piece of object level knowledge (rule or fact) came from: was it added by an expert, a novice, or created by the system itself? This will determine the reliability of the knowledge. ---------- Metarules --------- Metarules can refer in their conditions to facts (including metafacts) and rules (including other metarules). They can check whether a rule contains a particular clause in its conditions or actions. They can also check the conflict set for a particular rule, or check the size of the conflict set. Like object rules, the conditions of forward and backward chaining metarules have the same syntax. Forward chaining metarules may fire rules, add, delete or modify rules, or reorder the rules in the rulebase or conflict set. Metarules may have their own working memory, but they should not normally modify the contents of the WM used by the object rules. Metarules can be used to partition a knowledge base, thus enabling a system to concentrate on the knowledge most relevant to the situation at hand. A special case of this is the separation of a rule base into relevant and less relevant rules. Here are two examples from the MYCIN system which are used to guide backward chaining: IF the culture was not obtained from a sterile source AND there are rules which mention in their premise a previous organism which may be the same as the current organism THEN it is definite that each of them is not going to be useful. IF the infection is a pelvic abscess AND there are rules which mention in their premise enterobacteriaceae AND there are rules which mention in their premise gram positive rods THEN there is suggestive evidence that the former should be done before the latter. Learning involves learning new rules and modifying existing rules. This requires explicit access to the contents of existing rules, and knowledge of their effects when the system is running. An example of a system which uses metarules for learning is EURISKO, though its developer (Lenat) does not distinguish them from object level rules. Two examples from EURISKO, which work on object level rules (Lenat calls them heuristics) and also maths concepts are IF the results of performing f have been numerous and worthless THEN lower the expected worth of f. IF the results of performing f are only occasionally useful THEN consider creating new specializations of f. Unfortunately for Lenat, EURISKO itself decided to distinguish metarules from object level rules. ---------- Metaplanning ------------ Metaplanning is reasoning about the planning process itself. Wilensky considers four metaplanning "themes": (1) Don't waste resources. (2) Achieve as many goals as possible. (3) Maximize the value of the goals achieved. (4) Avoid impossible goals. Suppose I wish to buy a newspaper. It is raining heavily. There are two goals: (1) To have a newspaper. (2) To keep dry. I should try to achieve both goals if they are possible. I could use my standard plan: use my umbrella. If I have left my umbrella at work, this plan is unusable. However, it makes no sense to create a subgoal of having an umbrella (with the standard plan of buying one), as this would result in me either getting wet, or setting up having an umbrella as a subgoal in order to execute the plan of buying an umbrella without getting wet. This is an impossible goal because it is circular, and so should be avoided. I could use an alternative plan: call a taxi. Suppose my telephone is out of order. Then even this plan will fail. I could then wait until the rain stopped before buying the newspaper. If the rain was on for the day, this goal would fail. Worse still, I couldn't even phone anyone to ask them to keep a copy of the paper. In the end, I might have to abandon one of the two initial goals in order to achieve the other. If the most important goal is keeping dry, I could substitute the goal of listening to the news on the radio for the original goal of having a newspaper. This might make sense if the goal of having a newspaper was to know what the news was. In this example, we have seen the use of the metaplans Use normal plan (using umbrella) Try alternative plan (ordering a taxi) Wait for circumstances to change (wait for rain to stop) Abandon goal and substitute alternative (listen to radio) Metaplanning also can consider things such as resource limitations (how and why space, time and money are used up are quite different), and the action of external agents in creating and resolving conflicts. ----------