chrisboyle / sgtpuzzles

Android port of Simon Tatham's Puzzles
https://chris.boyle.name/puzzles
Other
594 stars 168 forks source link

Hint/check options #59

Open HYBRID-BEING opened 12 years ago

HYBRID-BEING commented 12 years ago

Right now i am stuck at some tough 6x6 Tower puzzle. While i can use Solve option to see the final result, i'd like to complete the puzzle by myself (I did check it though to make sure i didn't make any mistakes). So i thought that it would be nice to have an option to hint a player or just make the next possible step. For example, should i choose hint the game should remove one extra mark if present or fill a number in otherwise. Option would be suitable for puzzles with marks.

IronJelly commented 10 years ago

You realize that the games were not made by the person who ported them to Android, right?

I think a request for a hint system would be better handled here: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/

where they're from.

chrisboyle commented 9 years ago

Merging issue #244:

Mark Morrell writes:

Can you add a check feature that would only check "locked" squares? You have a similar feature on other games, turning wrong squares red. It doesn't happen often, but I've gotten to places where I've obviously made a mistake somewhere and I can't track it down. When this happens I have no choice but to scrap the game and start over.

Susan Sadot writes:

It'd be great to have a hint option and also a check option.

chrisboyle commented 9 years ago

See also #258 for the other direction, less error indication.

chrisboyle commented 8 years ago

Lindsey Hollinger writes, about Unruly:

This game would be SO much better if the counts for black and white squares were at the beginning or end of each column and row. For example, if a column had five blacks squares in it and three white ones, the top of the column should read 5/3. I spend so much time counting squares that I just get frustrated and switch to a different game.

chrisboyle commented 8 years ago

brandon gatto writes, about Pattern:

I was just going to suggest maybe making to that when met the condition of the number it changed like when you failed it. Like if its 3 1 1 and I fill in the two 1s make them turn blue or something.

chrisboyle commented 8 years ago

Fabian Röling writes:

I would like it if full islands in Bridges would be green. I mostly play with a big map size and 4 connections and it's sometimes hard to see if one of the 100 islands has 13 or 14 bridges on it.

As with several of these suggestions, it would be important to be very clear that although the island has its clue satisfied, it is not necessarily correct (i.e. the links could go to the wrong places). That's the hard part here. I'm sure most users would realise that, but I suspect enough wouldn't that it would be a problem. Popping up explanatory text is a bit ugly (and other platforms have fewer good ways to do so).

saizai commented 3 years ago

I was going to add this FR also. I suggest a slightly different approach, though.

Currently, there's "show solution". I regularly find myself using that as "check current entries" (and just trying to ignore the extra info).

It seems to me that this has a few basic, generalizable sub-elements, which overlap with current marking:

  1. Degree of indication
    • Replace empty square with answer
    • Replace incorrect square with answer
    • Mark committed squares
    • Mark pencil mark groups
    • Mark individual pencil marks
    • Mark relevant constraint
  2. Type of indication
    • Correct
    • Incorrect
    • Constraint violation
    • Constraint satisfaction
  3. What assumptions of game board to use
    • Full solution
    • Assume the rest of the committed squares on the board to be correct
    • Assume only givens
    • Assume nothing but rules (treat givens equal to player entered committeds)
  4. Degree of inference to use
    • Explicit rule
    • Inverse of explicit rule (e.g. lack of something required)
    • Impossible constraint
    • Each inference level used in the game generation-by-difficulty code, ignoring inferences that rely on hypothesis generation (= highest difficulty)
  5. When to add markings
    • On request, only for current square ("check square" button)
    • On request, for whole board ("check solution" button)
    • Whenever error is committed, after delay of a couple seconds (to ignore UI mistakes & deliberate errors made as history markers)
  6. When to update added markings
    • any change to board wipes all markings
    • any change to board wipes all markings except unmodified correct/incorrect markings
    • any change to board re-marks entire board

(I'm using "square" to mean any answerable cell, and "pencil mark" to mean any non-commited answer, since that's the most common instantiation. E.g. in Loopy, I'm calling a yellow edge a "pencil mark" and the edge itself a "square".

I'm using "given" to mean committed answers locked at the start — not including categories the player can't access for marking. E.g. in Towers, squares that start filled are "givens", but edge counts are quasi-rule constraints. In Mines, revealed squares become constraints, since that's irreversible; flags are committeds; and there are no pencil marks.

Treat blanks as if they have all possible pencil marks.)

So for instance:

(Blue vs red, not green vs red, because red-green color blindness is common. Blue-red color blindness doesn't exist short of fully monochromatic.)

schellingb commented 2 years ago

I was about to open a new feature request but I think it fits here well enough.

I'd really like a "Solve trivial steps" function. A button that fills out the trivial steps for some of the puzzles, or in other words to let the game do the boring stuff for me so I can spend more time on thinking through the complex parts.

Some examples:

I'm aware that on easier difficulty levels this could basically act as the existing "Solve" function so this would be intended for players of harder difficulties and it probably should be locked behind an option somewhere with a detailed explanation. For me a puzzle can be boring through the first few minutes of doing the minute setup tasks and even frustrating when I find myself making a dumb mistake due to wanting to get over the dull trivial parts quickly.

I'd be eager to contribute such a feature myself but I'm curious if this could be added as part of this project or if it absolutely would need to exist in the original upstream version first. The homepage of the original project doesn't mention "contribution" anywhere so I'm not even sure where to start, that's partially why I'm here in the first place. Sorry if this is unrelated but if someone could chime in on this I'd be grateful.

Either way thanks for this beautiful port of this fantastic collection!

abdulisik commented 2 years ago

I love all the contributions and ideas on this collection. I'd add an argument for this feature request. A good mechanism to “solve trivial steps” or “suggest next step” etc. would be one of the best ways to come up with a strategy about how to actually solve any puzzle.

schellingb commented 2 years ago

While I think my request for a "Solve Trivial Steps" button would be fairly simple to implement, a (good) "suggest next step" seems to me like it would not. In my experience puzzle games often know the solution not because they solve them like a human does but because they either already know the solution from the start (having generated the puzzle backwards from a solved board) or they can quickly brute force all possible inputs to find the solution. So to have a game tell a player what conclusions a human would need to make to continue further can be very complicated and hard to implement.

On the other hand having the game just do the trivial steps can be as dumb as possible. In fact I think it would make sense to make it somewhat rough. For example in Solo it could just fill in pencil marks and remove based on what is already there and then stop after just one iteration. So then the player can either press the button once to get over some trivial work or they can press it multiple times to have a few iterations of the marking-and-clearing to get a bit further along depending on how much assistance they personally want from the game.

schellingb commented 2 years ago

I started adding some assistance functionality to certain games in a fork with APKs built automatically here (custom app-id will not overwrite the existing puzzle app):

I'm considering adding 4 separate options for all of these but for now they are always enabled. Maybe I can open a PR for these additions in the future?