If you want something that looks a little "more real" but doesn't involve complex management of memory, maybe try a bug algorithm. https://en.wikipedia.org/wiki/Bug_algorithm
It errs on the side of "stupid" but is much easier to implement.
It errs on the side of "stupid" but is much easier to implement.