CS 621 Artificial Intelligence Lecture 1 – 28/07/05 Prof. Pushpak Bhattacharyya Introduction 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
AI Introduction Language Processing Expert Search System Reasoning Learning Knowledge Representation Vision Planning Robotics 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Thinking Ability in Machines “Can machines think” 320 BC Aristotle – Syllogism (Disjunctive Reasoning) ex: All men are mortal. Shakespeare is a man. Shakespeare is mortal. Inductive Reasoning – specific general (difficult for machine) ex: Crows in Bhopal are black. Crows in Mumbai are black. All crows are black. Abductive Learning - p q if Q is true then P is true in absence of any other info. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Turing Machine Finite state control Infinite tape Church-Turing Hypothesis Anything that is computable, is computable by a TM & viceversa. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Turing Test Computer Human Interrogator has to find which is a machine and which is a human by asking questions to both of them. If the machine is able to fool the interrogator to behave like a human, then that machine passes the Turing Test. Interrogator 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Machines Gene/DNA: A string of bits which is a coded instruction. ANIMATE THEORY: Intelligence is producable only on carbon base. Silicon intelligence is not possible. PHYSICAL SYMBOL HYPOTHESIS: (opposed to Animate theory): Intelligence emerges from manipulating symbols & nothing else is needed. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Levels in AI Knowledge level (Disambiguation) Symbol level (e.g. Lisp program) Signal level (e.g. Neural Net) AI Science (Cognitive Sc, Psychology, social science, physics Sci + Engg (theory + code) Engineering 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Search 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Search is Fundamental and Ubiquitous Fundamental in all of AI. In planning : C B A B C A Table At every stage: multiple possibilities, search for the best possible sequence of options. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay In Vision R L Two eye system Left eye retina & right eye retina have pixels activated. Search for corresponding points: points in the left eye should correspond to points in the right eye – O(n2) algorithm. World 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
In Language Processing The man would like to play. Noun Verb Prep Verb Noun Verb System has to search amongst the possibilities to get the correct meaning. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Abstractions of Search State state space Operators transform states Cost associated operations Start node Goal node (S) Minimal cost path 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Classical Example 8-puzzle 4 2 5 1 2 3 6 6 3 1 4 5 8 7 7 8 Start (S0) State: Matrix repersentation of the board. Goal 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Operators Here operators are movements of blank space. 4 2 5 3 1 6 MU 8 7 4 2 5 MR 4 2 5 6 3 1 3 1 6 8 7 8 7 ML 4 2 5 3 1 6 8 7 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Cost Cost of each operation = 1 for this problem. Which path leads to the goal – Uninformed search (Breadth first, Depth first) Heuristic Search (A* algorithm) 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Search All searchs are instantiations of “General Graph Search” (GGS) algo. Input: The state space graph (implicit/explicit). Output: The path to the goal node. Data Structures: 1. Open list (OL) 2. Closed list (CL) 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Example OL :A CL : OL : B C D CL : A OL : C D E CL : A B OL : D E F CL : A B C OL : E F G CL : A B C D A Start 1 3 4 B C D 6 2 9 8 3 E F G State space graph 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
KNOWLEDGE REPRESENTATION & INFERENCING USING PREDICATE CALCULUS 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Example Example: John, Jack & Jill are members of Alpine club. Every member if the club is either a mountain climber or a skier. All skiers like snow. No mountain climber likes rain. Jack dislikes whatever John likes, and likes whatever John dislikes. John likes rain and snow. Is there a member who is a mountain climber but not a skier. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Knowledge Representation member (John, Alpine) member (Jack, Alpine) member (Jill, Alpine) x [member(x, Alpine) → mc(x) sk(x)] x [sk(x) → like(x, snow)] x [mc(x) → ~like(x, rain)] x [like(John, x) → ~like(John, x)] x [~like(John, x) → like(Jack, x)] like(John, rain) like(John, snow) Ques: x [member(x, Alpine) mc(x) ~sk(x)] 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Inference Strategy - RESOLUTION Basic Idea: REFUTATION of the goal Proof by contradiction Suppose the goal is false. Then show contradiction in the knowledge base. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Steps in Inferencing Convert all expressions, including the falsified goal, into clauses. member (John, Alpine) member (Jack, Alpine) member (Jill, Alpine) ~ member(x1, Alpine) ν mc(x1) ν sk(x1) ~ sk(x2) ν like(x2,snow) ~ mc(x3) ν ~ like(x3,rain) ~ like(John, x4) ν ~ like(Jack, x4) like(John, x5) ν like(Jack, x5) like(John, rain) like(John, snow) ~ member(x6, Alpine) ν ~ mc(x6) ν sk(x6) 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Run Resolution By unification find value for x6 Theory of resolution: given P & ~P ν Q Resolvents we can obtain Q (Resolute) 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Inverted Tree Diagram P ~P ν Q Q Aim C1 C2 Indicates contradiction null clause 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Goal with Negation ~[ x{(member (x, Alpine) Λ mc(x) Λ ~ sk(x))}] x[~ member (x, Alpine) ν ~ mc(x) ν sk(x)] 11. ~ member(x6, Alpine) ν ~ mc(x6) ν sk(x6) 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Monotonic Logic Every step of resolution increases the knowledge base monotonically. Non-monotonic logic which used default reasoning. NEGATION BY FAILURE 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Modus Ponens & Modus Tolens P & P →Q gives Q Modus Tolens: ~Q and P →Q gives ~P 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Prolog Predicate calculus (HORN Clause) + Resolution HORN Clauses: All the implications have a single literal as consequent. A(antecedent) → B(consequent) B is a single literal, never contain any operator. Moreover B has to be a positive literal. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Summary AI is a fascinating discipline, needing input from many branches of knowledge. Scaling up and robustness are the needs of today’s world. Web has introduced new challenges to the field. Language processing and machine learning have assumed great importance. In this lecture we took a look at two core areas: search and reasoning, which will be developed further. Will delve into other areas as the course progresses. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay
Prof. Pushpak Bhattacharyya, IIT Bombay Reading Material Basic Text Books Russell S, Norvig P (1995) Artificial Intelligence: A Modern Approach, Prentice Hall Series in Artificial Intelligence. Englewood Cliffs, New Jersey Nilsson N. J. (1980) Principles of Artificial Intelligence, Morgan Kaufmann Publishers Inc. Journals AI, IEEE SMC, Machine Learning, Computational Linguistics Proceedings of AAAI, ECAI, IJCAI, ICML, ACL, COLING etc. etc. 28-07-05 Prof. Pushpak Bhattacharyya, IIT Bombay