You can play sudoku on this page!
Fri 09 December 2022Sree Rohith Pulipaka
You can find the "Play Sudoku" link on the bottom left corner of the page. As I was building my website, I wanted to integrate fun games into it. I've seen Sudoku since my childhood in the daily newspaper, attempted to solve it by hand a few times but never completed one.
That was before I came to know people made computers solve the puzzle! It must check for each possible number combination that can fill the grid and discard combinations that result in a dead end; 'systematically'. This systematic process is called backtracking. I used this to implement the Sudoku solver in Java Script on this page. Right now, I've set up only one puzzle. When I get more time (motivation), I'll add difficulty levels and more boards.
It should be noted that backtracking is not the only way to solve sudoku. We can use an approach in AI called Hill Climbing as well. There is a component of these type of algorithms called conflict resolution that needs to be dealt with smartly for the solution to scale well. There's yet another class of algorithms called genetic algorithms that I'm yet to explore. Check back in the future for a comprehensive comparison of these methods!