摘要

  本文会讲明白1)Agent定义(及其理性);2)PEAS及环境特性;3)Agent程序的结构;4)Agent程序的部件如何运转。

前言

接上一章——人工智能简介。
本章主要讲Agent,也对应人工智能定义维度中的Acting rationally (理性Agent)。

此外(划重点):在此和大家分享JADE(Java Agent DEvelopment Framework)一个很酷的在Java上进行Agent开发的框架。你可以用这个框架很轻易的搭建一个MAS(多智能体系统),在这些系统中,各个Agent是自治的,而且可以互相通信,很酷诶!

大家可以去我的CSDN资源页下载,内附JADE安装包,源码,以及官方给的一些必要的说明文档,还有一些很有意思的有关Agent系统实例。


一、Agent定义

1.1 What is an agent? (概念,定义)

定义:
  Anything that can be seen as 1) perceiving its environment through sensors 2) acting upon it through actuators. [1]

特点
  It will run in cycles of perceiving, thinking and acting.
  
例子
  拿我们人类做类比:我们的五官(五感)就是sensors,我们的身体各部分(手,足等)就是actuators。
而robotic agents靠我们给的sensors(camera,microphones 麦克风,infrared detectors 红外探测)来感知环境,它们进行一些计算(computing/think),然后通过各种各样的motors(马达,发动机)/actuators来做出行动。

Agent在身边
Now, it should be clear that the world around you is full of agents like your cell phone, vaccum cleaner, smart fridge, thermostat, camera and even yourself. (移动电话(手机),真空吸尘器,智能冰箱,恒温器,摄像头,甚至你自己,都是Agent)

  这样看来,Agent的概念确实有些广泛…当然,我们也可以具体研究Agent in AI,这时候我们就可以把人给排查在外了。


图一 Agent(一个很萌的形象图)[2]

1.2 What is an intelligent agent (也叫做Rational Agents)?

定义
  An agent which acts in a way that is expected to maximize to its performance measure, given the evidence provided by what it perceived and whatever built-in knowledge it has.

如何衡量/评估Agent的理性?
  The rationality of the agent is measured by its performance measure (that defines the criterion of sucess for an agent), the prior knowledge it has, the environment it can perceive and actions it can perform.


二、Agent的PEAS特性及其环境特性

2.1 PEAS是什么?

定义
PEAS是Agent四个特性的缩写。
Performance, Environment, Actuators and Sensors (PEAS).

例子
自动驾驶汽车拥有以下PEAS:

  • Performance: Safety, time, legal drive, comfort.
  • Environment: Roads, other cars, pedestrians, road signs(道路标志).
  • Actuators: Steering(转向装置,方向盘), accelerator, brake, signal(信号灯), horn(喇叭).
  • Sensors: Camera, sonar(声呐), GPS, speedometer(速度计), odometer(里程表), accelerometer(加速剂), engine sensors, keyboard.

2.2 环境特性

  因为人们需求众多,所以产生了各种各样的intelligent agents,name对应的环境也有不同的类型(特性)

特性1 Fully observable and partially obeservable
  An agent’s sensors give it access to the complete state of the environment at each point in time, if fully observable, otherwise not.
  例子:chess是全局可察的,但是poker(纸牌游戏,你可以想成是斗地主)不是。

特性2 Deterministic and stochastic
  The next state of the environment is completely determined by the current state and the action executed by the agent. (If the environment is deterministic except for (除了) the actions of other agents, then the environment is strategic). Stochastic environment is random in nature and cannot be completely determined. (就是说随机环境不仅仅只是由当前agent的状态和行动决定)
  例子:8-puzzle(九宫格)拥有一个确定性的环境,但是无人驾驶车没有(当然啦,因为这个无人驾驶可是在大马路上开,各种因素影响着环境)。

特性3 Static and dynamic
  The static environment is unchanged while an agent is deliberating (慎重,仔细考虑,深思熟虑). (The environment is semi-dynamic if the environment itself does not change with the passage of time (时间的流逝) but the agent’s performance score does.). A dynamic environment, on the other hand, does change.
  例子:Backgammon (西洋双陆跳棋) has static environment and a roomba (扫地机器人) has dynamic.

特性4 Discrete and continuous
  A limited number of distinct, clearly defined perceptions and actions, constitute a discrete environment.
  E.g., checkers is an example of a discrete environment, while self-driving car evolves in a continuous one.

特性5 Single agent and Multi-agent
  An agent operating just by itself has a single agent environment. However if there are other agents involved, then it’s a multi agent environment.
  例子:Self-driving cars have multi agent environment.

三、Agent的结构,种类

3.1 Agent程序的结构

Agent = architecture + program.

所有Agent都有一样的程序框架!具体如下:
输入:当前感知到的信息
输出:行为
程序:manipulates(操作,控制) input to produce output

3.2 Agent分类

  从Agent能够处理的任务复杂度和智能程度来分类,Agent可以分为四类,而这四类都可以概括为Learning Agents。

1)Simple reflex agents

  在做出行动时,仅仅只基于当前状态,忽略历史(过去的)感知信息。
  They can only work if the environment is fully observable, or the correct action is based on what is perceived currently.

2)Model-based reflex agents

  Agents keep track of partially observable environments. These have an internal state depending on perception history. The environment/ world is modeled based on how it evolves independently from the agent, and how the agent actions affects the world.(保留了部分可观察环境的踪迹(一些信息,路径之类的吧),整个environment/world在此基础上建模)

3)Goal-based agents

  This is an improvement over model based agents, and used in cases where knowing the current state of the environment is not enough. Agents combine the provided goal information with the environment model, to chose the actions which achieve that goal.

  该类agent是在model-based agent上的改进,适用于“光知道当前状态还不够(做出决定,行动)”的情况。其中,agent在做决定的时候考虑了goal information。

  这让我想起了搜索算法。

4)Utility-based agents

  An improvement over goal based agents, helpful when achieving the desired goal is not enough. We might need to consider a cost. For example, we may look for quicker, safer, cheaper trip to reach a destination. This is denoted by a utility function. A utility agent will chose the action that maximizes the expected utility.

  这让我想起了搜索算法中更加复杂的情况(考虑一些其他的cost)。

5)Learning Agents
Learning element: responsible for making improvements.
Performance element: responsible for selecting external actions. It is what we considered as agent so far.
Critic: How well is the agent is doing w.r.t. a fixed performance standard.
Problem generator: allows the agent to explore.

四、Agent程序的部件如何运转

  由于前面讨论的四类都可以归为learning agent,所以这里讨论learning agent中的部件如何运转。

4.1 各部件功能

  • 执行部件即前面考虑的整个Agent,接受感知,选择动作。
  • 学习部件根据评判部件的反馈评价Agent做得如何,从而确定如何修改执行部件。
  • 评判部件根据性能标准告知学习部件Agent的运行情况。当“将军”发生了,评判部件告知学习部件:好事情发生了
    (性能标准是固定的,Agent不应该修改性能标准来适应自己的行为)
  • 问题生成器可向执行部件建议探索性行动,短期内可能是次优的行动,但长远而言可能是更好的行动

4.2 例子

自动驾驶

  • 执行部件:使用执行部件在公路上行驶。执行部件包含选择驾驶行动的全部知识和过程集合。
  • 评判部件:观察评价世界,告知学习部件。不打转向灯变道,听到后车喇叭声。
  • 学习部件:制定修改规则。如果是不好的行动,如何修改执行部件。
  • 问题生成器:例如提议在不同路面试验一下刹车效果。

4.3 Agent各部件如何工作

  Agent程序包含回答以下问题的部件:1)当前状态;2)当前应该采取的行动;3行动后果。

如何表示状态及其转换?
  沿着复杂度和表达能力增长的轴线有三种表示:原子表示、要素化表示、结构化表示。

1)Atomic representation 原子表示

  The state is stored as black box, i.e. without any internal structure.

例子:
  For example, for Roomba(a robotic vaccum cleaner), the internal state is a patch already vaccumed, you don’t have to know anything else. As depicted in the image, such representation works for model and goal based agents and used in various AI algorithms such as search problems and adversarial games.

2)Factored Representation 要素化表示

  The state, in this representation, is no longer a black box. It now has attribute-value pairs, also known as variables that can contain a value.

例子
  For example, while finding a route, you have a GPS location and amount of gas in the tank. This adds a constraint to the problem. As depicted in the image, such representation works for goal based agents and used in various AI algorithms such as constraint satisfaction and bayesian networks.

3)Structured Representation 结构化表示

  In this representation, we have relationships between the variables/ factored states. This induces(引起 cause) logic in the AI algorithms.
  
例子
  For example, in natural language processing, the states are whether the statement contains a reference to a person and whether the adjective in that statement represents that person. The relation in these states will decide, whether the statement was a sarcastic one. This is high level Artificial Intelligence, used in algorithms like first order logic, knowledge-based learning and natural language understanding. [1]

五、资源

依旧是一些ppt,我看了之后感觉还挺有用的,这里分享给大家,有空可以去我的CSDN资源页下载,如果没有积分,也可以直接评论留言,我发给你。

本次分享的资源包含两个PPT文件:
1)Techniques in Artificial Intelligence (对Ai进行定义,描述世界模型Agent结构,一些实例等)
2)Intelligent Agents: Introduction(对Agent,甚至是整个AI人工智能都有一个比较全面的介绍,可以一看)

六、总结

又搞了一下午。2个小时左右吧。由于时间关系,有时候不得不忽略一些细节,如有疑问请评论留言。

参考文献

[1] Rational Agents for Artificial Intelligence. https://hackernoon.com/rational-agents-for-artificial-intelligence-caf94af2cec5
(我发现这个网站很贴合我们的所学内容诶,有空可以多看看。关注一下)
[2] AI series #1 - What is the meaning of agent in Artificial Intelligence? https://www.youtube.com/watch?v=aBiXwvsGmqA

人工智能第二章——Agent(附JADE开发包及源码+Agent相关PPT)相关推荐

  1. eclipser认java源码_java相关:Eclipse查看开发包jar里源代码的方法

    java相关:Eclipse查看开发包jar里源代码的方法 发布于 2020-5-21| 复制链接 摘记: Eclipse查看开发包jar里源代码的方法前言:最近我打算学习一下谷歌的类库Guava,下 ...

  2. python朴素贝叶斯调参_邹博机器学习升级版II附讲义、参考书与源码下载(数学 xgboost lda hmm svm)...

    课程介绍 本课程特点是从数学层面推导最经典的机器学习算法,以及每种算法的示例和代码实现(Python).如何做算法的参数调试.以实际应用案例分析各种算法的选择等. 1.每个算法模块按照"原理 ...

  3. (0045) iOS 开发之MBProgressHUD 源码学习

    (0045) iOS 开发之MBProgressHUD 源码学习 第一部分:学习所得和分析线程 1.  学习到了kvo 的使用 和屏幕方向的旋转判断. 2. 如果调起这个 HUD 的方法不是在主线程调 ...

  4. 站长技术导航二开美化网站源码 网站提交自动秒收录

    今天发现一款还挺不错的导航网源码,分享给大家,源码无BUG,无任何后门,导入数据库,然后修改为自己的信息就可以了,数据库里面也有收录接近一百个网站了. 安装教程: PHP版本需要选择5.6才能运行程序 ...

  5. 小程序源码:最新wordpress黑金壁纸微信小程序 二开修复版源码下载支持流量主收益

    这是一款wordpress系统框架的壁纸小程序源码 相信很多人以前也有用过这类的壁纸小程序源码吧 现在给大家发的这一款是二开修复版的 和以前的安装方式差不多,支持流量主收益模式 介绍: WordPre ...

  6. 最新wordpress黑金壁纸微信小程序 二开修复版源码下载支持流量主收益

    这是一款wordpress系统框架的壁纸小程序源码 相信很多人以前也有用过这类的壁纸小程序源码吧 现在给大家发的这一款是二开修复版的 和以前的安装方式差不多,支持流量主收益模式 介绍: WordPre ...

  7. 最新wordpress黑金壁纸微信小程序 二开修复版源码下载

    这是一款wordpress系统框架的壁纸小程序源码 相信很多人以前也有用过这类的壁纸小程序源码吧 现在给大家发的这一款是二开修复版的 和以前的安装方式差不多, 介绍: WordPress独立后台壁纸小 ...

  8. 微信小程序:最新wordpress黑金壁纸微信小程序 二开修复版源码下载支持流量主收益

    这是一款wordpress系统框架的壁纸小程序源码 相信很多人以前也有用过这类的壁纸小程序源码吧 现在给大家发的这一款是二开修复版的 和以前的安装方式差不多,支持流量主收益模式 介绍: WordPre ...

  9. 最新开运网源码,运势测算网站源码

    最新开运网源码,运势测算网站源码,流年风水起名+八字算命+算财运姻缘+易经周易+占卜测试 主要功能描述: 支持微信/支付宝H5和电脑端扫码支付.手机端可以调起微信/支付宝应用支付 支持后台设置价格.后 ...

最新文章

  1. 如何在实际中计划和执行一个机器学习和深度学习项目
  2. mysql与jframe_java-如何在JFrame上显示从mysql检索到的图像
  3. luogu P4070 [SDOI2016]生成魔咒
  4. Deep Learning 10_深度学习UFLDL教程:Convolution and Pooling_exercise(斯坦福大学深度学习教程)...
  5. 软件测试-APP专项测试
  6. 容器监控工具cAdvisor
  7. RGB565的计算颜色表
  8. 在linux终端绘图,Boxes - 在Linux终端中绘制ASCII艺术盒子和图形
  9. 用html实现彩虹动画
  10. CSS Flexbox布局
  11. 工频风力发电储能逆变电路中的电流检测(霍尔电流传感器ACS712/CH701应用案例)
  12. 「Python条件结构」if…else实现计算税后工资
  13. 图钉能按到墙上吗_图钉怎么钉在墙上
  14. 《黑客秘笈——渗透测试实用指南》—第1章1.1节搭建渗透测试主机
  15. py2neo直接调用cypher操作程序【不用每次都要输入cypher操作命令】
  16. MySQL数据库面试题(50道题含答案和思维导图总结)
  17. 如何查看某个网站的ip地址(根据域名怎么知道IP)
  18. web图书销售管理系统_图书管理系统的主要功能有哪些?
  19. 基于改进区域生长算法的PET-CT成像自动肺实质分割方法(笔记六)
  20. [pytest]夹具使用注意事项

热门文章

  1. 【不务正业的测试狗】从工地佬转为IT界的软件测试工程师
  2. 大学生职业生涯规书怎么写,大学生职业生涯规划与就业指导
  3. Springboot 阿里云服务器 发送 邮件问题
  4. 雅致古典山水中国风PPT模板
  5. mysql去重复查询 性能_MySQL中distinct语句去查询重复记录及相关的性能讨论
  6. OpenGL学习笔记15-Light casters
  7. 毛衣大战,殃及池鱼,亡羊补牢,尚可一试。
  8. CTF Crypto 个人初级训练笔记
  9. MySql史上最全总结
  10. 操作系统 #考研操作系统基础理论