diff --git a/.gitignore b/.gitignore index 732a48e..91d714a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ __pycache__/ data # ignore .joblib files -*.joblib \ No newline at end of file +*.joblib + +# ignore .csv files +*.csv \ No newline at end of file diff --git a/main.py b/main.py index 6021700..c34ef7b 100644 --- a/main.py +++ b/main.py @@ -16,6 +16,7 @@ from graphsearch import * from astar2 import * from pizza import * from learning import * +from csv_writer import * @@ -136,31 +137,17 @@ class Game: self.player.decision_tree_learning() #print("lol xD") pg.event.clear() - if event.key == pg.K_F6: - pg.event.clear() - #self.wentyl_bezpieczenstwa = 1 - """X = [[6,15,31,5,0,0,1,0],[6,36,5,8,1,1,1,0], - [13,40,29,3,0,0,0,0], [15,25,23,7,0,0,1,1], - [17,34,5,5,1,1,0,1], [3,9,28,8,0,0,1,0], - [18,38,43,6,1,1,1,1], [3,8,53,4,1,1,1,1], - [9,40,47,1,1,0,1,1],[11,23,31,5,0,0,1,1]] - Y = [1,5,1,1,4,1,2,2,1,1] - clf = tree.DecisionTreeClassifier() - clf = clf.fit(X,Y) - tree.plot_tree(clf)""" + if event.key == pg.K_F6 and self.wentyl_bezpieczenstwa == 0: + LabelSetter.set_labels() + self.wentyl_bezpieczenstwa = 1 - """my_learning = Learning() - my_learning.load_data() - my_learning.learn() - my_learning.draw_tree() - my_learning.predict()""" + - def graph_move(self, moves): for i in moves: if i == 'Right':