什么是启发式函数 [英] What is a Heuristic Function

查看:808
本文介绍了什么是启发式函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以用很简单的话来解释它是什么吗?还提供一个示例.因此,例如,如果您必须找到某事物的启发式功能,它的外观应该如何?

Can someone explain in very simple words what it is. Also provide an example. So for example if u have to find the heuristic function of something how is it supposed to look like?

以问题为例:

对于水壶问题 http://www.math. tamu.edu/~dallen/hollywood/diehard/diehard.htm

设计并解释一个允许的启发式函数(h)[不是平凡的h(n)= 0].一项操作的费用定义为执行该操作的1个单位,用于移动每加仑水(填充, 倒空),以及另外1个浪费的单位 每加仑水(空).路径成本(g)为 所有操作的费用之和.

Devise and explain an admissible heuristic function (h) [not the trivial h(n) = 0]. The cost of an action is defined as 1 unit for performing the action, an additional 1 unit for moving each gallon of water (fill, empty, pour), and an additional 1 unit for wasting each gallon of water (empty). The path cost (g) is the sum of the cost of all the actions.

推荐答案

启发式函数,是一种计算问题的近似成本(或对备选方案进行排名)的函数.

A heuristic function, is a function that calculates an approximate cost to a problem (or ranks alternatives).

例如,问题可能是找到到点的最短行驶距离.启发式成本将是到该点的直线距离.它简单快捷进行计算,这是大多数启发式算法的重要属性.实际距离可能会更高,因为我们必须坚持上路,并且很难计算.

For example the problem might be finding the shortest driving distance to a point. A heuristic cost would be the straight line distance to the point. It is simple and quick to calculate, an important property of most heuristics. The true distance would likely be higher as we have to stick to roads and is much harder to calculate.

启发式功能通常与搜索算法结合使用.您可能还会看到术语可允许的,这意味着启发式算法永远不会高估真实成本. 可接纳性可能是一项重要的素质,并且对于某些搜索算法(例如A *)是必需的.

Heuristic functions are often used in combination with search algorithms. You may also see the term admissible, which means the heuristic never overestimates the true cost. Admissibility can be an important quality and is required for some search algorithms like A*.

这篇关于什么是启发式函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆