LeongHW, SoC, NUS (UIT2201: AI) Page 1 © Leong Hon Wai, 2003-2013 Artificial Intelligence  Reading Materials:  Ch 14 of [SG]  Also Section 9.4.2 Logic.

Slides:



Advertisements
Similar presentations
The Development of AI St Kentigerns Academy Unit 3 – Artificial Intelligence.
Advertisements

Approaches, Tools, and Applications Islam A. El-Shaarawy Shoubra Faculty of Eng.
Chapter 09 AI techniques in different game genres (Puzzle/Card/Shooting)
Information and Software Technology
An Introduction to Artificial Intelligence. Introduction Getting machines to “think”. Imitation game and the Turing test. Chinese room test. Key processes.
Chapter 12: Expert Systems Design Examples
Chapter 10 Artificial Intelligence © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 4 DECISION SUPPORT AND ARTIFICIAL INTELLIGENCE
Chapter 13 Artificial Intelligence. Introduction Artificial intelligence (AI) is the part of computer science that attempts to make computers act like.
Marakas: Decision Support Systems, 2nd Edition © 2003, Prentice-Hall Chapter Chapter 7: Expert Systems and Artificial Intelligence Decision Support.
McGraw-Hill/Irwin ©2005 The McGraw-Hill Companies, All rights reserved ©2005 The McGraw-Hill Companies, All rights reserved McGraw-Hill/Irwin.
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
INVITATION TO Computer Science 1 1 Chapter 15 Artificial Intelligence.
4-1 Chapter 4 Decision Support and Artificial Intelligence Brainpower for Your Business.
Chapter 11: Artificial Intelligence
Artificial Intelligence Dr. Paul Wagner Department of Computer Science University of Wisconsin – Eau Claire.
Invitation to Computer Science 5th Edition
Chapter 10. Global Village “… is the shrinking of the world society because of the ability to communicate.” Positive: The best from diverse cultures will.
Artificial Intelligence Introduction (2). What is Artificial Intelligence ?  making computers that think?  the automation of activities we associate.
Chapter 14: Artificial Intelligence Invitation to Computer Science, C++ Version, Third Edition.
Chapter 10 Artificial Intelligence. © 2005 Pearson Addison-Wesley. All rights reserved 10-2 Chapter 10: Artificial Intelligence 10.1 Intelligence and.
What is Artificial Intelligence? AI is the effort to develop systems that can behave/act like humans. Turing Test The problem = unrestricted domains –human.
LeongHW, SoC, NUS (UIT2201: AI) Page 1 © Leong Hon Wai, Artificial Intelligence  Reading Materials:  Ch 14 of [SG]  Also Section Logic.
计算机科学概述 Introduction to Computer Science 陆嘉恒 中国人民大学 信息学院
11 C H A P T E R Artificial Intelligence and Expert Systems.
Artificial Intelligence Introductory Lecture Jennifer J. Burg Department of Mathematics and Computer Science.
1 Artificial Intelligence Introduction. 2 What is AI? Various definitions: Building intelligent entities. Getting computers to do tasks which require.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11: Artificial Intelligence Computer Science: An Overview Tenth Edition.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Neural Networks.
Chapter 13 Artificial Intelligence and Expert Systems.
I Robot.
1 CS 385 Fall 2006 Chapter 1 AI: Early History and Applications.
Chapter 15: KNOWLEDGE-BASED INFORMATION SYSTEMS. What is Knowledge? Data: Raw facts, e.g., Annual Expenses = $2 million Information: Data given context,
Introduction to Artificial Intelligence CS 438 Spring 2008.
LeongHW, SoC, NUS (UIT2201: AI) Page 1 © Leong Hon Wai, Artificial Intelligence  Reading Materials:  Ch 14 of [SG]  Also Section Logic.
Presented by:- Reema Tariq Artificial Intelligence.
ITEC 1010 Information and Organizations Chapter V Expert Systems.
Artificial Intelligence, simulation and modelling.
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
Introduction to Artificial Intelligence Revision Session.
Chapter 13 Artificial Intelligence. Artificial Intelligence – Figure 13.1 The Turing Test.
Artificial Neural Networks This is lecture 15 of the module `Biologically Inspired Computing’ An introduction to Artificial Neural Networks.
Overview of Artificial Intelligence (1) Artificial intelligence (AI) Computers with the ability to mimic or duplicate the functions of the human brain.
Sub-fields of computer science. Sub-fields of computer science.
Fundamentals of Information Systems, Sixth Edition
Chapter 11: Artificial Intelligence
Fundamentals of Information Systems
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Chapter 11: Artificial Intelligence
Organization and Knowledge Management
Introduction Characteristics Advantages Limitations
PART IV: The Potential of Algorithmic Machines.
Artificial Intelligence (CS 370D)
Dr. Unnikrishnan P.C. Professor, EEE
Knowledge Representation
MANAGING KNOWLEDGE FOR THE DIGITAL FIRM
Artificial Intelligence
Course Instructor: knza ch
Artificial Intelligence and Searching
Artificial Intelligence introduction(2)
CAP 5636 – Advanced Artificial Intelligence
OVERVIEW OF BIOLOGICAL NEURONS
Artificial Intelligence Lecture 2: Foundation of Artificial Intelligence By: Nur Uddin, Ph.D.
KNOWLEDGE REPRESENTATION
TA : Mubarakah Otbi, Duaa al Ofi , Huda al Hakami
Artificial Intelligence Lecture No. 28
Artificial Intelligence
Artificial Intelligence and Searching
Artificial Intelligence and Searching
Presentation transcript:

LeongHW, SoC, NUS (UIT2201: AI) Page 1 © Leong Hon Wai, Artificial Intelligence  Reading Materials:  Ch 14 of [SG]  Also Section Logic Programming  Contents:  Different Types of Tasks  Knowledge Representation  Recognition Tasks  Reasoning Tasks

LeongHW, SoC, NUS (UIT2201: AI) Page 2 © Leong Hon Wai, For Fall 2013 semester  Will only cover:  Turing Test, Eliza  Division of Labour in AI  Formal Language for Knowledge Representation  Reasoning: Intelligent Search, Expert Systems  Parts of Ch. 14 covered  Ch Introduction  Ch Division of Labour  Ch Only Formal Language (Predicates)  Ch Reasoning Tasks  Will not cover  Knowledge Representation (except Formal Lang)  Recognition Tasks (Ch 14.4)  Robotics (Ch 14.6)

LeongHW, SoC, NUS (UIT2201: AI) Page 3 © Leong Hon Wai, Artificial Intelligence…  Context so far…  Use algorithm to solve problem  Database used to organize massive data  Algorithms implemented using hardware  Computers linked in a network Educational Goals for this Chapter:  The computer as a tool for  Solving more human-like tasks  Build systems that “think” independently  Can “intelligence” be encoded as an algorithm?

LeongHW, SoC, NUS (UIT2201: AI) Page 4 © Leong Hon Wai, Introduction  Artificial intelligence (AI)  Explores techniques for incorporating aspects of “intelligence” into computer systems  Turing Test (Alan Turing, 1950)  A test for intelligent behavior of machines

LeongHW, SoC, NUS (UIT2201: AI) Page 5 © Leong Hon Wai, If the interrogator is unable to determine which entity is the human and which is the machine, then the machine has passed the Turing Test The Turing Test (Alan Turing, 1950)

LeongHW, SoC, NUS (UIT2201: AI) Page 6 © Leong Hon Wai, Introduction (continued)  Artificial intelligence can be thought of as constructing computer models of human intelligence  Early attempt: Eliza (see notes, website)

LeongHW, SoC, NUS (UIT2201: AI) Page 7 © Leong Hon Wai,

LeongHW, SoC, NUS (UIT2201: AI) Page 8 © Leong Hon Wai, A Typical Conversation with Eliza

LeongHW, SoC, NUS (UIT2201: AI) Page 9 © Leong Hon Wai, Is Eliza really “intelligent”?  How Eliza does it…

LeongHW, SoC, NUS (UIT2201: AI) Page 10 © Leong Hon Wai, Eliza Conversation revisited Encouragement simple inversion template “I am..” template “do you…” template “what …” template “tell me…” template “who else…” Finish the rest yourself

LeongHW, SoC, NUS (UIT2201: AI) Page 11 © Leong Hon Wai, What’s YOUR verdict? Does Eliza pass the Turing Test? YES? NO? How would you “break” it?

LeongHW, SoC, NUS (UIT2201: AI) Page 12 © Leong Hon Wai, Eliza, Chatterbots, & applications… Many Eliza-like programs on the Web: Also called “chatterbots”     Found applications in Answer services, Automated Call Centers.

LeongHW, SoC, NUS (UIT2201: AI) Page 13 © Leong Hon Wai, Recent news (NUS-USP-UIT2201 FB Gp)

LeongHW, SoC, NUS (UIT2201: AI) Page 14 © Leong Hon Wai, Headline on “Mashable” (28-Oct-2013)

LeongHW, SoC, NUS (UIT2201: AI) Page 15 © Leong Hon Wai, What is a Captcha? … is a program that can generate and grade tests that humans can pass but current computer programs cannot. … in other words, to tell Humans and Computers Apart Automatically

LeongHW, SoC, NUS (UIT2201: AI) Page 16 © Leong Hon Wai, Headline on “Mashable” (28-Oct-2013) So, does this computer pass the Turing Test? …major web services of Google, Yahoo, Paypal. …up to 90% of the time,

LeongHW, SoC, NUS (UIT2201: AI) Page 17 © Leong Hon Wai, A Division of Labor  Categories of “human-like” tasks  Computational tasks  Recognition tasks  Reasoning tasks

LeongHW, SoC, NUS (UIT2201: AI) Page 18 © Leong Hon Wai, A Division of Labor (continued)  Computational tasks  Tasks for which algorithmic solutions exist  Computers are better (faster and more accurate) than humans  Recognition tasks  Sensory/recognition/motor-skills tasks  Humans are better than computers  Reasoning tasks  Require a large amount of knowledge  Humans are far better than computers

LeongHW, SoC, NUS (UIT2201: AI) Page 19 © Leong Hon Wai, Figure 14.2: Human and Computer Capabilities

LeongHW, SoC, NUS (UIT2201: AI) Page 20 © Leong Hon Wai, Artificial Intelligence Contents:  Different Types of Tasks  Knowledge Representation  Recognition Tasks u Modeling of Human Brain u Artificial Neural Networks  Reasoning Tasks Skipped in Spring 2014 Skip Forward:

LeongHW, SoC, NUS (UIT2201: AI) Page 21 © Leong Hon Wai, Recognition Tasks: Human  Neuron – a cell in human brain; capable of:  Receiving stimuli from other neurons through its dendrites  Sending stimuli to other neurons thru’ its axon A Neuron Skipped in Spring 2014

LeongHW, SoC, NUS (UIT2201: AI) Page 22 © Leong Hon Wai, Human Neurons: How they work  Each neuron  Sums up activating and inhibiting stimuli it received – call the sum V  If the sum V equals or exceeds its “threshold” value, then neuron sends out its own signal (through its axon) [fires]  Each neuron can be thought out as an extremely simple computational device with a single on/off output; Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 23 © Leong Hon Wai, Recognition Tasks (continued)  Human brain: a connectionist architecture  A large number of simple “processors” with multiple interconnections  Von Neumann architecture  A small number (maybe only one) of very powerful processors with a limited number of interconnections between them Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 24 © Leong Hon Wai, Recognition Tasks (continued)  Artificial neural networks (neural networks)  Simulate individual neurons in hardware  Connect them in a massively parallel network of simple devices that act somewhat like biological neurons  The effect of a neural network may be simulated in software on a sequential- processing computer Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 25 © Leong Hon Wai, Modeling a single neuron  An artificial neuron  Each neuron has a threshold value  Input lines carry weights that represent stimuli  The neuron fires when the sum of the incoming weights equals or exceeds its threshold value Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 26 © Leong Hon Wai, Figure 14.5: One Neuron with Three Inputs  When can the output be 1? (neuron “fire”)  Can you modify the network and keep the same functionality? Operation of 1 neuron. Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 27 © Leong Hon Wai,  When can the output be 1? (neuron “fire”)  Can you draw a table for “x 1 x 2 Output” An OR gate (using ANN) Figure 14.7 A simple neural network Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 28 © Leong Hon Wai, Figure The Truth Table for XOR  Question: Can a simple NN be built to represent the XOR gate? What about XOR gate? Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 29 © Leong Hon Wai, More Simple Neural Networks Your HW: Give the “truth table” for these NN; Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 30 © Leong Hon Wai, Recognition Tasks (continued)  ANN (sample) Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 31 © Leong Hon Wai, Neural Network – with Learning Real Neural Networks: Uses back-propagation technique to train the NN; After training, NN used for character recognition; Read [SG] for more details. Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 32 © Leong Hon Wai, NN (continued) Some Success stories…  NN successfully used for small-scale license plate recognition – of trucks at PSA gates;  Between , NN also used for recognizing license plates at NUS carpark entrances. Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 33 © Leong Hon Wai, Recognition Tasks (summary)  Neural network  Both the knowledge representation and “programming” are stored as weights of the connections and thresholds of the neurons  The network can learn from experience by modifying the weights on its connections Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 34 © Leong Hon Wai, Artificial Intelligence Contents:  Different Types of Tasks  Knowledge Representation  Recognition Tasks  Reasoning Tasks u Intelligent Search u Intelligent Agents u Knowledge-Based Systems

LeongHW, SoC, NUS (UIT2201: AI) Page 35 © Leong Hon Wai, Reasoning Tasks  Human reasoning requires the ability to draw on a large body of facts and past experience to come to a conclusion  Artificial intelligence specialists try to get computers to emulate this characteristic Related Story: Bill Gates and Pancake Flipping

LeongHW, SoC, NUS (UIT2201: AI) Page 36 © Leong Hon Wai, Intelligent Search Example (Ch )  Solving a Puzzle (the 9-Puzzle)  Involves  Planning  Learning from past experience  Simulated/Modelling by  Searching a State-graph  State Graph can be Very BIG  Searching for “Goal State”  How to guide the search to make it more efficient.

LeongHW, SoC, NUS (UIT2201: AI) Page 37 © Leong Hon Wai, State Graph for 8-Puzzle

LeongHW, SoC, NUS (UIT2201: AI) Page 38 © Leong Hon Wai, Intelligent Searching  State-space graph:  After any one node has been searched, there are a huge number of next choices to try  There is no algorithm to dictate the next choice  State-space search  Finds a solution path through a state-space graph

LeongHW, SoC, NUS (UIT2201: AI) Page 39 © Leong Hon Wai, The Search Tree for the 9-Puzzle

LeongHW, SoC, NUS (UIT2201: AI) Page 40 © Leong Hon Wai, Search Strategy for 9-Puzzle

LeongHW, SoC, NUS (UIT2201: AI) Page 41 © Leong Hon Wai, Figure A State-Space Graph with Exponential Growth

LeongHW, SoC, NUS (UIT2201: AI) Page 42 © Leong Hon Wai, AI in Game Playing

LeongHW, SoC, NUS (UIT2201: AI) Page 43 © Leong Hon Wai, Intelligent Searching (continued)  Each node represents a problem state  Goal state: the state we are trying to reach  Intelligent searching applies some heuristic (or an educated guess) to:  Evaluate the differences between the present state and the goal state  Move to a new state that minimizes those differences

LeongHW, SoC, NUS (UIT2201: AI) Page 44 © Leong Hon Wai, Intelligent State Space search…  See notes (pdf) for concrete example Some Success stories…  AI in chess playing – Deep Blue (1997)  Deep Blue evaluate 200M positions/sec, or 50B positions in 3min  Other games: Othello, checkers, etc

LeongHW, SoC, NUS (UIT2201: AI) Page 45 © Leong Hon Wai, Swarm Intelligence (Ch )  Swarm intelligence  Models the behavior of a colony of ants  Model with simple agents that:  Operate independently  Can sense certain aspects of their environment  Can change their environment  May “evolve” and acquire additional capabilities over time Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 46 © Leong Hon Wai, Intelligent Agents (Ch )  An intelligent agent: software that interacts collaboratively with a user  Initially, an intelligent agent  simply follows user commands  Over time, the intelligent agent  initiates communication, takes action, and performs tasks on its own  using its knowledge of the user’s needs and preferences Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 47 © Leong Hon Wai, Intelligent Agents (where used)  Wizards (assistants) for Office Software  Personalized Web Search Engines  Push info, news, advertisements etc Skipped in Spring 2013

LeongHW, SoC, NUS (UIT2201: AI) Page 48 © Leong Hon Wai, Expert Systems (Ch )  Rule-based systems  Also called expert systems or knowledge- based systems  Attempt to mimic the human ability to engage pertinent facts and combine them in a logical way to reach some conclusion  Read also Sect of [SG2/3] (Logic Programming)

LeongHW, SoC, NUS (UIT2201: AI) Page 49 © Leong Hon Wai, Expert Systems (continued)  A rule-based system must contain  A knowledge base: set of facts about subject matter  An inference engine: mechanism for selecting relevant facts and for reasoning from them in a logical way  Many rule-based systems also contain  An explanation facility: allows user to see assertions and rules used in arriving at a conclusion

LeongHW, SoC, NUS (UIT2201: AI) Page 50 © Leong Hon Wai, Expert Systems (continued)  A fact can be  A simple assertion  A rule: a statement of the form if... then...  Modus ponens (method of assertion)  The reasoning process used by the inference engine

LeongHW, SoC, NUS (UIT2201: AI) Page 51 © Leong Hon Wai, Knowledge Based System:

LeongHW, SoC, NUS (UIT2201: AI) Page 52 © Leong Hon Wai, Knowledge-Based System…

LeongHW, SoC, NUS (UIT2201: AI) Page 53 © Leong Hon Wai, Expert Systems (continued)  Inference engines can proceed through  Forward chaining  Backward chaining  Forward chaining  Begins with assertions and tries to match those assertions to “if” clauses of rules, thereby generating new assertions

LeongHW, SoC, NUS (UIT2201: AI) Page 54 © Leong Hon Wai, Expert Systems (continued)  Backward chaining  Begins with a proposed conclusion uTries to match it with the “then” clauses of rules  Then looks at the corresponding “if” clauses uTries to match those with assertions, or with the “then” clauses of other rules

LeongHW, SoC, NUS (UIT2201: AI) Page 55 © Leong Hon Wai, Expert Systems (continued)  A rule-based system is built through a process called knowledge engineering  Builder of system acquires information for knowledge base from experts in the domain

LeongHW, SoC, NUS (UIT2201: AI) Page 56 © Leong Hon Wai, Expert Systems: Structure

LeongHW, SoC, NUS (UIT2201: AI) Page 57 © Leong Hon Wai, Expert Systems: Rules

LeongHW, SoC, NUS (UIT2201: AI) Page 58 © Leong Hon Wai, Summary  Artificial intelligence explores techniques for incorporating aspects of intelligence into computer systems  Categories of tasks: computational tasks, recognition tasks, reasoning tasks  Neural networks simulate individual neurons in hardware and connect them in a massively parallel network

LeongHW, SoC, NUS (UIT2201: AI) Page 59 © Leong Hon Wai, Summary  Swarm intelligence models the behavior of a colony of ants  An intelligent agent interacts collaboratively with a user  Rule-based systems attempt to mimic the human ability to engage pertinent facts and combine them in a logical way to reach some conclusion

LeongHW, SoC, NUS (UIT2201: AI) Page 60 © Leong Hon Wai,

61 Did you know that … Bill Gates [ 比尔 盖茨 ], Microsoft I used to flip pancakes.

62 Did Bill Gates really flip pancakes? Given an initial pancake configuration... You want to get a “sorted” configuration … Constraints: can only flip … (using a spatula) Example … Bill Gates & Christos Papadimitriou:, “Bounds For Sorting By Prefix Reversal.” Discrete Mathematics, Vol 27, pp 47-57, Source: Neil Jones and Pavel Pevzner, 2004 “Introduction to BioInformatics Algorithms”.

Pancake Flipping Problem… Listen to the Story… (as told on NPR National Public Radio)

64 More pancake-flipping examples… Abstraction skills, Problem Solving skills 2 flips 3 flips ? flips Need a systematic approach… an algorithm!

65 Unsorted Sorted Largest unsorted An Initial Algorithm (Greedy) Simple Idea: “Sort” the biggest unsorted pancake first… Greedy Algorithm: Repeatedly “sort” the biggest pancake; 5 flips

Pancake Flipping Problem… Lets have some FUN doing pancake flipping

67 A Counter Example: Greedy method [5 flips] Better way [3 flips] Is Greedy “the best” possible? Answer: NO Question: Design an algorithm that solve the pancake flipping Problems using the minimum number of flips.

Pancake Flipping Problem… Sometimes, it is good to look from another perspective!

69 A Different Perspective: The Solution Space… Pertinent Question: How many different configurations are there? Answer:

70 A Different Perspective: The Solution Space… Connect two configurations iff reachable via one flip

71 A Search Tree Method: (systematically search the search space) Want a smart method (algorithm) to search this space to find the optimal flipping solution.

Pancake Flipping Problem… What do we now know about Pancake Flipping?

Pancake Flipping Problem: Known Results Greedy Algorithm uses at most 2n-3 flips For n pancakes, at most 5n/3 flips are needed [Bill Gates and Papadimitriou, 1979] ~1.666n 2008 (almost 30 years later), at most 18n/11 needed [a team from UT-Dallas, 2008] ~1.6363n 73

More on Pancake Flipping Have some fun with pancake flipping: Listen to the story: Search more with your “private investigator”: 74

Pancake Flipping Problem… Why do we study Pancake Flipping?

76 Why study pancake flipping Mathematics – Study its properties – define f(n) to be the min. of number of flip for n pancakes Computing – Want an algorithm to solve it – solve it with minimum number of flips Applications – sorting by prefix reversal – used to study evolution of species in biology

77 Application of Sorting by Reversals Important Application in Computational Biology: Used to study the evolution from one species to another.

78 Sorting by Reversals used here… Question: Is human closer to mouse or rat?

79 Relevant Skills and Courses Pancake flipping is a model for – sorting by prefix-reversals Many CS problems are model in similar ways – sending files over internet (routing problems) – time table scheduling (graph colouring, 图着色问题 ) Courses to learn these things – CS1231 (Discrete Mathematics, 离散数学 ) [Blogs: 1, 2,] 12 – CS3230 (Analysis of Algorithms, 算法设计与分析 )