-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
/
Copy pathtest_a_star_variants.py
44 lines (33 loc) · 911 Bytes
/
test_a_star_variants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import PathPlanning.AStar.a_star_variants as a_star
import conftest
def test_1():
# A* with beam search
a_star.show_animation = False
a_star.use_beam_search = True
a_star.main()
reset_all()
# A* with iterative deepening
a_star.use_iterative_deepening = True
a_star.main()
reset_all()
# A* with dynamic weighting
a_star.use_dynamic_weighting = True
a_star.main()
reset_all()
# theta*
a_star.use_theta_star = True
a_star.main()
reset_all()
# A* with jump point
a_star.use_jump_point = True
a_star.main()
reset_all()
def reset_all():
a_star.show_animation = False
a_star.use_beam_search = False
a_star.use_iterative_deepening = False
a_star.use_dynamic_weighting = False
a_star.use_theta_star = False
a_star.use_jump_point = False
if __name__ == '__main__':
conftest.run_this_test(__file__)