![]() |
Sudoku Solver Published No.:XZXJ94.000 - Printable Version +- Small Basic Forum (https://litdev.uk/mybb) +-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1) +--- Forum: Standard Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=2) +--- Thread: Sudoku Solver Published No.:XZXJ94.000 (/showthread.php?tid=489) |
Sudoku Solver Published No.:XZXJ94.000 - The Old Guy - 08-30-2025 Hello, I am 'The Old Guy'. I am not new to Small Basic and I am definitely not a guru. I have a liking for Sudoku and was searching the net for a listing in Small basic to solve Sudoku using a backtracking algorithm. Having not found one I decided to compile my own. I am aware there are a lot of solvers available to not require another adaptation to get the job done but once my curiosity was aroused the bee in my bonnet would let me put it down. If the members of this forum are also curious enough to take an interest, I would be happy to take comment or criticism. Thank you. RE: Sudoku Solver Published No.:XZXJ94.000 - AbsoluteBeginner - 08-30-2025 (translated by Google translator) Hello, "Old Guy". ![]() I don't know the game "Sudoku" at all, but I am interested in exploring the possibility of using our proprietary SB neural network for this game. So, I will try to take part in the discussion of the topic "Creating a solver for the game Sudoku" that you started. ![]() RE: Sudoku Solver Published No.:XZXJ94.000 - litdev - 08-30-2025 I've also not seen a working Soduku solver in SB. I don't know what you have so far, but I guess the first part is to program the rules so that any grid can be tested and inconsistencies found. Then code so that each blank square can find its possible values and go from there. Also some way to get a starting grid in easily would be good, like a simple file format to read. As you go I'm sure the community will chip in with ideas... RE: Sudoku Solver Published No.:XZXJ94.000 - WhTurner - 08-30-2025 The file searcher found in my SM library 34 files with the word sudoku in it. Most of the small files are testprograms to draw a grid and help you with the test for possible solutions There are five files with more than 1000 lines, possible to "automatic" solving The are all available in the old published programs, I have not tested them at the moment. The five files are: FDB098 1498 lines JJT479 1404 lines NTS300-0 1067 lines (Nonki Takahasi) SWT064 1519 lines ZDX706 1421 lines Perhaps you can look for use of (part of) these old programs. If you are interested I can give the codenumbers of more files RE: Sudoku Solver Published No.:XZXJ94.000 - litdev - 08-30-2025 Yes, I didn't check through this list - the Nonki one I expect to be good, and it is. RE: Sudoku Solver Published No.:XZXJ94.000 - The Old Guy - 08-31-2025 Thank you for responding to my post I have viewed all of the listings you have recommended but they are very different to my program which is a complete and ready to used program. The program is a Sudoku Solver which allows any published 9x9 unique Sudoku Puzzles to be cloned and then solved. The listing I submitted for review is XZXJ94.000 I am not a novice or guru. Just an amateur who delights in coding using Small Basic I am 79 years of age which gave me to choose my username. RE: Sudoku Solver Published No.:XZXJ94.000 - litdev - 08-31-2025 Hi, I tested it using Nonki's program (NTS300-0) for a start grid - it froze so maybe Nonki's grid is impossible in some way or there is some infinite loop or some other issue in your program. I haven't attempted to debug it as this may be fun for you - a quick look at your code shows it is nicely structured with event loop, subroutines, comments and useful variable names so that is all good ![]() It may be good to somehow link the two programs to provide a test environment? EDIT While I was writing this it completed ![]() RE: Sudoku Solver Published No.:XZXJ94.000 - The Old Guy - 09-01-2025 Thank you for your suggestion, It appears sound. I will take this on board. |