Can't say that I understod what I was doing but I managed to beat it, Nice art and music
basically you only have to recognize if the room changes or not and take a door based on you recognition, like stoneguy said :D