📦 NEW: 完全最优行为树扩展算法

This commit is contained in:
Caiyishuai 2023-11-06 17:41:25 +08:00
parent 4ac4369f0b
commit 2d4d3cc82d
1 changed files with 1 additions and 1 deletions

View File

@ -102,6 +102,7 @@ print(ptml_string)
```python
# 判断初始状态能否到达目标状态
start = {'At(Robot,Bar)', 'Holding(VacuumCup)', 'Available(Table)', 'Available(CoffeeMachine)','Available(FrontDesk)'}
# 方法一:算法返回所有可能的初始状态,在里面看看有没有对应的初始状态
right_bt = algo.find_all_leaf_states_contain_start(start)
if not right_bt:
@ -109,7 +110,6 @@ if not right_bt:
else:
print("Right1: The current state can reach the goal state!")
# 方法二:预先跑一边行为树,看能否到达目标状态
right_bt2 = algo.run_bt_from_start(goal,start)
if not right_bt2: