This commit is contained in:
Kacper 2022-06-10 03:26:48 +02:00
parent 2908d62fb3
commit 75746f077e
5 changed files with 21 additions and 20 deletions

View File

@ -16,22 +16,22 @@
| | | | | |--- feature_1 <= 2.50 | | | | | |--- feature_1 <= 2.50
| | | | | | |--- feature_0 <= 2.50 | | | | | | |--- feature_0 <= 2.50
| | | | | | | |--- feature_1 <= 1.50 | | | | | | | |--- feature_1 <= 1.50
| | | | | | | | |--- feature_2 <= 2.50 | | | | | | | | |--- feature_4 <= 2.50
| | | | | | | | | |--- class: 1 | | | | | | | | | |--- class: 1
| | | | | | | | |--- feature_2 > 2.50 | | | | | | | | |--- feature_4 > 2.50
| | | | | | | | | |--- feature_4 <= 2.00 | | | | | | | | | |--- feature_2 <= 2.00
| | | | | | | | | | |--- class: 1 | | | | | | | | | | |--- class: 1
| | | | | | | | | |--- feature_4 > 2.00 | | | | | | | | | |--- feature_2 > 2.00
| | | | | | | | | | |--- class: 0 | | | | | | | | | | |--- class: 0
| | | | | | | |--- feature_1 > 1.50 | | | | | | | |--- feature_1 > 1.50
| | | | | | | | |--- class: 0 | | | | | | | | |--- class: 0
| | | | | | |--- feature_0 > 2.50 | | | | | | |--- feature_0 > 2.50
| | | | | | | |--- feature_4 <= 2.50 | | | | | | | |--- feature_2 <= 2.50
| | | | | | | | |--- class: 1 | | | | | | | | |--- class: 1
| | | | | | | |--- feature_4 > 2.50 | | | | | | | |--- feature_2 > 2.50
| | | | | | | | |--- feature_2 <= 2.50 | | | | | | | | |--- feature_4 <= 2.50
| | | | | | | | | |--- class: 1 | | | | | | | | | |--- class: 1
| | | | | | | | |--- feature_2 > 2.50 | | | | | | | | |--- feature_4 > 2.50
| | | | | | | | | |--- class: 0 | | | | | | | | | |--- class: 0
| | | | | |--- feature_1 > 2.50 | | | | | |--- feature_1 > 2.50
| | | | | | |--- feature_1 <= 3.50 | | | | | | |--- feature_1 <= 3.50
@ -73,19 +73,19 @@
| | |--- feature_2 > 1.50 | | |--- feature_2 > 1.50
| | | |--- class: 0 | | | |--- class: 0
|--- feature_2 > 3.50 |--- feature_2 > 3.50
| |--- feature_4 <= 1.50 | |--- feature_1 <= 1.50
| | |--- feature_1 <= 1.50 | | |--- feature_4 <= 1.50
| | | |--- feature_2 <= 4.50 | | | |--- feature_2 <= 4.50
| | | | |--- feature_0 <= 1.50 | | | | |--- feature_3 <= 4.50
| | | | | |--- class: 0 | | | | | |--- feature_0 <= 1.50
| | | | |--- feature_0 > 1.50
| | | | | |--- feature_3 <= 4.50
| | | | | | |--- class: 1
| | | | | |--- feature_3 > 4.50
| | | | | | |--- class: 0 | | | | | | |--- class: 0
| | | | | |--- feature_0 > 1.50
| | | | | | |--- class: 1
| | | | |--- feature_3 > 4.50
| | | | | |--- class: 0
| | | |--- feature_2 > 4.50 | | | |--- feature_2 > 4.50
| | | | |--- class: 0 | | | | |--- class: 0
| | |--- feature_1 > 1.50 | | |--- feature_4 > 1.50
| | | |--- class: 0 | | | |--- class: 0
| |--- feature_4 > 1.50 | |--- feature_1 > 1.50
| | |--- class: 0 | | |--- class: 0

Binary file not shown.

Binary file not shown.

View File

@ -113,6 +113,7 @@ class Game():
# print('----') # print('----')
# print(i) # print(i)
# print('----') # print('----')
self.draw()
def decsion_tree_move(self): def decsion_tree_move(self):
for i in range(0,len(self.positive_decision)): for i in range(0,len(self.positive_decision)):
@ -169,7 +170,7 @@ class Game():
# dist = a_star.get_cost # dist = a_star.get_cost
self.tsp_list = TSP.geneticAlgorithmPlot(population=city_list, popSize=100, eliteSize=20, mutationRate=0.01, generations=200) self.tsp_list = TSP.geneticAlgorithmPlot(population=city_list, popSize=100, eliteSize=20, mutationRate=0.01, generations=300)
print(self.tsp_list) print(self.tsp_list)
def load_data(self): def load_data(self):

View File

@ -7,7 +7,7 @@ RED = (255, 0, 0)
#game settings #game settings
WIDTH = 1024+200 WIDTH = 1024
HEIGHT = 768 HEIGHT = 768
FPS = 60 FPS = 60