r/tensorflow•
OikuraZ95

Trying to create an RNN for a Rubik's Cube

Hi Everyone, I am trying to create an Recurrent Neural Net with LSTM for a 2x2x2 Rubiks Cube with Tensorflow. I've already made Feed-Forward networks for solving the cube (with a max scramble size of 6 moves) and achieved an solve rate of 47%. However, I want to improve that by using RNNs. However I am not entirely sure how to train the network here. The way I want this to work, is by sending in the cube state at each time step. Essentially from a scrambled state, there are a sequence of moves that lead it to a solved state. I want it to predict those moves at each step. I have the data and training the network doesn't seem too hard if I am understanding this correctly, but every RNN LSTM tutorial only gets a prediction at the end of the time-steps. I want to get a prediction at each time step and it must also effect the next incoming cube-state if that makes sense. The reason I want an LSTM network is because the previous network sometimes finds itself in bad scenarios. For example, it may get stuck on a particular cube state and do the same moves over and over again. It may simply rotate the right face and then rotate it back in the opposite direction over and over again. I actually managed to fix this by also letting the feed-forward network taking in the last action that was made into the cube (Essentially making it an RNN) and that increased my solving rate by 5%, but I would like to achieve better results. I would like your guys input and opinions on the matter. Thanks very much!!!

TL;DR: The model should take in the vector state of the cube and outputs a one-hot vector of what move to make. These methods have already been implemented for a feed-forward network, but how would I make it work for an LSTM based network?

Posted Feb 17, 2017, 3:04 AM UTC

72
Loading comments…