Artificial Intelligence JA JA
A Modern Approach
JA JA
Fourth Edition JA
Stuart J. Russell and Peter Norvig
JA JA JA JA JA
with contributions from
JA JA
Nalin Chhibber, Ernest Davis, Nicholas J. Hay, Jared Moore, Alex Rudnick,
JA JA JA JA JA JA JA JA JA JA JA
Mehran Sahami, Xiaocheng Mesut Yang, and Albert Yu
JA JA JA JA JA JA JA
ThisJAsolutionJAmanualJAisJAintendedJAforJAtheJAinstructorJAofJAaJAclass.JAStudentsJAshouldJAuseJAth
eJAonlineJAsiteJAforJAexercisesJAatJAaimacode.github.io/aima-
exercises.J A ThatJAsiteJAisJAopenJAforJAanyoneJAtoJAuse.JAItJAoffersJAsolutionsJAforJAsomeJAbutJAn
otJAallJAofJAtheJAexercises;JAanJAinstructorJAcanJAcheckJAthereJAtoJAseeJAwhichJAonesJAhaveJAsolution
s.J A TheJAexercisesJAareJAonlineJAratherJAthanJAinJAtheJAtextbookJAitselfJAbecauseJA(a)JAtheJAtextbo
okJAisJAlongJAenoughJAasJAis,JAandJA(b)JAweJAwantedJAtoJAbeJAableJAtoJAupdateJAtheJAexercisesJAfreq
uently.
CopyrightJA©JA2022
©JA2023JAPearsonJAEducation,JAHoboken,JANJ.JAAllJArightsJAr
eserved.
,EXERCISES J A JA
1
INTRODUCTION
NoteJAthatJAforJAmanyJAofJAtheJAquestionsJAinJAthisJAchapter,JAweJAgiveJAreferencesJAwhereJAanswer
sJAcanJAbeJAfoundJAratherJAthanJAwritingJAthemJAout—
theJAfullJAanswersJAwouldJAbeJAfarJAtooJAlong.
1.1 What Is AI?
J A JA JA
ExerciseJA1.1.#DEFA
DefineJAinJAyourJAownJAwords:J A (a)JAintelligence,JA(b)JAartificialJAintelligence,JA(c)JAagent,JA(d)
JAra-JAtionality,JA(e)JAlogicalJAreasoning.
a. DictionaryJAdefinitionsJAofJAintelligenceJAtalkJAaboutJA“theJAcapacityJAtoJAacquireJAandJAa
pplyJAknowledge”JAorJA“theJAfacultyJAofJAthoughtJAandJAreason”JAorJA“theJAabilityJAtoJAcom
prehendJAandJAprofitJAfromJAexperience.”J A TheseJAareJAallJAreasonableJAanswers,JAbutJAifJ
AweJAwantJAsomethingJAquantifiableJAweJAwouldJAuseJAsomethingJAlikeJA“theJAabilityJAtoJAa
ctJAsuccessfullyJAacrossJAaJAwideJArangeJAofJAobjectivesJAinJAcomplexJAenvironments.”
b. WeJAdefineJAartificialJAintelligenceJAasJAtheJAstudyJAandJAconstructionJAofJAagentJAprogra
msJAthatJAperformJAwellJAinJAaJAgivenJAclassJAofJAenvironments,JAforJAaJAgivenJAagentJAarch
itecture;JAtheyJAdoJAtheJArightJAthing.J A AnJAimportantJApartJAofJAthatJAisJAdealingJAwithJAthe
JAuncertaintyJAofJAwhatJAtheJAcurrentJAstateJAis,JAwhatJAtheJAoutcomeJAofJApossibleJAactionsJ
AmightJAbe,JAandJAwhatJAisJAitJAthatJAweJAreallyJAdesire.
c. WeJAdefineJAanJAagentJAasJAanJAentityJAthatJAtakesJAactionJAinJAresponseJAtoJAperceptsJAfromJ
AanJAenvi-JAronment.
d. WeJAdefineJArationalityJAasJAtheJApropertyJAofJAaJAsystemJAwhichJAdoesJAtheJA“rightJAthing
”JAgivenJAwhatJAitJAknows.J A SeeJASectionJA2.2JAforJAaJAmoreJAcompleteJAdiscussion.J A TheJ
AbasicJAconceptJAisJAperfectJArationality;JASectionJA??JAdescribesJAtheJAimpossibilityJAofJAac
hievingJAperfectJArational-JAityJAandJAproposesJAanJAalternativeJAdefinition.
e. WeJAdefineJAlogicalJAreasoningJAasJAtheJAaJAprocessJAofJAderivingJAnewJAsentencesJAfromJAol
d,JAsuchJAthatJAtheJAnewJAsentencesJAareJAnecessarilyJAtrueJAifJAtheJAoldJAonesJAareJAtrue.JA(Noti
ceJAthatJAdoesJAnotJAreferJAtoJAanyJAspecificJAsyntaxJAorJAformalJAlanguage,JAbutJAitJAdoesJArequi
reJAaJAwell-definedJAnotionJAofJAtruth.)
ExerciseJA1.1.#TURI
ReadJATuring’sJAoriginalJApaperJAonJAAIJA(Turing,JA1950).J A InJAtheJApaper,JAheJAdiscussesJAsev
eralJAobjectionsJAtoJAhisJAproposedJAenterpriseJAandJAhisJAtestJAforJAintelligence.JAWhichJAobjectionsJAst
illJAcarry
©JA2023JAPearsonJAEducation,JAHoboken,JANJ.JAAllJArightsJAr
eserved.
, SectionJA1.1J A J A WhatJAIs 3
JAAI?
weight?J A AreJAhisJArefutationsJAvalid?J A CanJAyouJAthinkJAofJAnewJAobjectionsJAarisingJAfromJA
develop-
JAmentsJAsinceJAheJAwroteJAtheJApaper?J A InJAtheJApaper,JAheJApredictsJAthat,JAbyJAtheJAyearJA2000,JA
aJAcomputerJAwillJAhaveJAaJA30%JAchanceJAofJApassingJAaJAfive-
minuteJATuringJATestJAwithJAanJAunskilledJAinterrogator.JAWhatJAchanceJAdoJAyouJAthinkJAaJAcom
puterJAwouldJAhaveJAtoday?JAInJAanotherJA25JAyears?
SeeJAtheJAsolutionJAforJAexerciseJA26.1JAforJAsomeJAdiscussionJAofJApotentialJAobjections.
TheJAprobabilityJAofJAfoolingJAanJAinterrogatorJAdependsJAonJAjustJAhowJAunskilledJAtheJAinterr
ogatorJAis.J A AJAfewJAentrantsJAinJAtheJALoebnerJAprizeJAcompetitionsJAhaveJAfooledJAjudges,JAalt
houghJAifJAyouJAlookJAatJAtheJAtranscripts,JAitJAlooksJAlikeJAtheJAjudgesJAwereJAhavingJAfunJArather
JAthanJAtakingJAtheirJAjobJAseriously.J A ThereJAcertainlyJAhaveJAbeenJAexamplesJAofJAaJAchatbotJAo
rJAotherJAonlineJAagentJAfoolingJAhumans.JAForJAexample,JAseeJAtheJAdescriptionJAofJAtheJAJuliaJAch
atbotJAatJAwww.lazytd.com/lti/JAjulia/.J A We’dJAsayJAtheJAchanceJAtodayJAisJAsometh
ingJAlikeJA10%,JAwithJAtheJAvariationJAdependingJAmoreJAonJAtheJAskillJAofJAtheJAinterrogatorJArat
herJAthanJAtheJAprogram.J A InJA25JAyears,JAweJAexpectJAthatJ A theJAentertainmentJAindustryJA(mov
ies,JAvideoJAgames,JAcommercials)JAwillJAhaveJAmadeJAsufficientJAinvestmentsJAinJAartificialJAac
torsJAtoJAcreateJAveryJAcredibleJAimpersonators.
NoteJAthatJAgovernmentsJAandJAinternationalJAorganizationsJAareJAseriouslyJAconsideringJArule
sJAthatJArequireJAAIJAsystemsJAtoJAbeJAidentifiedJAasJAsuch.JAInJACalifornia,JAitJAisJAalreadyJAillegalJAf
orJAmachinesJAtoJAimpersonateJAhumansJAinJAcertainJAcircumstances.
ExerciseJA1.1.#REFL
AreJAreflexJAactionsJA(suchJAasJAflinchingJAfromJAaJAhotJAstove)JArational?JAAreJAtheyJAintelligent?
Yes,JAtheyJAareJArational,JAbecauseJAslower,JAdeliberativeJAactionsJAwouldJAtendJAtoJAresultJAi
nJAmoreJAdamageJAtoJAtheJAhand.J A IfJA“intelligent”JAmeansJA“applyingJAknowledge”JAorJA“using
JAthoughtJAandJAreasoning”JAthenJAitJAdoesJAnotJArequireJAintelligenceJAtoJAmakeJAaJAreflexJAactio
n.
ExerciseJA1.1.#SYAI
ToJAwhatJAextentJAareJAtheJAfollowingJAcomputerJAsystemsJAinstancesJAofJAartificialJAintelligence:
• SupermarketJAbarJAcodeJAscanners.
• WebJAsearchJAengines.
• Voice-activatedJAtelephoneJAmenus.
• SpellingJAandJAgrammarJAcorrectionJAfeaturesJAinJAwordJAprocessingJAprograms.
• InternetJAroutingJAalgorithmsJAthatJArespondJAdynamicallyJAtoJAtheJAstateJAofJAtheJAnetwork.
• AlthoughJAbarJAcodeJAscanningJAisJAinJAaJAsenseJAcomputerJAvision,JAtheseJAareJAnotJAAIJAs
ystems.JATheJAproblemJAofJAreadingJAaJAbarJAcodeJAisJAanJAextremelyJAlimitedJAandJAartifici
alJAformJAofJAvisualJAinterpretation,JAandJAitJAhasJAbeenJAcarefullyJAdesignedJAtoJAbeJAasJAsi
mpleJAasJApossible,JAgivenJAtheJAhardware.
• InJAmanyJArespects.J A TheJAproblemJAofJAdeterminingJAtheJArelevanceJAofJAaJAwebJApageJAto
©JA2023JAPearsonJAEducation,JAHoboken,JANJ.JAAllJArightsJAr
eserved.
, 4 ExercisesJ A 1J A J A Introduc
JAaJAquerytion
JAisJAaJAproblemJAinJAnaturalJAlanguageJAunderstanding,JAandJAtheJAtechniquesJAar
eJArelatedJAtoJAthose
©JA2023JAPearsonJAEducation,JAHoboken,JANJ.JAAllJArightsJAr
eserved.