Pathfinding
the idea is that the character can scan the accessible environment for points of interest, and can construct a path to whichever one they choose
notice how because the wall was blocking the wall, they couldn't account for the other two points.