Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何实现 not_all_equal/1 谓词
如何实施not all equal 1谓词 如果给定列表包含至少 2 个不同的元素 则该谓词成功 否则失败 这是我的尝试 不是很纯粹的尝试 not all equal L member H1 L member H2 L H1 H2 gt t
list
Prolog
predicate
prologdif
logicalpurity
如何在 GNU Prolog 中使用“long int”?
所以基本上看来 GNU Prolog 在我的 32 位 x86 Linux 上使用 28 位整数 下面的代码无法编译 foo A A0 is 0xdeadbeef A1 is A0 gt gt 8 A2 is A0 gt gt 16 A3
Prolog
gnuprolog
执行树元解释
我有根据我之前的问题制作的跟踪元解释器here https stackoverflow com questions 27235148 implementing cut in tracing meta interpreter prolog 我
Prolog
interpreter
Execution
prologmetainterpreter
YAP Prolog 中的正向链接?
我需要在某些 Prolog 问题中使用前向链接器 我想避免使用普通元解释器从头开始实现它 但如果没有其他选项可用 这就是我必须要做的 因为使用元解释器执行此操作会很慢 而且我我确信应该有一些好的实现 有人知道 YAP 或 SWI Prolo
Prolog
如何在 swi-prolog 的 prolog 文件中运行 prolog 查询?
如果我有一个定义规则的 prolog 文件 并在 Windows 中的 prolog 终端中打开它 它会加载事实 然而 然后它显示 提示我手动输入一些内容 如何将代码添加到文件中 以便它实际上会评估这些特定的语句 就像我输入它们一样 像这样
Prolog
依赖规则顺序
为了计算两个相同长度列表之间的汉明距离 我使用foldl hamm A B 0 R 有了这个定义hamm 4 hamm A A V V hamm A B V0 V1 A B V1 is V0 1 第一条规则的删减可以防止不必要的回溯 然而
Prolog
metapredicate
在 Prolog 中表达“交换性”的替代方案?
作为一个Prolog的初学者 我发现Prolog中的交换表达式非常不直观 例如 如果我想表达 X 和 Y 属于一个家庭 例如 family X Y married X Y relative X Y father son X Y 我还应该在定
Prolog
commutativity
Prolog 中的聊天机器人
我一直在尝试在序言中创建一个聊天机器人 作为作业 到目前为止 我已经在 pl 文件中创建了一个数据库 并且列出了很多可能的对话 我知道序言是这样工作的 例如如果我们有 Chatbot good 然后我们输入 Chatbot good 它会回
Prolog
Chatbot
Prolog 变量查询中的“\+”问题
我正在读 七周七种语言 atm 我对一些 Prolog 查询感到困惑 我不明白对 否 的回答 The friends pl文件看起来像这样 likes wallace cheese likes grommit cheese likes we
Prolog
predicate
gnuprolog
如何在 Prolog 中求反
我是 PROLOG 新手 正处于练习的开始阶段这一页 https sites google com site prologsite prolog course a first glimpse 给定规则parent X Y 和male X 我
Prolog
current_prolog_flag double_quotes DCG(代码或字符)?
在使用 SWI Prolog DCG 时 我注意到有些人注意到 set prolog flag double quotes codes Jan http www swi prolog org pldoc man section string
Prolog
flags
dcg
Prolog - 删除非唯一元素
我有一个谓词来检查元素是否是列表的成员 并且看起来如下 member X X member X T member X T 当我打电话时 member 1 2 3 1 4 我明白了 是的 现在我必须使用它来编写谓词 该谓词将从列表列表中删除所
Prolog
针对数字板难题的优化 CLP(FD) 求解器
考虑问题从https puzzling stackexchange com questions 20238 explore the square with 100 hops https puzzling stackexchange com
Prolog
clpfd
关于构建列表直至满足条件
我想解决 巨猫军团之谜 https youtu be YeMVoJKn1Tg由 Dan Finkel 使用 Prolog 编写 基本上你从 0 然后使用以下三个操作之一构建此列表 添加5 添加7 或采取sqrt 当您成功建立一个列表后 您就
list
Prolog
clpfd
dcg
Prolog 追加与剪切运算符
当我们使用append和cut操作符时会出现什么问题 append2 L L append2 H T L H TL append2 T L TL 我尝试了几种不同的输入 但总是成功 append2 1 2 5 L L 1 2 5 appen
Prolog
prologcut
二叉树的 Herbrand 宇宙、Herbrand 基础和 Herbrand 模型(序言)
什么是二叉树的 Herbrand 宇宙 Herbrand Base 和 Herbrand Model binary tree empty binary tree tree Left Element Right binary tree Lef
Prolog
Prolog,如何在 write() 中显示多个输出
go match Mn Fn write Matching Result nl write Mn write match with write Fn match Mn1 Fn1 person may female 25 blue perso
Prolog
AllegroGraph 检查现有三元组
我正在使用 AllegroGraph 4 我有一个三元组存储 并且只有在新的三元组尚不存在时我才会尝试添加它们 这是我的 Prolog 查询 select news alfas news a news tst has annotation
Prolog
allegrograph
获取 Prolog 中的解决方案列表
我正在学习 Prolog 并且正在阅读一本名为 人工智能 Prolog 编程 的书 作为练习 我想学习如何扩展本书中的示例之一 有人可以帮忙吗 假设您有以下事实 parent pam bob pam is a parent of bob p
Prolog
如何使用 Prolog 查找二叉树的深度
我正在学习 Prolog 并试图找到一个深度二叉树使用 Prolog 我代表一棵树是这样的 nil is a tree tree 1 nil nil this is a leaf tree 1 tree 1 nil nil nil this
Prolog
«
1
2
3
4
5
6
7
...22
»