A robot hand taught itself to solve a Rubik's Cube after creating its own training regime