The ability to select efficient routes while reaching several locations, in situations addressed as the "traveling salesperson problem (TSP)", seems to play an important role in the lives of nonhuman species as well as humans. One of our previous studies with pigeons (Columba livia) used different variations of computerized navigation tasks to move a target to one or more goals, and showed that the birds consistently exhibited tendencies to visit the nearest goal first (Miyata & Fujita, 2010). Is this inflexible tendency consistent across all situations, or is it abandoned if it leads to a nonefficient strategy? The present study compared pigeons' route selection strategies in two-goal navigation tasks with and without having an L-shaped line as an obstacle barrier between the starting location of the target and the nearer goal. The pigeons frequently started by visiting the nearer goal in trials with no obstacles, whereas in trials having obstacles the birds often visited the farther goal first. For the detour trials with obstacles, the birds started from visiting the farther goal significantly more often than chance, even though disparity between the two traveling sequences was relatively small. The data demonstrated a case in which a tendency to visit the nearest goal was flexibly abandoned when the route required a detour behavior. Detailed analyses of the movement paths further suggest that the pigeons made decisions to choose a farther goal during the initial few steps, although a past history of reinforcement to avoid the barrier might have guided the birds' behavior.