Example #1
0
	def __createEmptyPolicy(self):
		'''we create a partial function that is undefined in all points'''
		c, r = self.world.size
		return [ [ (None if self.world.cellAt(x,y) == GridWorld.CELL_VOID else GridWorld.randomAction()) for x in range(c) ] for y in range(r) ]
Example #2
0
 def __createEmptyPolicy(self):
     """we create a partial function that is undefined in all points"""
     c, r = self.world.size
     return [[(None if self.world.cellAt(x, y) == GridWorld.CELL_VOID else
               GridWorld.randomAction()) for x in range(c)]
             for y in range(r)]