introduction to ai & ai principles (semester 1) week 6 john barnden professor of artificial...

23
Introduction to AI Introduction to AI & & AI Principles (Semester 1) AI Principles (Semester 1) WEEK 6 WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK

Post on 19-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Introduction to AI Introduction to AI &&AI Principles (Semester 1)AI Principles (Semester 1)

WEEK 6WEEK 6

John BarndenProfessor of Artificial Intelligence

School of Computer ScienceUniversity of Birmingham, UK

Page 2: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Discussion based on Frayn’s guest lecture on chess

Page 3: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

REVIEW:where were we?

Page 4: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Planning Actions: Examples

Planning moves in a game (whether chess, a shoot-em-up, football, …)

planning the sequence of steps needed to buy presents for people

planning how to get to a particular place

planning the steps needed to build something

planning the steps needed to convince somebody of something.

Planning is discussed in Callan ch. 9 (and 10).

Page 5: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

New for Week 6

Page 6: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Planning: Towards “Search” Search is covered in Callan ch. 3.

In planning, one can mentally “search” through possible states of the world you could get to, or that would be useful to get to, by imagining doing actions.

(FORWARDS SEARCH) If I do this, then that would happen, and then if I do this, that would come about, or if instead I did this then that would happen, … … … … … … …

OR

(BACKWARDS SEARCH) To get such and such a (sub-)goal state, I could perhaps do this action from such and such another state, and to get to that state I could perhaps do so-and-so, or alternatively I could have done such and such … … … …

Page 7: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Towards Search, contd. What order to investigate the actions possible in or towards

any given state? Investigate all or just some? All in a bunch, or at different points in the search?

Follow a line of investigation as far as you can, and then hop back to a choice point if not getting anywhere?

Any limit on the number of states investigated, or on how far you follow any given line?

How can you measure how promising a state is?

How to take care of unexpected world conditions or changes, or unexpected effects of your own actions?

Page 8: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

More on Search in Week 11

Page 9: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Representation Needs in Planning Representing the actual state of the “world”.

Keeping track of several hypothetical states and how they arise from each other.

Representing all the information needed about each possible action the system can take. This includes information about what preconditions need to hold in order for the action to apply, and what the effects of the action are (effects on world and on system itself, incl. the “cost” to the system).

Representing the goal(s) conditions or states to be achieved, sub-goal states that dynamically arise, time constraints, effort constraints, etc.

Possibly, representing relationships between actions such as conflicts.

Internally expressing general knowledge about the world (e.g., if it’s raining and I go outside my joints will rust).

Page 10: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Representation Needs, contd.

Possibly, remembering useful things to help further planning (a type of learning):

Useful, recurring sequences of actions (“chunking” of actions)

Abstractions from such sequences

Why (parts of) the plan succeeded

What failed and why

Why particular steps were decided upon.

Page 11: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Further Representation Needs(for Planning or Other Purposes)

Inferential Adequacy (has also been called Heuristic Adequacy): ability adequately to support processes for deriving new information from existing information (“inference”, “reasoning”).

Ability to include special things that, for example, speed up access, inference, learning, …

Appropriate degree of narrowness or breadth (general-purposeness) for the researcher’s aims.

Page 12: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Why Not Use Human Language?

The need for a lot of context to remove ambiguity. Difficulty of knowing exactly what the context is.

Possibly leads to incorrectness or internal misunderstanding.

Also adds complexity and uncertainty that hurts inferential adequacy.

The syntax (grammatical structure) of human language is complex and full of historical quirks. This is a problem for all processing of the language, including inference.

Page 13: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Representing a State of the Worldand Expressing General Knowledge about

the World(for planning or other purposes)

A state could be past, present, future, hypothetical, … Ignore those differences for the moment.

Page 14: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Need to …

… represent entities (physical things, mental things, abstract things, situations, events, actions, processes, …) , properties of entities, relationships between entities, groups of entities, …

… make generalizations about types of entities

… capture propositional structure of information.

Page 15: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Entities: Some Examples People, desks, faces, noses, pens, chess-pieces, windows,

light-switches, rooms, buildings, towns, land areas, planets, …

Sizes, lengths, weights, times, prices, …, numbers

Written/spoken words/numbers/…, diagrams, …

Thoughts, emotions, claims, prejudices, personality types, plans, strategies, political movements, terrorism, peace, justice, …

Acts of eating, eating in general, the concept of eating, …

Similarly of saying, believing, learning, …

Page 16: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Properties: Some Examples

Being tall, being expensive, being stupid, having two legs, being kind, being a prime number, being a dog, being an act of violence, having a tail, being coffee, …

Page 17: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Relationships: Some Examples

X loving Y, X kissing Y, Y slapping X, X being married to Z, X being taller than Y, X drinking Y, X being a friend of Y, X being a square root of Y, X being less time-consuming than Y, X’s number of legs being Y, X being the end-point of Y, X’s hand grasping Y,

X being between Y and Z, X being the path from Y to Z, X’s tentacle number Z grasping Y, X giving money-amount Y to charity Z

X kissing Y at time T

X being stupid at time T, X giving money-amount Y to charity Z at time T

Page 18: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Entities versus Properties versus Relationships

Partly a matter of taste and convenience whether you think of something as being a property of one or more things or a relationship between things.

X being stupid at time T: timed property of X, or a relationship between X and T.

X having 2 legs: a property of X, or a relationship between X and 2.

X and Y being friends as a relationship between X and Y, or a property of X anor a property of Y, or a property of the group consisting of X andY

Properties and relationships are also, in principle, entities. But usually the entities are confined to those that we want to state properties of or relationships between.

Page 19: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Groups of Entities: Some Examples

A group of people going out together.

The set of prime numbers less than 100.

A couple’s children.

The thoughts you had yesterday.

The industrial strikes that have occurred in the UK in the last ten years.

The set of time instants between now and a minute from now.

Your limbs.

Page 20: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Groups versus Entities

Any conceivable group is in principle an entity. But it may not be included in the set of entities of interest.

When a group is regarded as an entity, it is possible for its members to be entities in their own right as well.

It’s largely a matter of taste/convenience whether you regard a complex object as one entity or a group of entities or both.

Extreme example: a person could be regarded as the set of molecules in his/her body. Usually it’s not convenient to do this!

Page 21: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Generalization/Quantification Don't want to refer only to particular entities.Need to have

representations that are about, for example, everyone in a room, without having to list them all

some unidentified buildings in a city

an unidentified pen in your bag

a few, several or many places you have been

five of the lecturers in the School

and so forth.

Case of referring to every thing with particular characteristics:

UNIVERSAL generalization/quantification.

Case of referring to a or some things with particular characteristics:

EXISTENTIAL generalization/quantification.

Page 22: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

Propositional Structure Want to be able to join statements together in various

ways. John is happy AND Mary is sad

John is happy OR Mary is sad

IF John is happy THEN Mary is sad

Mary is sad BECAUSE John is happy

AFTER Mary cried, John was happy

and so forth.

Need to able to negate statements. It's NOT the case that John is happy.

AND (), OR (), IF-THEN (), negation () and some closely related things are (to some extent) captured by “Propositional" (or “Sentential”) Logic … … and that's all it captures (in its basic forms).

Page 23: Introduction to AI & AI Principles (Semester 1) WEEK 6 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,

A Taste of “Predicate Logic” Predicate logic adds ability to deal also with entities,

properties and relationships explicitly, as well as universal generalization () and existential generalization ().

Some examples of predicate logic expressions: happy(TheodosiaKirkbride)

taller-than(TheodosiaKirkbride, MaryPoppins)

criticizes(TheodosiaKirkbride, MaryPoppins, 14feb05)

happy(TheodosiaKirkbride) sad(MaryPoppins)

happy(TheodosiaKirkbride) sad(MaryPoppins)

x (is-person(x) rich(x) happy(x))

y (is-person(y) rich(y) sad(y))

Standard predicate logic has no inbuilt facilities for other sorts of generalization or propositional structure.