magiccube4d icon indicating copy to clipboard operation
magiccube4d copied to clipboard

Add a M120C-like piece finding functionality.

Open GoogleCodeExporter opened this issue 9 years ago • 6 comments

Super-beneficial for the bigger puzzles, and actually fully necessary when 
there are lots of colors.

We can use the gravitation3D piece finding functionality as a model.

Original issue reported on code.google.com by [email protected] on 19 Oct 2009 at 12:27

GoogleCodeExporter avatar Mar 14 '15 23:03 GoogleCodeExporter

How would we implement piece finding functionality for cases where there are no 
fixed
centers to each block?  What about the case where there are multiple pieces 
that are
indistinguishable?  Whatever the final implementation is, I think that it 
should show
you all the possible pieces you are looking for, otherwise it might make parity 
cases
easy to avoid if it found the exact piece you are looking for.

Original comment by [email protected] on 1 Nov 2009 at 3:26

GoogleCodeExporter avatar Mar 14 '15 23:03 GoogleCodeExporter

I was actually working on a patch that did this.  I'm still getting up to speed 
with
the code and I'm sure my patch wouldn't be as good as what you two come up 
with.  I
haven't used MagicCell120 so I don't know how the feature works there but I was
thinking of highlighting cubes not by color but by type of piece.  The idea is 
that
if you hold shift while hovering over a piece, all pieces of that type will be
highlighted.  For solving large hypercubes this would cut down on the long time 
spent
solving the 1c center pieces.

This would be an alternate solution to the ones I suggested for issue 92.

Original comment by [email protected] on 21 Nov 2009 at 10:50

GoogleCodeExporter avatar Mar 14 '15 23:03 GoogleCodeExporter

These are related but different problems. Differentiating piece types is helpful
because it can help reduce the visual complexity, whereas a piece-finder let's 
you
quickly see your immediate goal. I recommend that in order to increase the 
chances of
incorporating your patch, that you familiarize yourself with the Magic120Cell
behavior of both of these features before getting very far into alternative
solutions. Thanks!

Original comment by [email protected] on 21 Nov 2009 at 11:18

GoogleCodeExporter avatar Mar 14 '15 23:03 GoogleCodeExporter

Original comment by [email protected] on 29 Nov 2009 at 9:17

  • Changed title: Add a M120C-like piece finding functionality.

GoogleCodeExporter avatar Mar 14 '15 23:03 GoogleCodeExporter

I haven't seen M120C in action, but I'm guessing that what we're talking about here is that the "Highlight by cubie" checkbox would be replaced by a radio button group, whose options are something like: "Highlight sticker" / "Highlight cubie" / "Highlight the cubie that should go here". Is that right?

Echoing the comment by [email protected] on 1 Nov 2009 at 3:26: while this would be very useful, and easy to implement in the straightforward case (which, I suspect, means precisely: regular with edge length exactly 3 and shallow-enough cuts), we'd need to decide what this feature should do, if anything, in the other cases when it's not so straightforward.

Proposal:

  1. When the current puzzle doesn't have an immovable center sticker in the center of every hyperface, add a "(doesn't work for this puzzle)" to the label of the relevant control in the control panel, and, when that option is selected, don't highlight anything. (It wouldn't work to just disable that option in that case, since doing so would lead to very unfriendly behavior on puzzle change.)

  2. When there are several identical pieces that are all correct answers, highlight them all. (Echoing the earlier comment, definitely don't limit it to only the one original piece-- that would be cheating!)

donhatch avatar Sep 05 '20 03:09 donhatch

The 3-mode control seems like a possible option, though it has the problems that you described. Roice's solution only highlights when you hold down a modifier key. Shift-click highlights stickers of the clicked piece, and Ctrl-Shift-click highlights what goes here. MC4D takes a different approach to highlighting, where we always highlight something, and we do careful filtering so that you can't do anything when clicking on an unhighlighted sticker. For example, 1-color pieces don't normally highlight, but when you hold the ctrl key wanting to move a face to the center, those pieces will suddenly also highlight because they can then accept that action.

My suggestion is a hybrid approach where the Shift key will turn normal MC4D highlighting into M120C style highlighting while held, but without requiring clicking. Clicks then continue to do what they already do. The Highlight by Cubie control also continues to do what it already does, though it could also affect the appearance of the piece-finder highlighting. IE when Highlight by Cubie is checked, we highlight all the stickers of found pieces, but when unchecked, we only highlight the found sticker(s) that belongs in the same position as the hovered sticker.

I like your proposal no. 2 regarding multiple correct pieces.

cutelyaware avatar Sep 06 '20 11:09 cutelyaware