<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ability to pass custom heuristic formula to pathfinder.search]]></title><description><![CDATA[<p>As described. It would be nice to be able to pass a custom heuristic to pathfinder as a function.</p>
<p><a href="http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html" rel="nofollow">http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html</a></p>
]]></description><link>http://screeps.com/forum/topic/3147/ability-to-pass-custom-heuristic-formula-to-pathfinder-search</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 21:23:04 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/3147.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Jan 2021 10:23:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p>As described. It would be nice to be able to pass a custom heuristic to pathfinder as a function.</p>
<p><a href="http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html" rel="nofollow">http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html</a></p>
]]></description><link>http://screeps.com/forum/post/16228</link><guid isPermaLink="true">http://screeps.com/forum/post/16228</guid><dc:creator><![CDATA[CrAzYDubC]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p>Have you seen the <code>heuristicWeight</code> option?</p>
]]></description><link>http://screeps.com/forum/post/16240</link><guid isPermaLink="true">http://screeps.com/forum/post/16240</guid><dc:creator><![CDATA[SystemParadox]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p>Yes. Read the attached article. <code>heuristicWeight</code> equal to the 'scale' listed in the article. I am asking to overwrite the existing A* formula <code>F = G + weight * H</code>, with a different one. I wrote my own A* function, but it will always be slower than pathfinder due to server side caching.</p>
]]></description><link>http://screeps.com/forum/post/16261</link><guid isPermaLink="true">http://screeps.com/forum/post/16261</guid><dc:creator><![CDATA[CrAzYDubC]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/4837">@crazydubc</a> As far as I know, calling js functions from a native module is heavy. The heuristic function is called for every point being added to the open set, which is a lot. The total overhead likely would be too high for a pathfinder with a custom heuristic formula to be useful in the game.</p>
<p>If someone wants to give it a try, please remember that it's a part of the driver component which is <a href="https://github.com/screeps/driver" rel="nofollow">open-sourced</a>.</p>
]]></description><link>http://screeps.com/forum/post/16263</link><guid isPermaLink="true">http://screeps.com/forum/post/16263</guid><dc:creator><![CDATA[o4kapuk]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/183">@o4kapuk</a> Well, damn. Then a custom A* is the answer. Thanks man!</p>
]]></description><link>http://screeps.com/forum/post/16264</link><guid isPermaLink="true">http://screeps.com/forum/post/16264</guid><dc:creator><![CDATA[CrAzYDubC]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Invalid Date]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/4837">@CrAzYDubC</a>, I read through the article but it didn't seem like it was doing anything other than changing the weight. Unless it was changing dynamically during the search? Not sure what the implication of that is?</p>
<p>I'm really intrigued to know what you are using this for!</p>
]]></description><link>http://screeps.com/forum/post/16266</link><guid isPermaLink="true">http://screeps.com/forum/post/16266</guid><dc:creator><![CDATA[SystemParadox]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Ability to pass custom heuristic formula to pathfinder.search on Mon, 25 Jan 2021 17:18:40 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="http://screeps.com/forum/uid/1624">@systemparadox</a> The implication may be quite practical. For example I once found <a href="https://factorio.com/blog/post/fff-317" rel="nofollow">the blog post about pathfinding</a> in the Factorio devs blog, they split the world onto square chunks (which we have out of the box), do reverse pathfinding over chunks, like <code>Game.map.findRoute</code> but keeping the closed set, and then use standard A* (not even JPS!) with a custom heuristic function to use the saved closed set of chunks search as a guide.</p>
]]></description><link>http://screeps.com/forum/post/16267</link><guid isPermaLink="true">http://screeps.com/forum/post/16267</guid><dc:creator><![CDATA[o4kapuk]]></dc:creator><pubDate>Mon, 25 Jan 2021 17:18:40 GMT</pubDate></item></channel></rss>