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


Python State.loc方法代码示例

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


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

示例1: openFile

# 需要导入模块: from state import State [as 别名]
# 或者: from state.State import loc [as 别名]
if __name__ == '__main__':
	
	# Open the predefined problem domain related info file here
	fo = openFile('static_value.txt')	
	exec('content=' + fo.read())
	
	# Create the Retriever module, given case based memory file and 
	# problem domain related info file 
	rt = Retriever('generated_plan.txt', 'state_similarity.txt')
	
	# Create a current state and goal state to test our program
	
	# Create the current state here
	currentState = State('current')
	currentState.target = 'me'
	currentState.loc = {'me':'IU Campus', 'bus':'bus_stop_2'}
	currentState.cash = {'me':3050}	
	currentState.balance_bank = {'me':120}
	currentState.time = {'me':1820}
	currentState.nearest_bus_stop={'me': 'bus_stop_2'}
	# Put the domain related info into the state
	for stateItem in content:				
		exec("currentState."+stateItem)
	
	# Create the goal state here
	goalState = State('goal')
	goalState.loc = {'me':'Paris'}
	goalState.cash = {'me':170}
	goalState.target = 'me'
	# Put the domain related info into the state
	for stateItem in content:		
开发者ID:ishtiakzaman,项目名称:KnowledgeBasedTravelPlan,代码行数:33,代码来源:client.py


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