TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Neat Algorithms - Harmony Search

65 点作者 hbrundage大约 14 年前

4 条评论

TrevorBurnham大约 14 年前
Beautiful CoffeeScript code for metaheuristic optimization. The visualizations are done in Protovis. A common misconception is that Protovis has its own language, since Protovis code is usually in<p><pre><code> &#60;script type="text/javascript+protovis"&#62; </code></pre> tags, which lets you write code like<p><pre><code> function(x) x*x </code></pre> This is actually JavaScript 1.8 (see <a href="https://developer.mozilla.org/en/New_in_JavaScript_1.8" rel="nofollow">https://developer.mozilla.org/en/New_in_JavaScript_1.8</a>); Firefox can handle it directly, but Protovis down-compiles it to standard JavaScript for the benefit of other browsers.<p>That design decision made a lot of sense before CoffeeScript existed, since standard JavaScript becomes extremely unwieldy in a Protovis context. I expect to see a lot more Protovis code done in CoffeeScript in the future.
评论 #2525148 未加载
wickedchicken大约 14 年前
This is very detailed and chock full of great visualizations, but I still can't figure out how harmony search is fundamentally different than your run-of-the-mill genetic algorithm. What am I missing?
评论 #2525459 未加载
评论 #2525908 未加载
评论 #2525460 未加载
tel大约 14 年前
The metaphor with jazz music isn't terribly illuminating.<p>The short of the algorithm is that it generates a set of random vectors and evaluates the objective for each one. It then stochastically chooses between perturbed components from elements in that set and new random components to build a test vector. If that vector performs better than the worst one in the set, it replaces the worst one.<p>I'm pretty sure that process doesn't look very similar to jazz improvisation. It's also not nearly as complicated as it's made out to be. I also am a little frustrated that neither of his problems were good fits for an algorithm like this and so I dunno if I can walk away calling this a neat algorithm.<p>I am super inspired to play with protovis though.
janzer大约 14 年前
While it doesn't have the demo or Coffeescript code, I found the wikipedia page much easier to comprehend what the algorithm actually does. <a href="http://en.wikipedia.org/wiki/Harmony_search" rel="nofollow">http://en.wikipedia.org/wiki/Harmony_search</a>