diff --git a/examples/emperor_dilemma/model.py b/examples/emperor_dilemma/model.py index f32348448..d28cd2708 100644 --- a/examples/emperor_dilemma/model.py +++ b/examples/emperor_dilemma/model.py @@ -1,11 +1,10 @@ import random +from agents import EmperorAgent from mesa import Model from mesa.datacollection import DataCollector from mesa.discrete_space.grid import OrthogonalMooreGrid -from .agents import EmperorAgent - class EmperorModel(Model): """The Emperor's Dilemma Model. diff --git a/examples/hex_ant/model.py b/examples/hex_ant/model.py index 96998d22b..24cbd5e82 100644 --- a/examples/hex_ant/model.py +++ b/examples/hex_ant/model.py @@ -1,8 +1,7 @@ import mesa +from agent import Ant from mesa.discrete_space import HexGrid -from .agent import Ant - class AntForaging(mesa.Model): """ @@ -57,9 +56,9 @@ def _init_environment(self): # Create the Nest in the center center = (self.grid.width // 2, self.grid.height // 2) # Spike the 'home' pheromone at the nest so ants can find it initially - self.grid.pheromone_home[center] = 1.0 + self.grid.pheromone_home.data[center] = 1.0 # Mark the home location - self.grid.home[center] = 1 + self.grid.home.data[center] = 1 # Scatter some Food Sources # Create 3 big clusters of food diff --git a/examples/hex_snowflake/hex_snowflake/model.py b/examples/hex_snowflake/hex_snowflake/model.py index ca06c0461..04fd8c650 100644 --- a/examples/hex_snowflake/hex_snowflake/model.py +++ b/examples/hex_snowflake/hex_snowflake/model.py @@ -1,8 +1,7 @@ import mesa +from cell import Cell from mesa.discrete_space import HexGrid -from .cell import Cell - class HexSnowflake(mesa.Model): """Represents the hex grid of cells. The grid is represented by a 2-dimensional array