<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/metasearch" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/metasearch" type="application/rss+xml"></fs:self_link><lastBuildDate>Sun, 24 Apr 2011 04:31:00 GMT</lastBuildDate><title>青青的专栏--C/C++ OOA/D  Design Pattern</title><description>Everyday is everything!</description><link>http://blog.csdn.net/blogrss.aspx?username=metasearch</link><item><title>STL set的使用  less function  override &lt; operator</title><link>http://blog.csdn.net/metasearch/archive/2011/04/24/6358654.aspx</link><description>&lt;br /&gt;一直没有总结过，每次设计都会出一些问题，要知道STL的报错可不是那么容易看懂的。&lt;br /&gt;   假定需要设计的类为Country，各country之类比较的依据是人口population，分析如下：&lt;br /&gt;   情形一：如果类Country类是你本人设计的，即你拥有对Country类的修改权，那么在类中重载operator&lt;br /&gt;class Country&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;    explicit Country(int population)&lt;br /&gt;     {&lt;br /&gt;         m_nPopulation=population;&lt;br /&gt;     }&lt;br /&gt;    void print()&lt;br /&gt;     {&lt;br /&gt;         std::cout&lt;br /&gt;     }&lt;br /&gt;    //注：operator&lt;br /&gt;    bool oper&lt;img src=&quot;http://www1.feedsky.com/t1/504234776/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/24/6358654.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234776/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234776/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 24 Apr 2011 12:31:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/24/6358654.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/24/6358654.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234776/1167556</fs:itemid></item><item><title>Mock 入门，分析stub . mock区别</title><link>http://blog.csdn.net/metasearch/archive/2011/04/20/6336495.aspx</link><description>&lt;br /&gt;Rhion.Mocks今天发布了最新版3.0.1，这是一个Mocking Framework，开发者是Ayende。&lt;br /&gt;&lt;br /&gt;
面向接口编程的测试难的问题&lt;br /&gt;&lt;br /&gt;
Mock
 
Framework的用处在于我们可以在不实现具体对象的情况下，即在没有某个类的实例的情况下对该对象的行为进行模拟。这一特征对于面向接口的编程非常
有用。因为接口的调用者可以在没有接口的具体实现的情况下使用接口，也就是说调用者可以先于接口的实现者行动。也许有人觉得这好像没什么神奇的，即使没有
mock我也一样可以使用接口啊，可是我要问：&lt;br /&gt;&lt;br /&gt;
  “在没有接口实现的情况下，你能对调用接口的代码进行测试吗？”&lt;br /&gt;&lt;br /&gt;
“NullReferenceException”相信很多人都碰到过的吧。由于接口不能定义构造函数，也就无法实例化，导致了调用接口的代码无法运行，当然也就是无法测试。&lt;br /&gt;---------------------------------------------&lt;br /&gt;
Mocking能干什么？&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/504234777/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/20/6336495.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234777/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234777/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 20 Apr 2011 16:50:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/20/6336495.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/20/6336495.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234777/1167556</fs:itemid></item><item><title>Java单元测试进阶之如何打桩（用easymock轻松打桩）</title><link>http://blog.csdn.net/metasearch/archive/2011/04/20/6336475.aspx</link><description>&lt;br /&gt;       打桩（mock）是单元测试的重要内容和难点，学好打桩的技术，做单元测试基本就没什么困难了。 
&lt;br /&gt;       mock有两种，一种是静态的，一种是动态的。静态的就是在写测试代码之前根据需要打桩的类生成另外一个类，这个类就是mock 
object。动态的就是mock 
object是在测试代码运行的时候才生成的。所以很明显，动态打桩比静态打桩要方便地多。本章就是介绍动态打桩的工具。&lt;br /&gt;        早期的动态mock工具只能够mock接口，而不能够mock类；现在的mock工具无论是mock接口还是类都能够轻松完成了。&lt;br /&gt;        
easymock就是其中的佼佼者，easymock现在已经是2.2版本了，本文使用的是easymock1.2_Java1.5版本。使用
easymock能够轻松的mock任何接口，但如果想mock类，那还需要另外一个lib，就是easymockclassextension，使用了
这个工具，你就能轻松地mock你要的任何类了。本文使用的是easymockclassextension1.&lt;img src=&quot;http://www1.feedsky.com/t1/504234778/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/20/6336475.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234778/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234778/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 20 Apr 2011 16:46:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/20/6336475.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/20/6336475.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234778/1167556</fs:itemid></item><item><title>单元测试初探 — 使用Stub快速反馈</title><link>http://blog.csdn.net/metasearch/archive/2011/04/20/6336463.aspx</link><description>作者: chiefsailor | 版权声明: 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明&lt;br /&gt;
 网址: http://www.chiefsailor.net/blog/2010/11/junit-unit-testing-use-stub-agile/&lt;br /&gt;一、单元测试&lt;br /&gt;单
元测试的一个目的就是能够对类的实现进行快速的反馈。这里面有两点很重要，一个是快速，也就是很短的时间，至少要比我们部署功能、点开页面、验证要快，一
般我们限制每个单元测试的执行时间在1秒以内；另外一个是结果反馈，就是能够告诉我这个类的方法实现的正确与否，当我改变代码的时候对类原有的功能有没有
影响。&lt;br /&gt;从上面来看，单元测试是一个很好的开发助手，如果一个类的内聚性很高，不依赖于其他类的时候，相对测试比较容易，但是在实际开发中，
我们经常会遇到依赖其他外部接口的情况，比如：调用其他系统Web 
Service，dll库；或者是调用本系统内的其他模块的接口；或者是访问数据库，网页等其他资源。这些情况下使用单元测试就会相对麻烦一些，而且会让
单元测试的独&lt;img src=&quot;http://www1.feedsky.com/t1/504234779/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/20/6336463.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234779/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234779/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 20 Apr 2011 16:43:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/20/6336463.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/20/6336463.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234779/1167556</fs:itemid></item><item><title>启发式算法简谈</title><link>http://blog.csdn.net/metasearch/archive/2011/04/13/6321759.aspx</link><description>&lt;br /&gt;引言：&lt;br /&gt;解
决实际的问题，要建模型，再求解。求解要选择算法，只有我们对各种算法的优缺点都很熟悉后才能根据实际问题选出有效的算法。但是对各种算法都了如指掌是不
现实的，但多知道一些，会使你的选择集更大，找出最好算法的概率越大。现在研一，要开题了些点文献综述，愿与大家分享。&lt;br /&gt;大自然是神奇的，它造就了很多巧妙的手段和运行机制。受大自然的启发，人们从大自然的运行规律中找到了许多解决实际问题的方法。对于那些受大自然的运行规律或者面向具体问题的经验、规则启发出来的方法，人们常常称之为启发式算法（Heuristic Algorithm）。现在的启发式算法也不是全部来自然的规律，也有来自人类积累的工作经验。&lt;br /&gt;启发式算法的发展：&lt;br /&gt;启发式算法的计算量都比较大，所以启发式算法伴随着计算机技术的发展，取得了巨大的成就。&lt;br /&gt;40年代：由于实际需要，提出了启发式算法（快速有效）。&lt;br /&gt;50年代：逐步繁荣，其中贪婪算法和局部搜索等到人们的关注。&lt;br /&gt;60年代: 反思，发现以前提出的启发式算法速度很快，但是解得质量不能保证，而且对大规&lt;img src=&quot;http://www1.feedsky.com/t1/504234780/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/13/6321759.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234780/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234780/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 13 Apr 2011 22:26:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/13/6321759.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/13/6321759.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234780/1167556</fs:itemid></item><item><title>智能算法的通俗解释(转载)</title><link>http://blog.csdn.net/metasearch/archive/2011/04/13/6321742.aspx</link><description>&lt;br /&gt;在工程实践中，经常会接触到一些比较“新颖”的算法或理论，比如模拟退火，遗传算法，禁忌搜索，神经网络等。这些算法或理论都有一些共同的特性（比如模拟自然过程），通称为“智能算法”。它们在解决一些复杂的工程问题时大有用武之地。&lt;br /&gt;  这些算法都有什么含义？首先给出个局部搜索，模拟退火，遗传算法，禁忌搜索的形象比喻：&lt;br /&gt;&lt;br /&gt;   为了找出地球上最高的山，一群有志气的兔子们开始想办法。&lt;br /&gt;&lt;br /&gt;1．兔子朝着比现在高的地方跳去。他们找到了不远处的最高山峰。但是这座山不一定是珠穆朗玛峰。这就是局部搜索，它不能保证局部最优值就是全局最优值。&lt;br /&gt;&lt;br /&gt;2．兔子喝醉了。他随机地跳了很长时间。这期间，它可能走向高处，也可能踏入平地。但是，他渐渐清醒了并朝最高方向跳去。这就是模拟退火。&lt;br /&gt;&lt;br /&gt;3．兔子们吃了失忆药片，并被发射到太空，然后随机落到了地球上的某些地方。他们不知道自己的使命是什么。但是，如果你过几年就杀死一部分海拔低的兔子，多产的兔子们自己就会找到珠穆朗玛峰。这就是遗传算法。&lt;br /&gt;&lt;br /&gt;4.兔子们知道一个兔的&lt;img src=&quot;http://www1.feedsky.com/t1/504234781/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/13/6321742.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234781/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234781/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 13 Apr 2011 22:20:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/13/6321742.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/13/6321742.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234781/1167556</fs:itemid></item><item><title>Combitorial search summary</title><link>http://blog.csdn.net/metasearch/archive/2011/04/12/6319110.aspx</link><description>&lt;br /&gt;Combitarial search:&lt;br /&gt;     Background:  &lt;br /&gt;     Algorithm 比较：&lt;br /&gt;     Backtracking&lt;br /&gt;     prunning&lt;br /&gt;     heuristic search:&lt;br /&gt;     A*  search&lt;br /&gt;     simutaneous anealing&lt;img src=&quot;http://www1.feedsky.com/t1/504234782/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/12/6319110.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234782/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234782/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 12 Apr 2011 21:55:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/12/6319110.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/12/6319110.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234782/1167556</fs:itemid></item><item><title>A*算法求解最短路径</title><link>http://blog.csdn.net/metasearch/archive/2011/04/12/6318590.aspx</link><description>关于A*算法求解最短路径的问题介绍, 给出了一个搜索最短路径的程序。&lt;br /&gt;近来不少的朋友问我关于 A* 算法的问题, 目的是写一个搜索最短路径的程序. 
这个在鼠标控制精灵运动的游戏中(不算智冠出的那些用鼠标充当键盘方向键的弱智 RPG) 大量使用,尤其是即时战略类的. 但是我个人认为 A* 
算法只适合处理静态路径求解, 对即时战略游戏中大量对象堵塞过道时,疏通交通很难实现(也不是不能实现, 
这需要一个相当好的估价函数,且不能一次搜索路径) 我奇怪的是, A* 算法应该是算法课的基础知识了, 任何一个系统学习过算法的人都应该了解, 本不应该我在这里乱写一通, 
大家随意翻本将计算机算法的书, 就应该看的到. (讲 AI 的书了更是少不了) 不过既然许多朋友问起, 在各个讨论组, BBS 
等地方也屡次见人提到, 特花一下午时间完成本文和附带的程序, 满足我们广大业余游戏制作爱好者的求知欲, 专业人士免看, 以免班门弄斧 ^_^ 
不过如有错误一定指出哟.  在介绍 A* 
算法前,先提一下广度优先搜索,广度优先搜索就是每次将当前状态可能发展的策略逐层展开,比如一&lt;img src=&quot;http://www1.feedsky.com/t1/504234783/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/12/6318590.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234783/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234783/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 12 Apr 2011 17:48:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/12/6318590.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/12/6318590.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234783/1167556</fs:itemid></item><item><title>A*算法理论与实践</title><link>http://blog.csdn.net/metasearch/archive/2011/04/12/6318522.aspx</link><description>[摘要]
                           本文介绍了启发式算法中一种重要而有效的算法------A*算法的理论，并给出了寻路问题的交互式实现。[关键词]
                          A*，启发式算法，最优路径，交互，AS2
                                
                        [历史回顾]       
P. E. Hart 
                          , N. J. Nilsson 和B. Raphael共同发表了一篇在启发式搜索方面有深远影响力的论文：“P. E. Hart, N. J. Nilsson, and B. Raphael. A formal 
                          basis for the heuristic determination of minimum cost paths in graphs&lt;img src=&quot;http://www1.feedsky.com/t1/504234784/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/12/6318522.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234784/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234784/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 12 Apr 2011 17:27:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/12/6318522.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/12/6318522.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234784/1167556</fs:itemid></item><item><title>A*寻路初探（转载）</title><link>http://blog.csdn.net/metasearch/archive/2011/04/11/6316752.aspx</link><description>&lt;br /&gt;在看下面这篇文章之前，先介绍几个理论知识，有助于理解A*
算法。&lt;br /&gt;&lt;br /&gt;启发式搜索：启发式搜索就是在状态空间中的搜索对每一个搜索的位置进行评估，得到最好的位置，再从这个位置进行搜索直到目标。这样可以省略大量无畏的搜索路径，提到了效率。在启发式搜索中，对位置的估价是十分重要的。采用了不同的估价可以有不同的效果。&lt;br /&gt;估价函数：从当前节点移动到目标节点的预估费用；这个估计就是启发式的。在寻路问题和迷宫问题中，我们通常用曼哈顿（manhattan
）估价函数（下文有介绍）预估费用。&lt;br /&gt;A*算法与BFS：可以这样说，BFS
是A*
算法的一个特例。对于一个BFS
算法，从当前节点扩展出来的每一个节点（如果没有被访问过的话）都要放进队列进行进一步扩展。也就是说BFS
的估计函数h
永远等于0
，没有一点启发式的信息，可以认为BFS
是“最烂的”A*
算法。&lt;br /&gt;选取最小估价：如果学过数据结构的话，应该可以知道，对于每次都要选取最小估价的节点，应该用到最小优先级队列（也叫最小二叉堆）。在C++
的STL
里有现成的数据结构p&lt;img src=&quot;http://www1.feedsky.com/t1/504234785/metasearch/csdn.net/s.gif?r=http://blog.csdn.net/metasearch/archive/2011/04/11/6316752.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/csdn.net/metasearch/504234785/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/csdn.net/metasearch/504234785/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 11 Apr 2011 22:30:00 +0800</pubDate><author>青青</author><guid isPermaLink="false">http://blog.csdn.net/metasearch/archive/2011/04/11/6316752.aspx</guid><dc:creator>青青</dc:creator><fs:srclink>http://blog.csdn.net/metasearch/archive/2011/04/11/6316752.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/metasearch/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/metasearch/~1167574/504234785/1167556</fs:itemid></item></channel></rss>
