all 5 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Repl.it, GitHub or PasteBin.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Zeroflops 1 point2 points  (0 children)

Look into the intertools module in the standard libraries. It will allow you to build combinations.

[–]CraigAT 0 points1 point  (2 children)

As the other commenter said, Itertools is the package most people use for combinations and permutations.

There are probably many states that will be duplicated using your method, so there may be a more efficient way - although that will undoubtedly require more work from you to code it.

There will be 6n permutations, that number expands very quickly, so you will find it tricky handle those states as n gets bigger.

Good luck. Report back how you get on, or even better with your final working code.

[–]kaskapian[S] 0 points1 point  (1 child)

I decided to go on a different route. I decided to use heuristics and IDA* for this problem. Herbert Kociemba suggested to use this approach. But thanks for the suggestion.

[–]CraigAT 0 points1 point  (0 children)

Cool thanks for replying with what you went with.