This isn’t a real new article on this site, but it’s a good read.
Basically, the developer goes step by step on how he designed the algorithm for Worm Run, a game where you are going along a pathway that goes up, down, left, and right. How to avoid making it turn in on itself, and what to do if no satisfactory solution is found.
For those wanting to make an endless runner that does more than just go in a straight line, here’s one way.