Skip to content

Commit

Permalink
BestFirstSearch (BFS) #3
Browse files Browse the repository at this point in the history
  • Loading branch information
brean committed Apr 13, 2018
1 parent 368f0bd commit 2ddafb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# python-pathfinding
Pathfinding algorithms based on [Pathfinding.JS](https://github.com/qiao/PathFinding.js) for python 2 and 3.

Currently there are 5 path-finders bundled in this library, namely:
Currently there are 6 path-finders bundled in this library, namely:
- A*
- Dijkstra
- Best-First
- Bi-directional A*
- Breadth First Search (BFS)
- Iterative Deeping A* (IDA*)
Expand Down
4 changes: 2 additions & 2 deletions pathfinding/finder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__all__ = ['a_star', 'bi_a_star', 'breadth_first', 'dijkstra', 'finder',
'ida_star']
__all__ = ['a_star', 'best_first', 'bi_a_star', 'breadth_first', 'dijkstra',
'finder', 'ida_star']
5 changes: 3 additions & 2 deletions test/path_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import pytest
from pathfinding.finder.a_star import AStarFinder
from pathfinding.finder.best_first import BestFirst
from pathfinding.finder.dijkstra import DijkstraFinder
from pathfinding.finder.bi_a_star import BiAStarFinder
from pathfinding.finder.ida_star import IDAStarFinder
Expand All @@ -18,8 +19,8 @@
# test scenarios from Pathfinding.JS
scenarios = os.path.join(BASE_PATH, 'path_test_scenarios.json')
data = json.load(open(scenarios, 'r'))
finders = [AStarFinder, BiAStarFinder, DijkstraFinder, IDAStarFinder,
BreadthFirstFinder]
finders = [AStarFinder, BestFirst, BiAStarFinder, DijkstraFinder,
IDAStarFinder, BreadthFirstFinder]
TIME_LIMIT = 10 # give it a 10 second limit.


Expand Down

0 comments on commit 2ddafb2

Please sign in to comment.