Artificial Intelligence
CSE643
                             Lecture #2
              Tip: Take your own notes during lectures
                             C. Anantaram
                        c.anantaram@iiitd.ac.in
                 Google classroom code: dke4bgy
                Note: This session is being recorded.
Disclaimer:    I do not claim that all material in these slides are self-produced.
               Some Material for the slides are taken from internet and other sources.
Real AI
• A serious science.
• General-purpose AI like the robots of science fiction is incredibly hard
• Human brain appears to have lots of special and general functions,
  integrated in some amazing way that we really do not understand
  (yet)
• Special-purpose AI is more doable (nontrivial)
• E.g., chess/poker/Go playing programs, logistics planning, automated
  translation, speech and image recognition, web search, data mining,
  medical diagnosis, keeping a car on the road, … … … …
                       From Vincent Conitzer’s slides on Artificial Intelligence, Duke University   2
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   3
Focus of AI
                                  Systems that think like                  Systems that think
focus on action                         humans                                 rationally
sidesteps philosophical
                                    Systems that act like                   Systems that act
issues such as “is the
                                         humans                                rationally
system conscious” etc.
• A lot of AI systems mostly follow “act rationally” approach
   – Distinction may not be that important
       • acting rationally/like a human presumably requires (some sort of) thinking
         rationally/like a human,
       • humans much more rational anyway in complex domains
          From Stuart Russell’s book, and Vincent Conitzer’s slides on Artificial Intelligence, Duke University   4
AI pre-history
• Philosophy       Logic, methods of reasoning, mind as physical
                   system foundations of learning, language,
                   rationality
• Mathematics      Formal representation and proof algorithms,
                   computation, (un)decidability, (in)tractability,
                   probability
• Economics        utility, decision theory
• Neuroscience     physical substrate for mental activity
• Psychology       phenomena of perception and motor control,
                   experimental techniques
• Computer         building fast computers
  engineering
• Control theory   design systems that maximize an objective
                   function over time
• Linguistics      knowledge representation, grammar
                                                                      5
History of AI
  • The history of AI begins with the following articles:
     • Turing, A.M. (1950), Computing machinery and intelligence, Mind, Vol.
       59, pp. 433-460.
                             From Xiao-Jun Zeng’s AI fundamentals slides, Univ of Manchester   6
History of AI – Acting Humanly: Turing Test
• Turing (1950) "Computing machinery and intelligence":
• "Can machines think?" → "Can machines behave intelligently?"
• Operational test for intelligent behavior: the Imitation Game
• Human beings are intelligent
• To be called intelligent, a machine must produce responses that are indistinguishable from those
  of a human
                                             From Max Welling: Introduction to AI course
                                                                                                     7
                                             and some parts from Eakta Jain’s slides
Is Turing Test the right goal?
• “Aeronautical engineering texts do not define the goal of their field as
  making ‘machines that fly so exactly like pigeons that they can fool
  even other pigeons.’” [Russell and Norvig]
                       From Vincent Conitzer’s slides on Artificial Intelligence, Duke University   8
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   9
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   10
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   11
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   12
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf   13
Areas of AI
• The rigorous application of probability theory and statistics in AI generally gained
  in popularity in the 1990s and are now the dominant paradigm in:
   • Machine learning
   • Pattern recognition and machine perception, e.g.,
       • Computer vision
       • Speech recognition
   • Robotics
   • Natural language processing
                                                                                                14
                              From Xiao-Jun Zeng’s AI fundamentals slides, Univ of Manchester
Areas of AI
• Deduction, reasoning, problem solving such as
    • Theorem-provers, solve puzzles, play board games
• Knowledge representation systems such as
    • Expert systems
• Automated planning and scheduling
• Machine Learning and Perception such as
    • detecting credit card fraud, stock market analysis, classifying DNA sequences, speech and handwriting
      recognition, object and facial recognition in computer vision
• Natural language processing such as
    •   Natural Language Understanding
    •   Speech Understanding
    •   Language Generation
    •   Machine Translation
    •   Information retrieval and text mining
• Motion and manipulation such as
    • Robotics to handle such tasks as object manipulation and navigation, with sub-problems of localization
      (knowing where you are), mapping (learning what is around you) and motion planning (figuring out how to
      get there)
• Social and business intelligence such as
    • Social and customer behaviour modelling
                                                                                                                15
                                         From Xiao-Jun Zeng’s AI fundamentals slides, Univ of Manchester
     Areas of AI
16
Some areas where humans shine
• Coming up with reasonably good solutions in complex messy environments
• Adapting/self-evaluation/creativity (“My usual approach to chess is getting
  me into trouble against this person… Why? Is there something entirely
  different I can do?”)
• Analogical reasoning, transfer learning (applying insights from one domain
  to another)
• Explaining our reasoning
• Tasks that require a broad understanding of the (human) world
• Knowing what it’s like to be human
• Humor
•…
                        From Vincent Conitzer’s slides on Artificial Intelligence, Duke University   17
Modern AI
• AI achieved its greatest successes, albeit somewhat behind the
  scenes, due to:
  • the incredible power of computers today
  • a greater emphasis on solving specific subproblems
  • the creation of new ties between AI and other fields working on similar
    problems
  • a new commitment by researchers to solid mathematical methods and
    rigorous scientific standards, in particular, based probability and
    statistical theories
  • Significant progress has been achieved in neural networks, probabilistic
    methods for uncertain reasoning and statistical machine learning,
    machine perception (computer vision and Speech), optimisation and
    evolutionary computation, fuzzy systems, Intelligent agents
                                                                           18
What is Artificial Intelligence ?
                     Behaviour
                • Has Knowledge; Uses it
• Man-made      • Understanding
• Simulated     • Reasoning
• Not natural   • Learning
                • Ability to solve problems   19
Purpose of AI
• Making the computer do more complex tasks in the real-world
• Use computers for decision-making
• Higher abstraction of programming
                                                                20
Definition of AI
• “AI is the science and engineering of making intelligent machines which can
  perform tasks that require intelligence when performed by humans …”
• Computer science defines AI research as the study of "intelligent agents":
  any device that perceives its environment and takes actions that maximize
  its chance of successfully achieving its goals.
• A more elaborate definition characterizes AI as “a system’s ability to
  correctly interpret external data, to learn from such data, and to use those
  learnings to achieve specific goals and tasks through flexible adaptation.”
                                                                               21
Characteristics of AI systems
• Knowledge
   • Explicit
   • Implicit
• Reasoning
   • Explicit
   • Implicit
• Learning
   • Explicit
       • Generalization
       • Specialization
   • Implicit
       • Generalization
       • Specialization
                                22
Basic problems
• Base machine is computational.
• No prior knowledge. Has to be specified.
• Cannot say machine has understood.
• Reasoning absent. Has to be built.
• No commonsense. No intuition
• Learning can only be simulated
• Constrained by whatever knowledge and data that we seed
• No General Knowledge
                                                            23
Some properties of AI systems
• Capture knowledge
• Simulate experience
• Reasoning by the System
   • Inductive, Deductive and Abductive
• Searching for a solution
• Learning                                24
Aspects in building modern AI solutions
• Data
   • Lots of it and more being generated
   • Hidden patterns, hidden correlations
   • Tremendous variations
• Knowledge
   • Explicit knowledge – in terms of rules, cases, frames, scripts
   • Implicit knowledge – tacit knowledge – cannot be expressed explicitly
• Reasoning
   • Explicit reasoning – logic based, similarity-based, probabilistic-based
   • Implicit reasoning – pattern-based, infer relations, deep-reasoning
• Learning
   • Deriving specializations
   • Finding generalizations                                                   25
Intelligent Agents
• Agents and environments
• Rationality
• PEAS – Performance, Environment, Actuators and Sensors
• Environment types
• Agent types
                                                           26
              From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Rational behaviour
                                                                                  27
Agents
• Agent: An agent is anything that can be viewed as perceiving its
  environment through sensors and acting upon that environment
  through actuators
• Human agent: eyes, ears, and other organs for sensors; hands, legs,
  mouth, and other body parts for actuators
• Robotic agent: cameras and infrared range finders for sensors;
  various motors for actuators
• Software agent: receives keystrokes, file contents, network packets as
  sensory inputs and acts by displaying, writing files, sending network
  packets, etc.
                                                                       28
Agent
                                                                                 29
        From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Agent = Architecture + Program
                                                                                     30
            From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Example: Vacuum cleaner world
                                                                                     31
            From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
A vacuum cleaner agent
                         32
A vacuum cleaner agent
                                                                                     33
            From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
A vacuum cleaner agent
                                                                                     34
            From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Designing Agents
                                                                                     35
            From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Agents: Performance measurement
• An agent should strive to "do the right thing", based on what it can
  perceive and the actions it can perform. The right action is the one
  that will cause the agent to be most successful
• Performance measure: An objective criterion for success of an agent's
  behavior
• E.g., performance measure of a vacuum‐cleaner agent could be
  amount of dirt cleaned up, amount of time taken, amount of
  electricity consumed, amount of noise generated, etc
                                                                                             36
                    From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
References
• Chapter 1: Russell and Norvig’s book
• Chapter 1: Deepak Khemani’s book
• Chapter 2: Russell and Norvig
                                         37