def __init__(self, num_agents = 500, max_sugar=5, sugar_growth_rate=.5, agent_vision=3, agent_metabolism=4, tax_rate=.5): ''' The sugarscape is a matrix of Location objects.''' Matrix.__init__(self, 51, 51) self.max_sugar = max_sugar self.sugar_growth_rate = sugar_growth_rate self.agent_vision = agent_vision self.agent_metabolism = agent_metabolism self.tax_rate = tax_rate self.agents = [] self.total_wealth = 0 self.num_agents = num_agents self.timestamp = 0 self.gov = Government(tax_rate=self.tax_rate, sugarscape=self) self.populate_sugarscape()