<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arne Aase &#187; Kodehjelp</title>
	<atom:link href="http://www.arneaase.net/category/kodehjelp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arneaase.net</link>
	<description>Stuff i find interesting</description>
	<lastBuildDate>Tue, 17 Mar 2009 22:51:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Weekend fun</title>
		<link>http://www.arneaase.net/2008/08/weekend-fun/</link>
		<comments>http://www.arneaase.net/2008/08/weekend-fun/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 15:33:31 +0000</pubDate>
		<dc:creator>Arne Aase</dc:creator>
				<category><![CDATA[Coding competition]]></category>
		<category><![CDATA[Kodehjelp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.arneaase.net/?p=9</guid>
		<description><![CDATA[Mats hosted a little competition last weekend. The main goal of the competition was to make a program which found the shortest path from . to X in a labyrinth, and the code size should be as small as possible.
My first approach was a depth-first seach algorithm, but when I ran the code on large [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://e-mats.org/">Mats</a> hosted a little <a title="competition" href="http://e-mats.org/2008/08/finding-your-way-around-for-the-weekend/" target="_blank">competition</a> last weekend. The main goal of the competition was to make a program which found the shortest path from . to X in a labyrinth, and the code size should be as small as possible.</p>
<p>My first approach was a <a href="http://en.wikipedia.org/wiki/Depth-first_search" target="_blank">depth-first seach</a> algorithm, but when I ran the code on large labyrinths the algorithm took to long time. Then I tried a <a href="http://en.wikipedia.org/wiki/Breadth-first_search">breadth-first search</a> algorithm which proved much faster and stable on finding the shortest path.</p>
<p>Even if I did manage to get my code down to 518 bytes, I didn&#8217;t even get close to the winner, which got it down to 253 (results can be found <a title="here" href="http://e-mats.org/2008/08/the-results-of-our-weekend-challenge/" target="_blank">here</a>). You can take a look at my code <a href="http://www.arneaase.net/resources/kodehjelp/maze_pretty.phps" target="_self">here</a>, it isn&#8217;t as advanced as the other examples shown on mats&#8217; page but it works and finds the correct answer quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arneaase.net/2008/08/weekend-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
