Expert Systems A medical expert system has multiple rule sets. One rule set is used by a forward chain mechanism to identify a set of possible medical disorders for a given patient by asking some general questions about their symptoms. The other rule sets are used by backward chainers to support or reject a diagnosis suggested by the forward chainer. (a) Explain what is meant by backward and forward chaining. How suitable is the use of the two chaining mechanisms in the above example? [8 marks] (b) Draw a diagram showing the architecture of an expert system. Explain the role of conflict resolution and outline typical approaches taken to achieve it. [8 marks] (c) Why is the use of certainty factors necessary in a medical expert system? Explain how certainty factors could be used this system. [6 marks] NLP (a) Part of a dictionary for a natural language parser is defined as follows: the old old man man boats <category> <category> <category> <number> <category> <number> <category> <number> <category> <number> determiner adjective noun plural noun singular verb plural noun plural Describe the mechanism of a chart parser and explain how a chart parser would process the sentence "the old man the boats". Use the dictionary definitions given and describe the grammar rules necessary to correctly parse the sentence and also accept "the old man" as a noun phrase. [10 marks] (b) Extend your grammar rules so they capture the following cases for the example sentence: actor( sentence ) = old action( sentence ) = man object( sentence ) = boats [8 marks] (c) Consider the following two sentences: (i) the boy kicked the ball under the tree (ii) the boy kicked the wall under the tree The implication in sentence (i) is that the ball moved, but in (ii) the wall did not. How can the use of case frames guide a system to select the correct meaning for each sentence? [7 marks] NLP (a) Write the grammar rules and dictionary definitions needed to parse the following sentences: the boy picked the flowers the boy picked the flowers under the tree [7 marks] (b) How can the grammar rules be extended so the parser can produce action/actor/object case frames for sentences like "the boy picked the flowers"? [6 marks] (c) Suggest a suitable case frame for the sentence: the boy kicked the ball over the fence Describe the changes that must be made to the grammar if this case frame is to be produced. [6 marks] (d) Consider the following two sentences: (i) the boy kicked the ball under the tree (ii) the boy kicked the wall under the tree The implication in sentence (i) is that the ball moved, but in (ii) the wall did not. How can the use of case frames guide a system to select the correct meaning for each sentence? [6 marks] Evol (a) Describe the main components of an evolutionary learning system and explain how such a system can learn a solution for a task. [8 marks] (b) Explain how selection takes place and describe the roles of the genetic operators 'crossover' and 'mutation'. Show how these operators could work in a system which uses a binary genetic alphabet. [10 marks] (c) Why do some systems evolve their testing strategy in parallel with their solution strategy? How can this be done? [7 marks] Search This question uses the farmer, dog, chicken, corn (FDCC) problem which has been introduced to you in lectures during your course. In this problem the farmer has to carry a dog, a chicken and some corn across a river using a boat which can only hold the farmer and one other object. This problem states that if the dog and chicken are left alone the dog will attack the chicken and if the chicken and the corn are left alone the chicken will eat the corn. (a) The problem can be solved using a search algorithm. Outline what is meant by search and explain how the farmer, dog, chicken, corn problem can be solved by a search routine. [5 Marks] (b) Show how FDCC problem states can be represented by a Lisp data structure and, using the FDCC problem as an example, explain the purpose of a legal move generator. [4 Marks] (c) Write a legal move generator for the FDCC problem using a series Lisp-matcher defmatch statements. [4 Marks] (d) Describe how search is achieved using pseudo code or an algorithm to support your answer. Explain your pseudo code/algorithm using a suitable example (the farmer, dog, chicken problem could be suitable). [11 marks] (e) What is the difference between game playing and other search problems? Describe the minimax procedure and demonstrate how it works with an example. What is the purpose of alpha-beta pruning? Explain how alpha-beta pruning works using a suitable example. [12 marks] Search (a) Briefly explain what is meant by search and write an algorithm for a breadth first search. [7 marks] (b) A legal move generator takes some state S as its input, it returns (as its output) all successor states of S and the cost associated with getting from S to each successor state. How can this cost information be used to develop a search strategy which will find the 'cheapest' route between start and goal states. A function takes two states as its arguments and returns an estimate of the cost associated with reaching one state from the other. How can this function be used to improve the efficiency of the search? [6 marks] (c) Explain briefly how game playing differs from other search problems and comment on the role of a static evaluation function. 2 17 4 3 -6 15 9 The tree shown represents a game tree for a two player game. The numbers shown at leaf nodes indicate the values returned by the static evaluation function for those nodes. If the first player is the maximising player, explain which move is recommended for this player by a minimaxer. Which nodes do not need to be explored if alpha-beta pruning is used? Draw a game tree of depth 3, with uniform branching factor 3. Show which nodes have to be explored in the best case with alpha-beta pruning. Which nodes have to be explored in the worst case? [9 marks] (d) Minimax is usually described as searching a tree. It may be better to search a graph and, when a position is generated, check to see if that position has been generated and evaluated before. Give details of the circumstances that would make this a good idea. [3 marks] Ex Sys A small chemical plant is monitored by an expert system which advises a human operator on the rate at which to supply a gas and a cooling liquid to the plant. The expert system receives data, in the form of facts, from various temperature sensors. Actual temperature readings are not used in these facts, instead temperatures are represented by a number between 1 and 100 (1 very cold, 100 very hot). The expert system is activated every two minutes when a new set of facts is received from the temperature sensors. When activated, the system runs a backward chainer to see if an alarm state exists (eg: "plant overheating"). The system then runs a forward chainer to produce new advice (if any) for the operator. Suggest a structure for the rules used by the expert system and explain what is meant by backward and forward chaining. How suitable is the use of the two chaining mechanisms in the above example? The system uses certainty factors in its reasoning. Explain how certainty factors can be implemented and suggest a way to deal with the temperature values. What is meant by 'conflict resolution'? Outline typical approaches to conflict resolution. Search (a) Briefly explain what is meant by search and write an algorithm for a breadth first search. [5 marks] (b) A legal move generator takes some state S as its input, it returns (as its output) all successor states of S and the cost associated with getting from S to each successor state. How can this cost information be used to develop a search strategy which will find the 'cheapest' route between start and goal states. [3 marks] (c) A function takes two states as its arguments and returns an estimate of the cost associated with reaching one state from the other. How can this function be used to improve the efficiency of the search you described in part (b)? [3 marks] KnRep (a) Explain how semantic nets can be used to describe the relationship between classes and instances of object. Show how default values are held and how demons can be used to produce information as it is required. Show how semantic nets can be held as association lists and explain how inheritance can take place when using an association list as a datastructure. [10 marks] (b) Explain the process of generalisation and comment on the results of using such a process. [5 marks] (c) Semantic nets can be held as sets of (slot-name object-name value) triples, eg: (color sky blue). Using this notation outline how semantic nets can be compared and explain how this mechanism underpins the process of 'learning by near-miss' (you should include a description of the learning process in your answer). [10 marks] KnRep (a) Describe the structures and procedures used in a frame based system for knowledge representation, include in your answer details of the typical structure of slots and describe the capabilities of such a system. Give an example of a frame which describes a class of object and another frame for an instance of that class. [10 marks] (b) Conceptual Dependency is a representation suitable for describing the kind of events contained in natural language sentences. Give an outline of Conceptual Dependency and explain the type of inferencing which typically occurs with it. [8 marks] (c) Describe a representation suitable for capturing stereotypical situations and the event sequences associated with them. What inferencing capability does this representation facilitate. [7 marks] KnRep (a) Briefly describe the structure of a semantic net and draw a fragment of a semantic net as an example. Explain what is meant by inheritance and how default values are represented. Show how the semantic net may be held in the form of a list. Write an inheritance function in Lisp or similar pseudo code (the function should take an object name and a slot name as arguments). Explain what is meant by a demon and how demons could be used with your semantic net structure and inheritance routine. [15 marks] (b) Semantic net systems have been criticised for being too unstructured. Explain how some frame based systems can overcome this (comment on both frames and slots in your answer). [10 marks] Planning A search routine is required to plan a sequence of actions for a robot arm. The primitive actions for the robot arm are: pickup, drop and move.The environment the robot arm works in is described as a set of lists. For example: [ at robot p1 ] [ at object1 p2 ] [ isa position p1 ] [ isa position p2 ] [ isa position p3 ] [ is_manipulable object1 ] (a) Explain how the primitive actions pickup, drop and move can be described in terms of their preconditions and effects. The statements you write should be of a syntax that can be used by the Lisp pattern matcher. Briefly outline how the Lisp pattern matcher deals with any special symbols you use. [9 marks] (b) How can these descriptions be used in a simple breadth first search mechanism to plan a sequence of actions. [6 marks] (c) The micro-world is defined as having 100 different locations that the robot arm can move to. Why is a breadth first search unsuitable in this case? Explain how a function giving a description of the difference between two states can be used to develop a more efficient search for this type of problem. [10 marks] Planning A robot arm operates in a world of blocks & pyramids. At a given time the state of this world can be drawn as follows: B A position: 1 2 C 3 4 5 D 6 7 8 (a) Write a data structure that represents this state. Block B is to be moved. What are the legal successor states that result from moving B? [6 marks] (b) Describe the operator move( object-name, destination ) in terms of its preconditions and its state transformation effects. For example move( "B", "A" ) would transform the state (above) into the new state represented graphically as: B A position: 1 2 C 3 4 5 D 6 7 8 [6 marks] (c) A robot arm is capable of holding a single object. It can perform primitive the actions: GRASP, DROP and MOVE-ARM. Explain how a planning system which uses means-end analysis can be used to plan a sequence of actions for the robot arm. [13 marks] NLP Outline the use of the "?" and "*" prefix tags used in grammar rules with Lkit. [2] Examine the grammar below then use "?" and "*" tags to simplify it. [4] NP -> Det NG NP -> NG NG -> Adj NG NG -> Noun NLP The grammar below is adequate for parsing sentences like "the cat chased the mouse". Draw a diagram (parse tree) showing how this sentence is deconstructed with this grammar. [2] S -> NP VP NP -> Det Noun VP -> Verb NP Extend the grammar above to deal with sentences like... (i) the cat chased the mouse in the garden (ii) the cat chased the mouse into the garden [4] NLP What is mean by Combinatorial Semantics? [1] How are rules for semantic processing handled in Lkit? [2] Extend the grammar below by writing semantic rules to produce a simple actor/action/object case-frame from sentences like "the dog chased the cat". [5] S -> NP VP NP -> Det Noun VP -> Verb NP Write Lkit grammar rules to build actor/action/object case-frame from simple passive sentences like "the cat was chased by the dog". [6] NLP One approach to analysing the semantics of natural language statements is to build caseframes. Draw a diagram showing the structure of a case-frame and outline the use of the following cases... 1. source 2. destination 3. beneficiary 4. instrument [6] Stereotypical case-frames can be associated with verb forms to describe the meaning of verbs. Consider the verb to throw and write a stereotypical case-frame suitable for capturing its meaning. [4] One meaning of the verb to give is to "give ownership of an object". Use a graph-diagram or a case-frame to describe the semantics for this meaning of give. [4] An inference rule implies that "when A throws X to B, X physically moves from A to B". Write this inference rule (you may use pseudo-code or a diagrammatic form). [4] Evol Briefly describe the relationship between DNA and its phenotypes in biological systems and explain how evolutionary adaptation takes place in these systems. [6] An evolutionary learning system uses a binary genome and a phenome based on neural networks. Outline the relationship between DNA and its phenotypes in biological systems and describe the similarities & differences between evolving computational systems and analogous biological systems. [4] Explain how the following may be achieved with a computational system... 1. parent selection 2. mutation 3. crossover 4. genome to phenome translation Evol A criticism of evolutionary learning systems suggests that if enough is known about the problem domain to specify phenotype structures and develop suites of self-generating test functions then enough is known to write a solution for the problem domain using more conventional techniques. Present both sides of this argument. [6] Neural Networks are themselves systems that learn. How are they used within an evolutionary framework and what are the benefits of using Neural Networks with evolutionary learning? [6] Tools Many AI applications are based on simple data structures. Outline the structure of tuples and show how a semantic net can be represented by a set of tuples. Your answer should include a sketch of a simple semantic network with at least one inheritance link. A forward chain inference engine uses facts encoded as tuples and rules of the form... antecedents => consequents Domain knowledge has not been provided in the form of rules but has been provided as a semantic network encoded as tuples instead. Use an example to explain how this semantic network can be processed to derive rules for the forward chainer (a suitable example could be a rule to discriminate between a motorbike and a bicycle). [6] Near Miss Learning by near-miss is a mechanism which refines a knowledge structure when it receives examples of a specified concept. Outline the process of learning by near-miss explaining how knowledge structures are affected by both positive and negative examples (a good answer will provide a high level algorithm and also a detailed explanation). [7] A system is built which uses tuples as its knowledge structure. Using Lisp or similar pseudo code, explain the steps required to compare a negative example to a working model and then modify the working model. [6] Outline how positive examples generalise a working model and show how this can be encoded in tuples. [3] Games What is the purpose of a static evaluation function? Why are they necessary in game playing? [4] Game playing involves adversaries with conflicting goals, how does the minimax algorithm deal with this? [4] A B 5 C 17 -3 24 Consider the game tree above. The numbers at the base of the tree show the results returned by the static evaluation function which is called at the cut-off depth of 2. The minimax function is called to recommend which move the maximiser should make from game state A. Explain which move the minimax function will recommend. [4] Minimax is a computationally efficient algorithm but static evaluation is often costly. How does alpha-beta pruning help? Provide a detailed explanation of alpha-beta pruning in your answer. [5] Various other techniques are used to improve the efficiency or performance of game playing. Compare any two other techniques you know. [6] Some games require a different strategy at different phases of a game – how can this be addressed by game playing systems? [6] A game using dice (backgammon for example) introduces a level of chance not present in games which do not use dice. How does this effect the design of game playing systems? [6] Games You intend to construct a game playing system to play connect-4. Someone suggests that noughts & crosses is a similar game so you should work on a system for noughts & crosses then extend it for connect-4. How sensible is this advice? How different in style are the solutions for these two games? [6] You decide to use minimax, alpha-beta pruning and a static evaluation function. Which of these will have most impact on the performance of your games system? Why? [3] Explain in detail how minimax and alpha-beta pruning work. [8] Someone suggests that you use library moves for the first few connect-4 moves, is this a good idea? Explain your answer. [5] Search You are using a breadth-first search to plan a route between towns. Is it better to use breathfirst or depth-first search in this situation? Explain your answer. You decide to use an algorithm based on cost (measured in distance). Write an algorithm for a breadth-first search and explain how it can be modified to describe a search mechanism which considers cost/distance. Search A micro-world describes rooms in a house (hall, kitchen, etc). Rooms contain various objects and are connected by doors. Doors have different states like locked/unlocked, closed/open. Locked doors can only be unlocked with a suitable key. A robot inhabits the micro-world. World states are represented as sets of tuples. Write state changing operator definitions for the robot which allows it to... (i) unlock a door (ii) open a door (iii) move through a door [9] Explain (in detail) how means-end analysis can use these operator definitions to plan sequences of actions for the robot. How does the performance of means-end analysis compare with the performance of a breadth-first search? Explain your answer. MEA A small storage depot uses a remote-control fork-lift truck (T) which can pick up and move boxes. The state of the depot is described by a set of tuples like... (at T P3) (location P3 15 7) (at Box5 P7) (location P7 8 14) The location tuples describe the position of place-markers using a co-ordinate system measured in meters. So the tuples... (at Box5 P7) (location P7 8 14) implies that Box5 is 8 meters south and 14 meters east of the depot entrance. To automate the depot further the fork-lift truck is going to plan its own sequence of activities based on the operations pickup, drop and move. Define these operations so they accurately modify state descriptions. The depot is considering using either breadth-first, best-first or means-end based search. Explain how each of these searches operate and recommend which one to use in the storage depot. Justify your answer. NLP Draw a diagram showing the logical steps required to process natural language sentences. Describe the following processes and their role in a language processing system... 1. morphological processing 2. syntax analysis 3. semantic processing 4. pragmatic analysis Consider the following sentences. In each case (i) state what problems they pose for a natural language processing system (ii) outline what types of knowledge is required to overcome these problems and (iii) explain how computer systems deal with these problems in practice. the old man the boats I saw the Eiffel Tower flying to Paris he opened the door with the key he opened the door with the squeaking hinge the boy kicked the ball under the tree the boy kicked the wall under the tree put the bottles in the box on the shelf by the door my car drinks petrol Const.Prop Constraint Propagation (CP) can be used as an alternative to search for certain types of problem. What are the features of a problem that make it suitable for solving with CP? The popular number placing puzzle, SuDoku, can be solved with CP. Why is CP preferable to search for SuDoku? Explain in detail how SuDoku can be solved with CP. NLP The simple grammar & lexicon below are adequate to parse/deconstruct sentences like... "the cat chased the rat" grammar S -> NP VP NP -> Det Noun VP -> Verb NP lexicon cat chased rat the Noun Verb Noun Det Extend the grammar & lexicon so they can cope with passive sentences like... "the rat was chased by the cat" What is meant by the term "Combinatorial Semantics"? Assume that the lexicon contains semantic definitions for words, extend the rules in the grammar (both the rules above and the new rules you have added) so they specify semantic construction. The rules should build simple actor/action/object case frames for simple active & passive sentences like those above ("the cat chased the rat" and "the rat was chased by the cat").