我目前正在学习Prolog,还不太了解如何将此声明转化为规则。这个问题让我很困惑。请帮忙!
这是数据库:
weather(tuesday,fair).
weather(wednesday,overcast).
weather(thursday,overcast).
weather(friday,rainy).
weather(saturday,overcast).
color_of_the_sky(blue,Day) :- weather(Day,fair).
color_of_the_sky(grey,Day) :- weather(Day,overcast).
status(active,sunday).
status(active,tuesday).
status(active,thursday).
happy(Day) :- weather(Day,fair), status(active,Day).
声明是:
下雨天和活动的鸟类会感到百感交集。