Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于以下事实:
people(ana, az, 13). people(sam, ca, 24). people(tom, il, 5). people(ginger, ca, 52).
我将如何编写一个序言规则来回答以下问题?
如果他大于 17 岁,他是成年人吗?
这就是我到目前为止所拥有的......(在此先感谢我是新手)
is_adult(Person):- people(Person, State, Age). Age>17.
您可能已经从其他示例中获取了高度,对吗?
这应该是什么样子
is_adult(Person):- people(Person, State, Age), Age>17.