有人可以为我解释这个 STRIPS 前向规划伪代码吗?
Can someone explain this STRIPS forward planning pseudo code for me?
Input : Set of operators 0, Start state s, Goal state g
Output : Plan P
1. begin
2. | let P = [];
3. | while g (is not a subset of) s do
4. | | let E = {a|a is ground instance of an operator in O,
5. | | and Preconditions(a) hold in s}
6. | | if E = {} then
7. | | | return failure
8. | | end
9. | | choose a (which is a member of) E;
10. | | let s = s\ DeleteList(a) (union) AddList(a)
11. | | P = P @ [a]
12. | end
13. | return P
14.end
我很难理解第 4,5 行(以及 E 的用途?)、第 9 行(它如何选择?)和第 10 行。
感谢您提供的任何帮助。
E
是s
中适用的操作集合。也就是说,E
是 O
中的一组操作,其所有先决条件都在 s
中成立。
如果没有这样的操作,这个'branch'的规划算法会导致失败(第6行和第7行)——无法从s
找到达到目标状态的计划g
.
第 9 行很可能意味着 'nondeterministically choose';也就是说,在非常轻松和抽象的意义上,'try all of them in parallel'。但在实践中,深度优先规划器的实现很可能会确定性地逐一*
尝试 E
的成员。
第 10 行指出下一个状态是通过删除负面影响并添加所选运算符的正面影响来给出的 a
。
*
这应该需要修改代码以检查循环以保证完整性。请参阅 Nau、Ghallab 和 Traverso 的第 4.2.2 节 'Automated Planning - Theory & Practice'。
Input : Set of operators 0, Start state s, Goal state g
Output : Plan P
1. begin
2. | let P = [];
3. | while g (is not a subset of) s do
4. | | let E = {a|a is ground instance of an operator in O,
5. | | and Preconditions(a) hold in s}
6. | | if E = {} then
7. | | | return failure
8. | | end
9. | | choose a (which is a member of) E;
10. | | let s = s\ DeleteList(a) (union) AddList(a)
11. | | P = P @ [a]
12. | end
13. | return P
14.end
我很难理解第 4,5 行(以及 E 的用途?)、第 9 行(它如何选择?)和第 10 行。
感谢您提供的任何帮助。
E
是s
中适用的操作集合。也就是说,E
是 O
中的一组操作,其所有先决条件都在 s
中成立。
如果没有这样的操作,这个'branch'的规划算法会导致失败(第6行和第7行)——无法从s
找到达到目标状态的计划g
.
第 9 行很可能意味着 'nondeterministically choose';也就是说,在非常轻松和抽象的意义上,'try all of them in parallel'。但在实践中,深度优先规划器的实现很可能会确定性地逐一*
尝试 E
的成员。
第 10 行指出下一个状态是通过删除负面影响并添加所选运算符的正面影响来给出的 a
。
*
这应该需要修改代码以检查循环以保证完整性。请参阅 Nau、Ghallab 和 Traverso 的第 4.2.2 节 'Automated Planning - Theory & Practice'。