什么是启发式(heuristic)?

一下引自:

http://old.blog.edu.cn/user2/43992/archives/2007/1622479.shtml

 

heuristic (hyu-'ris-tik) is the art and science of discovery and invention. The word comes from the same Greek root as "eureka" meaning "to find". A heuristic for a given problem is a way of directing your attention fruitfully to a solution. It is different from an algorithm in that a heuristic merely serves as a rule-of-thumb or guideline, as opposed to an invariant procedure. Heuristics may not always achieve the desired outcome, but can be extremely valuable to problem-solving processes. Good heuristics can dramatically reduce the time required to solve a problem by eliminating the need to consider unlikely possibilities or irrelevant states. As such, it is particularly useful to those in the process of discovery and the are constantly rethinking their strategies in the face of a stubborn unknown.
--------------------------------------------------------------------------------------------------------------------------

启发式方法(试探法)是一种帮你寻求答案的技术,但它给出的答案是具有偶然性的(subject to chance),因为启发式方法仅仅告诉你该如何去找,而没有告诉你要找什么。它并不告诉你该如何直接从A 点到达B 点,它甚至可能连A点和B点在哪里都不知道。实际上,启发式方法是穿着小丑儿外套的算法:它的结果不太好预测,也更有趣,但不会给你什么30 天无效退款的保证。 

 

驾驶汽车到达某人的家,写成算法是这样的:沿167 号高速公路往南行至Puyallup;从South Hill Mall 出口出来后往山上开4.5 英里;在一个杂物店旁边的红绿灯路口右转,接着在第一个路口左转;从左边褐色大房子的车道进去,就是North Cedar 路714 号。

用启发式方法来描述则可能是这样:找出上一次我们寄给你的信,照着信上面的寄出地址开车到这个镇;到了之后你问一下我们的房子在哪里。这里每个人都认识我们——肯定有人会很愿意帮助你的;如果你找不到人,那就找个公共电话亭给我们打电话,我们会出来接你。

算法和启发式方法之间的差别很微妙,两个术语的意思也有一些重叠。就本书的目的而言,它们之间的差别就在于其距离最终解决办法的间接程度:算法直接给你解决问题的指导,而启发式方法则告诉你该如何发现这些指导信息,或者至少到哪里去寻找它们。

----------------------------------------------------------------------------------------------------------------------------

从上面的启发式算法的解释可以看出,启发式算法的难点是建立符合实际问题的一系列启发式规则。启发式算法的优点在于它比盲目型的搜索法要高效,一个经过仔细设计的启发函数,往往在很快的时间内就可得到一个搜索问题的最优解,对于NP问题,亦可在多项式时间内得到一个较优解。

 

posted @ 2009-04-09 11:02  红袖添香  阅读(6479)  评论(0编辑  收藏  举报