This paper presents a new pathfinding algorithm called the boundary iterative-deepening depth-first search (BIDDFS) algorithm. The BIDDFS compromises the increasing memory usage of the Dijkstra's algorithm, where the memory clears enables the BIDDFS to consume less memory than the Dijkstra's algorithm. The expansion redundancy of the iterative-deepening depth-first search (IDDFS) is also compensated; it is faster than the IDDFS in all of the testing instances conducted. The BIDDFS is further enhanced for bidirectional searching to allow expanding to fewer nodes and reducing pathfinding time. The bidirectional BIDDFS and the parallel bidirectional BIDDFS are also proposed. The proposed BIDDFS is further extended to the multi-goal BIDDFS, which is able to search for multiple goals present on the map in a single search. Simulation examples and comparisons have revealed the good performance of the proposed algorithms.