astar_temp #19
6
App.py
6
App.py
@ -15,8 +15,8 @@ import random
|
||||
bfs1_flag=False
|
||||
bfs2_flag=False #Change this lines to show different bfs implementation
|
||||
bfs3_flag=False
|
||||
Astar = True
|
||||
Astar2 = False
|
||||
Astar = False
|
||||
Astar2 = True
|
||||
if bfs3_flag or Astar or Astar2:
|
||||
Pole.stoneFlag = True
|
||||
|
||||
@ -97,7 +97,7 @@ def init_demo(): #Demo purpose
|
||||
print_to_console("Nie można znaleźć ścieżki A*") # Wyświetl komunikat, jeśli nie znaleziono ścieżki
|
||||
if (Astar2):
|
||||
|
||||
aStarRoot2,cost_list= AStar.A_star2({'x': 0, 'y': 0, 'direction': "E"}, pole, goalTreasure)
|
||||
aStarRoot2,cost_list, total_cost= AStar.A_star2({'x': 0, 'y': 0, 'direction': "E"}, pole, goalTreasure)
|
||||
if aStarRoot2:
|
||||
print("Pełna ścieżka agenta:")
|
||||
aStarRoot2.reverse()
|
||||
|
Loading…
Reference in New Issue
Block a user