Compare commits
2 Commits
51a5b13669
...
da1bfe1d8f
Author | SHA1 | Date | |
---|---|---|---|
da1bfe1d8f | |||
4339284c4b |
2
App.py
2
App.py
@ -147,7 +147,7 @@ def init_demo(): #Demo purpose
|
|||||||
pass
|
pass
|
||||||
model = neuralnetwork.loadModel('model_500_hidden.pth')
|
model = neuralnetwork.loadModel('model_500_hidden.pth')
|
||||||
Tractor.drzewo.treeLearn()
|
Tractor.drzewo.treeLearn()
|
||||||
traktor.snake_move_predict_plant(pole, model, headers=['Coords','Real plant','Predicted plant','Result','Decision'], actions=[traktor.irigate_slot_NN])
|
traktor.snake_move_predict_plant(pole, model, headers=['Coords','Real plant','Predicted plant','Result','Water decision'], actions=[traktor.irigate_slot_NN])
|
||||||
start_flag=False
|
start_flag=False
|
||||||
# demo_move()
|
# demo_move()
|
||||||
old_info=get_info(old_info)
|
old_info=get_info(old_info)
|
||||||
|
6
BFS.py
6
BFS.py
@ -133,8 +133,12 @@ def check3(tab, state):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def BFS3(istate):
|
def BFS3(istate,GT):
|
||||||
|
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:
|
||||||
|
goalTreassuere=GT
|
||||||
print(goalTreassuere)
|
print(goalTreassuere)
|
||||||
fringe = []
|
fringe = []
|
||||||
explored = []
|
explored = []
|
||||||
|
17
readme.txt
17
readme.txt
@ -5,3 +5,20 @@ Required packages:
|
|||||||
pip install matplotlib
|
pip install matplotlib
|
||||||
pip install scikit-learn
|
pip install scikit-learn
|
||||||
pip install pandas
|
pip install pandas
|
||||||
|
How to run:
|
||||||
|
For BFS3:
|
||||||
|
-in App.py change bfs3_flag to True (other flags need to be disabled)
|
||||||
|
-in Image.py change range in function return_random_plant to (0,5)
|
||||||
|
For Astar:
|
||||||
|
in App.py change Astar to True (other flags need to be disabled)
|
||||||
|
-in Image.py change range in function return_random_plant to (0,7)
|
||||||
|
For Astar2:
|
||||||
|
-in App.py change Astar2 flag to True (other flags need to be disabled)
|
||||||
|
-in Image.py change range in function return_random_plant to (0,7)
|
||||||
|
For Tree:
|
||||||
|
-in App.py change TreeFlag to True (other flags need to be disabled)
|
||||||
|
-in Image.py change range in function return_random_plant to (0,5)
|
||||||
|
For neuralnetwork:
|
||||||
|
-in App.py change nnFlag to True (other flags need to be disabled)
|
||||||
|
For final_show (neuralnetwork+tree+genetic algorithm)
|
||||||
|
-in App.py change finalFlag to True (other flags need to be disabled)
|
Loading…
Reference in New Issue
Block a user