Finding Start and End positions of a maze automatically using python : I am new in python and I am trying to write a script that solves mazes (any kind of a maze). I Used this script https://stackoverflow.com/a/16656993/3493689 but I want to modify it so the start and End positions are not hardly given.

I thought about taking a walk around the outer wall of the maze to figure out those positions.
Is this a good solution? Is there any ideas to solve this problem?

Ps: I thought also about finding colored positions, Flagged with arrows or marked with words like"Start", "S" , "End" or "E".

Thanks :)