diff --git a/utils.py b/utils.py index b45c9bccf2030e7dca3209464b0caf9fad6ce678..02e21cd793d78fb5a550ebddc1ab2dc4dfa892ad 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ import numpy as np import matplotlib.pyplot as plt - +import pickle def plot2D_game_performance(save_path, n_episodes, *y): # The position of the bars on the x-axis @@ -81,4 +81,10 @@ def plot2D_feedback(save_path, n_episodes, *y): plt.xticks(r, x, fontweight='bold') plt.ylabel("feedback") plt.savefig(save_path) - plt.show() \ No newline at end of file + plt.show() + +def read_user_statistics_from_pickle(file_name): + # Getting back the objects: + with open(file_name, 'rb') as handle: + bn_dict_vars = pickle.load(handle) + return bn_dict_vars \ No newline at end of file