From b65c84629d9be8e4cfed76e9c277777219cdb166 Mon Sep 17 00:00:00 2001 From: Adrien <adrien.payen@student.uclouvain.be> Date: Sun, 19 May 2024 20:29:19 +0200 Subject: [PATCH] update files --- .gitignore | 3 ++- plot.py | 6 +++--- validation.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1cdbf95..20b5e10 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 2dce8ea..e0222e9 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 b76988c..e55680c 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: -- GitLab