@Kuba I was trying to add another condition in the code but because the way its written I'm finding it very hard too. I tryed to make it remember just the last position he was and add that position to the `Complement`.
What I did was include an `AppendTo[last, pos]` to record the position and "reset" it right after the `RandomChoice` doing `last={}`. The problem I'm having is with this part here:
If[# === {}, last = {};
RandomChoice[
Composition[Thread[{#, Extract[world, #]}] &,
Complement[#, two, start] &][# + p & /@ {{1, 0}, {0, 1}, {-1,