Merge genetic2 to final_show #27
2
App.py
2
App.py
@ -85,7 +85,7 @@ def init_demo(): #Demo purpose
|
|||||||
print_to_console("Traktor porusza sie obliczona sciezka BFS")
|
print_to_console("Traktor porusza sie obliczona sciezka BFS")
|
||||||
traktor.move_by_root(bfsRoot2, pole, [traktor.irrigateSlot])
|
traktor.move_by_root(bfsRoot2, pole, [traktor.irrigateSlot])
|
||||||
if(bfs3_flag):
|
if(bfs3_flag):
|
||||||
bfsRoot3 = BFS.BFS3({'x': 0, 'y': 0, 'direction': "E"})
|
bfsRoot3 = BFS.BFS3({'x': 0, 'y': 0, 'direction': "E"},goalTreasure)
|
||||||
#displayControler: NUM_X: 20, NUM_Y: 12 (skarb) CHANGE THIS IN DCON BY HAND!!!!!!!!
|
#displayControler: NUM_X: 20, NUM_Y: 12 (skarb) CHANGE THIS IN DCON BY HAND!!!!!!!!
|
||||||
bfsRoot3.reverse()
|
bfsRoot3.reverse()
|
||||||
print_to_console("Traktor porusza sie obliczona sciezka BFS")
|
print_to_console("Traktor porusza sie obliczona sciezka BFS")
|
||||||
|
2
BFS.py
2
BFS.py
@ -134,7 +134,7 @@ def check3(tab, state):
|
|||||||
|
|
||||||
|
|
||||||
def BFS3(istate,GT):
|
def BFS3(istate,GT):
|
||||||
randomGT=True
|
randomGT=False
|
||||||
if(randomGT==True):
|
if(randomGT==True):
|
||||||
goalTreassuere = (random.randint(0,NUM_X-1), random.randint(0,NUM_Y-1))
|
goalTreassuere = (random.randint(0,NUM_X-1), random.randint(0,NUM_Y-1))
|
||||||
else:
|
else:
|
||||||
|
@ -7,7 +7,7 @@ Required packages:
|
|||||||
pip install pandas
|
pip install pandas
|
||||||
How to run:
|
How to run:
|
||||||
For BFS3:
|
For BFS3:
|
||||||
-in App.py change bfs3_flag to True (other flags need to be disabled)
|
-in App.py: -change bfs3_flag to True (other flags need to be disabled) -ensure that in App.py in BFS3 you give goalTreasure
|
||||||
-in Image.py change range in function return_random_plant to (0,5)
|
-in Image.py change range in function return_random_plant to (0,5)
|
||||||
For Astar:
|
For Astar:
|
||||||
in App.py change Astar to True (other flags need to be disabled)
|
in App.py change Astar to True (other flags need to be disabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user