prolog-toplevel 相关问题


如何用序言中的给定字母替换矩阵中的给定坐标

我是 Prolog 新手,我正在尝试编写一个谓词,其中矩阵如 M = [[_, _, a, ], [, _, _, ], [a, a, a, a], [, _, a, _]], 给出了一个字母和一个坐标,我需要替换它


如何将整数(解)列表转换为连续区间列表

我使用CLP(FD)和SWI-Prolog编写了一个CSP程序。 有些约束看起来像 Xi mod N #= 0,所以我必须为每个变量 Xi 调用 res(Xi,Li) (使用 res(X,L) :- setof(X, indomain(X), L))。 ..


© www.soinside.com 2019 - 2024. All rights reserved.