图搜索基础(Graph Search Basis)

文章介绍了图搜索在解决问题中的应用,从状态空间图的概念开始,讨论了从起始状态X_s开始的搜索树生成。它涵盖了BFS(广度优先搜索)和DFS(深度优先搜索),并强调了启发式搜索的重要性,其中启发式函数用于指导搜索过程,如欧几里得距离和曼哈顿距离作为接近目标的估计。
摘要由CSDN通过智能技术生成

图搜索基础(Graph Search Basis)

在这里插入图片描述

State space graph: a mathematical representation of a search algorithm

• For every search problem, there’s a corresponding state space graph 
• Connectivity between nodes in the graph is represented by (directed or undirected) edges

The search always start from start state XS

• Searching the graph produces a search tree
• Back-tracing a node in the search tree gives us a path from the start state to that node
• For many problems we can never actually build the whole tree, too large or inefficient – we only want to reach the goal node asap.
Loop
	• Remove a node from the container according to some pre-defined score function
		• Visit a node
	• Expansion: Obtain all neighbors of the node
		• Discover all its neighbors
	• Push them (neighbors) into the container
End Loop

在这里插入图片描述

2.1.1 BFS

在这里插入图片描述

2.1.2 DFS

在这里插入图片描述

2.1.3 Heuristic search(启发式搜索)

• BFS and DFS pick the next node off the frontiers based on which was “first in” or “last in”.
(BFS和DFS根据哪个节点是“先到”或“后到”,从边界中挑选下一个节点。)
• Greedy Best First picks the “best” node according to some rule, called a heuristic.
(首先根据一些称为启发式的规则选择“最佳”节点。)
• Definition: A heuristic is a guess of how close you are to the target.
(定义:启发式是对你离目标有多近的猜测。)
• A heuristic guides you in the right direction.(启发式指导你找到正确的方向。)
• A heuristic should be easy to compute.(启发式应该易于计算。)

在这里插入图片描述

• Euclidean Distance (黄色)
• Manhattan Distance (绿色)
Both are approximations for the actual shortest path.

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值