Dodanie trybu macierzy testowej
This commit is contained in:
parent
86ce81245b
commit
c2237e1eba
@ -1,3 +1,5 @@
|
||||
# import tensorflow
|
||||
|
||||
class main():
|
||||
def __init__(self,traktor,field,ui,path):
|
||||
self.traktor = traktor
|
||||
|
16
field.py
16
field.py
@ -2,7 +2,21 @@ import numpy
|
||||
import random
|
||||
|
||||
class field():
|
||||
def __init__(self):
|
||||
def __init__(self,training=0):
|
||||
self.training = training
|
||||
if self.training == 1:
|
||||
#Macierz treningowa
|
||||
self.field_matrix = numpy.array([[8,0,1,3,0,6,4,3,2,3],
|
||||
[1,4,8,3,7,7,8,5,1,5],
|
||||
[8,7,6,0,4,0,7,7,5,0],
|
||||
[5,4,8,0,5,3,8,1,7,7],
|
||||
[6,0,2,3,2,0,6,6,2,2],
|
||||
[5,8,8,5,4,3,3,1,5,8],
|
||||
[7,8,7,1,5,7,8,0,4,8],
|
||||
[7,3,6,6,0,0,5,6,1,2],
|
||||
[7,2,8,7,1,2,5,3,2,4],
|
||||
[2,4,6,7,6,7,3,5,4,6]])
|
||||
else:
|
||||
self.field_matrix = numpy.random.randint(0, 9, (10, 10))
|
||||
print("Reprezentacja pola jako macierz:")
|
||||
print("###################")
|
||||
|
Loading…
Reference in New Issue
Block a user