Breadth-first Search Applet

Click on a spot to put a "bad area" (yellow) or wall (white) there. The applet will use the breadth-first search algorithm to find a path between the two corners that avoids bad areas (if possible) and if not, minimizes the longest consecutive path through a bad area. This is done by assigning a penalty cost based on the square of the cotiniguous-path-through-yellow length at each step.