There are nine lots of 3x3 blocks of cells which for purpose of coordination are numbered left to right and top down (row priority). Note that there are row numbers on the left and column numbers along the top.The puzzle is based on a 9 x 9 grid where the player has to fill in missing numbers between fixed values. The overall process was a good learning exercise and a fun way to make use of a laptop not being stretched.Ī word of warning, please do not run this on critical machines as it will impact performance! The Game I am not trying through these articles to find the best method, rather show a process in optimising an algorithm from a simple set-based start through to one that first optimises the options prior to running the solve step. The next article shows methods to reduce permutations so the execution time goes from a log relationship to puzzle complexity to an almost linear relationship. ![]() In this first article I demonstrate how a single select method can be used to solve a puzzle. I have not read descriptions of other approaches as wanted the challenge and learning opportunity. In preparation for the task I had screen grabbed a single game on my phone from the internet and started with pen and paper exploring the concepts. ![]() As I was on a long flight home and my work computer battery was dead it was my time to play on my personal laptop! I enjoy fiddling with scripting, number sequences, and modulo: which I use whenever a repeating sequence presents itself. I was keen to try solving Sudoku using only T-SQL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |