def find_shortest_paths(current, path, path_length):
# append path with currently active point
# stop if we've been here before on a shorter path
if path_length > length of current.shortest_path:
# copy path to current point to save it
current.shortest_path = path
# find candidate corners for path expansion
candidates = find(doors and convex corners in line of sight of current)
# recursively iterate candidates
# calculate distance from current to candidate
new_distance = euclidean_distance(current.x, current.y, c.x, c.y)
path = find_shortest_paths(c, path, length of path + new_distance)
# remove current step from path