<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx</link><description>In order to make the A* algorithm work we need to get the lowest-estimated-cost-path-discovered-so-far out of the list of paths under consideration. The standard data structure for doing so is called a “priority queue”. Priority queues are so-called because</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Techy News Blog &amp;raquo; Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5364545</link><pubDate>Mon, 08 Oct 2007 17:18:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5364545</guid><dc:creator>Techy News Blog » Path Finding Using A* in C# 3.0, Part Three</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.artofbam.com/wordpress/?p=6131"&gt;http://www.artofbam.com/wordpress/?p=6131&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5376672</link><pubDate>Tue, 09 Oct 2007 07:47:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5376672</guid><dc:creator>Blake</dc:creator><description>&lt;p&gt;Noting the ugly &amp;quot;private SortedDictionary&amp;lt;P, Queue&amp;lt;V&amp;gt;&amp;gt; list = new SortedDictionary&amp;lt;P, Queue&amp;lt;V&amp;gt;&amp;gt;();&amp;quot; led me to wonder - has there been any discussion of supporting 'var' for fields with an initializer like that? &amp;nbsp;At first blush I can't see any risk or breaking change.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5376747</link><pubDate>Tue, 09 Oct 2007 08:05:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5376747</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;There is a serious problem with doing so, unfortunately. Namely, what happens when you say&lt;/p&gt;
&lt;p&gt;public class Foo { &lt;/p&gt;
&lt;p&gt; &amp;nbsp;public var bar = new { Blah = 123 };&lt;/p&gt;
&lt;p&gt;? Now you have a public member of a public type which is of an anonymous type. We have carefully designed anonymous types so that they never escape from methods, and this would break that property. &lt;/p&gt;
&lt;p&gt;If we allowed that then before you know it, people would want an anonymous type defined in a VB assembly to interoperate with one structurally identical exposed by a C# assembly, and we just don't want to go there. &lt;/p&gt;
&lt;p&gt;Until we have a CLR-wide, version-safe strategy for dealing with anonymous types we'll avoid that situation.&lt;/p&gt;
</description></item><item><title>Path Finding Using A* in C# 3.0, Part </title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5376883</link><pubDate>Tue, 09 Oct 2007 08:37:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5376883</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5383502</link><pubDate>Tue, 09 Oct 2007 19:26:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5383502</guid><dc:creator>Pablo</dc:creator><description>&lt;p&gt;Why not just define public var field definations as illegal? and allow the useful private var bar &amp;nbsp;= ... ?&lt;/p&gt;
&lt;p&gt;A private field, which is how fields are most of the time, does not have the 'possible escaped anonymous type' issue you raise. &lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5402669</link><pubDate>Thu, 11 Oct 2007 19:45:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5402669</guid><dc:creator>Alan Oursland</dc:creator><description>&lt;p&gt;Heaps are a nice data structure to use in A* search priority queues. You get an amoratized constant time complexity for insertion and don't have to pay the logn cost until you remove items. Since A* often ends up with a bunch of unexplored nodes on the queue after you find the goal, it saves a bit of time.&lt;/p&gt;
</description></item><item><title>Community Convergence XXXIII</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#5456095</link><pubDate>Mon, 15 Oct 2007 04:25:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5456095</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#7744479</link><pubDate>Sun, 17 Feb 2008 04:49:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7744479</guid><dc:creator>filip_sound</dc:creator><description>&lt;p&gt;SortedDictionary.First(); defined? you're using it like: var pair = list.First(); and also with .Any();&lt;/p&gt;
&lt;p&gt;i can not get it running since this method is not declared. what am i doing wrong?&lt;/p&gt;
&lt;p&gt;filip&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#7744972</link><pubDate>Sun, 17 Feb 2008 05:28:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7744972</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;Are you using C# 3? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you got a &amp;quot;using System.Linq;&amp;quot; directive?&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#7745139</link><pubDate>Sun, 17 Feb 2008 05:42:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7745139</guid><dc:creator>filip_sound</dc:creator><description>&lt;p&gt;hm sorry, i'm still using c# 2. thanks.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#7924286</link><pubDate>Thu, 28 Feb 2008 02:08:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7924286</guid><dc:creator>filip_sound</dc:creator><description>&lt;p&gt;switched to c#3.0 now... &lt;/p&gt;
&lt;p&gt;the results increased from 300ms to 15ms for my pathfinder :) great!&lt;/p&gt;
</description></item><item><title>MicroQuest – AStar Pathfinding</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#8652223</link><pubDate>Wed, 25 Jun 2008 17:22:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8652223</guid><dc:creator>Marc: My Words</dc:creator><description>&lt;p&gt;The first thing I want to be able to do in MicroQuest is move my &amp;amp;quot;unit&amp;amp;quot; around the &amp;amp;quot;game&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#9516144</link><pubDate>Sat, 28 Mar 2009 20:11:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9516144</guid><dc:creator>observer</dc:creator><description>&lt;p&gt;Performance of the SortedDictionary is reportedly very slow. It might be worthwhile to write your own implementation.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://dotnetperls.com/Content/SortedDictionary.aspx"&gt;http://dotnetperls.com/Content/SortedDictionary.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Three</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/08/path-finding-using-a-in-c-3-0-part-three.aspx#9609436</link><pubDate>Wed, 13 May 2009 18:25:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9609436</guid><dc:creator>Vijay</dc:creator><description>&lt;p&gt;Can we store multiple same priority items for e.g.&lt;/p&gt;
&lt;p&gt;(1, &amp;nbsp;objA)&lt;/p&gt;
&lt;p&gt;(1, &amp;nbsp;objB)&lt;/p&gt;
&lt;p&gt;(2, objeCJ)&lt;/p&gt;
&lt;p&gt;(2, objK)&lt;/p&gt;
</description></item></channel></rss>