choueiry aima chapter 7 se tions 7 1 7 2 and 7 3 in tro
play

Choueiry AIMA: Chapter 7 (Setions 7.1, 7.2, and 7.3) In - PowerPoint PPT Presentation

B.Y. Title: Logial Agen ts Choueiry AIMA: Chapter 7 (Setions 7.1, 7.2, and 7.3) In tro dution to Artiial In telligene CSCE 476-876, Spring 2016 URL: www.se.unl.edu/~ ho uei ry/ S1 6-4 76- 87 6 1


  1. B.Y. Title: Logi al Agen ts ✫ ✬ Choueiry AIMA: Chapter 7 (Se tions 7.1, 7.2, and 7.3) In tro du tion to Arti� ial In telligen e CSCE 476-876, Spring 2016 URL: www. se.unl.edu/~ ho uei ry/ S1 6-4 76- 87 6 1 Berthe Y. Choueiry (Sh u-w e-ri) (402)472-5444 Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  2. Outline B.Y. ✫ ✬ Choueiry W umpus w orld: motiv ating example Kno wledge bases Logi for Kno wledge Represen tation & Reasoning • � Syn tax • � Seman ti s • � Inferen e me hanisms: omplexit y , ompleteness 2 Prop ositional logi /sen ten tial logi Predi ate logi /�rst-order logi Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  3. Motiv ating example : The W umpus w orld B.Y. ✫ ✬ Early omputer game Choueiry Agen t explores a a v e with: b ottomless pits Breeze Stench 4 PIT 3 a b east that eats an y one who en ters Breeze Breeze the ro om, and 3 PIT Stench Gold heap of gold to trap • Breeze Stench 2 • Instru tor's Breeze Breeze 1 PIT START Mar • 1 2 3 4 h notes 16, 2016 #11 ✪ ✩

  4. PEAS des ription of the W umpus w orld B.Y. P erforman e measure: gold +1000, death -1000, -1 p er step, -10 ✫ ✬ Choueiry for using the arro w En vironmen t: Squares adja en t to W umpus are smelly Squares adja en t to pit are breezy Glitter i� gold is in the same square Sho oting kills W umpus if y ou are fa ing it Sho oting uses up the only arro w Grabbing pi ks up gold if in same square 4 Releasing drops the gold in same square Sensors: Breeze, Glitter, Smell A tuators: Left turn, Righ t turn, F orw ard, Grab, Release, Sho ot Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  5. W umpus W orld : Chara terization B.Y. ✫ ✬ Choueiry Is the w orld: Observ able? No, only lo al p er eption Deterministi ? Y es, out ome exa tly sp e i�ed Episo di ? No, sequen tial at the lev el of a tions • Stati ? Y es, W umpus/Pits don't mo v e • 5 Dis rete? Y es • Single-agen t? Y es, W umpus onsidered a natural feature • • Instru tor's • Mar h notes 16, 2016 #11 ✪ ✩

  6. Empiri al ev aluations: single/m ultiple on�guration B.Y. ✫ ✬ An agen t an do w ell in a single en vironmen t: learns the Choueiry en vironmen t, exe utes rules. Agen t m ust b e tested in a omplete lass of en vironmen ts and its a v erage p erforman e m ust b e determined → empiri al exp erimen ts Constrain ts: start from p osition [1,1℄, limited to 4 × 4 grid Lo ation of W umpus and Gold hosen randomly with a uniform distribution (all squares are p ossible ex ept [1,1℄) 6 • Ea h square, ex ept [1,1℄, an b e a pit with probabilit y 0.2 • T erribly bad ases: gold in a pit or surrounded b y pits Instru tor's • Mar • h notes 16, 2016 #11 ✪ ✩

  7. W umpus W orld : A ting & Reasoning B.Y. ✫ ✬ After re eiving initial p er epts, agen t kno ws it is in [1,1℄ and it Choueiry is OK No sten h or breeze in [1,1℄ ⇒ [1,2℄ and [2,1℄ are danger-free • Cautious agen t mo v es only to square it kno ws it is OK Agen t mo v es only to square [2,1℄, dete ts breeze y ⇒ ∃ a pit in • neigh b oring squares [1,1℄, [2,2℄ and [3,1℄. Agen t kno ws no pit in [1,1℄ → Pit indi ated in [2,2℄ and [3,1℄ with P? • 7 Not visited OK squares? Only [1,2℄. Agen t go es to [1,1℄, • pro eeds to [1,2℄ Instru tor's • Mar h notes 16, 2016 #11 ✪ ✩

  8. B.Y. ✫ ✬ Choueiry W umpus W orld : A ting & Reasoning Breeze Stench 4 PIT Breeze Breeze 3 PIT Stench Gold Breeze Stench 2 Breeze Breeze 1 PIT START 1 2 3 4 A = Agent 1,4 2,4 3,4 4,4 1,4 2,4 3,4 4,4 B = Breeze G = Glitter, Gold 8 OK = Safe square P = Pit 1,3 2,3 3,3 4,3 1,3 2,3 3,3 4,3 S = Stench V = Visited W = Wumpus 1,2 2,2 3,2 4,2 1,2 2,2 3,2 4,2 P? OK OK Instru tor's 1,1 2,1 3,1 4,1 1,1 2,1 3,1 4,1 P? A A V B Mar OK OK OK OK h notes (b) (a) 16, 2016 #11 ✪ ✩

  9. W umpus W orld : A ting & Reasoning Agen ts dete ts sten h in [1,2℄ ⇒ W umpus nearb y! B.Y. ✫ ✬ P ossibilities: [1,1℄, [1,3℄ or [2,2℄. Choueiry Agen t kno ws [1,1℄ is W umpus-free (Agen t w as there!) Agen t an infer [2,2℄ is W umpus-free ( � ∃ sten h in [2,1℄) • Agen t infers W umpus is in [1,3℄ ( W! ) La k of breeze in [1,2℄ ⇒ [2,2℄ is pit-free But, ∃ a pit in either [2,2℄ or [3,1℄ ⇒ ∃ pit in [3,1℄ ( P! ) Inferen e om bines kno wledge gained at di�eren t times and pla es, b ey ond the abilities of most animals, but Logi al 9 • Inferen e an handle this Sin e [2,2℄ is OK and not visited, Agen t mo v es there et . Instru tor's • Mar h notes • 16, 2016 #11 ✪ ✩

  10. W umpus W orld : A ting & Reasoning B.Y. ✫ ✬ Choueiry Breeze Stench 4 PIT Breeze Breeze 3 PIT Stench Gold Breeze Stench 2 Breeze Breeze 1 PIT START 1 2 3 4 1,4 2,4 3,4 4,4 1,4 2,4 3,4 4,4 A = Agent P? B = Breeze 10 G = Glitter, Gold OK = Safe square 1,3 2,3 3,3 4,3 1,3 2,3 3,3 4,3 P = Pit W! P? W! A S = Stench S G V = Visited B W = Wumpus 1,2 2,2 3,2 4,2 1,2 2,2 3,2 4,2 A S S V V Instru tor's OK OK OK OK 1,1 2,1 3,1 4,1 1,1 2,1 3,1 4,1 B P! B P! Mar V V V V OK OK OK OK h notes 16, (a) (b) 2016 #11 ✪ ✩

  11. B.Y. ✫ ✬ Choueiry The p oin t of the W umpus w orld In ea h ase where the agen t dra ws a on lusion from the a v ailable information, that on lusions is guaran teed to b e orre t if the a v ailable information is orre t. 11 F undamen tal prop ert y of logi al reasoning. − → Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  12. Kno wledge Base B.Y. ✫ ✬ Choueiry A fa t in the w orld: A represen tation of a fa t in the w orld A sen ten e= a represen tation of a fa t in the w orld in a formal language A Kno wledge Based (KB): A set sen ten es A set (of represen tations) of fa ts ab out the w orld 12 Issues: A ess to KB, Represen tation (language), Reasoning (inferen e) Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  13. Lev el of Kno wledge B.Y. Agen ts an b e view ed at v arious lev els: ✫ ✬ Choueiry 1. Epistemologi al : Abstra t des ription of what the agen t kno ws ab out the w orld 2. Logi al : En o ding of kno wledge in to sen ten es 13 3. Implemen tation : A tual implemen tation (lists, arra ys, hash tables, et .) V ery imp ortan t for p erforman e of agen t Irrelev an t for higher lev els of kno wledge Instru tor's Mar • h notes • 16, 2016 #11 ✪ ✩

  14. A SK ( KB , M AKE -A CTION -Q UERY ( t )) t + 1 A simple KB-agen t B.Y. ✫ ✬ Choueiry function KB-A GENT ( percept ) returns an action static : KB , a knowledge base t , a counter, initially 0, indicating time T ELL ( KB , M AKE -P ERCEPT -S ENTENCE ( percept, t )) action T ELL ( KB , M AKE -A CTION -S ENTENCE ( action , t )) The agen t m ust b e able to: t represen t states, a tions, et . return action 14 in orp orate new p er epts up date in ternal represen tations of the w orld dedu e hidden prop erties of the w orld dedu e appropriate a tions Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

  15. A SK ( KB , M AKE -A CTION -Q UERY ( t )) t + 1 Kno wledge-Based Agen t B.Y. ✫ ✬ Choueiry function KB-A GENT ( percept ) returns an action static : KB , a knowledge base t , a counter, initially 0, indicating time T ELL ( KB , M AKE -P ERCEPT -S ENTENCE ( percept, t )) action T ELL ( KB , M AKE -A CTION -S ENTENCE ( action , t )) P er eiv es: T ells KB ab out new p er epts (new sen ten es) t Represen tation: Make-Per ept-Senten e return action 15 A ess to KB: Asks KB ab out a tions to tak e (inferen e) T w o primitiv es: Ask and Tell hide reasoning details A ts: T ells KB ab out a tions (new sen ten es) Represen tation: Make-A tion-Senten e , Instru tor's Make-A tion-Quer y Mar h notes 16, 2016 #11 ✪ ✩

  16. Logi in general Logi s are formal languages for represen ting information su h that B.Y. on lusions an b e dra wn ✫ ✬ Choueiry Syn tax de�nes the sen ten es in the language (grammar) Seman ti s de�ne the �meaning� of sen ten es; i.e. , de�ne truth of a sen ten e in a w orld Example: the language of arithmeti Syn tax: x + 2 ≥ y is a sen ten e; x 2 + y > is not a sen ten e 16 Seman ti s: � x + 2 ≥ y is true i� the n um b er x + 2 is no less than the n um b er y • � x + 2 ≥ y is true in a w orld where x = 7 , y = 1 • � x + 2 ≥ y is false in a w orld where x = 0 , y = 6 Instru tor's Mar h notes 16, 2016 #11 ✪ ✩

Recommend


More recommend