misc changes
This commit is contained in:
parent
4750908236
commit
f00c0cad5b
5
.gitignore
vendored
5
.gitignore
vendored
@ -8,4 +8,7 @@ __pycache__/
|
|||||||
data
|
data
|
||||||
|
|
||||||
# ignore .joblib files
|
# ignore .joblib files
|
||||||
*.joblib
|
*.joblib
|
||||||
|
|
||||||
|
# ignore .csv files
|
||||||
|
*.csv
|
23
main.py
23
main.py
@ -16,6 +16,7 @@ from graphsearch import *
|
|||||||
from astar2 import *
|
from astar2 import *
|
||||||
from pizza import *
|
from pizza import *
|
||||||
from learning import *
|
from learning import *
|
||||||
|
from csv_writer import *
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -136,31 +137,17 @@ class Game:
|
|||||||
self.player.decision_tree_learning()
|
self.player.decision_tree_learning()
|
||||||
#print("lol xD")
|
#print("lol xD")
|
||||||
pg.event.clear()
|
pg.event.clear()
|
||||||
if event.key == pg.K_F6:
|
if event.key == pg.K_F6 and self.wentyl_bezpieczenstwa == 0:
|
||||||
pg.event.clear()
|
LabelSetter.set_labels()
|
||||||
#self.wentyl_bezpieczenstwa = 1
|
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)"""
|
|
||||||
|
|
||||||
"""my_learning = Learning()
|
|
||||||
my_learning.load_data()
|
|
||||||
my_learning.learn()
|
|
||||||
my_learning.draw_tree()
|
|
||||||
my_learning.predict()"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def graph_move(self, moves):
|
def graph_move(self, moves):
|
||||||
for i in moves:
|
for i in moves:
|
||||||
if i == 'Right':
|
if i == 'Right':
|
||||||
|
Loading…
Reference in New Issue
Block a user