Comments (4)
Yeah, the problem with providing an actual size parameter for was, that there has to be lots of checking going on, because the size can be ambiguous: A 8x8 Sudoku can have boxes of 2x4 or 4x2. Worse: a 12x12 sudoku could have 1x12, 2x6, 3x4, ... boxes. That's why I deliberately didn't provide this option.
I will rename size to box_size. I think, this will be fine for now.
Thank you for the input. :)
from sudokutools.
Hi @jan25. Thank you for using sudokutools. :)
Just to make sure, that this is what you want to do: Do you want to create a Sudoku with 81 x 81 cells?
size
specifies the region_width
and region_height
. So a standard Sudoku requires size=(3, 3)
(which is the default):
from sudokutools.generate import generate
sudoku = generate(min_count=17)
(But as far as I remember, sadly sudokutools isn't very good, at producing sudokus with 17 numbers right now...)
(It may be a good idea to rename this parameter, to make it clearer, that this is not the actual size of the sudoku - the whole library works with this name - so if you have a good name, please do tell. :) )
It seems standard Python recursion limit is set to 1000 (on my system at least), which would be enough for Sudokus of (real) size 30 x 30 sudoku, e.g. size=(3, 10)
(31 x 31 would work too, but those don't exist), that's why I'm not sure, if I want to document this (but I'll look into common practise of documenting recursive functions in Python and get back to this).
from sudokutools.
Sorry, I may have misread the docs about size
. I assumed its the outer grid size. Without this param the stack seems to fit in default recursion limit.
I think it is a good idea to clarify about params in the docs. Maybe call it region_size=(3,3)
or have a way to provide outer grid size.
from sudokutools.
All done - closing.
from sudokutools.
Related Issues (2)
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 sudokutools.