I want to create a Sudoku puzzle, and I want it to be of moderate difficulty.
There's a specific pattern I want to include, called the X-Wing pattern:
This occurs when two numbers form locked pairs - the two squares are the only ones of a specific number in a row or column. As a result, the other in that row or column can be eliminated.
I want to create Sudoku puzzles which require the use of this pattern to be solved, partially because I want to practice it, but also partially because my friends and I like to swap difficult puzzles.
Currently, I use the "generate a random Sudoku and remove numbers" method to create new puzzles, then check in a solver to see whether it's valid and what patterns are used.
How do I go about modifying or creating a new generation process to ensure I will create puzzles with the X-Wing pattern?