Go back

Search

lhz07
2025/09/24 15:07:03
10 min read

Search in artificial intelligence

Search is about choice, not map

Option

Backtracking Use Enqueued List Informed
British Museum X X X
DFS ✔️ ✔️ X
BFS X ✔️ X
Hill Climbing (Improved DFS) ✔️ ✔️ ✔️
Beam (Improved BFS) X ✔️ ✔️

Enqueue

Example Queue

Image
From S to G (Using DFS)
(S)
(S A) (S B)
(S A B) (S A D) (S B)
(S A B C) (S A D) (S B)
(S A B C E) (S A D) (S B)
(S A D) (S B)
(S A D G) (S B)

How to Enqueue

DFS: Front

BFS: Back
Hill Climbing: Front Sorted
Beam: Keep W Best

Hill Climbing and Beam: Consider the distance to the goal

Consider how far we've gone so far

  1. Initialize the queue
  2. Test first path in the queue

Image

Admissible Heuristic

The heuristic estimate is guaranteed to be less than the actual distance

It is a perfectly sound way of doing an optimal search when about a map, but it may not work when it's not about a map.
So we need Consistency.

Consistent Heuristic

Qt 程序的打包部署 Vec的retain方法分析

已经到底啦!