diff --git a/.gitignore b/.gitignore index 1cdbf95f6799c630cca95b52484babedae6e1522..20b5e109018d8ba81cb0c530e69d798fc5a504af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.pyc *.pyd *.pyo -__pycache__ \ No newline at end of file +__pycache__ +*.DS_Store \ No newline at end of file diff --git a/plot.py b/plot.py index 2dce8ea9687b2e538ef2d858dff12698276eb63b..e0222e9f53cefcab3fa02a81ac128f4f9f9f3d78 100644 --- a/plot.py +++ b/plot.py @@ -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 diff --git a/validation.py b/validation.py index b76988c5e91c5de0ee1ab059f4f08a486f859827..e55680cefaeafb1a127e88b7af842a45ee9bae0f 100644 --- a/validation.py +++ b/validation.py @@ -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: