#EDIT
EDIT
#EDIT
EDIT
- 2.8k
- 2
- 24
- 42
I thought I should challenge myself today andmanaged to create a Sudoku generator (what a challenge, huh? Yeah I'm not that smart). I managed to create something but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
I thought I should challenge myself today and create a Sudoku generator (what a challenge, huh? Yeah I'm not that smart). I managed to create something but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
I managed to create a Sudoku generator but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
I thought I should challenge myself today and create a sudokuSudoku generator (what a challenge, huh? Yeah I'm not that smart). I managed to create something but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
Basically what I figured is if I had defined a range of numbers that are possible for each cell, then started selecting random numbers for cells 1 by 1 and removing the respective number from it'sits column, row and "box" ( don't really know how they're called ), then it would magically select appropriate numbers and will be left with only one single possible number for the last cell. Well that wasn't the case, but I thought if I gave it a bunch of more tries it would eventually end up as I planned it and it did, the problem is, as I already said that it is very inefficient.
I thought I should challenge myself today and create a sudoku generator (what a challenge, huh? Yeah I'm not that smart). I managed to create something but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
Basically what I figured is if I had defined a range of numbers that are possible for each cell, then started selecting random numbers for cells 1 by 1 and removing the respective number from it's column, row and "box" ( don't really know how they're called ), then it would magically select appropriate numbers and will be left with only one single possible number for the last cell. Well that wasn't the case, but I thought if I gave it a bunch of more tries it would eventually end up as I planned it and it did, the problem is, as I already said that it is very inefficient.
I thought I should challenge myself today and create a Sudoku generator (what a challenge, huh? Yeah I'm not that smart). I managed to create something but I'll just go ahead and say that it generates 1 out of 500 tries on average. I'd say that's pretty inefficient and I'd like to ask you for advice on improvements.
Basically what I figured is if I had defined a range of numbers that are possible for each cell, then started selecting random numbers for cells 1 by 1 and removing the respective number from its column, row and "box" ( don't really know how they're called ), then it would magically select appropriate numbers and will be left with only one single possible number for the last cell. Well that wasn't the case, but I thought if I gave it a bunch of more tries it would eventually end up as I planned it and it did, the problem is, as I already said that it is very inefficient.