Exemplo n.º 1
0
 def __init__(self, variables, parent):
     self.variables = variables
     self.parent = parent
     self.gValue = self.calculateGValue()
     self.hValue = self.calculateHeuristicValue()
     self.fValue = self.gValue + self.hValue
     self.kids = []
     self.state = self.calculateStateIndex()
     CSPNode.__init__(self, parent)
Exemplo n.º 2
0
	def __init__(self, rowVariables, columnVariables, parent, x_dimension, y_dimension):
		self.rowVariables = rowVariables
		self.columnVariables = columnVariables
		self.variables = {}
		self.variables.update(self.rowVariables)
		self.variables.update(self.columnVariables)
		self.parent = parent
		self.x_dimension = x_dimension
		self.y_dimension = y_dimension
		self.state = self.calculateStateIndex()
		CSPNode.__init__(self, parent)
Exemplo n.º 3
0
 def __init__(self, rowVariables, columnVariables, parent, x_dimension,
              y_dimension):
     self.rowVariables = rowVariables
     self.columnVariables = columnVariables
     self.variables = {}
     self.variables.update(self.rowVariables)
     self.variables.update(self.columnVariables)
     self.parent = parent
     self.x_dimension = x_dimension
     self.y_dimension = y_dimension
     self.state = self.calculateStateIndex()
     CSPNode.__init__(self, parent)