There are two lists in Mr sq. head. First, is a list of numbers (1-3) telling him to go up, right or left. Secondly is the cheat code, the number sequence to pass through without dying. Whenever Mr Sq. touches a brick, he turns on a variable, which tells him that on step, say, 2 he found the correct combination. So, next time he moves he inserts only step. 2 into his randomised code from his cheat code. This may seem like he's not really memorising it or getting any new input, seeing as he already knows how to get through. Well, not really. He can't see the cheat code unless he gives it to himself and then, only part of the cheat code. I think of it as a learning network regardless.