Average turns until a snake it crosses its path

83 Views Asked by At

If a snake each turn has a 0.5 chance of moving one unit forward and a 0.25 chance of moving one unit left or right from the way it was originally facing, what is the average amount of turns it can take until it crosses over its path?

Eg. If a snake moved forward and then did 3 moves to the right it would end up where it started (Cross its path), this would be the shortest amount of turns, I wonder how you could calculate the average?

My initial thought was to make some sort of probability tree that I assumed would turn into an infinite limiting sum however this became very complicated, so I am hoping there is a better way to do this. I have no idea how to approach this problem so thanks for any help or ideas.