<?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>selene tan &#187; puzzle</title>
	<atom:link href="http://selenetan.com/tag/puzzle/feed/" rel="self" type="application/rss+xml" />
	<link>http://selenetan.com</link>
	<description>reaching for the moon and sky</description>
	<lastBuildDate>Wed, 16 Feb 2011 06:22:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Simple Sudoku and Modes of Thinking</title>
		<link>http://selenetan.com/2010/02/simple-sudoku-and-modes-of-thinking/</link>
		<comments>http://selenetan.com/2010/02/simple-sudoku-and-modes-of-thinking/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:34:00 +0000</pubDate>
		<dc:creator>selene</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[interface design]]></category>
		<category><![CDATA[pattern recognition]]></category>
		<category><![CDATA[puzzle]]></category>
		<category><![CDATA[sudoku]]></category>

		<guid isPermaLink="false">http://selenetan.com/?p=62</guid>
		<description><![CDATA[A while back, I found Simple Sudoku, a freeware Sudoku puzzle maker/solver. It generates puzzles for you to solve, and also has a lot of features to make it easier to solve them. After playing way too much Sudoku in it, I realized why it makes things so much easier. On the surface, Sudoku is [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I found <a href="http://angusj.com/sudoku/">Simple Sudoku</a>, a freeware <a href="http://en.wikipedia.org/wiki/Sudoku">Sudoku</a> puzzle maker/solver. It generates puzzles for you to solve, and also has a lot of features to make it easier to solve them. After playing way too much Sudoku in it, I realized why it makes things so much easier. On the surface, Sudoku is all about logical deduction&#8211;the 9 in this square means you can eliminate 9&#8242;s elsewhere in the row and column, and so on. However, at higher levels, Sudoku is actually about pattern recognition, and that is what Simple Sudoku reveals.</p>
<p><span id="more-62"></span></p>
<p>One feature of Simple Sudoku is that it automatically shows the candidates for a square. This takes away the tedium of having to manually eliminate the obvious candidates, like 9&#8242;s in a row that already has a 9. Still, the candidates sometimes look like a mess.<br />
Simple Sudoku solves this with a feature called candidate filtering. What it does is highlight all squares that might be a particular number, e.g. all possible 9&#8242;s. This makes it easy to see, for example, when there&#8217;s only one possible 9 left in a column.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_lone_6-782602.jpg"><img src="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_lone_6-782598.jpg" border="0" alt="A screenshot of Simple Sudoku that shows candidate filtering on 6's. A now-obvious lone 6 in the rightmost column has been circled." width="263" height="320" /></a></div>
<div style="margin-left: auto; margin-right: auto; text-align: center; width: 60%;">A screenshot of Simple Sudoku that shows candidate filtering on 6&#8242;s. A now-obvious lone 6 in the rightmost column has been circled.</div>
<p>Candidate filtering is good for slightly more advanced deductions, as well. Let&#8217;s say you have one 3&#215;3 cell where all the possible 6&#8242;s are in the same row. You can eliminate 6 as a candidate from the rest of the row. Or, visually, you can do this:</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_eliminate_row-733225.jpg"><img src="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_eliminate_row-733217.jpg" border="0" alt="The same screenshot of Simple Sudoku with filtering on 6's. In the upper-right 3x3 cell, an arrow is drawn from the row of 6's across the row, showing that you can eliminate the other 6's." width="263" height="320" /></a></div>
<div style="margin-left: auto; margin-right: auto; text-align: center; width: 60%;">The same screenshot of Simple Sudoku with filtering on 6&#8242;s. In the upper-right 3&#215;3 cell, an arrow is drawn from the row of 6&#8242;s across the row, showing that you can eliminate the other 6&#8242;s.</div>
<p>There is an advanced Sudoku technique called <a href="http://www.sadmansoftware.com/sudoku/technique12.htm">coloring</a> or <a href="http://www.sudoku129.com/puzzles/tips_43.php">linked candidates</a>. It involves forming a chain of candidate squares where you know that some of the squares contain the candidate, and the rest do not. However, which set of squares contains the candidate is unknown at the start. The technique involves &#8220;coloring in&#8221; the candidate squares in an alternating pattern, e.g. with blue and pink. If any pink square contains the number, then all pink squares will contain the same number, and all blue squares will not. The reverse is true as well.</p>
<p>The technique can be difficult to understand from a description, but in Simple Sudoku, it&#8217;s really easy to do. Filter candidates so that, say, all 5&#8242;s are shown. Find a place where there are only two 5 candidates in a row, column, or large cell. Color one of the squares pink, and one blue. Then continue the chain as long as you can find links where there are only two 5&#8242;s. If you see two pink neighboring each other, then the pinks don&#8217;t have 5&#8242;s and the blues are the ones with 5&#8242;s.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_coloring_anim-749095.gif"><img src="http://selenetan.com/asherarpg/uploaded_images/simple_sudoku_coloring_05a-2-716669.jpg" border="0" alt="" width="263" height="320" /></a></div>
<div style="margin-left: auto; margin-right: auto; text-align: center; width: 60%;">A screenshot showing two neighboring pink squares. Click to view an animation of the process.</div>
<p>Coloring turns a painstaking deduction problem into a simple pattern-recognition problem. Going through the chain of logic step-by-step takes a while and can be prone to error, but marking squares as colors is easy. And on the computer, it&#8217;s easily reversible. I&#8217;ll often start coloring squares even when &#8220;simpler&#8221; deductions can be made because in Simple Sudoku, coloring <em>is</em> a simple deduction.</p>
<p>In general, as you get better at a type of logic puzzle, you start recognizing common sequences of deductions. Internally, you formulate a series of rules: &#8220;If <em>this</em>, then do <em>that</em>.&#8221; What Simple Sudoku and other good puzzle interfaces do is 1) Make it easier to notice common deductions, and 2) Make it easier to spot the &#8220;If this&#8221; part of your rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://selenetan.com/2010/02/simple-sudoku-and-modes-of-thinking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrambling Words for Maximum Fun</title>
		<link>http://selenetan.com/2009/09/scrambling-words-for-maximum-fun/</link>
		<comments>http://selenetan.com/2009/09/scrambling-words-for-maximum-fun/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 13:07:00 +0000</pubDate>
		<dc:creator>selene</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[puzzle]]></category>
		<category><![CDATA[word scrambling]]></category>

		<guid isPermaLink="false">http://selenetan.com/?p=50</guid>
		<description><![CDATA[A while back, I worked on an online Flash version of the game show Don&#8217;t Forget the Lyrics. It&#8217;s a game show where contestants get up and sing along to some music until the music stops dead and they have to fill in the rest of the line. They have three lifelines (a la Who [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I worked on an online Flash version of the game show Don&#8217;t Forget the Lyrics. It&#8217;s a game show where contestants get up and sing along to some music until the music stops dead and they have to fill in the rest of the line. They have three lifelines (a la Who Wants to be a Millionaire) they can use: show the first three words, turn the question into a multiple-choice question, or get their pre-appointed friend to answer for them. The first two are easy to code up, the third not so much. We didn&#8217;t have the budget to record people singing the missing lyrics, so it had to be text-based. We thought of randomly selecting one of the multiple choice answers, but realized that people would probably feel cheated at being given a wrong answer. And it would be too easy to just always give them the right answer.</p>
<p>At some point, I came up with the idea of showing the player a scrambled version of the correct answer. That would leave it up to the player&#8217;s skill to get the correct answer from it, so it wasn&#8217;t a guaranteed success but would still seem fair. Then I had to come up with an algorithm for scrambling words that wasn&#8217;t too easy, but wasn&#8217;t too hard for anyone to solve in the time limit.</p>
<p><span id="more-50"></span><strong>Try 1:</strong> Scramble the whole string, including spaces.<br />
<strong>Sample:</strong> UM  LOYDE L AYEYO HHIAS LSRT MNP OTIM NOPKATSFOHA EEFEN</p>
<p>This was dead easy to code and incredibly hard to solve. Scrambling the spaces in with the rest of the letters made it especially hard, since people automatically read them as word boundaries.</p>
<p><strong>Try 2:</strong> Split the string into words, then scramble each word<br />
<strong>Sample:</strong> I DEAM ITSH AHFL YPNO LAFH MENYKO MTOENSR TO SEAEPL UOY</p>
<p>This was much better, but still pretty hard. The time limit on answering meant that people often ran out of time while trying to unscramble the string. But then I remembered an e-mail forward I&#8217;d seen which claimed that if you leave the first and last letters of a word intact but scramble the rest, people can still pretty much read it.</p>
<p><strong>Try 3:</strong> Split the string into words, freeze the first and last letters, and scramble the middle ones. (For 2-letter words, give a 50% chance of swapping the order.)<br />
<strong>Sample:</strong> I MDAE THIS HALF PONY HLAF MEKONY MSOETNR TO PAESLE YOU</p>
<p>This was too easy. 3-letter words were always in order, since freezing the first and last letters left a 1-letter string to scramble. 4-letter words would stay in order half the time since their inner length-2 string got scrambled.</p>
<p><strong>Try 4:</strong> This had a lot of special cases.</p>
<ol>
<li>Split the string into words. For each word longer than 1 letter:</li>
<li>If the word is 2 letters long, 50% chance of swapping the letters</li>
<li>If the word is 3 letters long, scramble it</li>
<li>If the word is 4 letters long, freeze the first letter and scramble the rest</li>
<li>If the word is 5 or more letters, freeze the first and last letter and scramble the inner letters</li>
</ol>
<p><strong>Sample:</strong> I MEAD THSI HFLA PYON HLFA MEONKY MOESNTR OT PAESLE OUY</p>
<p>The results were really good! Easy enough to solve within the time limit most of the time, and just hard enough to feel good about solving. The computer science geek in me wishes there were some way to do it with fewer special cases and a continuous difficulty scale, but short words really need to be treated differently because of their length. Still, it was a pretty interesting problem. Who knew an e-mail forward would come in so handy?</p>
<p>(Incidentally, the phrase is &#8220;I made this half-pony half-monkey monster to please you&#8221;, which is from the song <a href="http://www.jonathancoulton.com/songdetails/Skullcrusher%20Mountain">Skullcrusher Mountain</a> by Jonathan Coulton. Check it out!)</p>
]]></content:encoded>
			<wfw:commentRss>http://selenetan.com/2009/09/scrambling-words-for-maximum-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

