Hacker News new | past | comments | ask | show | jobs | submit login
Battleship Solitaire (lukerissacher.com)
65 points by dhotson on Feb 22, 2018 | hide | past | favorite | 29 comments



It's missing some really basic instructions, i.e. clicking cycles between "not marked", "marked as water" and "marked as ship". Just saying "Click squares to set where you think the ships are." is singularly unhelpful.


I found the process of discovery (including the ship orientation hints mentioned below) was part of what made it enjoyable. Of course, after about five minutes the rules and strategies have become apparent and it does become truly mindless...


And yet I keep playing it....


Yeah, after a few minutes of playing and figuring it all out, it's become super easy to do a 15x15.

A timer would be really great to see just how well you can do and to push yourself for better times. I think I've gotten 15x15 to always under 25-30 seconds


Helps to go to a bigger square.

I just did 10x10 and am quitting.


You can also click-drag to set water, which isn't mentioned.


This is great! I'd love to see it as part of Simon Tatham's Portable Puzzle Collection [1]

[1] https://www.chiark.greenend.org.uk/~sgtatham/puzzles/


This reminded me of Tents [0], which is one of the games in Simon's puzzle collection that I reach for while waiting for code to compile.

Someone should add this game! Simon has very good developer documentation [1], and the code is very cleanly written C. Seriously, every C developer should take a look at it, it is inspiring [2].

[0]: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/tent...

[1]: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/devel/

[2]: https://git.tartarus.org/?p=simon/puzzles.git


Solitaire Battleship is very similar to "nonogram puzzles", e.g.

https://en.wikipedia.org/wiki/Nonogram

https://www.puzzle-nonograms.com/

You have a grid where the rows and columns are labeled with how many squares there are (additional info: you get splits, like "3 2" means there is a run of 3, and 2). You have to work out the image.

This Solitaire Battleship is hard though, because of the sparse placement and has other elements to it.

There is a similarity to this and the reconstruction of an image from projection data. Horizontal and vertical histogram data has been used for OCR. (You can recognize a glyph from the histogram patterns.)

This is also related to the backprojection technique used in CT scans to reconstruct the slice images.


This looks to be as addictive as 2048. I still play that one.

https://gabrielecirulli.github.io/2048/


I've been able to solve all the ones I've gotten so far, but I'm stumped as to how to do this one (https://i.imgur.com/6qmZX7z.png) without

1. trial and error, or

2. using the checking tool to see what I did wrong (cheating in a sense)

I feel like there's a strategy that I'm missing here. I'm just not sure what my next step should be, which would probably help me get all the rest done.


Actually nevermind, it's obvious now that the 5-piece was in the 5 row.


Here is how to solve them with SAT: http://kmkeen.com/battleship/


I was confused at first, but by 'mistakes' the author only means false positives, and not false negatives.

I guess... "Anyone who has never made a mistake has never tried anything new"


A fun little game, it seems like there are some solutions that are ambiguous though and it only allows one as the solution.


Fun puzzle, but I had the same problem. Example: https://imgur.com/a/t4T5l The solution is valid, but the expected result has the two dots in a different position. EDIT: I just realised, although it isn't clear in the instructions, that the shape of the boats is an implied part of the solution.


Not so, but only because of rules about the notation that are not stated. The dot in the top left (which I am assuming is one of the initial positions that the game gives you, from the darker background color) is, due to its shape, necessarily a size 1 ship. It does not continue downwards. Similarly, the initial position on the left-middle shows it going upwards. The initial positions not only tell you that there is a ship going through that location, but also in what direction, if it's the end of said ship.


Here is one I ran into that is clearly wrong: https://i.imgur.com/1leWCg9.png


Hey, author here - ships can't touch diagonally.


Yeah, maybe you should put that closer to the top. It took me 5-10 minutes to realize that I hadn't scrolled down quite far enough to see that extra rule.

It's especially easy to miss if you're already familiar with the original 2-player version of Battleship, since there's no such rule in that game.


Milton-Bradley's official rules do not have that restriction: https://www.hasbro.com/common/instruct/BattleShip_(2002).PDF

It's been a while since 1970-something, but I remember a no-ajacency rule clearly from a variant played in Czechoslovakia.

Here is some site giving Battleship with a "no touch" rule: https://www.yourturnmyturn.com/rules/battleships.php

It appears to be European; you can switch to a Dutch and German version of the site.

Maybe this is European vs. American rules?

The German version of the Battleship page gives Rule 1 as "Die Schiffe dürfen nicht aneinander stoßen" which seems to mean that they cannot touch each other (not simply that they mustn't overlap).

The point of the no touch rule is that you can use your brain: from the hit information, you infer water areas where the enemy must not have ships.

Under the Milton-Bradley rules, the players can just clump their ships together into a small area; it's just more or less pure guessing. If you hit two squares side by side, you cannot infer that they are sections of the same hull; they could belong to two parallel hulls, or to two ships "parallel parked". It's dull to be able to infer next to nothing.

Solitaire Battleship itself goes back to 1982: https://en.wikipedia.org/wiki/Battleship_(puzzle)

It seems to have had the no-touch rule from the beginning.


Yeah, that can be confusing - just updated the "show mistakes" code with a special-case "Ships can't touch diagonally" message when that happens, hopefully that'll help.


You need to make the rule more obvious, and you need to let people know that the shape of the ship in the starting condition is fixed.

Although, I guess I did figure it out, so maybe it's not necessary.


Why not?


Because that's one of the ship placement rules of the puzzle. It's listed at the bottom of the instructions, before the tips.


Simpler version of Nonograms.

Crossme Nonograms is one of the best non-sudoku mobile games that is somehow more fun.


For a while, the NY Times Sunday mag had just this kind of puzzle, in print form.


This puzzle is a bit janky and is able to have multiple solutions but only accepts one [1]. I recommend checking out similar-style puzzles called "nonograms" which are widely available.

[1] https://i.imgur.com/1leWCg9.png


That solution is not correct. Your boats on the top right are touching. They cannot touch, even diagonally




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: