Genshin Impact box puzzle - math modeling and potential approach

Viewed 133

I got stuck by a simple box puzzle in a mobile game called Genshin impact. Here is the scenario:

There are n boxes in front of the player. Each box has one side marked in blue, and the player has to turn one box at a time until all the blue sides facing the player. (There are some relationships between boxes, for example, if you turn box A, the boxes C and D will turn as well). The box can only be turned horizontally so we only need to consider 4 sides.

I normally apply brutal force to solve this kind of a puzzle but now I am curious about the hidden logic.

Here is a concrete example:

n = 5 (We have 5 boxes in front of us) named A, B, C, D, E

if you turn A, C will move as well A->C
if you turn B, A, C will move B->(A,C)
if you turn C, A, E will move C->(A,E)
if you turn D, C, E will move D-> (C,E)
if you turn E, C will move E-> C

All the turns are synced with the same pace, which means turn B one unit, A, C will turn one unit as well. To simply the scenario, in this game, the player turns one unit at a time and always turns clockwise. 

The initial state is:
A = 3
B = 0
C = 2
D = 1
E = 2

What are these numbers represent? when the blue mark is in front of me, I assign that position 0, the blue mark to the left side, I assign that position 1, and so on. So the number 2 means the blue mark is in the back. Therefore, we can use position number mod 4 to determine the blue mark's location.

Any ideas? Any coding simulation or mathematic interpretation will be greatly appreciated.

0 Answers
Related