Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
This is a class defining an ABM of a game.

src/g/a/Gamepy-HEAD/Abm/rpsls.py   Gamepy(Download)
col_matrix = [[0, 1, -1, -1, 1], [-1, 0, 1, 1, -1], [1, -1, 0, -1, 1], [1, -1, 1, 0, -1], [-1, 1, -1, 1, 0]]
 
g = Abm.ABM(number_of_agents, generations, rounds_per_generation, death_rate, mutation_rate, row_matrix, col_matrix)
 
g.simulate(plot=True)

src/g/a/Gamepy-HEAD/Abm/rps.py   Gamepy(Download)
col_matrix = [[0, 1, -1], [-1, 0, 1], [1, -1, 0]]
 
g = Abm.ABM(number_of_agents, generations, rounds_per_generation, death_rate, mutation_rate, row_matrix, col_matrix)
 
g.simulate(plot=True)

src/g/a/Gamepy-HEAD/Abm/chicken.py   Gamepy(Download)
col_matrix = [[1, -1], [-10, -10]]
 
g = Abm.ABM(number_of_agents, generations, rounds_per_generation, death_rate, mutation_rate, row_matrix, col_matrix)
 
g.simulate(plot=True)