我在goal / prolog(prolog swi 6.0.0)工作,并且我想做以下事情:我的信念基础中有以下内容:
elevator([agent0,0,[]])
elevator([agent1,0,[]])
elevator([agent2,0,[]])
然后执行以下查询:
if bel(bagof(Elevator,elevator(Elevator),Elevators)) then insert (elevatorList(Elevators)).
然而,而不是电梯的预期结果
[[agent1,0,[]],[agent2,0,[]],[agent3,0,[]]]
结果列表是
[Elevator/['.'(Agent0, '.'(0, '.'([], [])))]] [Elevator/['.'(Agent0, '.'(0, '.'([], []))),'.'(bidAgent, '.'(0, '.'([], [])))]] [Elevator/['.'(Agent0, '.'(0, '.'([], []))),'.'(bidAgent, '.'(0, '.'([], []))),'.'(agent1, '.'(0, '.'([], [])))]]
知道我在这里做错了吗?