![]() Don’t worry, this puzzle is pretty easy and is even easier for a computer when using constraint propagation.īy using constraint propagation, we can teach a computer how to solve almost any Sudoku puzzle by focusing on local constraints. ![]() So how does this method look in action? Well let’s start by looking at the following Sudoku board. In this case, our constraints are squares that can only contain one value ranging from 1 to 9 and must be unique per region. Put simply, it’s a method that allows a computer to move toward a likely solution (propagate) while following the rules of some space and the possible values to use per variable (constraints). Now to teach a computer how to do this, we need to use a common artificial intelligence method called constraint propagation. All you need to do then to solve the puzzle is to repeat this cycle over and over again. This is a good introduction to two common strategies called elimination and only choice, which requires you to list all possible values each square could take (elimination) followed by filling in the squares which have only one possible value listed (only choice). Maybe you ran into a couple forks in the road where you had to pick between two separate paths to find a solution, and one of those paths either helped you solve the puzzle or produced a dead end forcing you to backtrack. There were probably a few times when you had to remember several values for multiple squares. Then maybe you began solving the rest of the squares by eliminating all the possible values a particular square couldn’t take and choose the remaining one. More likely than not, you started out by filling in a square that could’ve only taken one possible value. ![]() Okay, now that you know the rules of Sudoku and hopefully got some experience playing it, you might’ve noticed some patterns in the process you took to find your way to a solution. If you haven’t played Sudoku, go ahead and try it out! People have been playing it for centuries and can be a lot of fun (and sometimes frustrating). Now there are different variants of this puzzle, but we’ll only focus on the original. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |