aehmlo / ku Goto Github PK
View Code? Open in Web Editor NEWA sudoku crate.
License: Apache License 2.0
A sudoku crate.
License: Apache License 2.0
03fdeda changed the backing storage of PossibilitySet
to use a u64
and bitwise operations. This limits users to a maximum order of 8 (the square root of 64). The backing store can be changed to a u128
to allow a maximum order of 11, but this isn't much better (and, unless done very carefully, can result in some pretty major performance regressions). u256
would only allow a maximum order of 16 (O(n2) is somewhat unwieldy).
Ideally, I'd like to use u64
as a backing until u128
becomes necessary and then downgrade to heap allocation (probably just a Vec
) thereafter to enable arbitrary orders at the cost of performance. I think the only realistic way to implement this right now is probably something like typenum
.
This may require some finagling with rustfmt
, or simply allowing nightly to fail if it won’t be tamed.
I'd like to use a procedural macro to do this, but hygiene seems to get in my way every time I try.
As it stands, the possibility map has no idea whether there's no freedom because an element exists there or because the position is over-constrained. Giving it this knowledge would let us short-circuit on otherwise expensive recursion. This may also be related to the hang encountered in gen::grid
.
There's at least one location (it's marked) which should be revisited when NLL lands, but a review of all lifetime/reference-related code might not be a bad idea.
This will enable things like ctx.set_fill_style_color(format!("{}", c))
.
Ensure that relevant tests are not run extradimensionally (as this will undoubtedly result in incorrect outcomes).
There's a lot of rounding going on in ui/color.rs
current; I'd like to avoid this.
Implement at least basic scoring functionality, based on the naïve solving mechanism.
If the lifetime annotations become excessive, it’s okay to give up.
Strip whitespace (including newlines), allow borders, whatever.
Reduce the amount of backtracking required by generating more components "statically."
It exists now, but it's not very pretty. This can be easily fixed, but I don't really want to do it right now.
Move color palettes and color manipulation into shared code, and give it a prettier structure. Since this is getting into the area of metadata, it may be a good idea to use serde
to let us specify these things as JSON/TOML so that it's parseable by other things.
It is most definitely overkill to use serde
for this, as we only need to support unsigned integer types. This will probably consist of FromStr
and fmt::Display
only.
Ensure that the portions returned are as they should be.
This allows us to use single-character representations for everything in a puzzle of order 4.
In order for this to be considered complete, we need:
impl fmt::UpperHex for Sudoku
As of now, FromStr
is limited to two dimensions, since I haven't thought of a good 2D representation for a higher-order puzzle. I'd be happy with just adding 3D, without being concerned about higher dimensions than that.
Once a format's specced out, FromStr
and fmt::Display
should be implemented as inverse functions (composable).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.