0
点赞
收藏
分享

微信扫一扫

人工智能——Search问题

古得曼_63b6 2022-05-04 阅读 74
人工智能

人工智能—— Chapter02 Search

问题导向:

  • 我们想采取一些行动来改变世界的状态(但由行为引起的变化完全是可以预料到的)
  • 我们试着采取一系列的行动引导我们达到目标状态(可能是最小化行动的次数,也可能是最小化行动的总成本)
  • 不需要在现实生活中执行行动的同时找到最小解决方案(让所有事都在意料之中)

重要知识点:
Q1:A search problem consists of?

  • A state space S (状态空间——所有节点)
  • An initial state s0(初始状态)
  • Actions A(s) in each state(每个状态下的行动)
  • Transition model Result(s,a)(移动模型——移动方式)
  • A goal test G(s)(目标状态)
  • Action cost c(s,a,s’)(行动损失)
    +1 per step; -10 food; -500 win; +500 die; -200 eat ghost

EXAMPLE——Traveling in Romania
分析Search问题:
在这里插入图片描述
Uninformed Search Methods——盲目搜索

Q2:Uninformed Search Methods and specify the difference?

  • Depth-First Search
  • Breadth-First Search
  • Uniform-Cost Search

DFS expands a deepest node first.
BFS expands a shallowest node first.
UCS expands the lowest g(n) or cost from root to n.

Q3:What is the difference between state space graphs and search trees?

  • Each node in the search tree is an entire PATH in the state space graph.(搜索树中的每个节点都是状态空间图中的一个完整的PATH)
  • In a state space graph, each state occurs only once.(在状态空间图中,每个状态只出现一次)
  • In a state space graph,the goal test is a set of goal nodes (maybe only one).(在状态空间图中,目标测试是一组目标节点(可能只有一个)
  • We construct the tree on demand – and we construct as little as possible.(我们按需构造树,并且尽可能少地构造)

Informed Search——启发式搜索

搜索过程中利用与问题有关的经验信息,引入估计函数(evaluation function)来估计节点位于解路径上的“希望”,函数值越小“希望”越大。

启发函数
用来描述经验信息;描述从当前这个节点到目标节点的最优路径代价的估计。一般用h(n)来表示。

  • A算法:
    f(x) = g(x) +h(x)
  • A*算法:
    f(x) =g(n) + h * (n)

0 <= h(n) <= h*(n)
【注意】:A算法并不能保证一定找到最优解,然后A*算法可以保证一定找到最优解.

举报

相关推荐

0 条评论