sudoku

How to get all possible solutions using backtracking algorithm?

孤者浪人 提交于 2021-02-10 05:00:32
问题 I'm using the backtracking algorithm described in this youtube video. Now, I should be able to get ALL possible solutions. Am I able to do this with the backtracking algoritme and how? If not possible, which other (simple) algorithm should I use? 回答1: This question is not a great fit for this site since it does not appear to be about actual code. But I'll take a shot at it anyways. Of course you can get all possible solutions with a backtracking algorithm. Remember how a backtracking

How to get all possible solutions using backtracking algorithm?

喜夏-厌秋 提交于 2021-02-10 04:59:25
问题 I'm using the backtracking algorithm described in this youtube video. Now, I should be able to get ALL possible solutions. Am I able to do this with the backtracking algoritme and how? If not possible, which other (simple) algorithm should I use? 回答1: This question is not a great fit for this site since it does not appear to be about actual code. But I'll take a shot at it anyways. Of course you can get all possible solutions with a backtracking algorithm. Remember how a backtracking

What's the worst-case valid sudoku puzzle for simple backtracking brute force algorithm?

那年仲夏 提交于 2021-02-07 09:48:59
问题 The " simple/naive backtracking brute force algorithm", "Straightforward Depth-First Search" for sudoku is commonly known and implemented. and no different implementation seems to exist. (when i first wrote this question.. i wanted to mean we could completely standardize it, but the wording is bad..) This guy has described the algorithm well i think: https://stackoverflow.com/a/2075498/3547717 Edit: So let me have it more specified with pseudo code... var field[9][9] set the givens in 'field'

Sudoku solver in JS

情到浓时终转凉″ 提交于 2021-01-21 05:12:43
问题 I'm trying to write an algorithm that can solve sudoku. For now, my code works till supplyGrid is out of numbers. When it happens it should go back and try another number, right? To be honest I have no clue how to achive that. var grid = [ [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0,

Sudoku solver in JS

和自甴很熟 提交于 2021-01-21 05:11:21
问题 I'm trying to write an algorithm that can solve sudoku. For now, my code works till supplyGrid is out of numbers. When it happens it should go back and try another number, right? To be honest I have no clue how to achive that. var grid = [ [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0,

Sudoku solver in JS

夙愿已清 提交于 2021-01-21 05:11:13
问题 I'm trying to write an algorithm that can solve sudoku. For now, my code works till supplyGrid is out of numbers. When it happens it should go back and try another number, right? To be honest I have no clue how to achive that. var grid = [ [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0,

Sudoku solver in JS

寵の児 提交于 2021-01-21 05:11:00
问题 I'm trying to write an algorithm that can solve sudoku. For now, my code works till supplyGrid is out of numbers. When it happens it should go back and try another number, right? To be honest I have no clue how to achive that. var grid = [ [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0,

Sudoku Board Using JPanels in Java

 ̄綄美尐妖づ 提交于 2020-01-24 05:50:07
问题 I know there have been several posts already about Sudoku-related questions, but I am not sure any of them have exactly what I am looking for... I am trying to build an empty Sudoku board in Java using JPanels and JTextfields. I also need to create a menu on the right hand side with another JPanel. The board itself is a 9 x 9 square, divided into 9 3x3 squares. Note that each smaller square is set off by a heavier border than the regular intersquare borders. Each square is a text field. Write

How to get the cells of a sudoku grid with OpenCV?

假装没事ソ 提交于 2020-01-15 05:04:19
问题 I've been trying for the last few days to get a sudoku grid from a picture, and I have been struggling on getting the smaller squares of the grid. I am working on the picture below. I thought processing the image with a canny filter would work fine, but it didn't and I couldn't get every contour of each square. I then put adaptive threshold, otsu, and a classic thresholding to the test, but every time, it just could not seem to capture every small square. The final goal is to get the cells