ai-lisp prolog · a classical approach to artifi cial intelligence presents an introduction to the...

14
Dr. Munesh Chandra Trivedi Associate Professor & Dean (Academics) Rajkiya Engineering College, Azamgarh (U.P.) KHANNA BOOK PUBLISHING CO. (P) LTD. Publisher of Engineering and Computer Books 4C/4344, Ansari Road, Darya Ganj, New Delhi-110002 Phone : 011-23244447-48 Mobile: +91-99109 09320 E-mail : [email protected] Website : www.khannabooks.com AI-LISP PROLOG Second Edition

Upload: others

Post on 12-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

Dr. Munesh Chandra Trivedi Associate Professor & Dean (Academics)

Rajkiya Engineering College, Azamgarh (U.P.)

KHANNA BOOK PUBLISHING CO. (P) LTD.Publisher of Engineering and Computer Books

4C/4344, Ansari Road, Darya Ganj, New Delhi-110002Phone : 011-23244447-48 Mobile: +91-99109 09320E-mail : [email protected] : www.khannabooks.com

AI-LISP PROLOG

Second Edition

Page 2: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

Price: ` 399.00

A Classical Approach toARTIFICIAL INTELLIGENCE

Munesh Chandra Trivedi

Copyright © Khanna Book Publishing Co. (P) Ltd.

This book is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, resold, hired out, or otherwise circulated without the publisher’s prior consent in any form of binding or cover other than that in which it is published and without a similar condition including this condition being imposed on the subsequent purchaser and without limiting the rights under copyright reserved above, no part of this publication may be reproduced, stored in or introduced into retrieval system, or transmitted any form or by any means (electronic, mechanical, photocopying, recording or otherwise), without the prior written permission of both the copyright owner and the above mentioned publisher of this book.

ISBN: 978-81-90698-89-4

Edition: 2018

Published by:

Khanna Book Publishing Co. (P) Ltd.4C/4344, Ansari Road, Darya Ganj, New Delhi-110 002Phone: 011-23244447-48 Mobile: +91-9910909320E-mail: [email protected]

Printed in India by:S.P.S. Printers & Binders, Delhi

Page 3: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

Th e ultimate aim of Artifi cial Intelligence is to understand intelligence and to build intelligent software and robots that come close to the performance of humans. the study of how computers can be made to act intelligently? A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation, search, reasoning, and learning, as well as the principal application domains of expert systems, natural language, vision, robotics, software agents and cognitive modelling.

Th roughout the volume, the author provides detailed, well-illustrated treatments of each topic with abundant examples and exercises. Th e authors bring this exciting fi eld to life by presenting a substantial and robust introduction to artifi cial intelligence in a clear and concise course book form. Th is book stands as a core text application-focused and hands-on approach to learning the subject. You’ll fi nd lucid, easy-to-read coverage of problem-solving methods, representation and models, game playing, automated understanding of natural languages, heuristic search theory, robot systems, heuristic scene analysis and specifi c artifi cial-intelligence accomplishments. Abundant illustrations, diagrams and photographs enhance the text, and challenging practice exercises at the end of each chapter test the student’s grasp of each subject.

Th e combination of introductory and advanced material makes A Classical Approach to Artifi cial Intelligence ideal for both the layman and the student of mathematics and computer science. Th e textbook presents concrete algorithms and applications in the areas of agents, logic, search, reasoning under uncertainty, machine learning, neural networks and reinforcement learning.

Topics and features:

Presented in Simple & Easily Understandable Language, an application-focused and hands-on approach to learning the subject.

Provides study exercises of varying degrees of diffi culty at the end of each chapter, with solutions given at the end of the book, includes Real World Examples to Illustrate Concepts.

Supports the text with highlighted examples, defi nitions, theorems, and illustrative cartoons.

Includes chapters on predicate logic, PROLOG, heuristic search, probabilistic reasoning, machine learning and data mining, neural networks and reinforcement learning.

Contains an extensive bibliography for deeper reading on further topics.

Supplies additional teaching resources, including lecture slides and training data for learning algorithms.

Provides Numerous Illustrations, Examples and End Chapter Exercises.

Separate portion of programming is included.

PREFACE TO SECOND EDITION

Page 4: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

Students of computer science and other technical natural sciences will fi nd this easy-to-read textbook excellent for self-study, a high-school level of knowledge of mathematics being the only prerequisite to understanding the material.

YOUR MOTIVATION BEHIND WRITING THIS BOOK

Th ere are many books available in the market on the proposed topic but none of them can be termed as comprehensive. Besides, students face problem in understanding the language of the books. Seeing these problems, it struck our mind that we should come up with a book on Artifi cial Intelligence, which should be simple enough to comprehend and comprehensive enough to encompass all the topics of diff erent institutions and universities.

Th e book is revised as per the latest Syllabus of Degree and Diploma courses in Engineering & Technology prepared by All India Council for Technical Education (AICTE).

What are the courses/markets for which your book could serve as a reference?

— Master of Computer Application— B. Tech (C.S.)— B. Tech (I. T.)— Bachelor of Computer Application— B. Sc./M. Sc. (C.S.)— PGDBM / MBA (I. T.)

Page 5: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

PREFACE TO FIRST EDITION

Th e book has been primarily written for students who take up a fi rst course in “Artifi cial Intelligence”. As such, it is basicaly an introduction to the vast and complex subject of AI. Th e book has been written to present various complex topics in a simple to understand way. As AI is a new subject, there are many controversies associated with various sub-fi elds. In our book we have avoided all such controversies and a simple approach to the subject has been adopted. Our aim is very clear. We do not want to confuse a reader who wants to enter a new fi eld (AI). For example, we are reminded of Turing test. For last fi fty years the debate about its validity is going on. However, in our book the basic test and its importance is described without going into a debate about its validity.

Another problem we faced in writing the book was like answering the question “which came fi rst—the hen or egg.” It was diffi cult to decide whether to give AI programming languages at fi rst or in last? Should MYCIN and DENDRAL be introduced to the reader in the beginning itself so that various chapters where its example is given are easier to follow or at a time when we discuss the expert system.

To a level we have tried to solve the problem (readers being the ultimate judge) by devoting fi rst four chapters of the book for an introduction to AI.

Chapter I introduces the reader to “What is AI?” including its various branches and application areas. Chapter II and III will discuss state space search and various search methods. Reading chapter II and III will be like taking the fi rst dip in a river. Anyone who has bathed in the river can understand that even in hot summers the river water is cold enough to give us a shiver at fi rst dip. Th e authors feel that the reader will get the same feeling when they go through these two chapters. It is our fi rm belief that after reading them you will start enjoying the subject of artifi cial intelligence just like a person who enjoys bathing in the river after the fi rst dip. For those who fi nd the subject matter in these chapters diffi cult, the authors advice to re-read the chapters again because without these clear concepts no one can proceed further. Chapter IV then discusses the problem solving in games. Chapter 5 is devoted to understanding natural languages. Chapter 6 and 7 are about knowledge representation and techniques for knowledge representation. Chapter 8 introduces the reader to expert systems which is a very important fi eld of AI. Chapter 9 and 10 discuss pattern recognition and computer vision. Chapter 11 discuss the computer vision representations while in Chapter 12 we discuss the common sense. Lastly in Chapter 13 we introduce the two programming languages—LISP and Prolog.

Th e complete book has been written in a simple and lucid way. Every eff ort has been made to make the treatments simple, comprehensive and complete. Th e subject matter has been developed through various articles in a step by step manner for easy understanding. Review questions, given at the end of each chapter, are selected with a view to present the model questions for the university examination.

Any suggestion from the readers for the improvement in contents of the book are welcome. I hope the book will be useful for the readers.

Page 6: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,
Page 7: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

1. OVERVIEW OF ARTIFICIAL INTELLIGENCE 1–32

1.1 INTRODUCTION 11.2 DEFINITIONS OF AI 31.3 IS AUTOMATING INTELLIGENCE IS POSSIBLE 51.4 MAN VS. COMPUTERS 5

1.4.1 What computers do better than people? 51.4.2 What people can do better than computers? 6

1.5 SIMULATION OF SOPHISTICATED AND INTELLIGENT BEHAVIOUR 71.5.1 General Problem Solving 91.5.2 Expert Systems 91.5.3 Natural Language Processing 101.5.4 Computer vision 101.5.5 Robotics 111.5.6 Others 12

1.6 HOW AI TECHNIQUES HELP COMPUTERS TO BE SMARTER? 121.7 BRIEF HISTORY OF AI 14

1.7.1 Turing Test 151.8 BRANCHES OF AI 181.9 NATURAL LANGUAGE 191.10 AUTOMATED REASONING 201.11 VISUAL PERCEPTION 22

1.11.1 Types of Visual Perception 231.11.2 Automating Visual Perception 23

1.12 INTELLIGENT AGENTS 241.12.1 Agents and Environments 251.12.2 The Concept of Rationality 251.12.3 Classifi cation of Agents 261.12.4 Application Areas of Intelligent Agents 27

1.13 MAJOR COMPONENTS OF INTELLIGENT SYSTEM 281.14 IMPORTANT DEFINITIONS AND CONCEPTS 29EXERCISE 31

2. PROBLEM SOLVING AND SEARCH 33–74

2.1 PROBLEM SOLVING BY INTELLIGENT COMPUTERS 332.2 PROBLEM FORMULATION 342.3 STATE SPACE REPRESENTATION 352.4 EXAMPLES OF SEARCH PROBLEMS 37

2.4.1 Playing Chess—An Example of State Space Search 372.4.2 The Eight Tile Puzzle 392.4.3 The Fifteen Tile Puzzle 402.4.4 Water Jug Problem 42

CONTENTS

Page 8: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

2.5 PROBLEM REDUCTION 452.6 PRODUCTION SYSTEMS 45

2.6.1 Rules of Production Systems 452.6.2 Architecture of Production System 46

2.7 EXAMPLE OF PRODUCTION SYSTEM-8-PUZZLE PROBLEM 522.8 HEURISTIC SEARCH 532.9 HEURISTIC FUNCTIONS 552.10 TYPES OF HEURISTICS 572.11 CHARACTERISTICS OF PROBLEMS 58

2.11.1 Is The Problem Decomposable? 592.11.2 Can Solution Steps Be Ignored or Undone 612.11.3 Is the Universe Predictable (or Role of Planning) 632.11.4 Is The Good Solution Absolute or Relative? Or Is The Aim Any Solution or the Best

Solution? 642.11.5 Is The Solution A State or A Path? 662.11.6 Role of Knowledge 68

2.12 PROBLEM SOLVING IN AI 69SUMMARY 70EXERCISE 71

3. SEARCH METHODS 75–132

3.1 SEARCHING FOR SOLUTIONS 753.2 UNINFORMED SEARCH METHODS 76

3.2.1 Breadth-First search 773.2.2 Uniform-Cost Search 783.2.3 Depth First Search (DFS) 793.2.4 Depth-limited Search 813.2.5 Iterative Deepening Depth-First Search 82

3.3 INFORMED SEARCH 843.4 GENERATE AND TEST METHOD 853.5 HILL CLIMBING 85

3.5.1 Diffi culties of Hill-Climbing Method 873.5.2 Determination of Heuristic Function—Example 89

3.6 SIMULATED ANNEALING 913.7 BEAM SEARCH 923.8 BEST-FIRST SEARCH 94

3.8.1 Comparison between Hill Climbing and Best- First Search 963.9 BRANCH AND BOUND SEARCH 97

3.9.1 Depth-First Branch and Bound 983.10 FINDING THE BEST SOLUTION—A* SEARCH 99

3.10.1 Desirable Properties of Heuristic Search Algorithms 1033.10.2 Admissibility of A* 104

3.11 ITERATIVE-DEEPENING A* 1043.12 PROBLEM REDUCTION 1053.13 AO* ALGORITHM 1093.14 CONSTRAINT SATISFACTION 1103.15 MEANS-END ANALYSIS 1173.16 HEURISTIC VERSUS SOLUTION GUARANTEED ALGORITHMS 120SUMMARY 123EXERCISE 128

( viii )

Page 9: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

4. PROBLEM SOLVING IN GAMES (Adversarial Search) 133–166

4.1 INTRODUCTION 1334.2 ADVERSIAL SEARCH 1344.3 GAME PLAYING CYCLE 1354.4 A SIMPLE GAME TREE 1364.5 GAME PLAYING SEARCH 1374.6 MINIMAX PROCEDURE 140

4.6.1 Illustration of Minimax Search 1424.6.2 Limitations of Minimax 1434.6.3 Negmax Procedure 144

4.7 ADDITIONAL PRUNING OF GAME TREE 1454.8 ILLUSTRATION OF ALPHA-BETA CUT OFF 1474.9 ADDITIONAL REFINEMENTS 1534.10 HORIZON EFFECT 1554.11 ITERATIVE DEEPENING 158SUMMARY 161EXERCISE 164

5. UNDERSTANDING NATURAL LANGUAGES 167–225

5.1 INTRODUCTION 1675.2 UNDERSTANDING NATURAL LANGUAGES 1685.3 NEED OF NATURAL LANGUAGE UNDERSTANDING 1695.4 WHY IS NATURAL LANGUAGE UNDERSTANDING DIFFICULT 169

5.4.1 Natural Languages Processing System—SHRDLU 1715.5 LEVELS OF KNOWLEDGE USED IN LANGUAGE UNDERSTANDING 1725.6 WORKING OF NATURAL LANGUAGE PROCESSING SYSTEM 1735.7 SYNTACTIC PROCESSING 1775.8 LANGUAGES OF GRAMMARS 1775.9 CLASSIFICATION OF GRAMMAR 178

5.9.1 Transformational Grammars 1795.9.2 Semantic Grammars 1815.9.3 Systemic Grammars 1815.9.4 Fillmore’s Case Grammars 1825.9.5 Unifi cation Grammars 1825.9.6 Context-Free Grammar 182

5.10 PARSING TECHNIQUES 1865.10.1 Top-Down and Bottom-Up Parsing 1895.10.2 Syntactic Parsers 1915.10.3 Chart Parsers 1915.10.4 Finite State Transition Diagrams 192

5.11 TRANSITION NETWORKS 1935.12 CONTEXT-SENSITIVE GRAMMARS 1955.13 AUGMENTED TRANSITION NETWORKS 197

5.13.1 Defi nite Clause Grammar 2005.14 UNIFICATION GRAMMAR 2015.15 SEMANTIC PROCESSING 2035.16 PRAGMATIC ANALYSIS 2055.17 SHANK’S CONCEPTUAL DEPENDENCY THEORY 2065.18 APPLICATIONS OF CD THEORY 215

( ix )

Page 10: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

5.18.1 MARGIE 2155.18.2 SAM 2155.18.3 PAM 2175.18.4 Other CD-based Natural Language Processing Programs 217

5.19 SENTENCE GENERATION 2195.20 MACHINE TRANSLATION 220EXERCISE 222

6. KNOWLEDGE REPRESENTATION 226–247

6.1 ROLE OF KNOWLEDGE REPRESENTATION IN A.I. 2266.1.1 Features of Knowledge representation 228

6.2 TYPES OF KNOWLEDGES 2286.2.1 Declarative and Procedural Knowledge 2286.2.2 Domain Specifi c Knowledge and Domain Independent (Common Sense) Knowledge 229

6.3 REPRESENTING KNOWLEDGE 2296.3.1 Properties for Knowledge Representation Systems 2316.3.2 Advantages of Disadvantages of Knowledge representations 233

6.4 APPROACHES TO KNOWLEDGE REPRESENTATION 2336.4.1 Simple Relational Knowledge 2336.4.2 Inheritable Knowledge 2346.4.3 Inferential Knowledge 2356.4.4 Procedural Knowledge 235

6.5 CATEGORIES OF KNOWLEDGE REPRESENTATION SCHEME 2356.6 LOGIC 236

6.6.1 Propositional Logic 2366.8 REASONING PATTERNS IN PROPOSITIONAL LOGIC 240

6.8.1 Resolution 2416.8.2 Normal Forms in Propositional Logic 242

6.9 RESOLUTION IN PROPOSITIONAL LOGIC 2436.9.1 Limitations of Propositional Logic 245

6.10 THE ROLE OF LOGIC IN ARTIFICIAL INTELLIGENCE 2466.11 THE ROLE OF ARTIFICIAL INTELLIGENCE IN LOGIC 246SUMMARY 247EXERCISE 247

7. TECHNIQUES OF KNOWLEDGE REPRESENTATION 248–301

7.1 FIRST ORDER PREDICATE CALCULUS 2487.1.1 Syntax for FOPL 2497.1.2 Semantics for FOPL 250

7.2 QUANTIFIERS 2517.3 PROPOSITIONAL VS. FIRST-ORDER INFERENCE 253

7.3.1 Inference Role for Quantifi ers 254 7.3.2 Rules for WFF 256

7.4 CONVERSION TO CLAUSAL FORM 2577.5 UNIFICATION 2607.6 RESOLUTION IN PREDICATE LOGIC 2617.7 COMPARISON WITH OTHER LOGICS 2647.8 HORN CLAUSES 2657.9 SEMANTIC NETS 2667.10 PROPERTIES OF SEMANTIC NETS 271

( x )

Page 11: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

7.11 TYPES OF SEMANTIC NETS 2727.12 PARTITIONED SEMANTIC NETS 2727.13 STRUCTURED REPRESENTATION 2757.14 MINSKY’S FRAME SYSTEM THEORY 2787.15 CASE GRAMMAR THEORY 2797.16 PRODUCTION RULES OR RULES 2827.17 FORWARD AND BACKWARD DEDUCTION 2857.18 ADVANTAGES OF PRODUCTION RULES 2897.19 PROBLEMS WITH PRODUCTION RULES 290

7.19.1 Confl ict Resolution 2907.20 APPLICABILITY OF PRODUCTION RULES 2917.21 KNOWLEDGE BASE 2927.22 THE INTERFACE SYSTEM 293SUMMARY 294EXERCISE 298

8. EXPERT SYSTEMS 302–341

8.1 INTRODUCTION 3028.2 BASIC ARCHITECTURE OF AN EXPERT SYSTEM 304

8.2.1 Individuals Involved with Expert Systems 3058.2.2 Advantages and Disadvantages 305

8.3 TYPE OF PROBLEMS SOLVED BY EXPERT SYSTEMS 3068.4 FEATURES OF AN EXPERT SYSTEM 3068.5 EXPERT SYSTEMS ARCHITECTURES 308

8.5.1 Rule-based System Architectures 3088.5.2 Non-production System Architectures 311

8.6 INDIVIDUALS INVOLVED WITH EXPERT SYSTEMS 3168.7 EXPERT SYSTEM HOW IT SHOULD BE? 3178.8 KNOWLEDGE ELICITATION / ACQUISITION 318

8.8.1 Stages of Knowledge Acquisition 3198.8.2 Techniques for Knowledge Elicitation 322

8.9 EXPERT SYSTEM TOOLS 3238.9.1 AI Shells or Expert System Shells 3248.9.2 Automating the Creation of the Knowledge Base 325

8.10 EXISTING EXPERT SYSTEMS 3268.10.1 Dendral 3278.10.2 Mycin 328

8.11 APPLICATIONS OF EXPERT SYSTEM TECHNOLOGY 3318.12 DOMAIN EXPLORATION 3338.13 METAKNOWLEDGE 3348.14 EXPERTISE TRANSFER 3358.15 SELF EXPLAINING SYSTEM 3368.16 DIFFERENCE BETWEEN NEURAL NETWORKS AND EXPERT SYSTEMS 3378.17 LIMITATIONS OF EXPERT SYSTEMS 338SUMMARY 338EXERCISE 340

9. PATTERN RECOGNITION 342–375

9.1 INTRODUCTION 3429.2 THE RECOGNITION AND CLASSIFICATION PROCESS 344

( xi )

Page 12: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

9.3 APPROACHES FOR RECOGNITION 3449.3.1 Structured Description (Syntactic Pattern Recognition) 3449.3.2 Statistical Classifi cation (Decision Theoretic Classifi cation) 346

9.4 SYMBOLIC DESCRIPTION 3499.5 LEARNING CLASSIFICATION PATTERNS 3539.6 MACHINE PERCEPTION 3549.7 COMPUTER VISION 3559.8 DIGITIZATION AND SIGNAL PROCESSING 3559.9 OBJECT IDENTIFICATION 3589.10 SPEECH RECOGNITION 362

9.10.1 Signal Processing 3639.10.2 Noisy Channel Formulation of Statistical Speech Recognition 3649.10.3 Approaches of Statistical Speech Recognition 3649.10.4 Major Design Issues in Speech Systems 3669.10.5 Applications of Speech Recognition 366

9.11 VISION SYSTEM ARCHITECTURES 3679.12 AUTOMATIC NUMBER PLATE RECOGNITION (ANPR) 3699.13 FACE RECOGNITION SOFTWARE 3709.14 FINGER PRINT RECOGNITION 3719.15 ROBOTICS 372SUMMARY 374EXERCISE 375

10. COMPUTER VISION 376–410

10.1 WHAT IS COMPUTER VISION? 37610.2 APPLICATIONS OF COMPUTER VISION 37710.3 STATE OF THE ART 37810.4 RELATED FIELDS 37810.5 TYPICAL TASKS OF COMPUTER VISION 380

10.5.1 Recognition 38110.5.2 Motion 38110.5.3 Scene Reconstruction 38210.5.4 Image Restoration 382

10.6 COMPUTER VISION SYSTEMS 38210.7 THE CHALLENGE OF VISION 38310.8 IMAGE ACQUISITION 384

10.8.1 2D Image Input 38410.8.2 3D Imaging 385

10.9 METHODS OF ACQUISITION 38710.9.1 Laser Ranging Systems 38710.9.2 Structured Light Methods 38710.9.3 More Fringe Methods 38710.9.4 Shape from Shading Methods 38810.9.5 Passive Stereoscopic Methods 38910.9.6 Active Stereoscopic Methods 389

10.10 GEOMETRIC MODELING FORM COMPUTER VISION 38910.10.1 Wireframe Models 39010.10.2 Set-Theoretic Modelling 39010.10.3 Boundary Representation 39110.10.4 Desirable Model Properties for Vision 392

10.11 LINE LABELING 392

( xii )

Page 13: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

10.11.1 Labelling an image 39510.12 HOUGH TRANSFORMS FOR EDGE LINKING (LINE FINDING) 396

10.12.1 Line-Finding in Image 39610.12.2 To Detect Straight Lines in an Image, We Do 397

10.13 RELAXATION LABELLING 39910.14 STATISTICAL RELAXATION TECHNIQUE 40010.15 EDGE DETECTION 40110.16 EDGE FOLLOWING 40310.17 REGION DETECTION 40410.18 RECONSTRUCTION OBJECTS 406SUMMARY 407EXERCISE 409

11. COMPUTER VISION REPRESENTATION 411–439

11.1 REPRESENTATION AND RECOGNITION 41111.1.1 Generalised Cylinders 41211.1.2 Aspect Graphs 41211.1.3 Skeleton Representations 413

11.2 OBJECT RECOGNITION 41311.2.1 Model-Based Recognition 41411.2.2 Geometric Invariants 41511.2.3 Recognition using Invariants 41611.2.4 Invariants 41711.2.5 Invariant Measures 418

11.3 PATTERN RECOGNITION 41911.3.1 Template Matching 419

11.3.1.1 Pixel Level Template Matching 41911.3.1.2 High Level Template Matching 419

11.3.2 Hough Transforms 42011.3.3 Extended Gaussian Images 423

11.4 MODEL BASED OBJECT RECOGNITION 42411.4.1 Tree Search Methods 42411.4.2 The Oshima and Shiral Method (1979) 42511.4.3 The 3DPO Method (1983) 42811.4.4 The ACRONYM Method (1979) 42811.4.5 The Grimson and Lozano-Perez Method (1984) 43011.4.6 Related Grimson and Lozano-Perez Methods 43211.4.7 The Faugeras and Hebert Method (1983) 433

11.5 RELAXATION LABELING METHODS 43411.6 GRAPH SEARCHING 435SUMMARY 438EXERCISE 438

12. COMMON SENSE 440–453

12.1 INTRODUCTION 44012.2 COMMON SENSE SYSTEM 446

12.2.1 The Physical World – Qualitative Physics 44612.2.2 Modeling the Qualitative World 44612.2.3 Reasoning with Qualitative Information 447

12.3 COMMON SENSE ONTOLOGIES 447

( xiii )

Page 14: AI-LISP PROLOG · A Classical Approach to Artifi cial Intelligence presents an introduction to the science of reasoning processes in computers, including knowledge representation,

12.3.1 Time 44712.3.2 Space 44812.3.3 Materials 44812.3.4 Memory Organization 449

12.4 FORMALIZED NONMONOTONIC REASONING 45012.5 SOME FORMALIZATIONS AND THEIR PROBLEMS 45012.6 ABILITY, PRACTICAL REASON AND FREE WILL 45112.7 THREE APPROACHES TO KNOWLEDGE AND BELIEF 452SUMMARY 452EXERCISE 453

13. PROGRAMMING LANGUAGES 454–523

13.1 INTRODUCTION 45413.2 LISP PROGRAMMING 45513.3 BASIC DATA OBJECTS—LISTS AND ATOMS 45713.4 LISP PRIMITIVES OR FUNCTIONS 460

13.4.1 List Selectors 46313.4.2 List Constructors 465

13.5 USER-DEFINED FUNCTIONS IN LISP 46813.5.1 Predicates and Conditionals 47113.5.2 Simple Branching Primitives 47613.5.3 General Branching Primitives 477

13.6 RECURSION AND ITERATION 47913.6.1 Repeating by Recursion 47913.6.2 Repeating by Iteration 480

13.7 MISCELLANEOUS PRIMITIVES 48213.8 PROPERTY LISTS AND ARRAYS 48413.9 PROLOG 48713.10 FEATURES OF PROLOG 48813.11 STRUCTURE OF PROLOG PROGRAM 49013.12 LISTS IN PROLOG 49413.13 CONTROLLING EXECUTION IN PROLOG 49513.14 STARTING PROLOG 49513.15 OTHER AI PROGRAMMING LANGUAGES 511

13.15.1 Small Talk 51113.15.2 Example of a SMALLTALK Program 51213.15.3 POP (POP-11) 513

SUMMARY 516EXERCISE 516

( xiv )