爬山搜索法

Hill climbing is a variety of Depth-First search. In this type of search (heuristic search), feedback is used to decide the next move in the state space. It is basically used for mathematical computations in the field of Artificial Intelligence.

爬山是多种深度优先搜索。 在这种搜索(启发式搜索)中,反馈用于确定状态空间中的下一个动作。 它基本上用于人工智能领域的数学计算。

The main concept of hill climbing can be understood as follows:

爬山的主要概念可以理解为:

suppose we are climbing the hill and are present at some point. Our task is to reach the peak point of the hill. So, we look at the neighboring points where we can step. If that step takes us closer towards the peak, then we take that step, but if it takes us farther, then we do not take it. If more than two options are available to choose from, then we choose the best one which brings us closest to our goal state.

假设我们正在爬山并且在某个时候出现。 我们的任务是到达山顶。 因此,我们看一下可以跨步的相邻点。 如果这一步使我们更接近高峰,那么我们就采取了这一步,但是如果使我们走得更远,那么我们就不会采取这一步。 如果可以从两个以上的选项中进行选择,那么我们选择最佳的一个,使我们最接近目标状态。

So, the strategy that we follow in the hill-climbing algorithm is that we look at the neighboring point, if it is at a level which is higher than our current position, then we take that step, else we do a further comparison of the other neighboring points.

因此,我们在爬山算法中遵循的策略是查看邻近点,如果该邻近点的水平高于当前位置,则采取该步骤,否则我们将进一步比较其他邻近点。

爬山算法 (Algorithm for Hill Climbing)

Step 1: Evaluate the current initial state. If it is the goal state, then return and quit.

步骤1:评估当前的初始状态。 如果是目标状态,则返回并退出。

Step 2: If the current state is not the goal state, then loop until a solution is found or there are no further operations left for comparison.

步骤2:如果当前状态不是目标状态,则循环运行,直到找到解决方案或没有其他操作可比较。

Step 3: Select a new state for comparison.

步骤3:选择一个新状态进行比较。

Step 4: Evaluate the new state:

步骤4:评估新状态:

  1. If it is the goal state, i.e. the highest peak, then quit.

    如果是目标状态,即最高峰,则退出。

  2. If it is better than the current state, then make it the new current state.

    如果它比当前状态好,则使其成为新的当前状态。

  3. If it is not better than the current state, then go to step 2.

    如果不是比当前状态更好,请转到步骤2。

爬山过程中出现的局限性/问题 (Limitations/problems that occur in hill climbing)

1. Local Maxima:

1.当地千里马:

It is a state which is better than all the existing neighboring states but is not the peak point of the hill.

这是一个比所有现有邻近州都更好的州,但不是山顶。

local maxima

2. Plateau:

2.高原:

A plateau is a flat area and therefore no neighboring state in the search space exists so that it is better than the current point because all of them lie on the same plane.

高原是一个平坦的区域,因此搜索空间中不存在任何相邻状态,因此它比当前点更好,因为它们都位于同一平面上。

Plateau

3. Ridge:

3.山脊:

It is an area in the search space which is higher than the surrounding areas but cannot be searched in a simple move.

它是搜索空间中比周围区域高的区域,但无法通过简单的移动进行搜索。

ridge

翻译自: https://www.includehelp.com/ml-ai/hill-climbing-search-in-artificial-intelligence.aspx

爬山搜索法

Logo

openvela 操作系统专为 AIoT 领域量身定制,以轻量化、标准兼容、安全性和高度可扩展性为核心特点。openvela 以其卓越的技术优势,已成为众多物联网设备和 AI 硬件的技术首选,涵盖了智能手表、运动手环、智能音箱、耳机、智能家居设备以及机器人等多个领域。

更多推荐