Hi there, I have undertaken a personal project of trying to write a program that can solve a rubik's cube by outputting a complete solution on all the movements that need to be made in order to solve a cube from any position. I am not looking for people to give me a solution so please don't, but \I would appreciate any cool ideas of how to progress through the problem.
What I have started with is this:
I thought maybe setting up Lists in order to provide a base for which a solved rubik's cube will look like in program form and below is alil search program o check if any List is not what it should be, but I am not super sure of where to go from here.
any suggestions welcome thanks
What I have started with is this:
Code:
White=['ww','1w','2w','3w','4w','5w','6w','7w','8w','9w'] Orange=['oo','1o','2o','3o','4o','5o','6o','7o','8o','9o'] Yellow=['yy','1y','2y','3y','4c','5y','6y','7y','8y','9y'] Red=['rr','1r','2r','3r','4r','5r','6r','7r','8r','9r'] Green=['gg','1g','2g','3g','4g','5g','6g','7g','8g','9g'] Blue=['bb','1b','2b','3b','4b','5b','6b','7b','8b','9b'] Master=[White,Orange,Red,Green,Blue,Yellow]
Code:
k=0
LEN=len(Master)
while LEN!=0:
Word=Master[k][0]
for i in Master[k]:
if Master[k][0][1]!=i[1]:
print "no",Master[0][0][1],i[1],Master[k].index(i)
else: print "yes"
k+=1
LEN-=1
Comment