Пример #1
0
 def __init__(self, width, height, color, grid):
     EnvironmentObject.__init__(self, width, height, color, grid)
     self.reward = 0
     self.gradientsCreated = False
     self.foodStrengthRounds = 0
     Food.dictionaryOfFoodObjects[(self.gridX, self.gridY)] = self
     self.grid.cellMatrix[self.gridX][self.gridY].foodIntensity = 1
     self.grid.cellMatrix[self.gridX][self.gridY].food = self
Пример #2
0
 def __init__(self,width,height,color,grid):
     EnvironmentObject.__init__(self,width,height,color,grid)
     self.reward = 0
     self.gradientsCreated = False
     self.foodStrengthRounds = 0
     Food.dictionaryOfFoodObjects[(self.gridX,self.gridY)] = self
     self.grid.cellMatrix[self.gridX][self.gridY].foodIntensity = 1
     self.grid.cellMatrix[self.gridX][self.gridY].food = self  
Пример #3
0
 def __init__(self,width,height,color,grid):
     EnvironmentObject.__init__(self,width,height,color,grid)
     #Already initialized at a random position by superclass
     Obstacle.dictionaryOfObstacles[(self.gridX,self.gridY)] = self
Пример #4
0
 def __init__(self, width, height, color, grid):
     EnvironmentObject.__init__(self, width, height, color, grid)
     #Already initialized at a random position by superclass
     Obstacle.dictionaryOfObstacles[(self.gridX, self.gridY)] = self