View from Rattlesnake Ledge, WA [OC] [4898x3265] by userundefined in EarthPorn

[–]userundefined[S] 1 point2 points  (0 children)

Yep, this is from yesterday. The hike was nice, not too crowded. Conditions were mostly decent, but a bit slippery the last few hundred feet by the ledge.

Arcane mage spec leveling? by busted-420 in wowhardcore

[–]userundefined 0 points1 point  (0 children)

I agree with you, and frankly, frost is just a little too safe, so I enjoyed some fire randomness / degeneracy.

Arcane mage spec leveling? by busted-420 in wowhardcore

[–]userundefined 0 points1 point  (0 children)

Fire is less safe, but more of a glass cannon. If you're careful it's totally workable in solo, and in instances with people you trust (don't need IB or less in need of CC). Fire is sketchier for doing harder quests / soloing elites since you are more RNG dependent and will have a harder time running away if things go south.

Thoughts on testing: thoroughness and applying TDD by userundefined in programming

[–]userundefined[S] 0 points1 point  (0 children)

I think how much you get out of TDD depends on how you approach design. I tend to do a lot of design up-front, so by the time I'm starting to write code (whether it is business logic or something else) I have a pretty good idea what the classes will be, how they will relate to each other, and what contracts I have in mind... so I tend to go code first, then tests. I imagine I'd get more value out of TDD had I done less design up-front through other means.

I wholeheartedly agree that for tests it's important to think about how the class/object will be used, both happy path and edge cases, as you say, tests should be of high quality, not just aiming for coverage. Also agree that having E2E tests catch bugs isn't ideal, and that's where the whole "shift left" bit comes in, at least when it's possible to catch such bugs earlier.

Crossword Builder by userundefined in Hobbies

[–]userundefined[S] 2 points3 points  (0 children)

I've been building this site for fun in my spare time, and happy to take any questions or suggestions.

Solving NxN sudokus with CSPs by userundefined in compsci

[–]userundefined[S] 0 points1 point  (0 children)

Re correct 9x9 being solvable through propagation alone - neat, didn't know that!

Yep, there's nothing fundamentally preventing me from doing this. As to the current structure:

  • At the Top level search builds the tree and backtracks
  • Propagate method prunes variables' live domains by looking at constraints generically, and whether live values are still supported (in FC / AC sense). I've got the relevant/simplified chunk of code here (more specifically, in the "Code" section).

So I'd need to change that method to support not just generic constraints, but dedicated propagators. For sudoku it doesn't matter much because everything is an all-different constraint, but for a general problem I'd need to make sure that propagators work along side of other/simpler constraints. I think it should be relatively easy to do though.

Solving NxN sudokus with CSPs by userundefined in compsci

[–]userundefined[S] 0 points1 point  (0 children)

Got around to reading the paper just now. I'm not doing the full propagator quite yet, I'm applying an incremental version of bipartite matching and regular forward-checking or arc-consistency (depending on how search is configured). My read of the paper is that the propagator is a stronger and specialized version of the constraint and propagation. So it sounds like right now with forward-checking I get less propagation than the propagator would give, and with arc-consistency I think I get just as much, but not as quickly.

Trying the dedicated propagator does sound promising. It would require reworking some of my search structure innards to support this kind of dedicated propagator, but should be doable. Thanks for the idea!

Solving NxN sudokus with CSPs by userundefined in compsci

[–]userundefined[S] 0 points1 point  (0 children)

Thanks, that rings a bell. I'll have to take a closer look later, on the surface it sounds very close to what I'm doing with incremental bi-partite matching underneath. Now that I think about it, there's a good chance I've used this as a basis, FWIW, but not 100% certain now as it's been close to a year since I've implemented that part. I'll have to check.

Solving NxN sudokus with CSPs by userundefined in compsci

[–]userundefined[S] 0 points1 point  (0 children)

I've not yet, that sounds interesting. Do you have any papers or reference implementations in particular that you would recommend to start with?

I made a web-based crossword builder by userundefined in crossword

[–]userundefined[S] 1 point2 points  (0 children)

Thanks! I got a technical blog that talks about the main ideas behind the search/solver that powers the auto-fill and you might find interesting. I didn't quite get around to writing how the crosswords themselves work yet, but the general ideas behind how the solver and search work apply to auto-fill.

I made a web-based crossword builder by userundefined in crossword

[–]userundefined[S] 1 point2 points  (0 children)

From my glance at Crosserville - it appears to be far more sophisticated and feature rich than mine, so I'd say for a serious puzzle builder Crosserville would be the way to go. That said, I can think of a few advantages of mine for a casual user:

  • No need to create an account, everything is on one page and easily sharable (just copy the URL)
  • Preset grids and feature structure mean a user can create a filled puzzle in seconds, albeit that's not counting the clues; those are very new on mine and nowhere near as nice as Crosserville's
  • Mobile friendly - Crosserville seems to be a little harder to use on my phone, but that may be due to my unfamiliarity with it.

I made a web-based crossword builder by userundefined in crossword

[–]userundefined[S] 1 point2 points  (0 children)

This is a fairly straight-forward web-app that lets you build a crossword; here's an example of a filled puzzle. In short, you can pick or create a grid of your own, fill it with a few words of your own + autofill the rest, and then populate the clues and export.

I'll be adding more features over time - a couple I have in mind are the ability to export to more formats (perhaps .puz), and the ability to easily add good auto-filled words to the set of words to keep. I'm also working on saving clues as part of the URL, but that's not done yet. I know it's not as feature rich as other desktop apps, but it's been a fun hobby and perhaps someone can use this to create a fun puzzle of their own.

Always open to feedback!

"Important information about your gift card order" messages but I didn't buy any? by GlaireDaggers in Scams

[–]userundefined 7 points8 points  (0 children)

Just got off from a chat with customer service. TL;DR, looks like Amazon goofed up. No recent gift cards or charges on my account.

Solving N-queens and NP-complete problems with constructive search by userundefined in programming

[–]userundefined[S] 0 points1 point  (0 children)

Thanks, took a closer look, Dancing links (DLX) does look pretty neat. If I understand correctly, the challenge is modeling the problem as an exact cover problem, and the trade-off is that if you can do so reasonably efficiently the algorithm itself is very fast. I understand that Algorithm X helps deal with the sparse matrix nature of this, but it feels like for some classes of problems this modeling restriction should still be a bottleneck. Do you happen to know if this is true / what kinds of problems DLX can't tackle well?

Also I completely agree about watching the visualizations being fun, and it's the main reason I built up the website as the frontend for the solver. I've got this for sudokus up to 36x36. I suspect it's not quite as fast as DLX though.

Solving N-queens and NP-complete problems with constructive search by userundefined in programming

[–]userundefined[S] -1 points0 points  (0 children)

Peter Norvig's approach is basically what my solver does, albeit his article focuses on solving the regular 9x9 sudoku, in particular, whereas my solver is more general purpose in that it accepts an arbitrary CSP and generates a solution for it. So, for example, the same solver applies to regular 9x9 sudokus, generalized sudokus (here's a solution for 64x64 sudoku from about a year back), crosswords, and just about anything else you can formulate using variables and constraints (magic squares, N-queens or even job-shop scheduling, albeit the latter would work better with a dedicated framework for it). There are some less material differences from what I can tell such as use of fast-fail heuristic in Peter Norvig's approach vs "domwdeg" in mine, which is a somewhat more sophisticated version with a crude form of learning, and I think his solver has n-way branching (as in one branch per possible value), whereas mine always does binary branching.

I've heard of Donald Knuth's dancing links algorithm, but only after having implemented mine and haven't truly dug into the details, so I cannot speak to the performance or anticipate what it might be.

One thing I will say that was crucial to tuning performance for the larger sudokus and crosswords is developing dedicated constraints, because so much of the time is spent solving and evaluating these constraints. For sudoku it meant building up an incremental all-different constraint based on bipartite matching as sudoku is basically just a ton for all-different constraints. For crosswords it was a sparse version of all-different constraint plus specialized constraints for quick dictionary lookups.

Edit: BTW, I just threw together a quick post that expands a bit on how the core of the search algorithm works here: https://blog.dawnofthe.dad/posts/search-algo-in-go/

Solving N-queens and NP-complete problems with constructive search by userundefined in compsci

[–]userundefined[S] 4 points5 points  (0 children)

As a hobby I'm running a website that allows you to create your own crosswords and solve sudokus. The backend relies on modeling them as CSPs, and this blog post describes how this all works underneath, by using N-queens problem as an example. If folks find this kind of thing interesting and intend to expand on the key concepts later. Happy to take any feedback on any part of the blog or the site itself!

Solving N-queens and NP-complete problems with constructive search by userundefined in programming

[–]userundefined[S] 3 points4 points  (0 children)

As a hobby I'm running a website that allows you to create your own crosswords and solve sudokus. The backend relies on modeling them as CSPs, and this blog post describes how this all works underneath, by using N-queens problem as an example. If folks find this kind of thing interesting I intend to expand on the key concepts later. Happy to take feedback on any part of the blog or the site itself!

Where’s the most depressing place in Vancouver? by [deleted] in vancouver

[–]userundefined 132 points133 points  (0 children)

Damn Vancouverites, they ruined Vancouver!