added HW5_final with suggestion system and repo cleanup
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
HW3/results
|
||||
HW4/results
|
||||
HW5/results
|
||||
HW5/plots
|
||||
HW5/plots/*
|
||||
HW5/dataset.csv
|
||||
HW5/trained_model.joblib
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
numpy>=1.24.0
|
||||
matplotlib>=3.5.0
|
||||
@@ -0,0 +1,3 @@
|
||||
numpy>=1.24.0
|
||||
matplotlib>=3.5.0
|
||||
pandas>=2.0.0
|
||||
+7
-5
@@ -78,7 +78,7 @@ class Pokemon:
|
||||
break
|
||||
return effect
|
||||
|
||||
def _useMove(self, move, opponent):
|
||||
def _useMove(self, move, opponent, game_status = None):
|
||||
if random.random() < move['accuracy']:
|
||||
if move['category'] == 'physical':
|
||||
attack = self.ActStats['attack']
|
||||
@@ -97,17 +97,19 @@ class Pokemon:
|
||||
opponent.curr_hp -= damage
|
||||
if opponent.curr_hp < 0:
|
||||
opponent.curr_hp = 0
|
||||
#print(f"{self.name} used {move['name']} and dealt {damage} damage to {opponent.name}!")
|
||||
if not game_status == 'new_random_battle':
|
||||
print(f"{self.name} used {move['name']} and dealt {damage} damage to {opponent.name}!")
|
||||
else:
|
||||
damage = 0
|
||||
#print(f"{self.name}'s attack missed!")
|
||||
if not game_status == 'new_random_battle':
|
||||
print(f"{self.name}'s attack missed!")
|
||||
return damage
|
||||
|
||||
def useMove(self, move_name, opponent):
|
||||
def useMove(self, move_name, opponent, game_status = None):
|
||||
if move_name not in self.moves_dict:
|
||||
raise ValueError(f"{self.name} does not know the move {move_name}.")
|
||||
else:
|
||||
return self._useMove(self.moves_dict[move_name], opponent)
|
||||
return self._useMove(self.moves_dict[move_name], opponent, game_status)
|
||||
|
||||
def print_move(self,move):
|
||||
print(f"Move: {self.moves_dict[move]['name']}")
|
||||
|
||||
-441
@@ -1,441 +0,0 @@
|
||||
player_hp,player_attack,player_defense,player_speed,player_special,player_type_normal,player_type_fire,player_type_water,player_type_electric,player_type_grass,player_type_ice,player_type_fighting,player_type_poison,player_type_ground,player_type_flying,player_type_psychic,player_type_bug,player_type_rock,player_type_ghost,player_type_dragon,opponent_hp,opponent_attack,opponent_defense,opponent_speed,opponent_special,opponent_type_normal,opponent_type_fire,opponent_type_water,opponent_type_electric,opponent_type_grass,opponent_type_ice,opponent_type_fighting,opponent_type_poison,opponent_type_ground,opponent_type_flying,opponent_type_psychic,opponent_type_bug,opponent_type_rock,opponent_type_ghost,opponent_type_dragon,battle_result
|
||||
32,15,26,18,33,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,56,33,29,51,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
32,15,26,18,33,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,34,30,28,22,20,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1
|
||||
32,15,26,18,33,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,20,12,10,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
|
||||
32,15,26,18,33,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,20,12,9,11,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
32,15,26,18,33,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,12,6,6,7,7,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
27,17,13,16,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,62,45,33,23,25,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
27,17,13,16,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,49,20,23,20,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
27,17,13,16,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
27,17,13,16,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,36,22,20,14,27,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0
|
||||
27,17,13,16,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,21,11,12,16,14,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
36,27,31,14,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,42,25,23,28,24,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
36,27,31,14,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,52,25,23,53,59,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
36,27,31,14,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,32,9,17,11,10,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
36,27,31,14,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,24,11,11,15,15,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
36,27,31,14,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,47,20,22,28,32,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1
|
||||
42,21,20,22,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,26,14,12,16,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,21,20,22,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,44,30,16,18,28,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
42,21,20,22,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,16,18,9,10,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
42,21,20,22,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,17,9,8,12,8,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,21,20,22,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,31,13,13,11,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
22,17,19,13,12,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
22,17,19,13,12,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,54,22,29,14,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
22,17,19,13,12,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,26,16,12,14,13,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
22,17,19,13,12,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,28,19,13,13,18,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
22,17,19,13,12,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,51,31,31,30,37,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
42,22,23,15,30,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,25,13,12,20,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
42,22,23,15,30,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,22,23,15,30,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,28,16,15,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
42,22,23,15,30,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,20,9,14,11,18,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,22,23,15,30,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,28,19,15,21,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
38,27,20,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,11,6,5,6,5,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,27,20,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,24,15,11,17,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,27,20,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,49,35,28,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1
|
||||
38,27,20,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,51,34,25,42,35,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
38,27,20,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,28,17,13,15,14,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
16,8,8,12,11,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,21,14,10,10,13,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
16,8,8,12,11,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,40,32,39,11,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
16,8,8,12,11,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,50,37,40,25,22,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
|
||||
16,8,8,12,11,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,35,23,17,28,23,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
16,8,8,12,11,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,21,13,10,15,13,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
36,16,15,15,26,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,28,7,19,25,10,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
36,16,15,15,26,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,17,11,8,12,8,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1
|
||||
36,16,15,15,26,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,53,36,26,44,37,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
36,16,15,15,26,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,15,8,9,6,8,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
36,16,15,15,26,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,38,21,31,24,38,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
27,14,18,8,14,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,47,30,23,17,20,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
27,14,18,8,14,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,33,16,15,19,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
27,14,18,8,14,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,52,30,29,34,27,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
27,14,18,8,14,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,42,29,32,17,14,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
|
||||
27,14,18,8,14,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,38,33,37,24,21,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
38,21,17,33,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,37,29,15,26,15,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
38,21,17,33,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
38,21,17,33,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,36,31,21,29,19,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
38,21,17,33,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,19,9,10,8,11,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,21,17,33,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,32,28,30,27,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
14,7,7,6,8,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,46,30,23,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
|
||||
14,7,7,6,8,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,51,23,17,39,39,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0
|
||||
14,7,7,6,8,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,54,32,33,32,39,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
14,7,7,6,8,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,14,7,7,10,8,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
14,7,7,6,8,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,27,11,17,11,14,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0
|
||||
22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,21,22,14,29,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35,23,31,14,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,15,16,13,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,33,22,17,19,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,24,27,17,29,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
51,37,23,24,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,23,20,12,12,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
51,37,23,24,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,37,30,19,27,19,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
51,37,23,24,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,59,44,29,54,27,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0
|
||||
51,37,23,24,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,31,15,14,12,16,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1
|
||||
51,37,23,24,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,23,11,13,21,14,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
23,10,11,13,14,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,42,35,62,27,32,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0
|
||||
23,10,11,13,14,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,46,29,20,15,15,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
23,10,11,13,14,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,56,42,28,30,41,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
23,10,11,13,14,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,46,37,27,38,30,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
23,10,11,13,14,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,35,17,14,30,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
43,17,29,17,23,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,48,44,35,33,18,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
43,17,29,17,23,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,49,36,24,26,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
43,17,29,17,23,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,18,9,9,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
43,17,29,17,23,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,32,27,30,20,17,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
43,17,29,17,23,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,15,7,7,9,9,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
48,27,21,25,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,15,8,8,8,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
48,27,21,25,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,47,31,26,36,41,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
48,27,21,25,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,51,41,30,42,33,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
48,27,21,25,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,36,18,29,14,15,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
48,27,21,25,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,38,21,20,25,21,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
24,11,10,19,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,25,17,12,20,12,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1
|
||||
24,11,10,19,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,36,18,24,10,19,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
24,11,10,19,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,52,32,30,35,42,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
24,11,10,19,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,24,12,10,19,11,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
24,11,10,19,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,46,31,28,28,37,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
17,9,9,10,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,44,37,66,28,33,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0
|
||||
17,9,9,10,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,38,14,15,18,11,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
|
||||
17,9,9,10,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,62,30,31,26,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,9,9,10,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,40,13,11,41,47,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
17,9,9,10,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,18,11,11,14,13,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,25,14,13,20,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,8,8,7,7,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,42,19,14,31,31,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0
|
||||
19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,42,21,17,24,19,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0
|
||||
19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
51,20,14,14,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,20,59,28,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
51,20,14,14,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,23,23,22,34,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
51,20,14,14,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,32,35,23,20,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
51,20,14,14,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,15,12,9,10,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
51,20,14,14,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,23,19,37,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
16,9,10,7,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,53,41,38,16,17,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
16,9,10,7,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,24,12,11,21,23,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
16,9,10,7,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,30,17,13,9,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
16,9,10,7,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,22,15,14,8,8,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
16,9,10,7,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,44,42,35,30,21,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
|
||||
50,20,21,16,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,9,9,19,21,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
50,20,21,16,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,6,6,12,13,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
50,20,21,16,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,20,37,19,34,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
50,20,21,16,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,26,25,29,35,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
50,20,21,16,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,8,7,8,7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,23,22,27,23,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,40,20,16,35,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,23,22,27,23,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,17,9,9,7,11,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
38,23,22,27,23,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,29,17,15,16,14,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
38,23,22,27,23,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,40,31,27,13,27,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1
|
||||
38,23,22,27,23,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,28,20,14,21,16,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
26,14,12,21,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
26,14,12,21,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
26,14,12,21,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,16,9,8,11,10,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
26,14,12,21,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,38,23,19,21,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
26,14,12,21,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,54,31,33,21,39,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
20,11,11,12,10,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,22,14,9,9,13,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
20,11,11,12,10,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,18,9,7,6,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
20,11,11,12,10,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
20,11,11,12,10,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,46,30,26,28,26,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
20,11,11,12,10,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,12,5,5,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
28,13,27,12,24,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,45,22,22,22,22,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
28,13,27,12,24,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,46,26,20,24,20,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
28,13,27,12,24,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,42,21,28,37,41,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
28,13,27,12,24,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,29,12,15,9,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
28,13,27,12,24,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,62,37,25,15,21,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,76,6,6,16,28,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,49,35,27,41,24,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,13,6,9,6,8,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1
|
||||
61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,21,18,11,11,16,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
61,38,36,45,39,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,12,6,6,6,6,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
40,20,22,20,25,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,28,20,19,9,10,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
40,20,22,20,25,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,40,27,37,16,25,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
40,20,22,20,25,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,42,27,25,26,22,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
40,20,22,20,25,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,44,29,24,33,38,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
40,20,22,20,25,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,37,20,17,32,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
46,35,23,34,32,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,19,7,10,8,7,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
46,35,23,34,32,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,51,20,35,20,27,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
46,35,23,34,32,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,28,16,22,20,22,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
46,35,23,34,32,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,32,26,20,17,21,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1
|
||||
46,35,23,34,32,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,33,26,17,24,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
36,25,20,21,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,53,52,43,37,25,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
36,25,20,21,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,43,29,26,26,35,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
36,25,20,21,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,33,20,12,23,13,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
36,25,20,21,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,15,7,7,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
36,25,20,21,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,45,20,22,18,18,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
30,18,16,17,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,49,29,29,29,35,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
30,18,16,17,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,28,18,15,20,23,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
30,18,16,17,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,53,27,31,20,33,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
30,18,16,17,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,18,8,11,8,9,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
30,18,16,17,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,41,24,23,25,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,46,28,33,26,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,33,15,12,24,24,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
|
||||
29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,21,10,10,10,10,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,27,16,15,11,20,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
29,16,16,15,19,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,38,27,21,24,21,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
25,12,12,12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,23,21,39,46,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
25,12,12,12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,11,23,15,13,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
25,12,12,12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,9,12,11,12,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
25,12,12,12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,33,46,16,35,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
25,12,12,12,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,18,21,18,25,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1
|
||||
17,8,9,8,8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,56,31,29,57,49,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,8,9,8,8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,43,22,28,20,23,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,8,9,8,8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,23,14,12,13,12,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
17,8,9,8,8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,36,27,24,12,24,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0
|
||||
17,8,9,8,8,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,21,10,12,10,11,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
33,15,14,23,31,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,44,27,23,25,24,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
33,15,14,23,31,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,43,39,36,29,26,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
33,15,14,23,31,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,22,15,16,11,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
33,15,14,23,31,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,33,24,28,13,14,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
33,15,14,23,31,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,29,22,13,35,19,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,34,11,18,14,11,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0
|
||||
28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,14,9,7,8,7,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,12,7,7,6,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,15,8,7,6,6,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,29,14,16,14,18,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1
|
||||
38,21,21,20,25,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,29,10,7,7,8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,21,21,20,25,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,49,28,25,44,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,21,21,20,25,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,18,10,10,9,9,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
38,21,21,20,25,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,41,24,23,25,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,21,21,20,25,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,47,37,32,15,32,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1
|
||||
51,27,25,37,43,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,26,13,13,13,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
51,27,25,37,43,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,28,22,16,31,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
51,27,25,37,43,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,19,9,10,8,11,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
51,27,25,37,43,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,63,39,37,43,52,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
51,27,25,37,43,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,37,18,17,21,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
28,17,14,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,38,19,17,22,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
28,17,14,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,54,40,27,49,25,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0
|
||||
28,17,14,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,47,29,27,19,37,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0
|
||||
28,17,14,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,7,6,6,7,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1
|
||||
28,17,14,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,48,41,73,31,37,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0
|
||||
46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,22,11,9,12,10,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,48,24,24,23,31,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,48,37,25,39,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,62,39,35,24,50,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
46,28,27,31,37,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,49,25,24,25,29,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
14,11,10,8,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,22,11,10,19,21,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
14,11,10,8,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,28,16,14,15,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
14,11,10,8,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,18,15,14,11,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
14,11,10,8,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,25,18,17,9,9,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
14,11,10,8,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,46,5,5,11,17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
39,23,23,29,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,33,18,16,21,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
39,23,23,29,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,34,22,19,25,29,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
39,23,23,29,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,17,7,6,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
39,23,23,29,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,38,19,30,26,30,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
39,23,23,29,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,32,18,18,17,17,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
66,57,37,27,31,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,37,18,28,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
66,57,37,27,31,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,53,29,29,39,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
66,57,37,27,31,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,35,27,14,24,14,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
66,57,37,27,31,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,27,13,25,12,23,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1
|
||||
66,57,37,27,31,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,21,11,12,16,14,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
24,13,15,13,17,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,20,8,8,8,11,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
24,13,15,13,17,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,40,20,33,15,17,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
|
||||
24,13,15,13,17,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,35,17,30,18,27,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
|
||||
24,13,15,13,17,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,12,5,5,5,6,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
24,13,15,13,17,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,19,10,9,14,16,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
53,30,37,28,31,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,29,20,29,14,15,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
53,30,37,28,31,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,16,9,7,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
53,30,37,28,31,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,50,27,25,35,35,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
53,30,37,28,31,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,12,12,12,14,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
53,30,37,28,31,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,22,11,11,14,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
28,21,16,21,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,24,12,20,11,18,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
28,21,16,21,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,45,29,32,41,37,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
28,21,16,21,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1
|
||||
28,21,16,21,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,22,9,9,8,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
28,21,16,21,17,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,32,25,14,41,22,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
42,26,15,30,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,35,17,16,20,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
42,26,15,30,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,29,22,12,20,12,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
42,26,15,30,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,11,6,5,6,5,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,26,15,30,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,63,37,35,41,33,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
42,26,15,30,16,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,16,10,8,10,8,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
43,26,25,31,27,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,53,29,27,54,46,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
43,26,25,31,27,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,51,39,25,43,39,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
43,26,25,31,27,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,16,12,11,9,8,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
43,26,25,31,27,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,28,26,14,20,11,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
43,26,25,31,27,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,54,32,31,33,32,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
20,9,9,12,12,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,57,50,37,32,39,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0
|
||||
20,9,9,12,12,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,44,25,24,28,23,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
20,9,9,12,12,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,14,7,8,7,9,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
20,9,9,12,12,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,28,17,14,11,12,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
20,9,9,12,12,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,23,8,6,6,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
47,36,33,14,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,29,15,14,24,28,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
47,36,33,14,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,19,15,13,11,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
47,36,33,14,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,40,24,21,23,22,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
47,36,33,14,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,67,25,24,25,40,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
47,36,33,14,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,34,30,28,22,20,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1
|
||||
38,25,33,16,18,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,52,27,18,11,18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
38,25,33,16,18,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,12,6,6,6,6,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
38,25,33,16,18,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,47,30,23,17,20,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
38,25,33,16,18,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,57,23,30,15,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
38,25,33,16,18,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,28,13,10,20,20,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
|
||||
44,28,21,16,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,46,35,24,37,28,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
44,28,21,16,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,66,31,31,11,21,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
44,28,21,16,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,34,29,20,27,18,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
44,28,21,16,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,34,13,22,13,18,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
44,28,21,16,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,35,32,27,23,17,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,48,31,29,30,25,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,42,15,16,20,11,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
|
||||
11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,46,26,24,32,27,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,38,34,27,26,14,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
11,6,6,5,6,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,59,47,31,32,39,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
26,9,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,21,15,10,13,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
26,9,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,43,39,39,52,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
26,9,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,8,8,6,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
26,9,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,36,26,44,37,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
26,9,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,5,5,6,7,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
14,7,7,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,27,17,18,23,21,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
14,7,7,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,36,22,18,20,18,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
14,7,7,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,46,23,21,27,19,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
14,7,7,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,21,10,16,11,15,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
|
||||
14,7,7,8,8,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,12,5,7,8,5,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,9,13,10,16,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,46,27,28,27,33,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
19,9,13,10,16,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,20,10,9,10,10,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,9,13,10,16,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,35,21,13,24,13,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
19,9,13,10,16,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,20,10,9,10,10,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,9,13,10,16,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,35,36,32,23,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
31,20,27,13,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,27,15,15,19,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
31,20,27,13,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,48,25,23,29,22,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
31,20,27,13,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,52,37,29,43,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
31,20,27,13,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,26,22,19,16,12,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
31,20,27,13,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,53,28,26,37,37,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0
|
||||
35,30,18,27,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,19,12,12,7,7,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
35,30,18,27,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,28,13,23,14,21,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
|
||||
35,30,18,27,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,36,12,8,8,9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
35,30,18,27,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,21,12,11,9,15,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
35,30,18,27,15,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,47,27,25,42,49,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,18,10,10,8,12,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,10,14,8,9,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,41,24,33,30,33,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,43,20,26,47,29,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,11,9,15,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
19,12,9,12,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,49,32,18,30,20,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0
|
||||
19,12,9,12,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,28,18,24,12,17,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
19,12,9,12,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,63,37,43,37,52,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0
|
||||
19,12,9,12,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,15,8,7,10,11,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
19,12,9,12,11,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,51,29,27,35,29,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
51,29,27,46,54,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,48,33,37,20,16,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
51,29,27,46,54,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,63,55,41,35,43,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1
|
||||
51,29,27,46,54,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,28,17,11,17,12,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
51,29,27,46,54,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,38,26,14,16,24,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
51,29,27,46,54,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,12,6,7,6,7,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1
|
||||
19,10,9,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,15,14,16,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,10,9,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,17,10,10,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,10,9,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,28,41,19,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
19,10,9,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,23,29,21,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
19,10,9,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,27,31,27,37,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0
|
||||
45,33,35,23,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,18,8,9,10,11,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1
|
||||
45,33,35,23,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,33,21,17,20,16,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
45,33,35,23,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,26,10,14,23,14,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
45,33,35,23,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,51,24,46,26,41,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
|
||||
45,33,35,23,20,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,15,7,8,10,11,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
15,8,8,7,7,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,15,8,8,6,6,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
15,8,8,7,7,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,14,8,7,9,8,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
15,8,8,7,7,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,35,17,15,33,37,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
15,8,8,7,7,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,26,13,14,10,15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
15,8,8,7,7,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,19,7,10,8,7,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
17,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,13,14,13,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,33,37,24,21,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
17,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,17,12,13,17,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
17,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,8,7,7,8,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
17,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,54,27,29,46,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
30,11,12,14,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,40,16,12,12,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
30,11,12,14,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,34,18,19,12,24,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
30,11,12,14,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,22,11,17,10,16,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0
|
||||
30,11,12,14,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,40,19,19,8,13,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
30,11,12,14,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,57,49,32,23,27,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
42,16,15,16,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,28,9,8,26,30,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
42,16,15,16,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,26,14,15,14,14,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
42,16,15,16,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,38,38,19,29,14,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
42,16,15,16,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,30,23,17,23,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,16,15,16,24,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,30,19,17,18,17,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1
|
||||
40,28,24,27,23,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,29,17,16,19,22,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
40,28,24,27,23,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,59,44,29,54,27,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0
|
||||
40,28,24,27,23,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,34,14,14,12,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
40,28,24,27,23,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,16,8,10,9,10,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
40,28,24,27,23,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,20,13,11,14,10,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
12,6,6,6,6,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,12,6,6,7,6,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,34,21,21,21,21,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
12,6,6,6,6,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,12,7,6,6,7,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
12,6,6,6,6,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,26,12,21,13,19,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
|
||||
12,6,6,6,6,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,14,7,7,7,7,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,50,40,27,27,33,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,24,23,21,14,9,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,30,17,13,9,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,50,33,28,38,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
|
||||
22,13,9,14,9,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,44,29,26,27,23,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
28,11,11,11,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,13,10,7,9,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
28,11,11,11,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,19,10,9,15,13,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
28,11,11,11,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,34,11,18,14,11,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
28,11,11,11,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,46,33,43,24,32,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
28,11,11,11,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,37,23,16,20,18,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,15,18,15,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,11,17,13,22,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,15,18,15,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,30,28,15,16,24,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,15,18,15,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,14,9,14,10,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1
|
||||
37,15,18,15,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,24,27,24,31,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1
|
||||
37,15,18,15,21,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,34,16,20,35,22,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,68,44,33,24,29,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,67,32,30,24,35,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0
|
||||
49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,45,23,22,23,27,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,44,22,22,21,28,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
49,29,28,30,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,16,6,6,12,13,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
37,21,19,32,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,27,27,26,33,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0
|
||||
37,21,19,32,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,22,21,22,25,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,21,19,32,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,14,12,24,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,21,19,32,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,14,16,22,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,21,19,32,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,8,6,7,6,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
37,21,29,27,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,13,6,6,6,7,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
37,21,29,27,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,62,37,36,39,37,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
37,21,29,27,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,26,10,14,23,14,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
37,21,29,27,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,23,11,9,16,16,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
|
||||
37,21,29,27,29,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,18,11,10,11,10,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
17,8,8,9,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,44,22,18,39,20,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,8,8,9,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,48,33,37,20,16,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
|
||||
17,8,8,9,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,44,27,17,41,25,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
17,8,8,9,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,26,8,13,9,9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
17,8,8,9,7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,19,11,14,8,11,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
46,28,31,12,13,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,19,11,11,11,11,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
46,28,31,12,13,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,12,6,6,5,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
46,28,31,12,13,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,18,10,9,11,10,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
46,28,31,12,13,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,25,13,12,20,23,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0
|
||||
46,28,31,12,13,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,12,7,7,6,6,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1
|
||||
19,9,11,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,11,5,6,7,6,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
19,9,11,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,33,14,12,32,36,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
19,9,11,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,12,7,6,6,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
19,9,11,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,51,28,26,51,44,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
19,9,11,14,15,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,42,33,17,30,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
30,15,14,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,34,24,17,27,24,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
30,15,14,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,46,30,26,28,26,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0
|
||||
30,15,14,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,28,14,18,13,15,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
30,15,14,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,28,12,13,12,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
30,15,14,17,14,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,29,14,23,16,29,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,25,21,23,21,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,25,17,14,9,14,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1
|
||||
38,25,21,23,21,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,46,29,29,29,29,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
|
||||
38,25,21,23,21,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,21,10,16,11,15,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
|
||||
38,25,21,23,21,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,32,17,17,17,21,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1
|
||||
38,25,21,23,21,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,15,7,7,10,7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
35,22,13,21,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,33,33,30,21,16,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
35,22,13,21,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,19,12,12,7,7,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
35,22,13,21,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,38,19,16,22,17,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
35,22,13,21,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,46,31,28,28,37,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0
|
||||
35,22,13,21,14,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,40,32,39,11,15,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0
|
||||
42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,32,16,20,15,17,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,39,19,19,19,19,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,27,18,16,17,15,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,32,23,17,24,19,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
42,23,23,30,19,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,16,9,8,10,8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
23,15,11,12,15,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,58,37,25,19,19,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
23,15,11,12,15,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,64,5,5,14,23,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
23,15,11,12,15,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,28,18,20,12,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
|
||||
23,15,11,12,15,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,53,52,43,37,25,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
|
||||
23,15,11,12,15,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,63,55,41,35,43,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0
|
||||
50,38,36,15,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,64,33,21,12,21,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
50,38,36,15,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,47,18,32,18,25,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1
|
||||
50,38,36,15,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,20,17,10,13,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1
|
||||
50,38,36,15,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,35,17,14,20,16,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
50,38,36,15,16,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,43,38,26,35,23,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
49,27,33,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,35,29,33,28,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1
|
||||
49,27,33,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,12,6,6,6,6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
49,27,33,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,63,37,43,37,52,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0
|
||||
49,27,33,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,27,19,27,13,14,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
49,27,33,25,28,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,12,6,6,6,6,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1
|
||||
14,8,12,7,8,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,43,21,20,18,17,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0
|
||||
14,8,12,7,8,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,30,32,28,18,11,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
14,8,12,7,8,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,12,6,7,5,5,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1
|
||||
14,8,12,7,8,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,41,21,22,19,19,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
|
||||
14,8,12,7,8,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,16,10,15,9,10,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1
|
||||
32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,22,10,16,12,20,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1
|
||||
32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,33,18,17,31,27,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,45,22,21,19,17,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0
|
||||
32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,37,19,18,22,17,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1
|
||||
32,25,18,36,23,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,35,28,19,14,16,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
|
||||
|
+1
-1
@@ -47,7 +47,7 @@ pokemons_df = pd.DataFrame.from_dict(pokemons_dict,orient='index')
|
||||
|
||||
|
||||
available_pokemon_names = list(pokemons_dict.keys())
|
||||
available_starters = ['bulbasaur', 'charmander', 'squirtle']
|
||||
available_starter_names = ['bulbasaur', 'charmander', 'squirtle']
|
||||
|
||||
#type effectiveness
|
||||
type_effectiveness = []
|
||||
|
||||
+5
-1
@@ -4,6 +4,7 @@ import random
|
||||
import copy
|
||||
import game_data as gd
|
||||
import pickle
|
||||
import joblib
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import os
|
||||
@@ -312,6 +313,8 @@ def train_model(dataset_column_labels):
|
||||
graph = graphviz.Source(dot_data)
|
||||
graph.render(outfile=f"plots/tree_{i}.pdf", format='pdf')
|
||||
|
||||
return best_model
|
||||
|
||||
if __name__ == "__main__":
|
||||
Ngames = 10
|
||||
Nbattles = 5
|
||||
@@ -327,5 +330,6 @@ if __name__ == "__main__":
|
||||
print("Generating dataset")
|
||||
dataset_column_labels = build_dataset()
|
||||
print("Training model")
|
||||
train_model(dataset_column_labels)
|
||||
best_model = train_model(dataset_column_labels)
|
||||
joblib.dump(best_model, 'trained_model.joblib')
|
||||
print("Ended")
|
||||
@@ -0,0 +1,571 @@
|
||||
from core import Trainer
|
||||
import game_data as gd
|
||||
import random
|
||||
import copy
|
||||
import numpy as np
|
||||
import pickle
|
||||
import joblib
|
||||
import os
|
||||
import pandas as pd
|
||||
from sklearn.model_selection import train_test_split
|
||||
from sklearn.ensemble import RandomForestClassifier
|
||||
from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
|
||||
from sklearn.model_selection import RandomizedSearchCV
|
||||
from scipy.stats import randint
|
||||
from sklearn.tree import export_graphviz
|
||||
import graphviz
|
||||
|
||||
game_status = 'story'
|
||||
game_active_flag = True
|
||||
if os.path.exists('trained_model.joblib'):
|
||||
recommender_sys_avail = True
|
||||
else:
|
||||
recommender_sys_avail = False
|
||||
|
||||
def recommend(player_pokemon, opponent_pokemon):
|
||||
global recommender_sys_avail
|
||||
if recommender_sys_avail:
|
||||
model = joblib.load('trained_model.joblib')
|
||||
|
||||
# Prepare input data
|
||||
all_pokemon_types = list(gd.available_types)
|
||||
player_ActStats = list(player_pokemon.ActStats.values())
|
||||
player_pokemon_type = player_pokemon.types
|
||||
player_pokemon_type_encoded = [1 if t in player_pokemon_type else 0 for t in all_pokemon_types]
|
||||
opponent_ActStats = list(opponent_pokemon.ActStats.values())
|
||||
opponent_pokemon_type = opponent_pokemon.types
|
||||
opponent_pokemon_type_encoded = [1 if t in opponent_pokemon_type else 0 for t in all_pokemon_types]
|
||||
|
||||
input_data = player_ActStats + player_pokemon_type_encoded + opponent_ActStats + opponent_pokemon_type_encoded
|
||||
labels = build_dataset()[:-1] # Exclude the last label which is 'battle_result'
|
||||
df_to_eval = pd.DataFrame([input_data], columns=labels)
|
||||
|
||||
prediction_proba = model.predict_proba(df_to_eval)
|
||||
return prediction_proba[0][1] # Returns 1 if prediction is a win, 0 otherwise, and the probability of winning
|
||||
else:
|
||||
raise ValueError("Recommender system is not available. Play NewRandomBattle once!")
|
||||
def Battle(trainer,cpu_trainer):
|
||||
global game_status
|
||||
global game_active_flag
|
||||
print(f"You are in battle against CPU's {cpu_trainer.get_active_pokemon().name}!")
|
||||
battle_active = True
|
||||
|
||||
while battle_active:
|
||||
player_battle_action_selected = False
|
||||
while not player_battle_action_selected:
|
||||
print("Type the number of one of the following actions:")
|
||||
print(f"1) Attack - [Your active Pokemon - {trainer.get_active_pokemon().name}]")
|
||||
print("2) Change pokemon")
|
||||
print("3) Use item")
|
||||
print("4) Consult the Oracle")
|
||||
print("5) Run away")
|
||||
print('6) Check status')
|
||||
|
||||
try:
|
||||
action = int(input("Choose an action (1-6): ").strip())
|
||||
player_battle_action_selected = True
|
||||
except ValueError:
|
||||
print("Invalid input. Please enter a number between 1 and 6.")
|
||||
continue
|
||||
|
||||
if action == 1:
|
||||
#check if the player can sustain a battle: first check the active pokemon,
|
||||
#then check the pokemons in the list
|
||||
if not trainer.active_pokemon_can_battle():
|
||||
print("Your active pokemon cannot battle!")
|
||||
if not trainer.can_battle():
|
||||
print("You have no more pokemon that can battle! You lost the battle!")
|
||||
battle_active = False
|
||||
game_status = 'pokemon_center'
|
||||
break
|
||||
else:
|
||||
print("You have other pokemon that can battle! Please change your active pokemon!")
|
||||
continue
|
||||
|
||||
selected_combat_move_flag = False
|
||||
while not selected_combat_move_flag:
|
||||
active_pokemon = trainer.get_active_pokemon()
|
||||
cpu_active_pokemon = cpu_trainer.get_active_pokemon()
|
||||
print(f"Choose a move for {active_pokemon.name} to use against {cpu_active_pokemon.name}:\n", active_pokemon.get_moves())
|
||||
player_move_name = input("Choose:")
|
||||
try:
|
||||
active_pokemon.useMove(player_move_name,cpu_active_pokemon)
|
||||
selected_combat_move_flag = True
|
||||
#check if the opponent has been defeated
|
||||
if not cpu_trainer.active_pokemon_can_battle():
|
||||
print(f"{cpu_trainer.get_active_pokemon().name} has been defeated!")
|
||||
battle_active = False
|
||||
game_status = 'story'
|
||||
break
|
||||
|
||||
#if the opponent has not been defeated, then its the CPU turn to play
|
||||
cpu_active_pokemon_selected_move_name = random.choice(cpu_active_pokemon.get_moves())
|
||||
print(f"CPU's {cpu_active_pokemon.name} is using {cpu_active_pokemon_selected_move_name} against your {active_pokemon.name}!")
|
||||
cpu_active_pokemon.useMove(cpu_active_pokemon_selected_move_name, active_pokemon)
|
||||
|
||||
#update the player pokemon list
|
||||
trainer.update_pokemon_list(active_pokemon)
|
||||
#check if the player has been defeated
|
||||
if not trainer.active_pokemon_can_battle():
|
||||
print(f"Your {active_pokemon.name} has been defeated!")
|
||||
if not trainer.can_battle():
|
||||
print("You have no more Pokemons that can battle! You lost!")
|
||||
battle_active = False
|
||||
game_status = 'pokemon_center'
|
||||
break
|
||||
else:
|
||||
print("You have other Pokemons that can battle!")
|
||||
continue
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
print("Please try again...")
|
||||
|
||||
elif action == 2:
|
||||
print('='*30)
|
||||
print("Change active pokemon")
|
||||
print('-'*30)
|
||||
change_pokemon_success = False
|
||||
while not change_pokemon_success:
|
||||
try:
|
||||
print("Select the name of a pokemon in your list:")
|
||||
print(trainer.get_pokemon_list())
|
||||
chosen_new_pokemon_name = input('Choose...')
|
||||
trainer.change_active_pokemon(chosen_new_pokemon_name)
|
||||
change_pokemon_success = True
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
|
||||
elif action == 3:
|
||||
print("Select the item index to use:")
|
||||
trainer.print_items()
|
||||
item_selected_flag = False
|
||||
while not item_selected_flag:
|
||||
try:
|
||||
avail_items = list(trainer.items.keys())
|
||||
item_index = int(input("Choose an item index (1-2): ").strip())
|
||||
item_selected_flag = True
|
||||
is_pokeball = trainer.use_item(item_name=avail_items[item_index - 1])
|
||||
if is_pokeball:
|
||||
catch_prob = 1 - (cpu_trainer.get_active_pokemon().get_current_hp() / cpu_trainer.get_active_pokemon().baseStats['hp'])
|
||||
random_value = random.uniform(0, 1)
|
||||
if random_value < catch_prob:
|
||||
print(f"You caught {cpu_trainer.get_active_pokemon().name}!")
|
||||
trainer.add_pokemon(cpu_trainer.get_active_pokemon())
|
||||
battle_active = False
|
||||
game_status = 'story'
|
||||
else:
|
||||
print(f"{cpu_trainer.get_active_pokemon().name} escaped your pokeball!")
|
||||
except ValueError:
|
||||
print("Please enter a number between 1 and 2.")
|
||||
continue
|
||||
|
||||
elif action == 4:
|
||||
global recommender_sys_avail
|
||||
if recommender_sys_avail:
|
||||
try:
|
||||
for pokemon in trainer.pokemon_list:
|
||||
win_prob = recommend(player_pokemon=pokemon, opponent_pokemon=cpu_trainer.get_active_pokemon())
|
||||
print(f"The Oracle predicts {pokemon.name} to have {win_prob:.2f} of chances to win against {cpu_trainer.get_active_pokemon().name}.")
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
|
||||
elif action == 5:
|
||||
runaway_prob = 0.6
|
||||
random_value = random.uniform(0, 1)
|
||||
if random_value < runaway_prob:
|
||||
print("You successfully ran away from the battle!")
|
||||
battle_active = False
|
||||
game_status = 'story'
|
||||
else:
|
||||
print("You could not run away from the battle!")
|
||||
|
||||
elif action == 6:
|
||||
print('='*30)
|
||||
print("BATTLE INFO")
|
||||
print('-'*30)
|
||||
print("Your items:")
|
||||
trainer.print_items()
|
||||
print("Your pokemon list info:")
|
||||
for pokemon in trainer.pokemon_list:
|
||||
pokemon.print_pokemon_info()
|
||||
print("-"*30)
|
||||
print("CPU active pokemon info:")
|
||||
cpu_trainer.get_active_pokemon().print_pokemon_info()
|
||||
print('='*30)
|
||||
else:
|
||||
print("Invalid action. Please choose again.")
|
||||
|
||||
def RandomBattle(trainer,cpu_trainer):
|
||||
#print(f"You are in battle against {cpu_trainer.name}!")
|
||||
battle_active = True
|
||||
|
||||
active_pokemon = trainer.get_active_pokemon()
|
||||
cpu_active_pokemon = cpu_trainer.get_active_pokemon()
|
||||
#print(f"Your active Pokemon is {active_pokemon.name} and the CPU's active Pokemon is {cpu_active_pokemon.name}.")
|
||||
did_player_won = False
|
||||
battle_turns_num = 0
|
||||
|
||||
player_hp_evolution = []
|
||||
player_selected_moves = []
|
||||
player_damage_done = []
|
||||
cpu_hp_evolution = []
|
||||
cpu_selected_moves = []
|
||||
cpu_damage_done = []
|
||||
while battle_active:
|
||||
player_move_name = random.choice(active_pokemon.get_moves())
|
||||
player_selected_moves.append(player_move_name)
|
||||
#print(f"{active_pokemon.name} selected {player_move_name} to use against {cpu_active_pokemon.name}:\n")
|
||||
try:
|
||||
player_damage_done_value = active_pokemon.useMove(player_move_name,cpu_active_pokemon,game_status='new_random_battle')
|
||||
|
||||
player_damage_done.append(player_damage_done_value)
|
||||
player_hp_evolution.append(active_pokemon.get_current_hp())
|
||||
cpu_hp_evolution.append(cpu_active_pokemon.get_current_hp())
|
||||
|
||||
battle_turns_num += 1
|
||||
#check if the opponent has been defeated
|
||||
if not cpu_trainer.active_pokemon_can_battle():
|
||||
#print(f"{cpu_trainer.get_active_pokemon().name} has been defeated! You win!")
|
||||
did_player_won = True
|
||||
battle_active = False
|
||||
break
|
||||
|
||||
#if the opponent has not been defeated, then its the CPU turn to play
|
||||
cpu_active_pokemon_selected_move_name = random.choice(cpu_active_pokemon.get_moves())
|
||||
#print(f"CPU's {cpu_active_pokemon.name} is using {cpu_active_pokemon_selected_move_name} against your {active_pokemon.name}!")
|
||||
cpu_selected_moves.append(cpu_active_pokemon_selected_move_name)
|
||||
|
||||
cpu_damage_done_value = cpu_active_pokemon.useMove(cpu_active_pokemon_selected_move_name, active_pokemon,game_status='new_random_battle')
|
||||
|
||||
cpu_damage_done.append(cpu_damage_done_value)
|
||||
player_hp_evolution.append(active_pokemon.get_current_hp())
|
||||
cpu_hp_evolution.append(cpu_active_pokemon.get_current_hp())
|
||||
battle_turns_num += 1
|
||||
|
||||
#update the player pokemon list
|
||||
trainer.update_pokemon_list(active_pokemon)
|
||||
#check if the player has been defeated
|
||||
if not trainer.active_pokemon_can_battle():
|
||||
#print(f"Your {active_pokemon.name} has been defeated!")
|
||||
if not trainer.can_battle():
|
||||
#print("You have no more Pokemons that can battle! You lose!")
|
||||
did_player_won=False
|
||||
battle_active = False
|
||||
break
|
||||
else:
|
||||
#print("You have other Pokemons that can battle!")
|
||||
continue
|
||||
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
|
||||
#manage those cases for which the player wins in the first turn and the cpu does not play any turn
|
||||
if len(player_damage_done) == 0:
|
||||
player_damage_done = [0]
|
||||
if len(cpu_damage_done) == 0:
|
||||
cpu_damage_done = [0]
|
||||
|
||||
player_avg_damage_done = np.mean(player_damage_done) #average damage done per turn
|
||||
cpu_avg_damage_done = np.mean(cpu_damage_done) #average damage done per turn
|
||||
|
||||
player_residual_hp_percent = trainer.get_active_pokemon().get_current_hp_percent()
|
||||
|
||||
player_history = {'player_hp_evolution':player_hp_evolution,
|
||||
'player_selected_moves':player_selected_moves,
|
||||
'player_damage_done':player_damage_done,
|
||||
'player_avg_damage_done':player_avg_damage_done
|
||||
}
|
||||
cpu_history = {'cpu_hp_evolution':cpu_hp_evolution,
|
||||
'cpu_selected_moves':cpu_selected_moves,
|
||||
'cpu_damage_done':cpu_damage_done,
|
||||
'cpu_avg_damage_done':cpu_avg_damage_done
|
||||
}
|
||||
turn_history = {'player_history':player_history,
|
||||
'cpu_history':cpu_history
|
||||
}
|
||||
battle_results = {
|
||||
'player_pokemon':trainer.get_active_pokemon(),
|
||||
'encountered_pokemon':cpu_trainer.get_active_pokemon(),
|
||||
'result':did_player_won,
|
||||
'battle_turns_num':battle_turns_num,
|
||||
'player_residual_hp_percent':player_residual_hp_percent,
|
||||
'turn_history':turn_history
|
||||
}
|
||||
return battle_results
|
||||
|
||||
def build_dataset():
|
||||
#if the dataset.csv file does not exist, then build, otherwise load it
|
||||
all_pokemon_types = list(gd.available_types)
|
||||
player_ActStats_labels = ["player_hp", "player_attack", "player_defense", "player_speed", "player_special"]
|
||||
player_type_label = ['player_type_' + t for t in all_pokemon_types]
|
||||
opponent_ActStats_labels = ["opponent_hp", "opponent_attack", "opponent_defense", "opponent_speed", "opponent_special"]
|
||||
opponent_type_label = ['opponent_type_' + t for t in all_pokemon_types]
|
||||
|
||||
#define a padas dataframe to store the dataset
|
||||
dataset_column_labels = player_ActStats_labels + player_type_label + opponent_ActStats_labels + opponent_type_label + ['battle_result']
|
||||
dataset = pd.DataFrame(columns=dataset_column_labels)
|
||||
files_to_analyze = os.listdir('results/')
|
||||
dataset_row = []
|
||||
for file_name in files_to_analyze:
|
||||
pickle_in = open(f"results/{file_name}",'rb')
|
||||
all_battle_results = pickle.load(pickle_in)
|
||||
pickle_in.close()
|
||||
for battle_result in all_battle_results:
|
||||
player_pokemon_ActStats = list(battle_result['player_pokemon'].ActStats.values())
|
||||
player_pokemon_type = battle_result['player_pokemon'].types
|
||||
player_pokemon_type_encoded = [1 if t in player_pokemon_type else 0 for t in all_pokemon_types]
|
||||
opponent_pokemon = list(battle_result['encountered_pokemon'].ActStats.values())
|
||||
opponent_pokemon_type = battle_result['encountered_pokemon'].types
|
||||
opponent_pokemon_type_encoded = [1 if t in opponent_pokemon_type else 0 for t in all_pokemon_types]
|
||||
battle_result_integer = 1 if battle_result['result'] else 0
|
||||
dataset_row = player_pokemon_ActStats + player_pokemon_type_encoded + opponent_pokemon + opponent_pokemon_type_encoded + [battle_result_integer]
|
||||
#append the row to the dataset
|
||||
dataset.loc[len(dataset)] = dataset_row
|
||||
|
||||
#save the dataset to a csv file
|
||||
dataset.to_csv('dataset.csv', index=False)
|
||||
|
||||
return dataset_column_labels
|
||||
|
||||
def train_model(dataset_column_labels):
|
||||
dataset_labels = dataset_column_labels[:-1]
|
||||
# Load the dataset
|
||||
dataset = pd.read_csv('dataset.csv')
|
||||
|
||||
# Split the dataset into features and target variable
|
||||
X = dataset.drop('battle_result', axis=1)
|
||||
y = dataset['battle_result']
|
||||
|
||||
# Split the data into training and testing sets
|
||||
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
|
||||
|
||||
# Create a Random Forest Classifier
|
||||
model = RandomForestClassifier()
|
||||
param_dist = {
|
||||
'n_estimators': randint(50, 500),
|
||||
'max_depth': randint(1, 20),
|
||||
}
|
||||
|
||||
rand_search = RandomizedSearchCV(model,
|
||||
param_distributions=param_dist,
|
||||
n_iter=5, cv=5).fit(X_train, y_train)
|
||||
|
||||
# Train the model
|
||||
best_model = rand_search.best_estimator_
|
||||
print(f"Best parameters found: {rand_search.best_params_}")
|
||||
|
||||
# Make predictions on the test set
|
||||
y_pred = best_model.predict(X_test)
|
||||
|
||||
# Evaluate the model
|
||||
accuracy = accuracy_score(y_test, y_pred)
|
||||
print(f"Model Accuracy: {accuracy:.2f}")
|
||||
print("Classification Report:")
|
||||
print(classification_report(y_test, y_pred))
|
||||
print("Confusion Matrix:")
|
||||
print(confusion_matrix(y_test, y_pred))
|
||||
|
||||
|
||||
# Visualize the first three estimators
|
||||
for i in range(3):
|
||||
tree = best_model.estimators_[i]
|
||||
dot_data = export_graphviz(tree,
|
||||
feature_names=dataset_labels,
|
||||
filled = True,
|
||||
max_depth = 2,
|
||||
impurity = False,
|
||||
proportion = True)
|
||||
graph = graphviz.Source(dot_data)
|
||||
graph.render(outfile=f"plots/tree_{i}.pdf", format='pdf')
|
||||
|
||||
# Save the trained model
|
||||
joblib.dump(best_model, 'trained_model.joblib')
|
||||
|
||||
def MainRandomBattle(starter_choice,Nbattles):
|
||||
try:
|
||||
starter_name = starter_choice
|
||||
trainer = Trainer(name='trainer', starter_name=starter_name)
|
||||
#print(f"{trainer.name} has chosen {trainer.starter} as their starter Pokemon!")
|
||||
#print("Adding potions and pokeballs to your inventory...")
|
||||
trainer.items = {"potions": 10, "pokeball": 10}
|
||||
#print("Your character is ready!")
|
||||
#print(f"Welcome {trainer.name}! Your adventure begins now!")
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
print("Something went wrong!")
|
||||
|
||||
game_active_flag = True
|
||||
while game_active_flag:
|
||||
all_battle_results = []
|
||||
for i in range(0,Nbattles):
|
||||
#print("You entered the Random Battle mode")
|
||||
#print("Battle #",i)
|
||||
cpu_trainer = Trainer(name='CPU',starter_name=gd.pokemons_df.index[random.randint(0,len(gd.pokemons_df.index)-1)],is_CPU=True)
|
||||
battle_results = RandomBattle(trainer,cpu_trainer)
|
||||
all_battle_results.append(battle_results)
|
||||
heal_flag = 'yes'
|
||||
if heal_flag == 'yes':
|
||||
for pokemon in trainer.pokemon_list:
|
||||
pokemon.curr_hp = pokemon.baseStats['hp']
|
||||
#print("All your Pokemon have been healed!")
|
||||
|
||||
game_active_flag = False
|
||||
#save all battle results
|
||||
return all_battle_results
|
||||
|
||||
def Main():
|
||||
global game_status
|
||||
global game_active_flag
|
||||
player_created_flag = False
|
||||
while not player_created_flag:
|
||||
try:
|
||||
trainer_name = input("Enter your trainer name: ")
|
||||
print("Available starter Pokemon: ", gd.available_starter_names)
|
||||
starter_name = input("Choose your starter Pokemon: ")
|
||||
trainer = Trainer(name=trainer_name, starter_name=starter_name)
|
||||
print(f"{trainer.name} has chosen {trainer.starter} as their starter Pokemon!")
|
||||
print("Adding potions and pokeballs to your inventory...")
|
||||
trainer.items = {"potions": 10, "pokeball": 10}
|
||||
print("Your character is ready!")
|
||||
#trainer.print_trainer_info()
|
||||
player_created_flag = True
|
||||
print(f"Welcome {trainer.name}! Your adventure begins now!")
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
print("Please try again...")
|
||||
continue
|
||||
|
||||
while game_active_flag:
|
||||
if game_status == 'story':
|
||||
print("Type the number of one of the following actions:")
|
||||
print("1) Explore ")
|
||||
print("2) Pokemon Center")
|
||||
print("3) Pokemon Store")
|
||||
print("4) Show trainer data")
|
||||
print("5) NewRandomBattle")
|
||||
print("6) Exit")
|
||||
|
||||
try:
|
||||
action = int(input("Choose an action (1-6): ").strip())
|
||||
except ValueError:
|
||||
print("Invalid input. Please enter a number between 1 and 6.")
|
||||
continue
|
||||
if action == 1:
|
||||
game_status = 'explore'
|
||||
elif action == 2:
|
||||
game_status = 'pokemon_center'
|
||||
elif action == 3:
|
||||
game_status = 'pokemon_store'
|
||||
elif action == 4:
|
||||
print("Showing trainer data:")
|
||||
trainer.print_trainer_info()
|
||||
elif action == 5:
|
||||
confirm=input("Are you sure you want to start a new random battle? This will generate data and train the model. Type 'yes' to continue: ")
|
||||
if confirm.lower() == 'yes':
|
||||
print("Starting a new random battle!")
|
||||
game_status = 'new_random_battle'
|
||||
else:
|
||||
print("Cancelled starting a new random battle.")
|
||||
elif action == 6:
|
||||
print("Exiting the game. Goodbye!")
|
||||
game_active_flag = False
|
||||
else:
|
||||
print("Invalid action. Please choose again.")
|
||||
|
||||
elif game_status == 'explore':
|
||||
print("You are exploring")
|
||||
battle_prob = random.uniform(0, 1)
|
||||
#print(f"Battle probability: {battle_prob:.2f}")
|
||||
if battle_prob < 0.8:
|
||||
cpu_trainer = Trainer(name='CPU',starter_name=gd.pokemons_df.index[random.randint(0,len(gd.pokemons_df.index)-1)],is_CPU=True)
|
||||
print(f"A wild {cpu_trainer.get_active_pokemon().name} appeared!")
|
||||
|
||||
#print(cpu_trainer.get_active_pokemon().print_pokemon_info())
|
||||
game_status = 'battle'
|
||||
#before entering the battle, we predict the win probability of
|
||||
#each of the player's pokemon against the opponent's pokemon
|
||||
try:
|
||||
win_probs = []
|
||||
for pokemon in trainer.pokemon_list:
|
||||
win_prob = recommend(player_pokemon=pokemon, opponent_pokemon=cpu_trainer.get_active_pokemon())
|
||||
win_probs.append(win_prob)
|
||||
print(f"The Oracle predicts {pokemon.name} to have {win_prob:.2f} of chances to win.")
|
||||
#if all the win probabilities are below 0.5, we suggest the player to run away
|
||||
if all(prob < 0.5 for prob in win_probs):
|
||||
print("The Oracle suggests to RUN AWAY!")
|
||||
else:
|
||||
if len(win_probs) > 1:
|
||||
#find the pokemon with the highest win probability
|
||||
best_pokemon_index = win_probs.index(max(win_probs))
|
||||
best_pokemon = trainer.pokemon_list[best_pokemon_index]
|
||||
print(f"The Oracle suggests to use {best_pokemon.name}!")
|
||||
else:
|
||||
continue
|
||||
except ValueError as e:
|
||||
print("HINT: Unlock access to the Oracle by playing NewRandomBattle!")
|
||||
|
||||
Battle(trainer,cpu_trainer)
|
||||
else:
|
||||
print('-'*30)
|
||||
print("No wild Pokemon appeared.")
|
||||
game_status = 'story'
|
||||
|
||||
elif game_status == 'pokemon_center':
|
||||
print("You are at the Pokemon Center. You can heal your Pokemon here.")
|
||||
heal_flag = input("Type 'yes' to heal your Pokemons or any other key to exit: ").strip().lower()
|
||||
if heal_flag == 'yes':
|
||||
for pokemon in trainer.pokemon_list:
|
||||
pokemon.curr_hp = pokemon.baseStats['hp']
|
||||
for move in pokemon.moves_dict.keys():
|
||||
pokemon.moves_dict[move]['pp'] = copy.deepcopy(gd.available_moves_df.loc[move]['pp'])
|
||||
print("All your Pokemon have been healed!")
|
||||
game_status = 'story'
|
||||
else:
|
||||
print("You exited the Pokemon Center.")
|
||||
game_status = 'story'
|
||||
# Add Pokemon Center logic here
|
||||
|
||||
elif game_status == 'pokemon_store':
|
||||
print("You are in the Pokemon Store. You can buy items here.")
|
||||
restore_items_flag = input("Type 'yes' to restore your items: ").strip().lower()
|
||||
if restore_items_flag == 'yes':
|
||||
trainer.items = {"potions": 10, "pokeball": 10}
|
||||
print("Your items have been restored!")
|
||||
game_status = 'story'
|
||||
else:
|
||||
print("You exited the Pokemon Store.")
|
||||
game_status = 'story'
|
||||
|
||||
elif game_status == 'new_random_battle':
|
||||
Ngames = 1000
|
||||
Nbattles = 500
|
||||
print("Generating data...")
|
||||
for i in range(Ngames):
|
||||
starter_choice = gd.pokemons_df.index[random.randint(0,len(gd.pokemons_df.index)-1)]
|
||||
#print(f"Generating data for {starter_choice}, game {i}...")
|
||||
results = MainRandomBattle(starter_choice=starter_choice, Nbattles=Nbattles)
|
||||
pickle_out = open(f"results/{starter_choice}_game_{i}_{Nbattles}_battles.pickle",'wb')
|
||||
pickle.dump(results,pickle_out)
|
||||
pickle_out.close()
|
||||
|
||||
print("Generating dataset")
|
||||
dataset_column_labels = build_dataset()
|
||||
print("Training model")
|
||||
try:
|
||||
train_model(dataset_column_labels)
|
||||
print("Model has been trained! Ending NewRandomBattle")
|
||||
global recommender_sys_avail
|
||||
recommender_sys_avail = True
|
||||
except Exception as e:
|
||||
print(f"An error occurred during model training: {e}")
|
||||
print("Ending NewRandomBattle without training the model.")
|
||||
game_status = 'story'
|
||||
|
||||
else:
|
||||
print("Unknown game status. Try again.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if not os.path.exists('results'):
|
||||
os.makedirs('results')
|
||||
|
||||
Main()
|
||||
@@ -1,33 +0,0 @@
|
||||
digraph Tree {
|
||||
node [shape=box, style="filled", color="black", fontname="helvetica"] ;
|
||||
edge [fontname="helvetica"] ;
|
||||
0 [label="player_defense <= 14.5\nsamples = 100.0%\nvalue = [0.332, 0.668]", fillcolor="#9ccef2"] ;
|
||||
1 [label="opponent_speed <= 16.5\nsamples = 40.8%\nvalue = [0.579, 0.421]", fillcolor="#f8ddc9"] ;
|
||||
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
|
||||
2 [label="player_hp <= 13.0\nsamples = 20.2%\nvalue = [0.321, 0.679]", fillcolor="#97cbf1"] ;
|
||||
1 -> 2 ;
|
||||
3 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 3 ;
|
||||
6 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 6 ;
|
||||
29 [label="opponent_hp <= 37.5\nsamples = 20.6%\nvalue = [0.873, 0.127]", fillcolor="#e99356"] ;
|
||||
1 -> 29 ;
|
||||
30 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
29 -> 30 ;
|
||||
39 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
29 -> 39 ;
|
||||
40 [label="opponent_speed <= 36.5\nsamples = 59.2%\nvalue = [0.145, 0.855]", fillcolor="#5baee9"] ;
|
||||
0 -> 40 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
|
||||
41 [label="player_attack <= 14.0\nsamples = 54.3%\nvalue = [0.102, 0.898]", fillcolor="#50a8e8"] ;
|
||||
40 -> 41 ;
|
||||
42 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
41 -> 42 ;
|
||||
43 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
41 -> 43 ;
|
||||
80 [label="player_special <= 30.0\nsamples = 4.9%\nvalue = [0.714, 0.286]", fillcolor="#efb388"] ;
|
||||
40 -> 80 ;
|
||||
81 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
80 -> 81 ;
|
||||
88 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
80 -> 88 ;
|
||||
}
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
digraph Tree {
|
||||
node [shape=box, style="filled", color="black", fontname="helvetica"] ;
|
||||
edge [fontname="helvetica"] ;
|
||||
0 [label="player_hp <= 32.5\nsamples = 100.0%\nvalue = [0.327, 0.673]", fillcolor="#99cdf2"] ;
|
||||
1 [label="player_type_psychic <= 0.5\nsamples = 47.3%\nvalue = [0.503, 0.497]", fillcolor="#fffefd"] ;
|
||||
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
|
||||
2 [label="player_special <= 6.5\nsamples = 45.0%\nvalue = [0.479, 0.521]", fillcolor="#eff7fd"] ;
|
||||
1 -> 2 ;
|
||||
3 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 3 ;
|
||||
12 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 12 ;
|
||||
47 [label="opponent_attack <= 17.5\nsamples = 2.3%\nvalue = [0.9, 0.1]", fillcolor="#e88f4f"] ;
|
||||
1 -> 47 ;
|
||||
48 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
47 -> 48 ;
|
||||
49 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
47 -> 49 ;
|
||||
50 [label="opponent_hp <= 40.5\nsamples = 52.7%\nvalue = [0.156, 0.844]", fillcolor="#5eafea"] ;
|
||||
0 -> 50 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
|
||||
51 [label="player_defense <= 17.5\nsamples = 38.6%\nvalue = [0.075, 0.925]", fillcolor="#49a5e7"] ;
|
||||
50 -> 51 ;
|
||||
52 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
51 -> 52 ;
|
||||
59 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
51 -> 59 ;
|
||||
78 [label="player_attack <= 26.5\nsamples = 14.1%\nvalue = [0.391, 0.609]", fillcolor="#b8dcf6"] ;
|
||||
50 -> 78 ;
|
||||
79 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
78 -> 79 ;
|
||||
98 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
78 -> 98 ;
|
||||
}
|
||||
Binary file not shown.
@@ -1,21 +0,0 @@
|
||||
digraph Tree {
|
||||
node [shape=box, style="filled", color="black", fontname="helvetica"] ;
|
||||
edge [fontname="helvetica"] ;
|
||||
0 [label="opponent_type_ghost <= 0.5\nsamples = 100.0%\nvalue = [0.361, 0.639]", fillcolor="#a9d4f4"] ;
|
||||
1 [label="opponent_defense <= 28.5\nsamples = 98.7%\nvalue = [0.352, 0.648]", fillcolor="#a4d2f3"] ;
|
||||
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
|
||||
2 [label="player_type_bug <= 0.5\nsamples = 80.4%\nvalue = [0.254, 0.746]", fillcolor="#7cbeee"] ;
|
||||
1 -> 2 ;
|
||||
3 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 3 ;
|
||||
58 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
2 -> 58 ;
|
||||
65 [label="opponent_type_dragon <= 0.5\nsamples = 18.3%\nvalue = [0.794, 0.206]", fillcolor="#eca26c"] ;
|
||||
1 -> 65 ;
|
||||
66 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
65 -> 66 ;
|
||||
83 [label="(...)", fillcolor="#C0C0C0"] ;
|
||||
65 -> 83 ;
|
||||
84 [label="samples = 1.3%\nvalue = [1.0, 0.0]", fillcolor="#e58139"] ;
|
||||
0 -> 84 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
numpy>=1.24.0
|
||||
pandas>=2.0.0
|
||||
scikit-learn>=1.3.0
|
||||
scipy>=1.10.0
|
||||
joblib>=1.3.0
|
||||
graphviz>=0.20.0
|
||||
Reference in New Issue
Block a user