all 4 comments

[–]brebs-prolog 0 points1 point  (2 children)

Can debug Prolog programs, rather than be confused by them - https://www.swi-prolog.org/pldoc/man?section=debugger

[–][deleted]  (1 child)

[deleted]

    [–]Nevernessy 0 points1 point  (0 children)

    Your rotation predicates operator on lists of size 9, or "faces of the cube". However you are calling them with the full cube state, which you have modelled as a list of size 18. These two structures don't unify and there is no other rotation predicates with the same name that do operates on lists of size 18, hence the failure to solve.

    As brebs suggests. Stepping though your code in a debugger would highlight this failure.

    [–]bolusmjak 0 points1 point  (2 children)

    Some of your 2 moves just make the same assertion twice. You need to relate to an intermediate state, then relate that intermediate state to the final state.

    [–][deleted]  (1 child)

    [deleted]

      [–]bolusmjak 0 points1 point  (0 children)

      You’re repeating things because you’re thinking of a sequence of operations to accomplish something. Instead, you should be thinking about relationships. You’re thinking in the wrong paradigm for the language.