当前位置: 首页>>代码示例>>Python>>正文


Python Parser.parseActionsAndPropositions方法代码示例

本文整理汇总了Python中Parser.Parser.parseActionsAndPropositions方法的典型用法代码示例。如果您正苦于以下问题:Python Parser.parseActionsAndPropositions方法的具体用法?Python Parser.parseActionsAndPropositions怎么用?Python Parser.parseActionsAndPropositions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parser.Parser的用法示例。


在下文中一共展示了Parser.parseActionsAndPropositions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
 def __init__(self, domain, problem):
   p = Parser(domain, problem)
   domainKB = p.parseActionsAndPropositions();
   self.actions = domainKB[0]
   self.propositions = domainKB[1]
   prob = p.pasreProblem()
   self.initialState = prob[0]
   self.goal = prob[1]
开发者ID:csmiles000,项目名称:cs182asst4,代码行数:10,代码来源:AStarGraphPlan.py

示例2: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
 def __init__(self, domain, problem):
   """
   Constructor
   """
   p = Parser(domain, problem)
   self.actions, self.propositions = p.parseActionsAndPropositions()	  # list of all the actions and list of all the propositions                                            
   self.initialState, self.goal = p.pasreProblem() 				            # the initial state and the goal state are lists of propositions                                            
   self.createNoOps() 											                            # creates noOps that are used to propagate existing propositions from one layer to the next
   PlanGraphLevel.setActions(self.actions)
   PlanGraphLevel.setProps(self.propositions)
   self._expanded = 0
开发者ID:josdurgar1,项目名称:GraphPlan,代码行数:13,代码来源:planningProblem.py

示例3: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
  def __init__(self, domain, problem):
    p = Parser(domain, problem)
    domainKB = p.parseActionsAndPropositions()
    self.actions = domainKB[0]
    self.propositions = domainKB[1]
    prob = p.pasreProblem()
    self.initialState = prob[0]
    self.goal = prob[1]

    self.relaxedActions = []
    for a in self.actions:
      self.relaxedActions.append(Action(a.getName(), a.getPre(), a.getAdd(), []))
开发者ID:saagar,项目名称:cs182,代码行数:14,代码来源:AStarGraphPlan.py

示例4: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
	def __init__(self,domain, problem):
		#Constructor de la clase
		self.independentActions = set()
		self.noGoods = []
		self.graph = []
		p = Parser(domain, problem)
		self.actions, self.propositions = p.parseActionsAndPropositions() #Listado de todas las acciones y estados
		self.initialState, self.goal = p.pasreProblem()	#El estado iniacial y el objetivo (que son una lista de estados)
		self.createNoOps() #Crea el noOps que se usa para propagar estados de una capa a la siguiente
		self.independent() #Crea el listado de acciones independent y actualiza self.independentActions
		PlanGraphLevel.setIndependentActions(self.independentActions)
		PlanGraphLevel.setActions(self.actions)
		PlanGraphLevel.setProps(self.propositions)
开发者ID:josdurgar1,项目名称:GraphPlan,代码行数:15,代码来源:graphPlan.py

示例5: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
 def __init__(self,domain, problem):
   """
   Constructor
   """
   self.independentActions = []
   self.noGoods = []
   self.graph = []
   p = Parser(domain, problem)
   self.actions, self.propositions = p.parseActionsAndPropositions()   # list of all the actions and list of all the propositions
   self.initialState, self.goal = p.pasreProblem() 					# the initial state and the goal state are lists of propositions
   self.createNoOps() 													# creates noOps that are used to propagate existing propositions from one layer to the next
   self.independent() 													# creates independent actions list and updates self.independentActions
   PlanGraphLevel.setIndependentActions(self.independentActions)
   PlanGraphLevel.setActions(self.actions)
   PlanGraphLevel.setProps(self.propositions)
开发者ID:junsup,项目名称:cs-182-jun-tim,代码行数:17,代码来源:graphPlan.py

示例6: __init__

# 需要导入模块: from Parser import Parser [as 别名]
# 或者: from Parser.Parser import parseActionsAndPropositions [as 别名]
 def __init__(self,domain, problem):
     '''
     Constructor
     '''
     self.independentActions = []
     self.noGoods=[]
     self.graph = []
     p = Parser(domain, problem)
     domainKB = p.parseActionsAndPropositions();
     self.actions = domainKB[0]
     self.propositions = domainKB[1]
     prob = p.pasreProblem()
     self.initialState = prob[0]
     self.goal = prob[1]
     self.createNoOps() #creates noOps that are used to propogate existing propositions from one layer to the next
     self.independent() #creates independent actions list
     self.graphplan() #calls graphplan
开发者ID:saagar,项目名称:cs182,代码行数:19,代码来源:GraphPlan.py


注:本文中的Parser.Parser.parseActionsAndPropositions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。