poprawki
This commit is contained in:
parent
ff6de2c7e4
commit
adf186529c
27
Kamila.py
27
Kamila.py
@ -187,15 +187,17 @@ class main():
|
||||
self.path = path
|
||||
self.best_action = 0
|
||||
|
||||
|
||||
def main(self):
|
||||
# tworzymy zbior uczacy, w ktorym podajemy wszystkie mozliwe pola i czynnosci
|
||||
training_data = [[0, 0, 1, 0, "Zasadzic"],
|
||||
[0, 1, 1, 0, "Odchwascic"],
|
||||
[0, 0, 0, 0, "Podlac"],
|
||||
[0, 1, 0, 0, "Odchwascic"],
|
||||
#[1, 0, 1, 0, "Zasadzic"],
|
||||
#[1, 1, 1, 0, "Odchwascic"],
|
||||
# [1, 0, 1, 0, "Zasadzic"],
|
||||
# [1, 1, 1, 0, "Odchwascic"],
|
||||
[1, 0, 0, 0, "Czekac"],
|
||||
#[1, 1, 0, 0, "Odchwascic"],
|
||||
# [1, 1, 0, 0, "Odchwascic"],
|
||||
[0, 0, 0, 1, "Zebrac"]]
|
||||
self.tree = build_tree(training_data)
|
||||
print_tree(self.tree)
|
||||
@ -203,14 +205,14 @@ class main():
|
||||
print("------------------")
|
||||
print("TEST:")
|
||||
|
||||
# for i in range(len(training_data)):
|
||||
# print("Przewidziania czynnosc: %s Czynnosc: %s"
|
||||
# % (print_leaf(classify(translate(i), self.tree)), training_data[i][-1]))
|
||||
# if training_data[i][-1] in self.work_field(classify(translate(i), self.tree)):
|
||||
# continue
|
||||
# else:
|
||||
# print("Testowanie zakonczone niepowodzeniem")
|
||||
# break
|
||||
# for i in range(len(training_data)):
|
||||
# print("Przewidziania czynnosc: %s Czynnosc: %s"
|
||||
# % (print_leaf(classify(translate(i), self.tree)), training_data[i][-1]))
|
||||
# if training_data[i][-1] in self.work_field(classify(translate(i), self.tree)):
|
||||
# continue
|
||||
# else:
|
||||
# print("Testowanie zakonczone niepowodzeniem")
|
||||
# break
|
||||
|
||||
print("Przewidziania czynnosc: %s Czynnosc: Zasadzic"
|
||||
% print_leaf(classify(translate(4), self.tree)))
|
||||
@ -218,9 +220,6 @@ class main():
|
||||
% print_leaf(classify(translate(5), self.tree)))
|
||||
print("Przewidziania czynnosc: %s Czynnosc: Odchwascic"
|
||||
% print_leaf(classify(translate(7), self.tree)))
|
||||
|
||||
|
||||
def main(self):
|
||||
for action in order:
|
||||
self.traktor.set_mode(action)
|
||||
self.search_field()
|
||||
|
Loading…
Reference in New Issue
Block a user