Intro CS 10 Artificial Intelligence

download Intro CS 10 Artificial Intelligence

of 31

Transcript of Intro CS 10 Artificial Intelligence

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    1/31

    1

    Polly Huang, NTU EE Artificial Intelligence 1

    Introduction to Computer Science

    Polly Huang

    NTU EEhttp://cc.ee.ntu.edu.tw/~phuang

    [email protected]

    Polly Huang, NTU EE Artificial Intelligence 2

    Chapter 10

    Artificial Intelligence

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    2/31

    2

    Polly Huang, NTU EE Artificial Intelligence 3

    Chapter 10: Artificial Intelligence

    10.1 Intelligence and Machines

    10.2 Understanding Images

    10.3 Reasoning

    10.4 Artificial Neural Networks

    10.5 Genetic Algorithms

    10.6 Other Areas of Research

    10.7 Considering the Consequences

    Polly Huang, NTU EE Artificial Intelligence 4

    Computer vs. Human

    Machine

    Performs precisely defined tasks with speed andaccuracy

    Not gifted with common sense Human

    Capable of understanding and reasoning

    More likely to understand the results and

    determine what to do next

    Not gifted with complex computations

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    3/31

    3

    Polly Huang, NTU EE Artificial Intelligence 5

    Humanlike Computer

    The ideal hybrid

    Continue without human intervention when

    faced with unforeseen situations

    Possesses or simulate the ability to reason

    Psychologists and their models may behelpful

    Polly Huang, NTU EE Artificial Intelligence 6

    Intelligent Agents

    Agent

    Device that responds to stimuli from its

    environment

    Sensors: to receive stimuli Actuators: to react

    The goal of artificial intelligence

    To build agents that behave intelligently

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    4/31

    4

    Polly Huang, NTU EE Artificial Intelligence 7

    Related Fields

    PhilosophyArtificial

    Intell igence

    ComputerScience

    Linguistics

    Psychology

    BiologyMathematics

    Polly Huang, NTU EE Artificial Intelligence 8

    AI Research Approaches

    Performance oriented Researcher tries to maximize the performance of

    the agents

    Just do it Exhaustive search, probabilistic deduction

    Computer scientists approach

    Simulation oriented Researcher tries to understand how the agents

    produce responses.

    Wait, let me figure whats going on first Heuristic search, classification

    Psychologists approach

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    5/31

    5

    Polly Huang, NTU EE Artificial Intelligence 9

    The Eight Puzzle Problem

    Polly Huang, NTU EE Artificial Intelligence 10

    Puzzle-Solving Machine

    Sensor

    Actuator

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    6/31

    6

    Polly Huang, NTU EE Artificial Intelligence 11

    Issues Involved

    Sensor Camera

    Understanding the images (10.2)

    Finding a solution (10.3)

    Actuator

    Based on the solution

    Move arms to slide the tiles (Robotics 10.6)

    Polly Huang, NTU EE Artificial Intelligence 12

    Levels of Intelligence:Not Really Intelligent

    Weak AI

    1. Reflex

    Actions are fixed and predetermined

    2. Context aware Actions affected by knowledge of the

    environment

    Context information

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    7/31

    7

    Polly Huang, NTU EE Artificial Intelligence 13

    Levels of Intelligence:

    Trying to be Really Intelligent

    Strong AI

    3. Goal seeking

    Search for a solution

    Key: efficient searching

    4. Learning

    Deduce from experience

    Key: identifying majority

    Polly Huang, NTU EE Artificial Intelligence 14

    Turing Test

    Proposed by Alan Turing in 1950

    Benchmark for progress in artificialintelligence

    Human interrogator communicates with

    test subject by typewriter

    Can the human interrogator distinguish

    whether the test subject is human ormachine?

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    8/31

    8

    Polly Huang, NTU EE Artificial Intelligence 15

    Chapter 10: Artificial Intelligence

    10.1 Intelligence and Machines

    10.2 Understanding Images

    10.3 Reasoning

    10.4 Artificial Neural Networks

    10.5 Genetic Algorithms

    10.6 Other Areas of Research

    10.7 Considering the Consequences

    Polly Huang, NTU EE Artificial Intelligence 16

    Understanding ImagesComputer Vision

    Template matching Compare two bitmaps

    Ex. recognizing well-formed characters

    Image processing Consider characters by the common shape

    Ex. recognizing hand-written characters Edge enhancement

    Region finding

    Smoothing

    Image analysis Guess what partial, obstructed objects are

    Ex. recognizing what the image means

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    9/31

    9

    Polly Huang, NTU EE Artificial Intelligence 17

    Production Systems Capturing common characteristics of

    reasoning problems

    1. Collection of states Start or initial state

    Goal state

    2. Collection of productions Rules or moves Each production may have preconditions

    3. Control system Production to apply next

    Polly Huang, NTU EE Artificial Intelligence 18

    Applications

    Playing games

    8 Puzzles, chess

    Drawing logical conclusions from givenfacts

    Reasoning

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    10/31

    10

    Polly Huang, NTU EE Artificial Intelligence 19

    Ex. 8 Puzzle

    Polly Huang, NTU EE Artificial Intelligence 20

    Ex. Deductive Reasoning

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    11/31

    11

    Polly Huang, NTU EE Artificial Intelligence 21

    Control System Search tree

    Record of state transitions explored whilesearching for a goal state

    Searching for goal Searches the state graph to find a path from the

    start node to the goal

    Strategies

    Root: start state Children: states reachable by applying one

    production

    Walking up the tree from the goal

    Polly Huang, NTU EE Artificial Intelligence 22

    An Unsolved Eight Puzzle

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    12/31

    12

    Polly Huang, NTU EE Artificial Intelligence 23

    Breadth-First Search Tree

    Polly Huang, NTU EE Artificial Intelligence 24

    Production Stack

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    13/31

    13

    Polly Huang, NTU EE Artificial Intelligence 25

    Quiz Time!

    Polly Huang, NTU EE Artificial Intelligence 26

    Types of Searches

    Blind

    Breadth-first search

    Depth-first search

    Heuristics

    Proximity to goal

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    14/31

    14

    Polly Huang, NTU EE Artificial Intelligence 27

    Heuristic Search

    Polly Huang, NTU EE Artificial Intelligence 28

    Good Heuristics

    Easier to compute than a completesolution

    Provide a reasonable estimate of

    proximity to a goal

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    15/31

    15

    Polly Huang, NTU EE Artificial Intelligence 29

    Heuristic Search Algorithm

    Polly Huang, NTU EE Artificial Intelligence 30

    Heuristic Search: Beginning

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    16/31

    16

    Polly Huang, NTU EE Artificial Intelligence 31

    Heuristic Search: 2 passes

    Polly Huang, NTU EE Artificial Intelligence 32

    Heuristic Search: 3 Passes

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    17/31

    17

    Polly Huang, NTU EE Artificial Intelligence 33

    Heuristic Search: Completion

    Polly Huang, NTU EE Artificial Intelligence 34

    Quiz Time!

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    18/31

    18

    Polly Huang, NTU EE Artificial Intelligence 35

    Chapter 10: Artificial Intelligence

    10.1 Intelligence and Machines

    10.2 Understanding Images

    10.3 Reasoning

    10.4 Artificial Neural Networks

    10.5 Genetic Algorithms

    10.6 Other Areas of Research

    10.7 Considering the Consequences

    Polly Huang, NTU EE Artificial Intelligence 36

    Neural Networks

    Artificial Neuron

    Input multiplied by a weighting factor

    Output

    1 if sum of inputs exceeds a threshold value

    0 if otherwise.

    Network is programmed by adjustingweights using feedback from examples.

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    19/31

    19

    Polly Huang, NTU EE Artificial Intelligence 37

    A Biological Neuron

    Polly Huang, NTU EE Artificial Intelligence 38

    Neuron as Processing Unit

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    20/31

    20

    Polly Huang, NTU EE Artificial Intelligence 39

    An Example

    Polly Huang, NTU EE Artificial Intelligence 40

    One Network, Two Programs

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    21/31

    21

    Polly Huang, NTU EE Artificial Intelligence 41

    Uppercase C and T

    Polly Huang, NTU EE Artificial Intelligence 42

    Various Orientations

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    22/31

    22

    Polly Huang, NTU EE Artificial Intelligence 43

    Character Recognition

    Polly Huang, NTU EE Artificial Intelligence 44

    1st Level Processing Units

    One processing unit per 9 cells Center cell weight = 2

    Other cell weight = -1

    Input value per cell 1, if highlighted

    0, otherwise

    Threshold 0.5

    Only when center square is highlighted andone or less other cells also highlighted, theoutput will be 1

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    23/31

    23

    Polly Huang, NTU EE Artificial Intelligence 45

    2nd Level Processing Units All outputs from the 1st level

    Weight 1

    Threshold 0.5

    The final output will be 1 (character T) when

    at least one output from the 1st

    levelprocessing unit is 1

    The final output will be 0 (character C) whenno output from the 1st level processing unit is1

    Polly Huang, NTU EE Artificial Intelligence 46

    The Letter C

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    24/31

    24

    Polly Huang, NTU EE Artificial Intelligence 47

    The Letter T

    Polly Huang, NTU EE Artificial Intelligence 48

    Associative Memory

    Associative memory

    The retrieval of information relevant to the

    information at hand

    Application of neural networkGiven a partial pattern

    Transition themselves to a completedpattern.

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    25/31

    25

    Polly Huang, NTU EE Artificial Intelligence 49

    Example Neural Network1. Circle

    Processing unit

    2. Number in circleThreshold

    3. Line Output tobe the input of

    the connectedprocessing unit

    4. Number on lineWeight of input

    Polly Huang, NTU EE Artificial Intelligence 50

    Stablization

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    26/31

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    27/31

    27

    Polly Huang, NTU EE Artificial Intelligence 53

    Crossing Two Strategies

    Polly Huang, NTU EE Artificial Intelligence 54

    ApplicationConfiguring Neural Networks

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    28/31

    28

    Polly Huang, NTU EE Artificial Intelligence 55

    Chapter 10: Artificial Intelligence

    10.1 Intelligence and Machines

    10.2 Understanding Images

    10.3 Reasoning

    10.4 Artificial Neural Networks

    10.5 Genetic Algorithms

    10.6 Other Areas of Research

    10.7 Considering the Consequences

    Polly Huang, NTU EE Artificial Intelligence 56

    Language Processing

    Syntactic analysis

    Semantic analysis

    Contextual analysis

    Information retrieval

    Information extraction (knowledgerepresentation)Semantic net

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    29/31

    29

    Polly Huang, NTU EE Artificial Intelligence 57

    A Semantic Net

    Polly Huang, NTU EE Artificial Intelligence 58

    Robotics

    Before

    A field within mechanical and electrical

    engineering

    NowA much wider range of activities

    Robocup competition

    Evolutionary robotics

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    30/31

    30

    Polly Huang, NTU EE Artificial Intelligence 59

    Expert systems

    Software package to assist humans insituations where expert knowledge isrequired

    Example: medical diagnosis

    Often similar to a production system

    Blackboard modelSeveral problem-solving systems share a

    common data area

    Polly Huang, NTU EE Artificial Intelligence 60

    Debates

    When should a computers decision betrusted over a humans?

    If a computer can do a job better than ahuman, when should a human do the jobanyway?

    What would be the social impact if computerintelligence surpasses that of many humans?

  • 8/4/2019 Intro CS 10 Artificial Intelligence

    31/31

    Polly Huang, NTU EE Artificial Intelligence 61

    Questions?