astar_temp #19

Merged
s481825 merged 12 commits from astar_temp into master 2024-05-10 17:34:48 +02:00
Showing only changes of commit c0fe5766b0 - Show all commits

6
App.py
View File

@ -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()