misc changes

This commit is contained in:
eugenep 2021-05-29 18:51:32 +02:00
parent 4750908236
commit f00c0cad5b
2 changed files with 9 additions and 19 deletions

3
.gitignore vendored
View File

@ -9,3 +9,6 @@ data
# ignore .joblib files
*.joblib
# ignore .csv files
*.csv

21
main.py
View File

@ -16,6 +16,7 @@ from graphsearch import *
from astar2 import *
from pizza import *
from learning import *
from csv_writer import *
@ -136,24 +137,10 @@ 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()"""