本文整理汇总了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: