344-571 ปัญญาประดิษฐ์ (artificial intelligence) ผศ. ดร....

95
344-571 ปปปปป ปปปปปปปป (Artificial Intelligence) ปป.ปป.ปปปปปป ปปปปปปปปปปปปปป ปปปปปปปปปปปปปปปปปปปปปปปปปป ปปป ปปปปปปปปปปป ปปปปปปปปปปปปปปปป ปปปปปปปป ปปปปปปปปปป : CS 108 ปปปปปปปป : 074-288580 E-mail : [email protected] Website : http://www.cs.psu.ac.th/wiphada

Upload: alan-conley

Post on 13-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

344-571 ปั�ญญาปัระดิ�ษฐ์� (Artificial Intelligence)

ผศ.ดิร.วิ�ภาดิา เวิทย์�ปัระสิ�ทธิ์�� ภาควิ�ชาวิ�ทย์าการคอมพิ�วิเตอร� คณะวิ�ทย์าศาสิตร�

มหาวิ�ทย์าลั!ย์สิงขลัานคร�นทร� ห%องท&างาน : CS 108 โทรศ!พิท� - 074288580:

E-mail : [email protected] : http://www.cs.psu.ac.th/wiphada

Page 2: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 12

วิ!ตถุ*ปัระสิงค�1. ให%น!กศ,กษาม-ควิามร. %ควิามเข%าใจเก-0ย์วิก!บปั�ญญาปัระดิ�ษฐ์�แลัะสิาขา

ต3างๆของปั�ญญาปัระดิ�ษฐ์�2. ให%น!กศ,กษาสิามารถุพิ!ฒนางานทางดิ%านปั�ญญาปัระดิ�ษฐ์�ไดิ%3. ให%น!กศ,กษาสิามารถุค%นควิ%าเพิ�0มเต�มดิ%วิย์ตนเองไดิ%

วิ�ธิ์-การเร-ย์นการสิอน : การบรรย์าย์ การสิ!มมนา การศ,กษาค%นควิ%าดิ%วิย์ต!วิเอง

การวิ!ดิผลั : สิอบกลัางภาค 30% สิอบปัลัาย์ภาค 40%

LAB & Assignment 30%

ต&ารา : Artificial Intelligence second edition, Elaine Rich and Kevin Knight,

- McGraw Hill Inc.,1991.

Page 3: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 13

เน78อหาวิ�ชาChapter 1 : What is Artificial Intelligence?Chapter 2 : Problems and SpacesChapter 3 : Heuristic Search Chapter 4 : Natural Language Processing Chapter 5 : Machine Learning Chapter 6 : Robotics Chapter 7 : Neural Networks Chapter 8 : Expert Systems Chapter 9 : Computer Vision

Page 4: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Chapter 1

What is Artificial Intelligence?

Page 5: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Content

• Artificial IntelligenceArtificial Intelligence FieldsHeuristicTic Tac ToeTuring Test

Page 6: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 16

Artificial Intelligence

artificial intelligencen. (Abbr. AI) The ability of a computer or other machine

to perform those activities that are normally thought to require intelligence.

The branch of computer science concerned with the development of machines having this ability.

Page 7: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 17

Artificial Intelligence

• The subfield of computer science concerned with understanding the nature of intelligence and constructing computer systems capable of intelligent action.

• It embodies the dual motives of furthering basic scientific understanding and making computers more sophisticated in the service of humanity.

Page 8: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 18

Artificial Intelligence

• Many activities involve intelligent action

—problem solving, perception, learning, planning and other symbolic reasoning, creativity, language, and so forth—and therein lie an immense diversity of phenomena.

Page 9: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 19

Artificial Intelligence

• Computer Encyclopedia • (Artificial Intelligence) Devices and

applications that exhibit human intelligence and behavior including robots, expert systems, voice recognition, natural and foreign language processing. It also implies the ability to learn and adapt through experience.

Page 10: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 110

Artificial Intelligence

WikipediaThe term Artificial Intelligence (AI)

was first used by John McCarthy who considers it to mean "the science and engineering of making intelligent machines".[1]

It can also refer to intelligence as exhibited by an artificial (man-made, non-natural, manufactured) entity.

Page 11: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 111

Artificial Intelligence

WikipediaAI is studied in overlapping fields

of computer science, psychology, neuroscience and engineering, dealing with intelligent behavior, learning and adaptation and usually developed using customized machines or computers.

Page 12: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 112

History of Artificial Intelligence

1950

Alan Turing introduces the Turing test intended to test a machine's capability to participate in human-like conversation.

1951

The first working AI programs were written to run on the Ferranti Mark I machine of the University of Manchester: a checkers-playing program written by Christopher Strachey and a chess-playing program written by Dietrich Prinz.

1956

John McCarthy coined the term "artificial intelligence" as the topic of the Dartmouth Conference.

1958

John McCarthy invented the Lisp programming language.

1965

Joseph Weizenbaum built ELIZA, an interactive program that carries on a dialogue in English language on any topic.

1965

Edward Feigenbaum initiated DENDRAL, a 10-yr effort to develop software to deduce the molecular structure of organic compounds using scientific instrument data. It was the first expert system.

Page 13: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 113

1966

Machine Intelligence workshop at Edinburgh - the first of an influential annual series organized by Donald Michie and others.

1968

HAL 9000 made its appearance in the science fiction movie 2001: A Space Odyssey.

1972

The Prolog programming language was developed by Alain Colmerauer.

1973

Edinburgh Freddy Assembly Robot: a versatile computer-controlled assembly system.

1974

Ted Shortliffe's PhD dissertation on the MYCIN program (Stanford) demonstrated a very practical rule-based approach to medical diagnoses, even in the presence of uncertainty. While it borrowed from DENDRAL, its own contributions strongly influenced the future of expert system development, especially commercial systems.

1997

The Deep Blue chess program (IBM) beats the world chess champion, Garry Kasparov.

1999

Sony introduces the AIBO, an artificially intelligent pet.

2004

DARPA introduces the DARPA Grand Challenge requiring competitors to produce autonomous vehicles for prize money.

History of Artificial Intelligence

Page 14: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 114

Artificial IntelligenceTypical problems to which AI methods are

applied

Pattern recognition

Computer vision, Virtual reality and Image processing

Optical character recognition

Diagnosis (artificial intelligence)

Handwriting recognition

Game theory and Strategic planning

Speech recognition

Game artificial intelligence and Computer game bot

Face recognition

Natural language processing, Translation and Chatterbots

Artificial Creativity

Non-linear control and Robotics

Page 15: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 115

AI Areas• Artificial Intelligence (AI) :

•the branch o f computer science that is concerned with the automation of intelligent behavior.

• AI Areas :• Game Playing• Automated Reasoning and Theorem Proving• Expert Systems• Natural Language Understanding and Semantics Modeling• Modeling Human Performance• Planning and Robotics• Machine Leaning • Neural Networks

Page 16: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 116

Task Domain of AI

Mundane Tasks mundane(มั�นเดน) adj. ทางโลกPerception : Vision, SpeechNatural language : Understanding, Generation, TranslationCommonsense reasoningRobot control

Formal TasksGames: ChessMathematics : Logic, Geometry

Expert TasksEngineering : Design, Fault finding, Manufacturing planningScientific analysisMedical diagnosisFinancial analysis

Page 17: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Fields

Page 18: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 118

Robotics

• Shakey the Robot Developed in 1969 by the Stanford Research Institute, Shakey was the first fully mobile robot with artificial intelligence. Seven feet tall, Shakey was named after its rather unstable movements. (Image courtesy of The Computer History Museum, www.computerhistory.org)

Page 19: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 119

Robotics

• A legged game from RoboCup 2004 in Lisbon, Portugal

• Team ENSCO's entry in the first Grand Challenge, DAVID

Page 20: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 120

Robotics• The DARPA Grand Challenge is

a race for a $2 million prize where cars drive themselves across several hundred miles of challenging desert terrain without any communication with humans, using GPS, computers and a sophisticated array of sensors. In 2005 the winning vehicles completed all 132 miles of the course in just under 7 hours.

Page 21: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 121

Robotics

• ro·bot A mechanical device that sometimes resembles a human and is capable of performing a variety of often complex human tasks on command or by being programmed in advance.

• A machine or device that operates automatically or by remote control.

• A person who works mechanically without original thought, especially one who responds automatically to the commands of others.

Page 22: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 122

Robotics

• Computer Encyclopedia • robot • A stand-alone hybrid computer system that

performs physical and computational activities. Capable of performing many different tasks, it is a multiple-motion device with one or more arms and joints.

• Robots can be similar in form to a human, but industrial robots do not resemble people at all.

Page 23: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 123

Robotics

• Huey, Dewey and Louie• Named after Donald

Duck's famous nephews, robots at this Wayne, Michigan plant apply sealant to prevent possible water leakage into the car. Huey (top) seals the drip rails while Dewey (right) seals the interior weld seams. Louie is outside of the view of this picture. (Image courtesy of Ford Motor Company.)

Page 24: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 124

Robotics• Inspect Pipes from the

Inside• Developed by SRI for

Osaka Gas in Japan, this Magnetically Attached General Purpose Inspection Engine (MAGPIE) goes inside gas pipes and looks for leaks. This unit served as the prototype for multicar models that perform temporary repairs while capturing pictures. (Image courtesy of SRI International.)

Page 25: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 125

Robotics

• Computers Making Computers

• Robots, whose brains are nothing but chips, are making chips in this TI fabrication plant. (Image courtesy of Texas Instruments, Inc.)

Page 26: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 126

Robotics• How Small Can They

Get?• By 2020, scientists at

Rutgers University believe that nano-sized robots will be injected into the bloodstream and administer a drug directly to an infected cell. This robot has a carbon nanotube body, a biomolecular motor that propels it and peptide limbs to orient itself.

Page 27: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 127

Robotics• ASIMO,• a humanoid robot

manufactured by Honda.

Page 28: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 128

Three Laws of Robotics

• A robot may not injure a human being or, through inaction, allow a human being to come to harm.

• A robot must obey orders given it by human beings except where such orders would conflict with the First Law.

• A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

Page 29: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 129

Computer Vision

Page 30: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 130

Computer Vision

• Computer vision • The technology concerned with

computational understanding and use of the information present in visual images.

• In part, computer vision is analogous (similar) to the transformation of visual sensation into visual perception in biological vision.

Page 31: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 131

Computer Vision

• For this reason the motivation, objectives, formulation, and methodology of computer vision frequently intersect with knowledge about their counterparts in biological vision. However, the goal of computer vision is primarily to enable engineering systems to model and manipulate the environment by using visual sensing.

Page 32: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 132

Computer Vision

• Field of robotics in which programs attempt to identify objects represented in digitized images provided by video cameras, thus enabling robots to "see."

• Much work has been done on stereo vision as an aid to object identification and location within a three-dimensional field of view. Recognition of objects in real time.

Page 33: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 133

Computer Vision Vision based

biological species identification systems

Page 34: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 134

Computer Vision

• Artist's Concept of Rover on Mars,

• an example of an unmanned land-based vehicle. Notice the stereo cameras mounted on top of the Rover. (credit: Maas Digital LLC)

Page 35: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 135

Neural Network

• neural network also neural net n. • A real or virtual device, modeled

after the human brain, in which several interconnected elements process information simultaneously, adapting and learning from past patterns

Page 36: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 136

Neural Network

• Computer Encyclopedia • neural network •A modeling technique based

on the observed behavior of biological neurons and used to mimic (imitate) the performance of a system.

Page 37: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 137

Neural Network

• It consists of a set of elements that start out connected in a random pattern, and, based upon operational feedback, are molded into the pattern required to generate the required results.

• It is used in applications such as robotics, diagnosing, forecasting, image processing and pattern recognition.

Page 38: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 138

Neural Network

Page 39: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 139

Machine Learning

Page 40: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 140

Neural Network

• Accounting Dictionary • Neural Networks • Technology in which computers

actually try to learn from the data base and operator what the right answer is to a question.

Page 41: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 141

Neural Network

• The system gets positive or negative response to output from the operator and stores that data so that it will make a better decision the next time.

• While still in its infancy, this technology shows promise for use in accounting, fraud detection, economic forecasting, and risk appraisals.

• The idea behind this software is to convert the order-taking computer into a "thinking" problem solver.

Page 42: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 142

Neural Network

• Britannica Concise Encyclopedia • neural network • Type of parallel computation in which

computing elements are modeled on the network of neurons that constitute animal nervous systems.

• This model, intended to simulate the way the brain processes information, enables the computer to "learn" to a certain degree.

Page 43: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 143

Neural Network

• A neural network typically consists of a number of interconnected processors, or nodes. Each handles a designated sphere of knowledge, and has several inputs and one output to the network. Based on the inputs it gets, a node can "learn" about the relationships between sets of data, sometimes using the principles of fuzzy logic.

Page 44: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 144

Neural Network

•Neural networks have been used in pattern recognition, speech analysis, oil exploration, weather prediction, and the modeling of thinking and consciousness.

Page 45: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 145

Machine Learning

• Sci-Tech Dictionary

• machine learning (mə′shēn ′lərn·iŋ)

• (computer science) The process or technique by which a device modifies its own behavior as the result of its past experience and performance.

Page 46: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 146

Machine Learning• Wikipedia • machine learning is concerned

with the development of algorithms and techniques that allow computers to "learn".

• At a general level, there are two types of learning: inductive, and deductive. Inductive machine learning methods extract rules and patterns out of massive data sets.

Page 47: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 147

Machine Learning• inductive, • Logic.

– The process of deriving general principles from particular facts or instances.

• Mathematics. – A two-part method of proving a theorem

involving an integral parameter . First the theorem is verified for the smallest admissible value of the integer. Then it is proven that if the theorem is true for any value of the integer, it is true for the next greater value. The final proof contains the two parts .

Page 48: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 148

Machine Learning• inductive, • reasoning from detailed facts to

general principles– Rule induction is an area of machine

learning in which formal rules are extracted from a set of observations .

Page 49: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 149

Machine Learning• deductive. Logic.

– The process of reasoning in which a conclusion follows necessarily from the stated premises; inference by reasoning from the general to the specific .

– reasoning from the general to the particular

– Deduction is the process of drawing conclusions from premises

Page 50: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 150

Machine Learning– Deduction The process of reaching

a conclusion through reasoning from general premises to a specific premise.

– An example of deduction is present in the following syllogism:

– Premise: All mammals are animals. – Premise: All whales are mammals .– Conclusion: Therefore, all whales are

animals.

Page 51: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 151

Machine Learning

• deduction, in logic, form of inference such that the conclusion must be true if the premises are true .

• For example, – if we know that….. all men have two legs – And that …………..John is a man, – it is then logical to deduce that

……………………..John has two legs.

Page 52: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 152

Expert System

• expert systemn. Computer Science.

•A program that uses available information, heuristics, and inference to suggest solutions to problems in a particular discipline.

Page 53: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 153

Expert System• Expert systems • Methods and techniques for

constructing human-machine systems with specialized problem-solving expertise.

• The pursuit of this area of artificial intelligence research has emphasized the knowledge that underlies human expertise and has simultaneously decreased the apparent significance of domain-independent problem-solving theory. In fact, new principles, tools, and techniques have emerged that form the basis of knowledge engineering.

Page 54: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 154

Expert System• Expertise consists of knowledge about a

particular domain, understanding of domain problems, and skill at solving some of these problems.

• Knowledge in any specialty is of two types, public and private.

• Public knowledge includes the published definitions, facts, and theories which are contained in textbooks and references in the domain of study. But expertise usually requires more than just public knowledge.

Page 55: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 155

Expert System

• Human experts generally possess private knowledge which has not found its way into the published literature.

• This private knowledge consists largely of rules of thumb or heuristics.

• Heuristics enable the human expert to make educated guesses when necessary, to recognize promising approaches to problems, and to deal effectively with erroneous or incomplete data.

Page 56: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 156

Expert System

Category Problem addressed

InterpretationsInferring situation descriptions from sensor

data

PredictionInferring likely consequences of given

situations

Diagnosis Inferring system malfunctions from observables

Design Configuring objects under constraints

Planning Designing actions

MonitoringComparing observations to plan

vulnerabilities

Debugging Prescribing remedies for malfunctions

RepairExecuting a plan to administer a prescribed

remedy

InstructionDiagnosing, debugging, and repairing

students' knowledge

Page 57: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 157

Natural Language Processing • Wikipedia

• Natural language processing (NLP) is a subfield of artificial intelligence and linguistics. It studies the problems of automated generation and understanding of natural human languages.

• Natural language generation systems convert information from computer databases into normal-sounding human language, and natural language understanding systems convert samples of human language into more formal representations that are easier for computer programs to manipulate.

Page 58: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 158

Natural Language Processing

• have the same surface grammatical structure. However, in one of them the word they refers to the monkeys, in the other it refers to the bananas:

• the sentence cannot be understood properly without knowledge of the properties and behaviour of monkeys

• We gave the monkeys the bananas because they were hungry and We gave the monkeys the bananas because they were over-ripe.

Page 59: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 159

Natural Language Processing

• A string of words may be interpreted in myriad ways. For example,

1. time moves quickly just like an arrow does; 2. measure the speed of flying insects like you

would measure that of an arrow - i.e. (You should) time flies like you would an arrow.;

3. measure the speed of flying insects like an arrow would - i.e. Time flies in the same way that an arrow would (time them).;

4. measure the speed of flying insects that are like arrows - i.e. Time those flies that are like arrows;

5. a type of flying insect, "time-flies," enjoy arrows (compare Fruit flies like a banana.)

Time flies like an arrow

Page 60: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 160

Natural Language Processing

• English and several other languages don't specify which word an adjective applies to.

• For example, in the string "pretty little girls' school". – Does the school look little? – Do the girls look little? – Do the girls look pretty? – Does the school look pretty?

•"pretty little girls' school"

Page 61: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 161

Question Answering 1

• Russia massed troops on the Czech border.

• POLITICS program [Corbonell,1980)Q1: Why did Russia do this?A1:......................................................................Q1: What should the United States do?A2: .....................................................................

ORA2.........................................................................

Page 62: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 162

Question Answering 2

•Mary went shopping for a new coat.

•She found a red one she really liked.

•When she got it home, she discovered that it went perfectly with her favorite dress.

ELIZA Q1:What did Mary go shopping for?A1: .............................................Q2:What did Mary find she liked?A2:.............................................Q3: Did Mary buy anything ?A3:.............................................

Page 63: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 163

Intelligence require knowledge

1. It is voluminous.2. It is hard to characterize

accurately.3. It is constantly changing.4. It differs from data by being

organized in a way that corresponds to the ways it will be used.

Page 64: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 164

Knowledge Representation and Search for AI

The knowledge captures generalizations.

It can be understood by people who must provide it.

It can easily be modified to correct errors and to reflect changes in the world.

It can be used in many situations even if it is not totally accurate or complete.

It can use to narrow the range of possibilities that must usually be considered.

Page 65: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 165

Common Features of AI Problems

1. The use of computer to do the symbolic reasoning.

2. A focus on problems that do not respond to algorithmic solutions. Heuristic search.

3. Manipulate the significant quantitative features of a situation rather than relying on numeric methods.

4. Dealing with semantic meaning.5. Answer that are neither exact nor optimal but

“sufficient”.6. Domain specific knowledge in solving problems.7. Use meta-level knowledge.

Page 66: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 166

Heuristic

•heu·ris·tic (hyʊ-rĭs'tĭk) adj.

•Of or relating to a usually speculative formulation serving as a guide in the investigation or solution of a problem:

Page 67: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 167

Heuristic

• Of or constituting an educational method in which learning takes place through discoveries that result from investigations made by the student.

• Computer Science. Relating to or using a problem-solving technique in which the most appropriate solution of several found by alternative methods is selected at successive stages of a program for use in the next step of the program.

Page 68: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 168

Heuristic

• Computer Encyclopedia • heuristic • A method of problem solving using

exploration and trial and error methods. Heuristic program design provides a framework for solving the problem in contrast with a fixed set of rules (algorithmic) that cannot vary.

Page 69: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 169

Heuristic

• Business Dictionary • Heuristic • Method of solving problems that

involves intelligent trial and error, such as playing chess. By contrast, an algorithmic solution method is a clearly specified procedure that is guaranteed to give the correct answer.

Page 70: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 170

tic tac toe

Page 71: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 171

Tic Tac Toe

Page 72: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 172

3D Tic Tac Toe

Page 73: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 173

Homework 1

• Read program 1, 2 and 3 and discuss the following criteria. Their Complexity Their use of generalization. The clarity of their knowledge. The extensibility of their approach.

1 2 3

7 8 9

4 5 6Tic-Tac-Toe

Page 74: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 174

Tic-Tac-Toe : Program 1

Page 75: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 175

Tic-Tac-Toe : Program 1

Page 76: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 176

Tic-Tac-Toe : Program 1

• Board : nine element vector representation.

• 0 = blank, 1 =X, 2 = O

• Moveable : Their Complexity = 39 = 19,683

– view vector board as a ternary number (base three)

1 2 3

7 8 9

4 5 6

Page 77: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 177

Tic-Tac-Toe : Program 2

Page 78: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 178

Tic-Tac-Toe : Program 2

Page 79: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 179

Tic-Tac-Toe : Program 2

– an integer indicating which move of the game is about to played.– 1 indicate the first move.– 9 indicate the last move.– Board[5] = 2 mean blank

• Poswin(p) : If it produce (3*3*2) =18 X can win– p = 0 if the player can not win on his next move.

• Poswin(p) : If it produce (5*5*2) =50 O can win• Go(n) : Make a move on square n.

– TURN is odd if it is playing X– TURN is even if it is playing O– More efficient in term of space.

1 2 3

7 8 9

4 5 6

•Board : nine element vector representation.

2 = blank

3 =X

5 = O

Page 80: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 180

Tic-Tac-Toe : Program 2’

Page 81: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 181

Tic-Tac-Toe : Program 2’

Page 82: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 182

Tic-Tac-Toe : Program 2’

• Board : nine element vector representation.• 2 = blank, 3 =X, 5 = O

– an integer indicating which move of the game is about to played.– 1 indicate the first move.– 9 indicate the last move.– Board[5] = 2 mean blank

• Poswin(p) : If it produce MAGIC SQUARE – (8 + 3 + 4) =15 – p = 0 if the player can not win on his next move.

• Go(n) : Make a move on square n. – TURN is odd if it is playing X– TURN is even if it is playing O– More efficient in term of space.

8 3 4

6 7 2

1 5 9

Page 83: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 183

Tic-Tac-Toe : Program 3

Page 84: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 184

Tic-Tac-Toe : Program 3

Page 85: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 185

Tic-Tac-Toe : Program 3

• Board_Position : nine element vector representing the board, a list of board positions that could result from the next move, and a number representing as estimate of how likely the board position is lead to an ultimate win for the player to move.

• Minimax Procedure : in chapter 12. – We maximize the likely hood of winning the game, – While opponent Minimize the likely hood of winning the game

• Decide which of a set of board positions is best.– find highest possible rating.– consider all the moves the component could make next.

See which move is worst for us.... (Assume the opponent will make that move)

• Look forward many steps in advance. • Search tree : need more time• Use AI technique :

1 2 3

7 8 9

4 5 6

Page 86: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 186

The level of the model

1. What is the goal in trying to produce programs that do intelligent things that people do?

2. Are we trying to produce programs that do the tasks the same way people do?

3. Are we attempting to produce programs that simply do the tasks in whatever way appears easiest?

Page 87: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 187

Model human performance

1. To test psychological theories of human performance.

PAPPY {Colby, 1975]

2. To enable computers to understand human reasoning.

3. To enable computers to understand computer reasoning.

Page 88: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 188

TURING TEST

Alan Mathison Turing

Page 89: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 189

TURING TEST

• Columbia Encyclopedia • Turing test, a procedure to test

whether a computer is capable of humanlike thought. As proposed (1950) by the British mathematician Alan Turing, a person (the interrogator) sits with a teletype machine isolated from two correspondents—one is another person, one is a computer.

Page 90: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 190

TURING TEST

•By asking questions through the teletype and studying the responses, the interrogator tries to determine which correspondent is human and which is the computer.

Page 91: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 191

TURING TEST• The computer is programmed to give

deceptive answers, e.g., when asked to add two numbers together, the computer pauses slightly before giving the incorrect sum —to imitate what a human might do, the computer gives an incorrect answer slowly since the interrogator would expect the machine to give the correct answer quickly.

• If it proves impossible for the interrogator to discriminate between the human and the computer, the computer is credited with having passed the test.

Page 92: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 192

Criteria for success

• How will we know if we have succeeded?

• Turing test. Human Computer Person asking?

• DENDRAL : is a program that analyzes organic compounds to determine their structure.

• HUMAN CHEMIST COMPUTER

Page 93: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 193

Homework 1

1. Given the meaning of Artificial Intelligence from your point of view. You may add citation from searching documents in the web or from the text book.

2. Given all AI fields with some explanations.

Page 94: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 194

Answers.com

Page 95: 344-571 ปัญญาประดิษฐ์ (Artificial Intelligence) ผศ. ดร. วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์

Artificial Intelligence Chapter 195

Jim Miller