Merge old branches to refactor due to merge it with master #22
@ -1,5 +1,6 @@
|
||||
import random
|
||||
import Climate
|
||||
import Ui
|
||||
|
||||
class Condition:
|
||||
def __init__(self):
|
||||
@ -44,4 +45,3 @@ class Condition:
|
||||
|
||||
def getCondition(self):
|
||||
print(f"Aktualny czas: {Climate.time[self.currentTime]},opady: {Climate.rain[self.rain]},temperatura: {Climate.temperature[self.temperature]}, pora roku: {Climate.seasons[self.season]}")
|
||||
|
@ -22,4 +22,7 @@ class Drzewo:
|
||||
plt.show()
|
||||
def makeDecision(self,values):
|
||||
action=self.tree.predict([values]) #0- nie podlewac, 1-podlewac
|
||||
return action
|
||||
if(action==[0]):
|
||||
return "Nie podlewac"
|
||||
if(action==[1]):
|
||||
return "Podlewac"
|
@ -71,7 +71,7 @@ class Tractor:
|
||||
attributes=[]
|
||||
attributes=attributes+slot_attributes+[self.waterLevel]+climate_attributes
|
||||
print("Decyzja czy podlac:",drzewo.makeDecision(attributes),"Atrybuty tego stanu to:",attributes)
|
||||
#TODO SNAKE MOVE AND USING drzewo.makeDecision(attributes)for each slot. Also we need to cycle climate for each slot change by
|
||||
#TODO SNAKE MOVE AND USING drzewo.makeDecision(attributes)for each slot. Also we need to cycle climate for each slot change
|
||||
#condition.cycle()
|
||||
#condition.getCondition()
|
||||
def turn_right(self):
|
||||
|
Loading…
Reference in New Issue
Block a user