Comments (6)
I've implemented variable sudoku sizes. Unfortunately 16x16 and 25x25 are really not working with the algorithm used here.
See:
https://github.com/sfuhrm/sudoku/releases/tag/sudoku-parent-4.0.0
from sudoku.
is that an copy paste error?
from sudoku.
@Lemkinator
I have the suspect that the problem is the non deterministic loop in
https://github.com/sfuhrm/sudoku/blob/master/sudoku/src/main/java/de/sfuhrm/sudoku/Creator.java#L320
The proper way would be to do a backtracking search using a difficulty range as suggested in the articles mentioned above. A 'riddle has exactly one single solution' is expensive to calculate.
I did not yet have time to check it.
from sudoku.
What does "the algorithm is really slow" mean, are there any numbers?
from sudoku.
Yes, you've found a C&P error in S25X25, thanks! This is fixed in 16ffe37
What does "the algorithm is really slow" mean, are there any numbers?
Creating full matrices is still quick, creating riddles isn't (text output doesn't make sense):
$ java -jar sudoku-client/target/sudoku-client-4.0.1-SNAPSHOT-jar-with-dependencies.jar -s S16X16 -e Full -t
16135261381297101141415
11871415141636529101213
91541237105131114162168
13261091112148154137165
81016971211121331461554
13131585261041297161114
51214641591317161182310
47211141016358156129131
14135166815411191210372
29101163712614131545811
12111571325101638414619
36841141197102513121516
71411251631412108151396
15413109671451113168212
61612131148159217514103
10598121314215166311147
Took total of 18ms
Each iteration took 18ms
$ java -jar sudoku-client/target/sudoku-client-4.0.1-SNAPSHOT-jar-with-dependencies.jar -s S16X16 -e Riddle -t
...
I never got a riddle of a 16x16 or 25x25 run. I think the backtracking approach is not suitable for that since the runtime can grow exponentially with the dimension growth of the game.
from sudoku.
yep, but there is not really a performant alternative to backtracking, is there?
this app has 16x16 Sudokus and i wonder how they did... maybe just downloading pre-made sudokus/riddles?
from sudoku.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sudoku.