4 ms·
Show HN: Minesweeper on a chess board with chess pieces as mines
rearrange the chess pieces so that the number of pieces threatening each square matches the large number in that square? pieces move freely
https://chedoku.com/#dailypuzzle
- jarofgreen 4y agoI've been playing the daily puzzle for a week, it's fun. Well done :-)
- chedoku 4y agohttps://chedoku.com/#dailypuzzle https://chedoku.com/#dailypuzzle
- Andugal 4y agoThis is actually good! Well done :)
- chedoku 4y agoI am very glad you like it and thanks for taking the time to write the comment :)
- bspammer 4y agoThis is really cool. I wish the pieces were off the board at the start though. I’d much prefer to build up a solution iteratively than try to fix a broken one.
- chedoku 4y agoI totally agree. This was the technical limitation of the library that I was using (chessboardjs). If pieces are off board, there is no easy way to limit the number of pieces that you add to the board. Finding a better solution is on my todo list.
- remarkEon 4y agoDo you think there’s a way to “rate” a particular solution? I’m wondering about how to gauge “efficiency” in placing the pieces. Fewest “wasted” threat squares maybe?
- chedoku 4y agoI am not sure what this question has to do with the previous comment and why it is not asked in a separate thead! am I missing a point in your question? Back to your question. There are two types of solutions: 1- Perfect solution, you get a green notification when you find the solution, in which other squares with no number have zero threats. Pressing the 'solution' button reveal the perfect solution 2- Imperfect solution, you get a yellow notification when you find one, in which other squares with no number may be under one or more threats. As a simple example, for the puzzle below placing pawn on c2 is an imperfect solution but placing it on a2 is the perfect solution. https://chedoku.com/#gid=3&d=1& https://chedoku.com/#gid=3&d=1& Is perfect solution in my terminology is what you mean by efficiency solution?
- noman-land 4y agoSuper fun!
- chedoku 4y agoThanks, happy you liked it :)
- dado3212 4y agoWould also be awesome if there was deterministically only a single solution, though that may be hard to create.
- smegsicle 4y agothere's a whole extra knight in today's puzzle edit: i meant if you (r13: ebbx naq xavtug ba oynpx'f xvat'f ovfubc naq xavtug cbfvgvbaf) you only need to use two of the three provided
- chedoku 4y agoIt was promoted from a pawn ;) joke aside, there can be: 1- any arbitrary number of pieces on the board 2- pawns in the first and last rows 3- missing king 4- missing opposite color pieces
- chedoku 4y agoThis is something that bugged me for a long time. There are many other challenging algorithmic questions that I will share in a separate blog post later (e.g. writing a efficient solver). If you have any idea how to do that I would love to hear about that.
- shmageggy 4y agoLooks like this could be translated into a SAT problem and solved with a SAT solver. Have you tried that?
- chedoku 4y agoI have actually used SAT solver before but I have no idea how to translate this into a SAT problem. I know it is too much to ask you to do it for me but maybe you can give me a hint (or link) on how to translate problems that deal with numbers into boolean expression that can be solved by a SAT solver.
- 4y ago
- akaa 4y ago[flagged]
- shmageggy 4y agoThis is really fun, and it definitely tickles that same part of the brain as sudoku. One UI suggestion is to use a diverging color palette for the larger numbers so there are different hues for too many versus too few attackers.
- chedoku 4y agoI am glad you like it. This is actually a great (and easy to implement) idea. I will fix this in the next release. Thanks for the suggestion
- based2 4y agohttps://boardgamegeek.com/boardgame/267979/tiwanaku https://boardgamegeek.com/boardgame/267979/tiwanaku