Skip to content
Extraits de code Groupes Projets
Valider b65c8462 rédigé par Adrien Payen's avatar Adrien Payen
Parcourir les fichiers

update files

parent 784ffb63
Branches main
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
*.pyc
*.pyd
*.pyo
__pycache__
\ No newline at end of file
__pycache__
*.DS_Store
\ No newline at end of file
......@@ -90,7 +90,7 @@ def plot_state_based_comparison_once(num_games : int):
if __name__ == '__main__':
##### Paramètres #####
##### Parametres #####
# Define the layout of the game board
layout = [0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 1, 0]
......@@ -98,8 +98,8 @@ if __name__ == '__main__':
# All the layout for the comparison
#classiclayout = [0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 1, 0]
#layout = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 1, 0]
#layouttpslowlane = [0, 0, 3, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0] # layout with a trapped slowlane
#layouttpfastlane = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 1, 0] # layout with a trapped fastlane
#layoutslowlanetp = [0, 0, 3, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0] # layout with a trapped slowlane
#layoutfastlanetp = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, 1, 0] # layout with a trapped fastlane
#zerolayout = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
# Indicates whether the board is circular or linear
......
......@@ -85,7 +85,7 @@ class Validation:
total_turns = []
for _ in range(n_iterations):
state_turns = np.zeros(len(layout) - 1) # Utiliser un tableau numpy pour stocker les tours par état
state_turns = np.zeros(len(layout) - 1) # Numpy to store the turns by state
for state in range(len(layout) - 1):
k = state
......@@ -103,7 +103,7 @@ class Validation:
if layout[k] == 3:
if action == 2:
turns += np.random.choice([1, 2], p=[0.5, 0.5]) # Utiliser numpy pour la randomisation
turns += np.random.choice([1, 2], p=[0.5, 0.5]) # Numpy for randomisation
elif action == 3:
turns += 2
else:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter