I can't able to figure out this algorithm. I have a semi-working one.
There is a 6 side dice.
In the starting position i can see the side A.
If its rotated from right to left i can see the side B, C, D.
If its rotated from top to bottom i can see the side E.
If its rotated from bottom to top i can see the side F.
You can't use the skin to help the algorithm.
What algorithm is able to recognize which side i can see after any rotation?

i tried to enter an image, i don't understand why didn't appear that...
example image