i essence o computing THE ESSENCE OF Artificial INTELLIGENCE Alison Cawsey THE ESSENCE OF Artificial Intelligence THE ESSENCE OF COMPUTING SERIES Publishedtitles TheEssenceofProgramDesign TheEssenceofDiscrete Mathematics The EssenceofLogic TheEssenceofProgrammingUsingC++ TheEssenceofArtificial Intelligence Forthcomingtitles TheEssenceofDatabases TheEssenceofHuman-ComputerInteraction The EssenceofZ TheEssenceofCompilers THE ESSENCE OF Artificial Intelligence Alison Cawsey Heriot Watt University Prentice Hall LONDON NEW YORK TORONTO SYDNEY TOKYO SINGAPORE MADRID MEXICO CITY MUNICH PARIS First published 1998 by Prentice HallEurope Campus400, MaylandsAvenue Hemel Hempstead Hertfordshire, HP2 7EZ Adivision of Simon & Schuster International Group ©Prentice Hall Europe 1998 Allrightsreserved. Nopartofthispublicationmaybereproduced, storedinaretrievalsystem,ortransmitted, in anyform,orbyany means, electronic, mechanical, photocopying, recordingorotherwise, without priorpermission, inwriting, fromthe publisher. PrintedandboundinGreatBritainby MPGBooksLtd,Bodmin,Cornwall LibraryofCongress Cataloging-in-Publication Data Cawsey, Alison. Theessenceofartificial intelligence/AlisonCawsey. p. cm. Includesbibliographical references and index. ISBN 0-13-571779-5 (pbk. : alk. paper) 1. Artificial intelligence. 2. Expert systems (Computerscience) I. Title. Q335.C39 1997 006.3—dc21 97-11460 CIP British LibraryCataloguingin Publication Data Acatalogue recordforthisbookisavailable from the British Library ISBN 0-13-571779-5 2 3 4 5 02 01 00 99 98 Contents Foreword vii Preface ix 1 Introduction 1 2 KnowledgeRepresentationandInference 9 3 ExpertSystems 40 4 Using Search inProblem Solving 68 5 Natural LanguageProcessing 98 6 Vision 125 7 MachineLearning andNeural Networks 143 8 Agents and Robots 168 AppendixA Glossary 179 References 184 Index 187 Foreword As the consulting editor for the Essence of Computing Series it is my role to encourage the production of well-focused, high-quality textbooks at prices which students can afford. Since most computing courses are modular in structure, we aim to produce books which will cover the essential material for a typical module. I want to maintain a consistent style forthe series so thatwheneveryou pick upan Essencebookyouknowwhattoexpect. Forexample,eachbookcontains important features such as end-of-chapter summaries and exercises and a glossary of terms, if appropriate. Of course, the quality of the series depends crucially on the skills of its authors and all the books are written by lecturers who have honed theirmaterial in the classroom. Each book in the series takes apragmatic approach and emphasisespractical examples andcase studies. Ouraimisthateachbookwillbecomeessentialreadingmaterialforstudents attendingcore modules in computing. However, we expect students towant to go beyond the Essence books and so all books contain guidance on further readingand relatedwork. An introduction toartificial intelligence isanessentialpartofthecomputing curriculumand thisbookcoversaverywide rangeofAItopicsin asmallspace. The emphasis ofthe book is on practical aspects ofAI and examples are given throughout to illustrate the main techniques. This book will support an introductory module in AI and prepare the reader for a more in-depth study of the many interesting facets of this subject. I am not an AI specialist but I enjoyed reading this book, I learnt a lot and I commend it as a concise and readable introduction to artificial intelligence. RayWelland DepartmentofComputingScience UniversityofGlasgow (e-mail: [email protected])