Chapter1
1.1 Definein yourownword:(a)intelligence,(b)artificialintelligence,(c)agent.
?Intelligence智能: Dictionarydefinitions of intelligencetalk about―the capacity to acquireandapply knowledge‖ or ―the faculty of thought and reason‖ or ―the ability to comprehend and profit from experience.‖ Theseareallreasonableanswers,butifwewantsomethingquantifiablewewoulduse somethinglike ―the abilityto apply knowledge in orderto performbetterin anenvironment.‖
智能的字典定义有一种学习或应用知识的能力,一种思考和推理的本领,领会并且得益于经验的能 力,这些都是有道理的答案,但如果我们想量化一些东西,我们将用到一些东西像为了在环境中更 好的完成任务使能力适应知识
?Artificialintelligence人工智能:Wedefineartificialintelligenceasthestudyandconstructionofagent programs thatperformwell in a given environment, fora given agentarchitecture.
作为一学习和构造智能体程序,为了一个智能体结构,在被给的环境中可以很好的完成任务。 ?Agen 智能体t:Wedefineanagentasanentity实体 thattakesactioninresponsetoperceptsfroman environment.在一个环境中对一个对象做出反应的实体
1.4Thereare well-knownclassesofproblemthatareintractablydifficult forcomputers,andother classesthatare provablyundecidable. Doesthismean thatAIisimpossible?
No.ItmeansthatAIsystemsshouldavoidtryingtosolveintractableproblems.Usually,thismeansthey can onlyapproximateoptimalbehavior.Noticethathumansdon’tsolveNPcompleteproblemseither.Sometimes they aregoodatsolvingspecificinstanceswithalotofstructure,perhapswiththeaidofbackground knowledge. AIsystems should attempt to dothesame.
1.11“surelycomputerscannotbeintelligent-they candoonly whattheirprogrammerstellthem.”Is the latterstatementtrue,and doesitimplytheformer?
Thisdependsonyourdefinitionof―intelligent‖and―tell.‖Inonesensecomputersonlydowhatthe
programmers command themto do, butinanothersense what the programmers consciouslytellsthe computertodooftenhasvery littletodowithwhatthecomputeractually does. Anyonewhohaswritten a program withanornerybugknowsthis,asdoesanyonewhohaswrittenasuccessfulmachinelearning program.SoinonesenseSamuel―told‖thecomputer―learntoplaycheckersbetterthanI do,andthenplay thatway,‖butinanothersensehetoldthecomputer―followthislearningalgorithm‖anditlearnedtoplay. Sowe’re leftin the situationwhereyoumay ormay notconsider learning to play checkers tobes signof intelligence(oryou maythinkthatlearningto playin the rightwayrequiresintelligence, butnotin thisway), and you maythinktheintelligenceresidesin the programmeror inthe computer
Chapter2
2.1Defineinyourown wordsthefollowingterms:agent,agentfunction,agentprogram,rationality, reflexagent,model-basedagent, goal-based agent, utility-based agent,learning agent. Thefollowingarejust some ofthe manypossible definitionsthatcan bewritten:
?Agent智能体:anentity(实体)thatperceives (感知)andacts行为;or,onethatcanbeviewedas perceivingandacting.Essentially本质上anyobjectqualifies限定;thekeypointisthewaytheobject
implementsanagentfunction.(Note:someauthorsrestricttheterm toprogramsthatoperateonbehalfofa human,or toprogramsthatcan cause someorallof theircode to runonothermachinesona network,as in mobile agents.MOBILE AGENT)
一个具有感知和行文的实体,或者是一个可以观察到感觉的实体,本质上,任何限定对象,只要的观 点是一种对象执行智能体函数的方法。(注意,一些作者)
可以感知环境,并在环境中行动的某种东西。
?Agentfunction智能体函数:afunctionthatspecifiestheagent’sactioninresponsetoeverypossible perceptsequence.智能体相应任何感知序列所采取的行动
?Agentprogram智能体程序:thatprogramwhich,combinedwithamachinearchitecture,implementsan agentfunction.Inoursimpledesigns,theprogramtakesanewperceptoneachinvocationandreturnsan
action.实现了智能函数。有各种基本的智能体程序设计,反应出现实表现的一级用于决策过程的信息 种类。设计可能在效率、压缩性和灵活性方面有变化。适当的智能体程序设计取决于环境的本性 ?Rationality;理性:apropertyofagentsthatchooseactionsthatmaximizetheirexpectedutility,giventhe percepts todate.
?Autonomy自主:apropertyofagentswhosebehaviorisdeterminedbytheirownexperienceratherthan solelybytheir initialprogramming.
? Reflex agent反射型智能体:an agentwhoseactiondependsonlyon thecurrentpercept. 一个智能体的行为仅仅依赖于当前的知觉。
?Model-basedagent基于模型的智能体:anagentwhoseactionisderiveddirectlyfromaninternalmodel of the currentworldstate thatisupdated overtime.
一个智能体的行为直接得自于内在模型的状态,这个状态是当前世界通用的不断更新。 ?Goal-basedagen基于目标的智能体t:anagentthatselectsactionsthatitbelieveswillachieveexplicitly represented goals.智能体选择它相信能明确达到目标的行动。
?Utility-basedagen基于效用的智能体t:anagentthatselectsactionsthatitbelieveswillmaximizethe expectedutilityofthe outcome state.试图最大化他们自己期望的快乐
? Learning agent学习智能体:an agentwhosebehavior improvesovertime based on itsexperience.
2.2Boththeperformancemeasureandtheutilityfunctionmeasurehowwellanagentisdoing. Explain the difference betweenthe two. Aperformance measure(性能度量)isused byanoutside observer toevaluate(评估)howsuccessfulan agent is. It isa function fromhistories to a realnumber. Autilityfunction(效用函数)isused byan agent itselftoevaluatehowdesirable(令人想要)statesorhistoriesare.Inourframework,theutilityfunction
maynotbethesameastheperformancemeasure;furthermore,anagentmayhavenoexplicitutility functionatall, whereas there isalwaysa performancemeasure.
2.5 For each offollowingagents, develop aPEAS description of the task environment: a. Robot soccerplayer;
b. Internetbook-shopping agent; c. AutonomousMarsrover;
d. Mathematician’stheorem-proving assistant.
Some representative, butnotexhaustive, answersare given in Figure S2.1.
智能体类型 机器人足 球运动员 因特网购 书智能体 自主火星 漫步者 数学家的定理 证明助手
性能度量
赢得比赛, 打败对手 获得请求/感兴趣
的书,最小支出 地形探测,汇报, 样本采集分析 环境 执行器 裁判,自己队伍,
其他队伍,自己身体 装置(腿)行走踢球
向下连接,输入提
因特网 交数据,用户显示器 火星,运行装置, 轮子/腿,简单手机装置, 登陆器 分析装置,无线电发射装置
传感器
相机,触摸传感器 加速器
网页,用户请求 相机,触摸传感器 方向传感器
2.6 Foreachof theagent types listed in Exercise2.5,characterizetheenvironmentaccording to the propertiesgiveninSection2.3,andselectasuitable agentdesign.The followingexercisesallconcern the implementation ofenvironmentand agentsfor the vacuum-cleanerworld. Environmentpropertiesare given inFigure S2.2. Suitableagent types:
a.Amodel-basedreflexagentwouldsufficeformostaspects;fortacticalplay,autilitybasedagentwith lookahead would be useful.基于模型的映射能够满足大多数要求,对于战术游戏,向前效用智能体将会 有用
b.Agoal-basedagentwouldbeappropriateforspecificbookrequests.Formoreopenendedtasks—e.g., ―Find me somethinginterestingtoread‖—tradeoffs(权衡折中)areinvolved(棘手的)andthe agentmust compareutilitiesforvarious(不同的) possiblepurchases.基于目标的智能体将适当的明确书的请求, 为更多开放的任务,例如查找我有兴趣读的书,智能体必须比较各种可能的购买方式之间的效用 c.Amodel-basedreflexagentwouldsufficeforlow-levelnavigationandobstacleavoidance;forroute
planning,explorationplanning,experimentation,etc.,somecombinationofgoal-basedand utility-based agentswould be needed.基于模型的映射智能体能够满足低水平的航线和避免障碍,为了路由计划,探 测计划,实验等。这需要基于目标和效用的智能体。
d. For specificprooftasks, agoal-based agent isneeded. For―exploratory‖ tasks—e.g., ―Prove someuseful lemmata concerningoperationson strings‖—a utility-basedarchitecture mightbe needed. 为了明确的检验任务,需要基于目标的智能体,为探测任务,
任务环境
机器人足 球运动员 因特网购 书智能体 自主火星 漫步者
可观察性 部分
确定性 随机的
片段性 连续的
静态性 动态的
离散型 连续的
智能体数 多 单
部分
确定的
连续的
静态的
离散的 连续的
部分
随机的
连续的
动态的 静态的
单 多
数学家的定理
完全 证明助手
确定的 连续的 离散的
Chapter3
3.1Defineinyourownwordsthefollowingterms:state,statespace,searchtree,searchnode,goal, action, successorfunction, and branchingfactor.
?state:Astateisasituationthatanagentcanfinditself in.Wedistinguish twotypesofstates:worldstates (theactualconcretesituationsintherealworld)and representationalstates(theabstractdescriptionsofthe realworld thatare used bythe agentin deliberatingaboutwhat todo).
? state space:Astate spaceisa graph whosenodesarethe setofallstates, and whose linksare actionsthattransformone state intoanother.
?searchtree:Asearchtreeisatree(agraphwithnoundirectedloops)inwhichtherootnodeisthestart state and the setofchildrenforeachnodeconsistsofthe statesreachable bytakinganyaction. ? searchnode:Asearchnodeisa node inthe search tree. ? goal:Agoalisa statethatthe agentistryingto reach.
? action :Anactionissomethingthattheagentcan choose to do.
?successorfunction:Asuccessorfunctiondescribedtheagent’soptions:givenastate,itreturnsasetof (action, state)pairs, whereeachstateisthestatereachablebytakingthe action.
? branching factor:The branchingfactor in asearchtree is the numberofactionsavailabletothe agent.
3.7Givetheinitialstate,goaltest,successorfunction,andcostfunctionforeachofthefollowing. Choose aformulation that isprecise enoughto beimplemented.
a.Youhavetocoloraplanarmapusingonlyfourcolors,insuchawaythatnotwoadjacentregions have the same color.
Initialstate:No regionscolored.
Goaltest:Allregionscolored, andno twoadjacentregionshave thesame color. Successorfunction:Assign a colorto aregion. Costfunction:Numberofassignments.路径耗损
b. A3-foot-tall monkey isin a room wheresomebananasare suspended from the8-footceiling. He wouldliketogetthebananas.Theroomcontainstwostackable,movable,climbable3-foot-high crates. Initialstate:Asdescribed in thetext.初始状态:
Goaltest:Monkeyhasbananas.目标测试:猴子拿到香蕉
后继函数:Hoponcrate;Hopoffcrate;Pushcrate fromonespottoanother;Walk fromonespottoanother; grab bananas(ifstandingon crate). 挪动箱子,,把箱子叠起,走到箱子上拿香蕉 Costfunction:Numberofactions. 行动数量
c.Youhaveaprogramthatoutputs the message“illegalinputrecord”when fedacertain records.Youknowthatprocessingofeachrecordisindependentoftheotherrecords.You discoverwhatrecordisillegal.
Initialstate:consideringallinput records.
Goaltest:consideringa single record, and itgives―illegal input‖ message.
Successorfunction: runagain onthefirsthalfoftherecords;run againon the second halfoftherecords.
Costfunction:Numberofruns.
Note:Thisisa contingencyproblem;you need toseewhetherarun givesanerror message ornotto decide whatto do next.
fileofinput
wantto