I think it would need some genetic algorithm in order to figure out about how “close” it is to the solution, then make a tree structure where it figures out what happens after every combination of however many moves, and it does the one that looks closest to the solution.
It would update the algorithm based on how close it is to the closest solution. For example, if it’s five moves away from something that looks about 37 moves away from finishing, then it’s about 42 moves away now.
The problem with this is that when you start it, it will have no idea how close anything is to the solution except for the solution, and there’s no way it’s getting to that by chance.
Essentially, you’d have to cheat and start by giving it almost solved Rubik’s cubes, and slowly giving it more randomized ones. It won’t learn on its own, but you can teach it pretty easily.
A less cheating-ish solution is to use some reasonable-seeming heuristic to guess how close you are to a solution. For example, you could just count the number of squares “in the right place” after a move sequence.
(First post, bear with me.. find the site very interesting :)
I do agree!
But actually I would model the problem with what is known in some circles as a closed-loop controller, and specifically with a POMDP. Then apply RealTime Dynamic Prog. by embedding an heuristic without having to visit all the states in order to compute the rough but optimal h*.
Another way could be done by means of a graphical model, and more specifically a DAG would be quite nicely suited to the problem. Apply a simulated annealing approach (Ising model!) and when you reach “thermal equilibrium” by having minimized some energy functional you get the solution. Obviously this approach would involve learning the parameters of the model, instead of modelling the problem as in my first proposed approach.
Exactly the difficulty of solving a Rubik’s cube is that it doesn’t respond to heuristics. A cube can be 5 moves from solved and yet look altogether a mess, whereas a cube with all but one corner correct is still some 20 moves away from complete (by the methods I looked up at least). In general, -humans- solve a Rubik’s cube by memorizing sequences of moves with certain results, and then string these sub-solutions together. An AI, though, probably has the computational power to brute force a solution much faster than it could manipulate the cube.
The more interesting question (I think) is how it figures out a model for the cube in the first place. What makes the cube a good problem is that it’s designed to match human pattern intuitions (in that we prefer the colors to match, and we quickly notice the seams that we can rotate through), but an AI has no such intuitions.
Exactly the difficulty of solving a Rubik’s cube is that it doesn’t respond to heuristics. A cube can be 5 moves from solved and yet look altogether a mess, whereas a cube with all but one corner correct is still some 20 moves away from complete (by the methods I looked up at least).
I don’t know the methods you used, but the only ones I know of have certain “steps” where you can easily tell what step it’s on. For example, by one method, anything that’s five moves away will have all but two sides complete.
I had the same problem.
I think it would need some genetic algorithm in order to figure out about how “close” it is to the solution, then make a tree structure where it figures out what happens after every combination of however many moves, and it does the one that looks closest to the solution.
It would update the algorithm based on how close it is to the closest solution. For example, if it’s five moves away from something that looks about 37 moves away from finishing, then it’s about 42 moves away now.
The problem with this is that when you start it, it will have no idea how close anything is to the solution except for the solution, and there’s no way it’s getting to that by chance.
Essentially, you’d have to cheat and start by giving it almost solved Rubik’s cubes, and slowly giving it more randomized ones. It won’t learn on its own, but you can teach it pretty easily.
A less cheating-ish solution is to use some reasonable-seeming heuristic to guess how close you are to a solution. For example, you could just count the number of squares “in the right place” after a move sequence.
(First post, bear with me.. find the site very interesting :)
I do agree!
But actually I would model the problem with what is known in some circles as a closed-loop controller, and specifically with a POMDP. Then apply RealTime Dynamic Prog. by embedding an heuristic without having to visit all the states in order to compute the rough but optimal h*.
Another way could be done by means of a graphical model, and more specifically a DAG would be quite nicely suited to the problem. Apply a simulated annealing approach (Ising model!) and when you reach “thermal equilibrium” by having minimized some energy functional you get the solution. Obviously this approach would involve learning the parameters of the model, instead of modelling the problem as in my first proposed approach.
Quite geeky, excuse me!
Exactly the difficulty of solving a Rubik’s cube is that it doesn’t respond to heuristics. A cube can be 5 moves from solved and yet look altogether a mess, whereas a cube with all but one corner correct is still some 20 moves away from complete (by the methods I looked up at least). In general, -humans- solve a Rubik’s cube by memorizing sequences of moves with certain results, and then string these sub-solutions together. An AI, though, probably has the computational power to brute force a solution much faster than it could manipulate the cube.
The more interesting question (I think) is how it figures out a model for the cube in the first place. What makes the cube a good problem is that it’s designed to match human pattern intuitions (in that we prefer the colors to match, and we quickly notice the seams that we can rotate through), but an AI has no such intuitions.
I don’t know the methods you used, but the only ones I know of have certain “steps” where you can easily tell what step it’s on. For example, by one method, anything that’s five moves away will have all but two sides complete.