press the flag and wait. The counter in the top-left counts how many "steps" the ant(shown as a red pixel.)took.at around 10,000 steps it will start bridging to the upper-left side and its done.(P.S. turbo mode(shift-click)will make it go faster.)
I did not borrow any scripts, but I based the code off of Langton's ant. ( @https://en.wikipedia.org/wiki/Langton%27s_ant )