<p>There is no "easy" way to remove clues from a completed Sudoku grid as the removal process is not linear.</p>

<p>After each removal of a cell or clue you need to check if the Sudoku only has a unique solution.</p>

<p>To check this you need to run a solver that can count all possible solutions (you can stop it after 2 possibilities are found to save time).</p>

<p>The two most popular algorithm used both for solving a Sudoku, counting all the Sudoku solutions and removing cells are backtracking algorithms and dancing links algorithms.</p>

<p>This article explains really well how the dancing links algorithm can be used in Sudokus:
<a href="http://garethrees.org/2007/06/10/zendoku-generation/#section-2" rel="nofollow noreferrer">http://garethrees.org/2007/06/10/zendoku-generation/#section-2</a></p>

<p>Here is another description of a dancing link algorithm in Sudokus written in JavaScript:
<a href="http://www.sudokubum.com/documentation.html" rel="nofollow noreferrer">http://www.sudokubum.com/documentation.html</a> </p>

<p>And here is the full paper about dancing links algorithms in general:
<a href="http://lanl.arxiv.org/pdf/cs/0011047" rel="nofollow noreferrer">http://lanl.arxiv.org/pdf/cs/0011047</a> </p>
Removing cells from a Sudoku solution to make it a puzzle
<p>I am writing a Sudoku application and am currently working on the game generation algorithm. I managed to figure out how to quickly generate a solution (not solve).  I am stumped on how to remove some of the numbers to actually make it into a puzzle, though. My first inclination was to randomly remove a certain number of cells based on the difficulty, but that is not the correct algorithm, because it often renders a puzzle that is unsolvable or has multiple solutions. It also might generate puzzles that don't reflect the requested difficulty.</p>

<p>Here is the code that I have so far. I removed most of the irrelevant code, but if you would like to see something that isn't implemented but used below, please let me know. I can also provide my attempt at the <code>Puzzlefy</code> method if you would like, but I opted out of immediately posting it since it's blatantly wrong (even though it "works").</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;

namespace Sudoku
{
    public class Game
    {
        public enum Difficulty
        {
            VeryEasy,
            Easy,
            Medium,
            Difficult,
            Evil
        }

        private readonly int?[,] _currentItems = new int?[9,9];
        private readonly int?[,] _solution = new int?[9,9];
        private readonly int?[,] _startingItems = new int?[9,9];
        private readonly Difficulty _difficulty;

        public Game(Difficulty difficulty)
        {
            _difficulty = difficulty;
            GenerateSolution();
            Puzzlefy();
        }

        private void GenerateSolution()
        {
            var random = new Random();
            var availableNumbers = new Stack&lt;List&lt;int?&gt;&gt;(81);
            var x = 0;
            var y = 0;

            availableNumbers.Push(AllowableNumbers(_solution, 0, 0).ToList());
            while (x &lt; 9 &amp;&amp; y &lt; 9)
            {
                var currentAvailableNumbers = AllowableNumbers(_solution, x, y).ToList();
                availableNumbers.Push(currentAvailableNumbers);

                // back trace if the board is in an invalid state
                while (currentAvailableNumbers.Count == 0)
                {
                    _solution[x, y] = null;
                    availableNumbers.Pop();
                    currentAvailableNumbers = availableNumbers.Peek();
                    x -= y &gt;= 1 ? 0 : 1;
                    y = y &gt;= 1 ? y - 1 : 8;
                }

                var index = random.Next(currentAvailableNumbers.Count);
                _solution[x, y] = currentAvailableNumbers[index];
                currentAvailableNumbers.RemoveAt(index);

                x += y &lt; 8 ? 0 : 1;
                y = y &lt; 8 ? y + 1 : 0;
            }
        }

        private void Puzzlefy()
        {
            CopyCells(_solution, _startingItems);

            // remove some stuff from _startingItems

            CopyCells(_startingItems, _currentItems);
        }
    }
}
</code></pre>

<p>I am not looking for code, rather an algorithm. How would I go about removing the numbers from the solution to make it into a puzzle?</p>