%pylab inline !python ews.py !python ews.py 1234 3 50 0 !ls -l *.pickle import pickle filename_ranking_counts = 'n_3_dist_0_seed_1234_count.pickle' filename_most_abundant_counts = 'ma_n_3_dist_0_seed_1234_count.pickle' ranking_changes = pickle.load(open(filename_ranking_counts)) most_abundant_changes = pickle.load(open(filename_most_abundant_counts)) ranking_changes most_abundant_changes from ews import * number_of_strategies = 3 distribution_type = 0 # for uniform a_random_game = random_game(number_of_strategies, distribution_type) print a_random_game 'Intensity of selection interval = {}'.format((10**LEFT_LIMIT, 10**RIGHT_LIMIT)) intensity_vector = np.logspace(LEFT_LIMIT, RIGHT_LIMIT, num=100, endpoint=True) population_size = 30 matrix = get_curves_truncating(intensity_vector, a_random_game, population_size, truncate=True) matrix.shape count_intersections(matrix) count_most_abundant_changes(matrix) from visualization import plot_abundance plot_abundance(matrix, intensity_vector) figure_3a_game = np.array([[0.18,0.91,0.85],[0.11,0.59,0.78],[0.75,0.11,0.54]]) intensity_vector = np.logspace(LEFT_LIMIT, RIGHT_LIMIT, num=100, endpoint=True) auxiliary_matrix = get_curves_truncating(intensity_vector, figure_3a_game, population_size=30, truncate=True) plot_abundance(auxiliary_matrix, intensity_vector) !python tests.py