【发布时间】:2012-11-09 21:50:49
【问题描述】:
我对解决推理规则有以下疑问。
1* 在for each Ci, Cj in clauses do 中,每个 Ci 和 Cj 是否必然包含互补符号(例如,一个包含 A,另一个包含 ~A)?
2* 在上面的示例中,如果两个子句具有相同的符号(例如 A 和 A)会怎样。我应该考虑推论吗?如果是,它返回什么结果?
3* if new ⊆ clauses then return false 何时运行?探索完所有子句之后?
4*if new ⊆ clauses then return false有什么用?
5*if new ⊆ clauses then return false有什么用?
function PL-RESOLUTION(KB,α) returns true or false
inputs: KB, the knowledge base, a sentence α in propositional logic,
the query, a sentence in propositional logic
clauses <--- the set of clauses in the CNF representation of KB ∧ ¬α
new <--- {}
loop do
for each Ci, Cj in clauses do
resolvents <----- PL-RESOLVE(Ci, Cj)
if resolvents contains the empty clause then return true
new <--- new ∪ resolvents
if new ⊆ clauses then return false
clauses <---- clauses ∪ new
【问题讨论】:
标签: algorithm logic artificial-intelligence