1 / 17

Introduction to AI & AI Principles (Semester 1) WEEK 5 – Tuesday (2008/09)

Introduction to AI & AI Principles (Semester 1) WEEK 5 – Tuesday (2008/09). John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK. Reminder (HOT) DRINKS Case Study Planning the Delivery of One Drink.

max
Download Presentation

Introduction to AI & AI Principles (Semester 1) WEEK 5 – Tuesday (2008/09)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to AI &AI Principles (Semester 1)WEEK 5 – Tuesday (2008/09) John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK

  2. Reminder(HOT) DRINKSCase StudyPlanning the Delivery of One Drink

  3. ReminderPlanning the Delivery of One Drink, 8 • A possible way of working out an action sequence: • How do I achieve the Goal? I could address the following two subgoals separately: • (G1) M has B; (G2) B is open. • How do I achieve, say, G1? Aha, an action that could achieve it is “a gives held object z to person p”, with a instantiated to me, z instantiated to B, and p instantiated to M. But this means I have to achieve two subgoals (and not forget about G2): • (G1.1) I am holding B; (G1.2) I am next to M. • How do I achieve G1.1? Aha , …..

  4. ReminderPlanning the Delivery of One Drink, 9 • Such a process is a form of backwards chaining. • Notice some complications: • Trying to achieve more than one subgoal. One issue: what order to address them in? • The fact that several different action instances could achieve a particular subgoal. How do you choose? What order? • In principle, a single action instance could achieve more than one subgoal. • Needing to remember other subgoals when thinking backwards through an action instance (subgoal regression).

  5. New Stuff on(HOT) DRINKSCase StudyPlanning the Delivery of One Drink

  6. Planning the Delivery of One Drink, 10 • Could also consider forwards chaining: • Let the only “[imagined] [forwards-]open situation” (situation to be worked forwards from in one’s imagination) initially be the Initial Situation. • Choose one open situation OS and • Choose one possible action instance ActI that could apply in OS. • Apply ActI in OSand add the resulting situation to the set of open situations (unless it’s already there). • RemoveOS from the set of open situations if no more action instances are possible in OS. • Repeat such choosing and applyinguntil you hit the Goal situation.

  7. Planning the Delivery of One Drink, 11 • Notice some complications: • How do you choose [forwards-]open situations to act upon? Essentially, what order do you tackle them in? • How do you choose which action instance to try on the chosen open situation? That is, what order should you try them in? • Should you, and how would you, remember what action instances you’ve already tried on a particular open situation? • How do you avoid cycles? • What if there are (effectively) infinitely many instances of a particular action? • NB: The above also applies, with suitable modifications, to backwards chaining.

  8. Planning the Delivery of One Drink, 12 • Could also consider a middle out process (initially proposed in an aI system from the 1960s called the General Problem Solver [GPS]): • Let the only open situation pair initially be the Initial Situation together with the Goal Situation. • Any situation pair will consist of a “forwards-looking” situation F(P) and a “backwards-looking” situation B(P). • Find the open situation pair P that has the “most important difference” between its F(B) and B(P). Call the difference MID. Find an action instance ActI that will (most) reduce, or even eliminate, MID. • Imagine applying ActI. The situation it requires to hold is Pre(ActI), which may be different from F(P), and it would result in situation Post(ActI), which may different from B(P). Form a new open situation pair from F(P) and Pre(ActI) if needed, and similarly a pair from Post(ActI) and B(P) if needed.

  9. “SEARCH”inPlanning the Delivery of One Drink

  10. Search • Search is a matter of investigating a set of possibilities, of any sort, by going from one to the other by means of certain specified operations, usually in the imagination. • Potentially important across all AI areas, not just planning, e.g. in reasoning more generally, language understanding, learning, vision, … • The “possibilities” are usually called “states”. They typically describe states of some world (real or artificial) outside the search, or some objects, or suggested solutions (partial or full) to a problem, or designs for something, etc. etc. • The “Initial Situation” description in the delivering-one-drink problem is an example of (a description of) a state. The “Goal Situation”, in that problem, is only a partial description of a state.. • The Actions in that problem are the operations.

  11. Search, contd. • A search problem consists of the following pre-defined things: • A set of (possible) states (infinitely many, perhaps). • A set of possible operations (finitely many, usually) that can transform states into other states, and a specification of their effects on states. • When operations represent things the agent could do in some environment represented by the states: a way of determining the cost of actually applying any particular sequence of operations starting from a particular state. • Cost usually found by adding up the costs of individual operations along the sequence. The cost is often just the sequence length. • A particular initial state, and either a particular goal state (or listed set of alternative goal states), or a goal condition: a specification of what any goal state looks like. • In some cases, very many states, perhaps even all, count as goals: the question then is of getting to a best possible goal, according to some goal evaluation function.

  12. Search, contd. • A search graph is the graph (i.e. network) of all the states you can possibly get to from the initial state by applying operations (plus the initial state itself), together with links between states corresponding showing the action instances that cause changes between states. • So solving a search problem consists of finding one or more “solution paths” through this network from the initial state to one or more goal states. • NB: There may be several solution paths to any given goal state.

  13. Possible Aims in a Search Problem • When only a goal condition is given: may only want to discover one or more specific goals (and perhaps a best possible goal). E.g.: a particular design for a building. • When either a specific goal state or a goal condition is given: (may) want to discover one or more solution paths. • This is the more typical case. Applies to planning, for example. • If a solution path is (part of the) answer, then we typically want a reasonable-cost one, or even perhaps one of lowest-possible cost (optimal solution path).

  14. More Examples of Search in Planning • Working out a route from one room to a distant room in a building. • Working out how to assemble a machine. • Planning how to convince somebody of something, though language. • Working out a move in a game such as chess, by exploring possible sequences of moves (NB: this involves suppositions about moves of the opponent). • Cannibals and Missionaries puzzles.

  15. Non-Planning Search Examples • Working out what to wear by imagining different options for each part of the outfit. • Working out the meaning of a sentence such as “The driver kicked the ball” (partly) by trying different meanings for ambiguous words. • Solving a Sudoku puzzle by trying out different possibilities for different cells in the grid. • But NB can exploit the constraints between clothing items, words, grid cells or whatever to cut down the amount of search.

  16. Representing the Informationin a situation(Planning the Delivery of One Drink, contd)

  17. Possible Logical Forms, 1(corrected) • D is a door. (D is the door’s name. We might use D-KS, say, as D.) • is-door(D). • D [stated separately to be a door] is open. • is-open(D) • Door [stated separately to be a door] D is closed. • is-closed(D) or¬is-open(D) • D is an open door • is-door(D)  is-open(D) • Mike (M) is in the sitting-room (S). • in(M, S) or in(S, M)[Caution children! Do it consistently!]

More Related