chunk_id
large_stringlengths
9
11
question_id
large_stringlengths
6
8
language
large_stringclasses
1 value
chunk_index
int64
0
4
chunk_text
large_stringlengths
115
2.62k
sparse_text
large_stringlengths
111
4.37k
dense_vector
listlengths
3.58k
3.58k
sparse_indices
listlengths
9
217
sparse_values
listlengths
9
217
export_source
large_stringclasses
1 value
30281606_c1
30281606
prolog
1
this is what i have so far but its just goes through the first element of the list and subtracts it until it reaches 0. I need it to go through each element to find the combination that to get to the given value. stepWith(L,I,J) :- Z is J-I, step(L,Z). step([F|L],Z) :- N1 is Z - F, goThrough(N1,L). step([],0). goThrou...
this is what i have so far but its just goes through the first element of the list and subtracts it until it reaches 0. I need it to go through each element to find the combination that to get to the given value. stepWith(L,I,J) :- Z is J-I, step(L,Z). step([F|L],Z) :- N1 is Z - F, goThrough(N1,L). step([],0). goThrou...
[ -0.0238037109375, 0.027587890625, -0.01531982421875, 0.01544189453125, -0.01361083984375, 0.012451171875, -0.00836181640625, 0.009765625, 0.0220947265625, -0.010986328125, 0.0030517578125, 0.0179443359375, -0.002716064453125, 0.003936767578125, -0.0093994140625, 0.01055908203125, 0.0...
[ 903, 83, 2367, 17, 765, 221, 2060, 1284, 6863, 1660, 60899, 8305, 5117, 12830, 5303, 1614, 39989, 24189, 58359, 90, 757, 87, 3871, 442, 738, 12638, 7413, 162515, 450, 2046, 47, 34475, 34292, 29954, 194583, 866, 568, 1375, 567, 821, 9, ...
[ 0.06109619140625, 0.057098388671875, 0.049163818359375, 0.0701904296875, 0.10205078125, 0.0305328369140625, 0.1302490234375, 0.012847900390625, 0.1444091796875, 0.032012939453125, 0.041778564453125, 0.184814453125, 0.085205078125, 0.224609375, 0.195556640625, 0.0777587890625, 0.13854...
embed
2978130_c0
2978130
prolog
0
Title: PROLOG - How to implement stack? Problem title: PROLOG - How to implement stack? Tags: prolog Problem: PROLOG - How to implement stack? I have to implement stac in Prolog, but WITHOUT using list. Each element of stack should point to before element. Is there possible to do it? Could I define rules in runtime pro...
PROLOG - How to implement stack? PROLOG - How to implement stack? prolog PROLOG How PROLOG - How to implement stack? I have to implement stac in Prolog, but WITHOUT using list. Each element of stack should point to before element. Is there possible to do it? Could I define rules in runtime program? ( like: element('foo...
[ 0.01458740234375, 0.01446533203125, -0.0135498046875, 0.0244140625, -0.01495361328125, 0.005157470703125, -0.02392578125, 0.0140380859375, -0.00958251953125, -0.044677734375, 0.004119873046875, 0.00250244140625, -0.0250244140625, -0.00567626953125, 0.00250244140625, 0.010009765625, 0...
[ 10514, 47510, 11249, 47, 29479, 177261, 502, 4867, 1924, 238, 23, 1250, 52001, 17368, 5303, 98423, 12830, 5608, 6275, 8108, 7722, 61924, 91736, 11675, 6032, 1528, 3584, 31, 1299, 5775, 10941, 3564, 1909, 56, 15700 ]
[ 0.181884765625, 0.274658203125, 0.086669921875, 0.0885009765625, 0.249267578125, 0.30615234375, 0.1231689453125, 0.275634765625, 0.1785888671875, 0.1705322265625, 0.00970458984375, 0.1905517578125, 0.0565185546875, 0.0184326171875, 0.1351318359375, 0.078125, 0.1531982421875, 0.0378...
embed
19119660_c1
19119660
prolog
1
4, _G30, _G36, _G42], Z = [_G24, _G30, _G36, _G42, 1, 2, 3] ; X = [_G24, _G30, _G36, _G42, _G48], Z = [_G24, _G30, _G36, _G42, _G48, 1, 2, 3] ; X = [_G24, _G30, _G36, _G42, _G48, _G54], Z = [_G24, _G30, _G36, _G42, _G48, _G54, 1, 2, 3] and so on (basically, every possible list ending with [1,2,3]. so how can I reason w...
4, _G30, _G36, _G42], Z = [_G24, _G30, _G36, _G42, 1, 2, 3] ; X = [_G24, _G30, _G36, _G42, _G48], Z = [_G24, _G30, _G36, _G42, _G48, 1, 2, 3] ; X = [_G24, _G30, _G36, _G42, _G48, _G54], Z = [_G24, _G30, _G36, _G42, _G48, _G54, 1, 2, 3] and so on (basically, every possible list ending with [1,2,3]. so how can I reason w...
[ 0.00823974609375, 0.0203857421875, -0.0091552734375, 0.00445556640625, -0.00958251953125, 0.0242919921875, -0.0086669921875, -0.00323486328125, 0.0167236328125, 0.00787353515625, 0.013916015625, -0.0189208984375, 0.008056640625, -0.01458740234375, 0.001861572265625, 0.006591796875, 0...
[ 201, 724, 1197, 8659, 13023, 567, 2203, 2357, 106, 116, 138, 1193, 9285, 12338, 4, 11907, 7722, 5303, 86658, 678, 155761, 3642, 831, 87, 31635, 3129, 17582, 1221, 3564, 707, 959, 98, 62775, 1528, 28864, 26073, 7, 1250, 4867, 11249, 4481...
[ 0.1427001953125, 0.0738525390625, 0.2078857421875, 0.217529296875, 0.2164306640625, 0.140869140625, 0.0614013671875, 0.1817626953125, 0.00177001953125, 0.002655029296875, 0.083984375, 0.131591796875, 0.17431640625, 0.2100830078125, 0.001861572265625, 0.04779052734375, 0.1534423828125...
embed
57483086_c0
57483086
prolog
0
Title: Superpermutation in Prolog Problem title: Superpermutation in Prolog Tags: permutation, prolog, superpermutation Problem: Superpermutation in Prolog I want to watch 6 episodes of "friends" in all possible permutations. How can I arrange the episodes in one string so that the substrings of length 6 cover all perm...
Superpermutation in Prolog Superpermutation in Prolog permutation prolog superpermutation Superpermutation Prolog Superpermutation in Prolog I want to watch 6 episodes of "friends" in all possible permutations. How can I arrange the episodes in one string so that the substrings of length 6 cover all permutations? What ...
[ 0.0228271484375, 0.001617431640625, 0.01806640625, 0.033203125, -0.01483154296875, 0.005523681640625, -0.006561279296875, 0.0023651123046875, -0.0009918212890625, -0.037109375, -0.000308990478515625, 0.009033203125, -0.00021457672119140625, 0.007720947265625, -0.00113677978515625, 0.02...
[ 4265, 1264, 561, 22062, 23, 1250, 4867, 117, 502, 1601, 3444, 47, 39544, 305, 50094, 84240, 756, 7722, 14311, 21094, 137356, 1632, 79315, 1614, 91693, 140909, 29256, 16610, 525, 18151 ]
[ 0.21337890625, 0.1514892578125, 0.2078857421875, 0.076904296875, 0.024444580078125, 0.1593017578125, 0.2279052734375, 0.1346435546875, 0.09808349609375, 0.1591796875, 0.081787109375, 0.011505126953125, 0.1815185546875, 0.14892578125, 0.205322265625, 0.2235107421875, 0.023086547851562...
embed
41637402_c2
41637402
prolog
2
901234567890). % true. % <character code constant> examples % ??? % <binary constant> examples number(0b0). % true. number(0b10101010101010101010101010101010101010101010101010). % true. % <octal constant> examples integer(0o7). % true. integer(0o1234567012345670123456701234567012345670123456701234567). % true. % <hexad...
901234567890). % true. % <character code constant> examples % ??? % <binary constant> examples number(0b0). % true. number(0b10101010101010101010101010101010101010101010101010). % true. % <octal constant> examples integer(0o7). % true. integer(0o1234567012345670123456701234567012345670123456701234567). % true. % <hexad...
[ -0.0042724609375, -0.009765625, 0.0157470703125, 0.01806640625, -0.006072998046875, 0.0257568359375, -0.0062255859375, 0.000286102294921875, -0.017822265625, 0.0035400390625, -0.0107421875, -0.01397705078125, -0.0108642578125, 0.0206298828125, 0.0048828125, 0.00213623046875, 0.020629...
[ 2510, 190875, 162082, 136442, 194, 1745, 29568, 5, 9254, 2263, 720, 18151, 53697, 27781, 7, 37336, 19155, 1294, 14012, 132, 2389, 275, 77495, 35046, 76327, 50258, 6652, 1803, 892, 1505, 31, 36076, 1530, 96060, 108620, 1106, 3798, 170753, 42...
[ 0.260009765625, 0.18017578125, 0.27783203125, 0.220703125, 0.0811767578125, 0.1165771484375, 0.1837158203125, 0.0791015625, 0.07672119140625, 0.1141357421875, 0.08123779296875, 0.2166748046875, 0.21240234375, 0.239501953125, 0.062103271484375, 0.178955078125, 0.143310546875, 0.0957...
embed
21333096_c0
21333096
prolog
0
Title: calculating an algorithm time in prolog Problem title: calculating an algorithm time in prolog Tags: systemtime, swi-prolog, prolog Problem: calculating an algorithm time in prolog I am solving Bridge and Torch puzzle by PROLOG. As I am trying different search methods, I need to find the calculation time. I mean...
calculating an algorithm time in prolog calculating an algorithm time in prolog systemtime swi-prolog prolog calculating an algorithm time in prolog I am solving Bridge and Torch puzzle by PROLOG. As I am trying different search methods, I need to find the calculation time. I mean the start time and the end time of sol...
[ 0.005950927734375, 0.0027313232421875, 0.0194091796875, 0.00927734375, -0.021728515625, -0.01495361328125, -0.0157470703125, 0.00823974609375, -0.0177001953125, -0.07861328125, 0.0072021484375, 0.0264892578125, -0.01373291015625, 0.00494384765625, 0.00030517578125, -0.017333984375, -...
[ 74481, 1916, 234873, 1733, 23, 502, 4867, 142, 5426, 6032, 2452, 3454, 3115, 59132, 136, 6653, 206, 104192, 390, 10514, 47510, 31577, 12921, 33938, 150624, 3871, 7413, 1363, 4034, 3564, 2967, 4171, 765, 17203, 47, 12353, 1295, 1250 ]
[ 0.2047119140625, 0.07025146484375, 0.288330078125, 0.23486328125, 0.0916748046875, 0.136474609375, 0.24169921875, 0.040771484375, 0.1524658203125, 0.224609375, 0.1351318359375, 0.13232421875, 0.07904052734375, 0.1463623046875, 0.0968017578125, 0.1202392578125, 0.0784912109375, 0.16...
embed
78328698_c0
78328698
prolog
0
Title: Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no jpl in java.library.path: Problem title: Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no jpl in java.library.path: Tags: java, linux, prolog, maven, windows Problem: Exception in thread "main" java.lang.UnsatisfiedLin...
Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no jpl in java.library.path: Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no jpl in java.library.path: java linux prolog maven windows java.lang.UnsatisfiedLinkError Exception java.library.path Query kb.pl Exception in thread "...
[ 0.01495361328125, 0.0311279296875, -0.0191650390625, -0.00848388671875, -0.0203857421875, 0.002655029296875, 0.015380859375, -0.01031494140625, 0.00074005126953125, -0.032470703125, -0.004486083984375, -0.011474609375, -0.01611328125, 0.00927734375, 0.0025787353515625, 0.00148773193359...
[ 5443, 63928, 86997, 24931, 79, 330, 3066, 14256, 7, 50958, 1029, 64287, 18468, 31611, 110, 1647, 2424, 23, 150, 2844, 1294, 128405, 11508, 6077, 502, 4867, 1353, 54825, 58836, 51882, 18499, 9790, 37067, 47, 13452, 18151, 678, 154107, 77336,...
[ 0.034759521484375, 0.1380615234375, 0.1689453125, 0.1278076171875, 0.1322021484375, 0.230224609375, 0.1240234375, 0.042205810546875, 0.1063232421875, 0.1651611328125, 0.1580810546875, 0.1512451171875, 0.1229248046875, 0.0101318359375, 0.13916015625, 0.144287109375, 0.255615234375, ...
embed
25791365_c0
25791365
prolog
0
Title: How to convert (0,0) to [0,0] in prolog? Problem title: How to convert (0,0) to [0,0] in prolog? Tags: string, prolog, list Problem: How to convert (0,0) to [0,0] in prolog? I'm making a predicate distance/3 that calculates the distance between 2 points on a 2d plane. For example : ?- distance((0,0), (3,4), X). ...
How to convert (0,0) to [0,0] in prolog? How to convert (0,0) to [0,0] in prolog? string prolog list How Yes How to convert (0,0) to [0,0] in prolog? I'm making a predicate distance/3 that calculates the distance between 2 points on a 2d plane. For example : My predicate only works if (0,0) is the list [0,0] . Is there...
[ 0.0240478515625, 0.006103515625, -0.0050048828125, 0.007598876953125, -0.01055908203125, 0.0272216796875, -0.0016021728515625, 0.0029449462890625, 0.00885009765625, -0.02392578125, 0.01324462890625, -0.01361083984375, -0.0174560546875, -0.0035858154296875, -0.0115966796875, 0.009216308...
[ 11249, 47, 96760, 63527, 16, 378, 268, 23, 502, 4867, 79315, 5303, 32635, 20662, 1653, 2063, 67, 62488, 18113, 74481, 17721, 116, 26847, 98, 71, 47880, 4734, 43240, 2174, 3917, 3249, 142477 ]
[ 0.09710693359375, 0.1126708984375, 0.185546875, 0.28466796875, 0.0498046875, 0.020782470703125, 0.072265625, 0.058563232421875, 0.1661376953125, 0.2392578125, 0.1708984375, 0.1676025390625, 0.04180908203125, 0.031463623046875, 0.1556396484375, 0.16845703125, 0.106689453125, 0.17822...
embed
14680829_c2
14680829
prolog
2
,3). posC(4,2). posC(4,1). posC(4,0). posC(3,2). posC(3,1). posC(3,0). posC(2,1). posC(1,0). posD(9,5). posD(8,5). posD(8,4). posD(7,5). posD(7,4). posD(7,3). posD(6,5). posD(6,4). posD(6,3). posD(6,2). posD(5,4). posD(5,3). posD(5,2). posD(5,1). posD(4,3). posD(4,2). posD(4,1). posD(5,0). posD(3,2). posD(3,1). posD(3,...
,3). posC(4,2). posC(4,1). posC(4,0). posC(3,2). posC(3,1). posC(3,0). posC(2,1). posC(1,0). posD(9,5). posD(8,5). posD(8,4). posD(7,5). posD(7,4). posD(7,3). posD(6,5). posD(6,4). posD(6,3). posD(6,2). posD(5,4). posD(5,3). posD(5,2). posD(5,1). posD(4,3). posD(4,2). posD(4,1). posD(5,0). posD(3,2). posD(3,1). posD(3,...
[ 0.0023345947265625, 0.007568359375, -0.002899169921875, 0.0269775390625, 0.0062255859375, -0.00286865234375, -0.01556396484375, 0.00689697265625, -0.0111083984375, 0.00019359588623046875, -0.0181884765625, -0.011962890625, 0.0089111328125, 0.00823974609375, -0.047607421875, -0.00079727...
[ 6, 4, 21320, 5, 3864, 441, 105801, 10461, 17727, 77495, 86827, 132, 128188, 194, 206808, 397, 93754, 151003, 1019, 29557, 109631, 173664, 129678, 150643, 139303, 104116, 54753, 1126, 647, 28864, 26073, 7, 12, 332, 121978, 19, 31901, 187895, ...
[ 0.05914306640625, 0.047210693359375, 0.203125, 0.10699462890625, 0.1793212890625, 0.1676025390625, 0.1265869140625, 0.104736328125, 0.06939697265625, 0.09521484375, 0.042022705078125, 0.00433349609375, 0.1202392578125, 0.00665283203125, 0.0921630859375, 0.0743408203125, 0.13330078125...
embed
63871745_c2
63871745
prolog
2
[Rule 15] [Pos cover = 1 Neg cover = 0] publication_nbpages(publication0,14). It's so strange, I want a general Code signals: Aleph, How, SWI-Prolog, use_module, current_predicate, use_rendering, publication_nbpages, book_chapters_nbPages, begin_bg, publication_title, book2publication, book_title, end_bg, begin_in_pos...
[Rule 15] [Pos cover = 1 Neg cover = 0] publication_nbpages(publication0,14). It's so strange, I want a general Code signals: Aleph, How, SWI-Prolog, use_module, current_predicate, use_rendering, publication_nbpages, book_chapters_nbPages, begin_bg, publication_title, book2publication, book_title, end_bg, begin_in_pos...
[ -0.0009918212890625, 0.005096435546875, 0.0103759765625, 0.01226806640625, 0.0059814453125, 0.0184326171875, 0.0081787109375, -0.0115966796875, 0.00775146484375, -0.034423828125, 0.004486083984375, -0.0228271484375, -0.00127410888671875, -0.01165771484375, 0.0205078125, 0.01171875, -...
[ 26951, 133, 423, 7192, 7, 29256, 106, 799, 177, 757, 104345, 275, 22469, 57964, 2320, 2389, 65283, 221, 114453, 3444, 4537, 28864, 26073, 4733, 11727, 11249, 159, 38969, 10752, 4867, 4527, 83279, 43581, 19714, 2063, 18280, 2852, 12877, 1244...
[ 0.12646484375, 0.0916748046875, 0.1943359375, 0.11279296875, 0.137451171875, 0.1807861328125, 0.0153656005859375, 0.106689453125, 0.1168212890625, 0.055084228515625, 0.1949462890625, 0.06365966796875, 0.20166015625, 0.1181640625, 0.034027099609375, 0.07635498046875, 0.118896484375, ...
embed
34460301_c1
34460301
prolog
1
0^3. ! Existence error in (^)/2 ! constraint user:wi(^)/2 does not exist ! goal: 10^3 ?- X #= 10**3. ! Existence error in user:(**)/2 ! constraint user:(**)/2 does not exist ! goal: 10**3 Ideas / hints / advice, please. What can I do? Use some clpfd compatibility layer(s), perhaps? Thank you in advance! Code signals: S...
0^3. ! Existence error in (^)/2 ! constraint user:wi(^)/2 does not exist ! goal: 10^3 ?- X #= 10**3. ! Existence error in user:(**)/2 ! constraint user:(**)/2 does not exist ! goal: 10**3 Ideas / hints / advice, please. What can I do? Use some clpfd compatibility layer(s), perhaps? Thank you in advance! Code signals: S...
[ -0.00872802734375, 0.0115966796875, -0.0107421875, -0.0140380859375, 0.0194091796875, 0.00927734375, 0.00347900390625, -0.01324462890625, 0.0245361328125, -0.0272216796875, -0.0008544921875, 0.00506591796875, -0.00151824951171875, -0.00299072265625, 0.007568359375, -0.0147705078125, ...
[ 757, 8353, 363, 711, 122688, 329, 18499, 23, 12477, 158, 2816, 4288, 38937, 2452, 14602, 959, 32316, 69236, 209, 705, 9, 1193, 468, 1369, 25442, 77298, 7, 248, 5122, 933, 67660, 22936, 831, 87, 54, 36836, 33139, 39557, 71, 112793, 13535...
[ 0.1143798828125, 0.1341552734375, 0.2249755859375, 0.0819091796875, 0.2403564453125, 0.079345703125, 0.282470703125, 0.0906982421875, 0.2568359375, 0.082763671875, 0.2060546875, 0.1370849609375, 0.2449951171875, 0.2198486328125, 0.080322265625, 0.135498046875, 0.2401123046875, 0.25...
embed
70297144_c0
70297144
prolog
0
Title: Why Prolog can&#x27;t see the obvious answer? Problem title: Why Prolog can&#x27;t see the obvious answer? Tags: function, math, prolog Problem: Why Prolog can't see the obvious answer? f(9) = f(A), X = A, X = T * T Why prolog cant see A = 9, X = 9, T = 3/-3, am I making a syntax error here? If so what is the co...
Why Prolog can&#x27;t see the obvious answer? Why Prolog can&#x27;t see the obvious answer? function math prolog Why Prolog Why Prolog can't see the obvious answer? Why prolog cant see A = 9, X = 9, T = 3/-3, am I making a syntax error here? If so what is the correct form of this query? I am getting false, but there is...
[ 0.0150146484375, 0.007232666015625, -0.0057373046875, 0.00701904296875, -0.0185546875, -0.0028228759765625, 0.0016937255859375, 0.01287841796875, -0.0019378662109375, -0.00518798828125, 0.0024566650390625, 0.000244140625, -0.00982666015625, 0.0152587890625, 0.0191650390625, -0.01733398...
[ 44084, 1250, 4867, 831, 3768, 18, 1957, 162520, 35166, 70, 32354, 48909, 502, 45767, 62, 2203, 483, 1193, 384, 138, 64, 8316, 20662, 6002, 86531, 18499, 26785, 3173, 41, 1294, 98320, 171259, 23468, 5490 ]
[ 0.1280517578125, 0.185546875, 0.268798828125, 0.07647705078125, 0.04278564453125, 0.07672119140625, 0.2088623046875, 0.18212890625, 0.2030029296875, 0.02947998046875, 0.133056640625, 0.11669921875, 0.160888671875, 0.1416015625, 0.10107421875, 0.048583984375, 0.1859130859375, 0.1339...
embed
24838289_c0
24838289
prolog
0
Title: Amzi prolog and list member predicate Problem title: Amzi prolog and list member predicate Tags: prolog, amzi-prolog Problem: Amzi prolog and list member predicate I am student and I have a problem with amzi prolog. We learned at class that there is a predicate that returns true if an item is a member in a list:...
Amzi prolog and list member predicate Amzi prolog and list member predicate prolog amzi-prolog Amzi Amzi prolog and list member predicate I am student and I have a problem with amzi prolog. We learned at class that there is a predicate that returns true if an item is a member in a list: member(1,[1,2,3]) should return ...
[ 0.00213623046875, 0.007568359375, 0.00653076171875, 0.016845703125, -0.0281982421875, 0.0235595703125, 0.01904296875, 0.0302734375, 0, -0.01708984375, 0.028564453125, 0.005828857421875, 0.0159912109375, 0.006866455078125, 0.014892578125, -0.004547119140625, 0.0009918212890625, -0.0...
[ 2022, 708, 502, 4867, 136, 5303, 32786, 1653, 2063, 67, 444, 3454, 9836, 2967, 97384, 18507, 30646, 29568, 2174, 35735, 83, 41600, 133063, 96386, 5608, 63519, 2046, 98320, 20594, 44691, 4358, 28601, 24799 ]
[ 0.151611328125, 0.2171630859375, 0.143310546875, 0.1884765625, 0.1041259765625, 0.1873779296875, 0.2235107421875, 0.178955078125, 0.2213134765625, 0.1202392578125, 0.12109375, 0.129150390625, 0.1259765625, 0.0830078125, 0.06793212890625, 0.0823974609375, 0.1649169921875, 0.17285156...
embed
61146135_c0
61146135
prolog
0
Title: Translate predicate calculus statement into Prolog Problem title: Translate predicate calculus statement into Prolog Tags: predicate, computer-science, prolog Problem: Translate predicate calculus statement into Prolog can we translate the following logic from empty_class(C) ← ¬∃X(takes(X, C)) . to empty_class(C...
Translate predicate calculus statement into Prolog Translate predicate calculus statement into Prolog predicate computer-science prolog Translate Prolog empty_class Translate predicate calculus statement into Prolog can we translate the following logic from to ? my take is ¬∃X = ∀X Can anyone help me with this logic, T...
[ 0.01953125, 0.0111083984375, 0.0108642578125, -0.0020599365234375, -0.0191650390625, 0.0167236328125, 0.01385498046875, -0.0174560546875, 0.0279541015625, -0.035888671875, -0.01055908203125, 0.006195068359375, -0.0054931640625, -0.01385498046875, 0.003662109375, 0.01104736328125, -0....
[ 11062, 19309, 1653, 2063, 67, 44805, 223, 63805, 3934, 1250, 4867, 13909, 175201, 502, 201505, 67413, 831, 3900, 25632, 62775, 1295, 47, 5646, 36927, 248265, 1542, 2203, 165304, 4358 ]
[ 0.1158447265625, 0.16943359375, 0.132080078125, 0.1654052734375, 0.056732177734375, 0.1761474609375, 0.09637451171875, 0.1920166015625, 0.1097412109375, 0.1177978515625, 0.2137451171875, 0.0732421875, 0.0889892578125, 0.065673828125, 0.160888671875, 0.14794921875, 0.0207061767578125,...
embed
56409962_c0
56409962
prolog
0
Title: What does [] and [_] mean in Prolog Problem title: What does [] and [_] mean in Prolog Tags: prolog Problem: What does [] and [_] mean in Prolog I believe [] means accepting the empty lists while [_] accepting a non empty list that may have anything. But then in some context such as say a function: f([]). f[_])....
What does [] and [_] mean in Prolog What does [] and [_] mean in Prolog prolog What Prolog What does [] and [_] mean in Prolog I believe [] means accepting the empty lists while [_] accepting a non empty list that may have anything. But then in some context such as say a function: Wouldn't [x|y] and [_] both be called ...
[ 0.0167236328125, -0.0023956298828125, -0.001068115234375, 0.0029449462890625, -0.0223388671875, 0.0166015625, -0.01318359375, -0.003173828125, 0.0030670166015625, 0.0191650390625, 0.0230712890625, -0.0274658203125, -0.019287109375, -0.0032196044921875, 0.01025390625, 0.0009689331054687...
[ 4865, 378, 268, 136, 454, 29459, 23, 1250, 4867, 14602, 502, 18822, 26950, 26946, 201505, 5303, 12960, 214, 351, 1543, 765, 23937, 43701, 32354, 154559, 58745, 53, 15044, 35839, 85590, 5701, 13580 ]
[ 0.008575439453125, 0.083984375, 0.06103515625, 0.21484375, 0.1658935546875, 0.1485595703125, 0.058441162109375, 0.1654052734375, 0.238525390625, 0.06463623046875, 0.134521484375, 0.01287841796875, 0.09222412109375, 0.12060546875, 0.1578369140625, 0.1531982421875, 0.03887939453125, ...
embed
29357117_c0
29357117
prolog
0
Title: Partition a List in Prolog Problem title: Partition a List in Prolog Tags: prolog Problem: Partition a List in Prolog This is the predicate: partList(Len,L,R):- length(L,LL), length(R,RR), RR is LL/Len, append(R,L). The query shows: 42 ?- partList(2,[t,t,t,f,f,t,f,f],R). R = [[], [], [], [t, t, t, f, f, t, f, f]...
Partition a List in Prolog Partition a List in Prolog prolog Partition List Prolog Len Partition a List in Prolog This is the predicate: The query shows: But I want to partition into How do I fix this? Thanks!
[ -0.0101318359375, 0.00531005859375, 0.0078125, 0.006317138671875, -0.01422119140625, -0.009765625, -0.006988525390625, 0.0089111328125, 0.0054931640625, 0.004302978515625, 0.004180908203125, 0.0118408203125, -0.0025482177734375, -0.007110595703125, 0.016357421875, -0.0135498046875, 0...
[ 9148, 1363, 10, 32036, 23, 1250, 4867, 502, 18226, 1653, 2063, 41, 1294, 45831, 4966, 87, 3444, 47, 2878, 3934, 11249, 30022, 903 ]
[ 0.265869140625, 0.162109375, 0.0419921875, 0.22119140625, 0.04559326171875, 0.171630859375, 0.250244140625, 0.1297607421875, 0.194580078125, 0.0231170654296875, 0.064208984375, 0.06756591796875, 0.07421875, 0.0355224609375, 0.135986328125, 0.0194854736328125, 0.158935546875, 0.0585...
embed
10785787_c0
10785787
prolog
0
Title: prolog deleteall doesn&#x27;t work Problem title: prolog deleteall doesn&#x27;t work Tags: prolog, accumulator Problem: prolog deleteall doesn't work I was trying to find out the problem but unsuccessfully Could you tell me what is wrong? % using accumulator deleteall(X,Y,Zs) :- deleteall(X,Y, [], Zs). deleteall...
prolog deleteall doesn&#x27;t work prolog deleteall doesn&#x27;t work prolog accumulator accumulator prolog deleteall doesn't work I was trying to find out the problem but unsuccessfully Could you tell me what is wrong?
[ 0.006591796875, -0.0014495849609375, -0.011474609375, 0.0146484375, -0.01336669921875, 0.02392578125, 0.004852294921875, -0.0026397705078125, 0.009765625, -0.01611328125, 0.03369140625, 0.00567626953125, 0.00086212158203125, 0.005767822265625, 0.019287109375, 0.006072998046875, 0.004...
[ 502, 4867, 154109, 5584, 22027, 3768, 18, 4488, 183278, 1290, 226534, 44691 ]
[ 0.153564453125, 0.2379150390625, 0.2025146484375, 0.1949462890625, 0.0457763671875, 0.059417724609375, 0.0535888671875, 0.1456298828125, 0.1812744140625, 0.09332275390625, 0.030517578125, 0.04132080078125 ]
embed
64842200_c0
64842200
prolog
0
Title: Syntax error: Operator expected (SWI Prolog) Problem title: Syntax error: Operator expected (SWI Prolog) Tags: prolog, syntax-error Problem: Syntax error: Operator expected (SWI Prolog) I'm getting the issue: Syntax error: Operator expected This is my code reduceBy1(Input,Output) :- (Input > 0 -> Output = Input ...
Syntax error: Operator expected (SWI Prolog) Syntax error: Operator expected (SWI Prolog) prolog syntax-error Syntax Operator SWI Prolog reduceBy1 Input Output Syntax error: Operator expected (SWI Prolog) I'm getting the issue: Syntax error: Operator expected This is my code What am I doing wrong? The error points towa...
[ 0.0123291015625, 0.0224609375, -0.0211181640625, 0.0247802734375, -0.013671875, -0.01470947265625, -0.01092529296875, 0.0157470703125, -0.0032958984375, -0.03076171875, 0.0072021484375, -0.0120849609375, -0.0032806396484375, -0.025390625, 0.0234375, -0.01275634765625, -0.01025390625,...
[ 19010, 86531, 18499, 150922, 84751, 294, 38969, 1250, 4867, 502, 6002, 188800, 159, 34390, 75358, 418, 360, 13538, 31089, 12, 3293, 83, 759, 18151, 444, 20594, 44691, 26847, 98186, 70, 44, 1242 ]
[ 0.1453857421875, 0.2066650390625, 0.182373046875, 0.272705078125, 0.2293701171875, 0.03948974609375, 0.201416015625, 0.1322021484375, 0.2005615234375, 0.1126708984375, 0.120361328125, 0.150146484375, 0.04144287109375, 0.18310546875, 0.0892333984375, 0.037078857421875, 0.0399169921875...
embed
27431281_c0
27431281
prolog
0
Title: Shuffling a list in Prolog Problem title: Shuffling a list in Prolog Tags: prolog, shuffle, list Problem: Shuffling a list in Prolog Simple question, how can I shuffle a list in Prolog, so that A1 is the shuffled list? shuffle([1,1,1,2,3,4],A1), I've tried a few predicates I found on the web but none of them see...
Shuffling a list in Prolog Shuffling a list in Prolog prolog shuffle list Shuffling Prolog Shuffling a list in Prolog Simple question, how can I shuffle a list in Prolog, so that A1 is the shuffled list? I've tried a few predicates I found on the web but none of them seems to be working. Also found this but apparently ...
[ 0.001983642578125, 0.0194091796875, 0.0194091796875, 0.0020294189453125, -0.01263427734375, 0.001373291015625, -0.0311279296875, -0.0004425048828125, -0.0189208984375, -0.00982666015625, 0.0036468505859375, 0.02880859375, -0.004608154296875, 0.021728515625, 0.007080078125, 0.0075683593...
[ 13684, 4902, 2069, 10, 5303, 23, 1250, 4867, 502, 170052, 60552, 3642, 831, 62, 418, 83, 71, 1653, 2063, 20697, 959, 19882, 176683, 38969, 10752 ]
[ 0.1522216796875, 0.2052001953125, 0.08331298828125, 0.022613525390625, 0.2357177734375, 0.0684814453125, 0.15625, 0.234619140625, 0.1163330078125, 0.2548828125, 0.0211181640625, 0.03729248046875, 0.03387451171875, 0.1416015625, 0.1083984375, 0.038421630859375, 0.093017578125, 0.077...
embed
71371782_c0
71371782
prolog
0
Title: LCM of list PROLOG Problem title: LCM of list PROLOG Tags: prolog, lcm Problem: LCM of list PROLOG How to get the LCM of a list in Prolog? Lets say the list is: [1,2,3,4,5] and the LCM will be 60. I have the following code fo the GCD and the LCM that work for 2 numbers but dont know how to apply to lists. gcd(X,...
LCM of list PROLOG LCM of list PROLOG prolog lcm LCM PROLOG GCD LCM of list PROLOG How to get the LCM of a list in Prolog? Lets say the list is: [1,2,3,4,5] and the LCM will be 60. I have the following code fo the GCD and the LCM that work for 2 numbers but dont know how to apply to lists.
[ -0.01068115234375, 0.0015716552734375, 0.0120849609375, 0.009033203125, 0.006378173828125, 0.003204345703125, -0.006805419921875, -0.00286865234375, -0.00091552734375, -0.038330078125, 0.0244140625, -0.01708984375, 0.000835418701171875, -0.00909423828125, -0.002960205078125, 0.01336669...
[ 339, 36498, 111, 5303, 10514, 47510, 502, 4867, 96, 3931, 527, 16069, 11249, 47, 2046, 70, 10, 23, 1250, 5154, 68252, 155761, 80389, 1221, 186, 1496, 25632, 18151, 5775, 136, 4488, 100, 116, 101935, 13319, 3714, 3642, 59911 ]
[ 0.1619873046875, 0.302001953125, 0.1795654296875, 0.254638671875, 0.161865234375, 0.2296142578125, 0.0999755859375, 0.271484375, 0.05450439453125, 0.1951904296875, 0.07958984375, 0.1754150390625, 0.0477294921875, 0.047698974609375, 0.14013671875, 0.127197265625, 0.03070068359375, 0...
embed
47024620_c0
47024620
prolog
0
Title: Array Univ var ([x,y]=..T) - prolog Problem title: Array Univ var ([x,y]=..T) - prolog Tags: prolog Problem: Array Univ var ([x,y]=..T) - prolog I saw a question asking what does [a,b,c]=..L. return. When testing this I saw that it returns: L = ['.', a, [b, c]] . I can't understand why this happens, I was unable...
Array Univ var ([x,y]=..T) - prolog Array Univ var ([x,y]=..T) - prolog prolog Array Univ Array Univ var ([x,y]=..T) - prolog I saw a question asking what does [a,b,c]=..L. return. When testing this I saw that it returns: L = ['.', a, [b, c]] . I can't understand why this happens, I was unable to understand the nature ...
[ 0.02001953125, 0.006317138671875, 0.007171630859375, 0.00830078125, -0.018798828125, -0.03466796875, 0.010498046875, 0.002288818359375, 0.01055908203125, -0.01434326171875, 0.00092315673828125, 0.0118408203125, 0.01708984375, -0.0023193359375, -0.01385498046875, -0.006103515625, 0.01...
[ 69253, 53, 11789, 334, 285, 425, 618, 502, 4867, 24124, 9655, 113292, 2367, 14602, 11, 275, 4, 238, 5, 866, 30646, 134234, 339, 2203, 378, 25, 10, 501, 6, 28219, 15400, 96276, 2886, 31425, 209806 ]
[ 0.1580810546875, 0.111572265625, 0.1953125, 0.2484130859375, 0.20751953125, 0.0222930908203125, 0.1124267578125, 0.1453857421875, 0.1654052734375, 0.06732177734375, 0.102783203125, 0.025238037109375, 0.065673828125, 0.0367431640625, 0.043060302734375, 0.1011962890625, 0.00927734375, ...
embed
16381194_c0
16381194
prolog
0
Title: keep getting the Singleton variable error Problem title: keep getting the Singleton variable error Tags: prolog Problem: keep getting the Singleton variable error i am a beginner and use swi-Prolog. Can someone tell me why this piece of code doesn't work? inp:- write('Enter the string'),nl,read(X),write(X). abc:...
keep getting the Singleton variable error keep getting the Singleton variable error prolog Singleton Enter keep getting the Singleton variable error i am a beginner and use swi-Prolog. Can someone tell me why this piece of code doesn't work? I keep getting the Singleton Variable[X] error. Thanks.
[ -0.001251220703125, 0.0045166015625, -0.01080322265625, 0.023681640625, -0.025634765625, 0.0245361328125, 0.01611328125, -0.003326416015625, -0.00182342529296875, -0.038330078125, 0.007720947265625, -0.00823974609375, -0.0172119140625, -0.0011138916015625, -0.00634765625, 0.0107421875,...
[ 13695, 20949, 43609, 1507, 77336, 18499, 502, 4867, 60816, 1679, 4527, 91, 2452, 9, 10752, 4171, 22008, 14192, 15400, 63847, 18151, 22027, 18, 4488, 84572, 2886, 1542 ]
[ 0.1239013671875, 0.084716796875, 0.2191162109375, 0.2410888671875, 0.2587890625, 0.1832275390625, 0.10205078125, 0.2020263671875, 0.1619873046875, 0.0430908203125, 0.0088653564453125, 0.0455322265625, 0.2037353515625, 0.01470947265625, 0.110595703125, 0.005619049072265625, 0.00587844...
embed
8014224_c0
8014224
prolog
0
Title: How to represent &quot;somewhere to the left&quot; in prolog? Problem title: How to represent &quot;somewhere to the left&quot; in prolog? Tags: dcg, prolog, rule Problem: How to represent "somewhere to the left" in prolog? In the Prolog, how to represent the situation "somewhere to the left". For example, there...
How to represent &quot;somewhere to the left&quot; in prolog? How to represent &quot;somewhere to the left&quot; in prolog? dcg prolog rule How How to represent "somewhere to the left" in prolog? In the Prolog, how to represent the situation "somewhere to the left". For example, there is a List "List" and two terms "X"...
[ 0.0206298828125, 0.0087890625, 0.006683349609375, 0.00543212890625, -0.015380859375, 0.0174560546875, 0.00537109375, -0.00131988525390625, 0.0128173828125, -0.032470703125, 0.00225830078125, -0.00640869140625, -0.00396728515625, 0.00092315673828125, 0.0125732421875, -0.006011962890625,...
[ 11249, 47, 33636, 43452, 136913, 70, 25737, 502, 4867, 23, 177, 79986, 360, 1250, 3642, 16648, 32036, 154663, 6626, 69407, 1542, 136, 1723, 1193, 83, 174653, 111, 990 ]
[ 0.065185546875, 0.24658203125, 0.2822265625, 0.0982666015625, 0.1668701171875, 0.1226806640625, 0.2685546875, 0.166748046875, 0.265380859375, 0.0660400390625, 0.06890869140625, 0.1846923828125, 0.0093994140625, 0.156982421875, 0.0682373046875, 0.1666259765625, 0.1231689453125, 0.12...
embed
54181461_c0
54181461
prolog
0
Title: Neo4j reasoning alternatives to Prolog Problem title: Neo4j reasoning alternatives to Prolog Tags: cypher, neo4j, prolog, reasoning Problem: Neo4j reasoning alternatives to Prolog I am working on a project that makes use of Neo4j. Cypher is used for queries, and Prolog for reasoning (after translation from Neo4j...
Neo4j reasoning alternatives to Prolog Neo4j reasoning alternatives to Prolog cypher neo4j prolog reasoning Neo4j Prolog Neo4j reasoning alternatives to Prolog I am working on a project that makes use of Neo4j. Cypher is used for queries, and Prolog for reasoning (after translation from Neo4j model). Is there any alter...
[ 0.0206298828125, 0.00077056884765625, 0.016357421875, 0.0017852783203125, -0.01434326171875, 0.001617431640625, -0.0223388671875, -0.0230712890625, -0.0113525390625, -0.057861328125, -0.00860595703125, 0.034423828125, -0.02685546875, -0.00064849853515625, 0.037353515625, 0.002212524414...
[ 54311, 617, 170, 31635, 214, 30700, 47, 1250, 4867, 19932, 94266, 16169, 502, 20697, 13452, 4527, 27939, 11814, 41, 100, 153648, 3299, 2499, 14602, 959, 3871, 29954, 1295 ]
[ 0.181640625, 0.16455078125, 0.185791015625, 0.1796875, 0.0771484375, 0.1580810546875, 0.0543212890625, 0.138671875, 0.2296142578125, 0.052276611328125, 0.209716796875, 0.1060791015625, 0.05364990234375, 0.024322509765625, 0.02703857421875, 0.004852294921875, 0.07781982421875, 0.050...
embed
35762462_c0
35762462
prolog
0
Title: What is Horn clause in prolog? Problem title: What is Horn clause in prolog? Tags: prolog, logic Problem: What is Horn clause in prolog? I don't understand what the Horn clause is in prolog. • A Horn clause is a clause with exactly one positive literal. root(X) :- \+ left(X,Y), \+ right(X,Y). So for this one it ...
What is Horn clause in prolog? What is Horn clause in prolog? prolog logic What Horn What is Horn clause in prolog? I don't understand what the Horn clause is in prolog. • A Horn clause is a clause with exactly one positive literal. So for this one it is not a horn clause cause it has multiple clauses? Or is there havi...
[ 0.0107421875, 0.0233154296875, -0.0024261474609375, 0.0115966796875, -0.0238037109375, 0.015869140625, -0.00640869140625, -0.022216796875, 0.0157470703125, -0.03564453125, -0.00537109375, -0.021728515625, -0.01080322265625, -0.000408172607421875, 0.00897216796875, 0.0012969970703125, ...
[ 4865, 83, 78315, 70731, 13, 23, 502, 4867, 62775, 28219, 2367, 70, 62, 678, 66161, 1632, 24491, 15659, 289, 959, 10, 3328, 19, 48716, 36510 ]
[ 0.0556640625, 0.0626220703125, 0.272705078125, 0.23681640625, 0.15087890625, 0.05340576171875, 0.1629638671875, 0.2366943359375, 0.11376953125, 0.06268310546875, 0.0191650390625, 0.0220184326171875, 0.0170745849609375, 0.0239410400390625, 0.07861328125, 0.0880126953125, 0.13916015625...
embed
30758763_c0
30758763
prolog
0
Title: Prolog binding arguments Problem title: Prolog binding arguments Tags: prolog, meta-predicate Problem: Prolog binding arguments In sicstus prolog, there's a predicate: maplist(:Pred, +List) Pred is supposed to take just one argument - List element. How can I pass a 2-argument predicate, with first argument defin...
Prolog binding arguments Prolog binding arguments prolog meta-predicate Prolog Pred List pred.bind SomeValue Prolog binding arguments In sicstus prolog, there's a predicate: Pred is supposed to take just one argument - List element. How can I pass a 2-argument predicate, with first argument defined? In other languages ...
[ 0.0028076171875, 0.00112152099609375, 0.00836181640625, -0.0201416015625, -0.0194091796875, 0.041259765625, 0.01336669921875, 0.00897216796875, 0.00750732421875, -0.0361328125, 0.00299072265625, 0.0037384033203125, -0.01611328125, 0.006927490234375, 0.00274658203125, 0.01470947265625, ...
[ 1250, 4867, 128239, 10750, 502, 23550, 19714, 2063, 7145, 32036, 1653, 89817, 31384, 856, 50770, 26536, 18253, 67, 134598, 5646, 1660, 1632, 12830, 11249, 831, 27875, 4720, 155937, 5117, 61924, 71, 46876, 59121 ]
[ 0.1510009765625, 0.22265625, 0.1844482421875, 0.264404296875, 0.1376953125, 0.1197509765625, 0.121337890625, 0.2149658203125, 0.259765625, 0.165771484375, 0.214599609375, 0.15478515625, 0.011932373046875, 0.086669921875, 0.1082763671875, 0.0726318359375, 0.1939697265625, 0.10742187...
embed
33699198_c0
33699198
prolog
0
Title: Create a range rule in Prolog Problem title: Create a range rule in Prolog Tags: clpfd, prolog, range Problem: Create a range rule in Prolog I want to create 3 range in prolog like these: if CF >70 and <80 -> range 1 if CF >81 and <90 -> range 2 if CF >91 and <100 -> range 3 Then I want to pass the range value t...
Create a range rule in Prolog Create a range rule in Prolog clpfd prolog range Create Prolog RANGE Create a range rule in Prolog I want to create 3 range in prolog like these: Then I want to pass the range value to another predicate depending on the CF value. Ex: advice(D,RANGE). Could someone help me?? Thank you
[ 0.0155029296875, 0.01092529296875, 0.00531005859375, 0.0179443359375, 0.01373291015625, 0.013671875, 0.00157928466796875, -0.000339508056640625, 0.00689697265625, 0.01031494140625, -0.01409912109375, 0.007232666015625, 0.00182342529296875, -0.005462646484375, 0.02490234375, -0.00921630...
[ 151313, 37457, 79986, 23, 1250, 4867, 10, 39557, 71, 502, 30174, 11679, 3444, 28282, 138, 1884, 6097, 27875, 34292, 15700, 1653, 2063, 96819, 73754, 67660, 397, 4358 ]
[ 0.1302490234375, 0.265869140625, 0.2218017578125, 0.0426025390625, 0.1650390625, 0.254638671875, 0.0168609619140625, 0.0008831024169921875, 0.04656982421875, 0.12469482421875, 0.1796875, 0.1385498046875, 0.0684814453125, 0.139892578125, 0.1236572265625, 0.0181121826171875, 0.02699279...
embed
34002425_c0
34002425
prolog
0
Title: Prolog Recursive example Problem title: Prolog Recursive example Tags: prolog Problem: Prolog Recursive example I have this database in Prolog: connection(a,b,bus). connection(b,c,metro). connection(b,d,taxi). connection(d,e,bus). How can I set the rules so the question: trajectbetween(a,c,T). gives me back the ...
Prolog Recursive example Prolog Recursive example prolog Prolog Recursive Prolog Recursive example I have this database in Prolog: How can I set the rules so the question: trajectbetween(a,c,T). gives me back the answer: T = b I've tried the rule: but it's not working.
[ 0.0172119140625, 0.0238037109375, 0.00830078125, 0.0166015625, 0.00130462646484375, 0.01153564453125, -0.00286865234375, 0.00799560546875, 0.0142822265625, -0.05078125, 0.00396728515625, -0.03515625, -0.0238037109375, 0.017578125, 0.01129150390625, -0.0029144287109375, 0.018798828125...
[ 1250, 4867, 853, 48650, 5844, 27781, 502, 903, 63399, 11249, 5423, 91736, 221, 9655, 182418, 4626, 1177, 33, 11, 238, 618, 4420, 35166, 384, 2203, 876, 272, 37842, 79986, 959, 20697 ]
[ 0.158935546875, 0.272216796875, 0.00836944580078125, 0.1558837890625, 0.0867919921875, 0.19775390625, 0.036590576171875, 0.0005173683166503906, 0.196533203125, 0.0138092041015625, 0.1585693359375, 0.207763671875, 0.0631103515625, 0.139892578125, 0.284423828125, 0.169921875, 0.2036132...
embed
33685244_c0
33685244
prolog
0
Title: Prolog error arguments Problem title: Prolog error arguments Tags: error-handling, error-checking, prolog, list, iso-prolog Problem: Prolog error arguments I'm wondering how to go about adding error checking in Prolog. For instance I have a program that will find how long a list is: listlen([],0). listlen([_|T],...
Prolog error arguments Prolog error arguments error-handling error-checking prolog list iso-prolog Prolog Prolog error arguments I'm wondering how to go about adding error checking in Prolog. For instance I have a program that will find how long a list is: How would I print out an error like "The 1st argument has to be...
[ 0.0230712890625, 0.01177978515625, -0.004974365234375, 0.007354736328125, -0.00408935546875, 0.017822265625, -0.015380859375, 0.00836181640625, -0.007415771484375, -0.016845703125, 0.006591796875, -0.039306640625, -0.005218505859375, -0.001434326171875, 0.01416015625, 0.006744384765625...
[ 1250, 4867, 18499, 10750, 7, 54885, 78292, 214, 502, 5303, 13882, 3454, 149016, 3642, 1672, 154107, 175199, 23, 1528, 7413, 4989, 83, 11249, 2806, 28412, 1810, 1884, 3957, 106, 271, 1556, 47, 186, 10, 3229, 96276 ]
[ 0.171875, 0.253173828125, 0.2391357421875, 0.239990234375, 0.01149749755859375, 0.1202392578125, 0.1407470703125, 0.015045166015625, 0.12188720703125, 0.1741943359375, 0.083984375, 0.10577392578125, 0.0555419921875, 0.01192474365234375, 0.0172119140625, 0.1368408203125, 0.23413085937...
embed
66146268_c0
66146268
prolog
0
Title: I need to multiply and sum one list, the output should be like this Problem title: I need to multiply and sum one list, the output should be like this Tags: prolog Problem: I need to multiply and sum one list, the output should be like this I need to multiply and sum one list, the output should be like this: ?- ...
I need to multiply and sum one list, the output should be like this I need to multiply and sum one list, the output should be like this prolog tp4 I need to multiply and sum one list, the output should be like this I need to multiply and sum one list, the output should be like this: First the multi, next the sum and at...
[ -0.01422119140625, 0.014404296875, 0.0086669921875, 0.004364013671875, -0.025146484375, -0.00084686279296875, -0.0142822265625, 0.0206298828125, 0.031005859375, -0.02978515625, -0.003326416015625, 0.00982666015625, -0.01806640625, 0.0220947265625, -0.0091552734375, 0.02587890625, 0.0...
[ 3871, 6024, 62479, 136, 10554, 1632, 5303, 140992, 5608, 1884, 903, 47, 186, 502, 4867, 92790, 617, 23972, 11737, 3564, 10588, 101935, 5 ]
[ 0.136474609375, 0.19580078125, 0.2088623046875, 0.051055908203125, 0.22314453125, 0.0916748046875, 0.2086181640625, 0.229736328125, 0.09307861328125, 0.08209228515625, 0.05023193359375, 0.033233642578125, 0.011474609375, 0.1478271484375, 0.2154541015625, 0.120361328125, 0.15490722656...
embed
34682742_c0
34682742
prolog
0
Title: Prolog mouse hover recognizer Problem title: Prolog mouse hover recognizer Tags: hover, prolog, gesture, mouseover Problem: Prolog mouse hover recognizer How can i add a hover recognizer to an object in prolog? I want a rule to be called when the user hovers an object with the mouse. something like that: send(S,...
Prolog mouse hover recognizer Prolog mouse hover recognizer hover prolog gesture mouseover Prolog click_gesture Prolog mouse hover recognizer How can i add a hover recognizer to an object in prolog? I want a rule to be called when the user hovers an object with the mouse. something like that: but for mouse hover gestur...
[ 0.01361083984375, 0.009521484375, -0.004302978515625, -0.0032196044921875, 0.006103515625, 0.0255126953125, -0.0014190673828125, -0.01165771484375, 0.0166015625, -0.06103515625, 0.030517578125, -0.0269775390625, -0.018310546875, -0.0169677734375, 0.0064697265625, -0.0208740234375, -0...
[ 1250, 4867, 114669, 739, 814, 125296, 42, 502, 28995, 3408, 5465, 18158, 4188, 6644, 831, 17, 15190, 10, 47, 36746, 23, 3444, 79986, 35839, 3229, 38937, 7864, 678 ]
[ 0.1597900390625, 0.254638671875, 0.1954345703125, 0.1827392578125, 0.2357177734375, 0.197998046875, 0.1561279296875, 0.14892578125, 0.12481689453125, 0.0977783203125, 0.178466796875, 0.1119384765625, 0.09698486328125, 0.007785797119140625, 0.0382080078125, 0.022796630859375, 0.150512...
embed
37624314_c0
37624314
prolog
0
Title: Lists of N length Problem title: Lists of N length Tags: prolog, list Problem: Lists of N length Is it to possible to create N elements of 0 array in another way than the following one: makeInitialArray(N, A) :- N > 0, Nn is N-1, makeInitialArray(Nn, B), append([0], B, A). makeInitialArray(0, []). It is a poor w...
Lists of N length Lists of N length prolog list Lists N-1 Lists of N length Is it to possible to create N elements of 0 array in another way than the following one: It is a poor way on my eye because of the fact of recurrence. I suppose that will be made to call very often operation like that.
[ 0.0015869140625, 0.01513671875, 0.004241943359375, 0.01348876953125, -0.01055908203125, 0.0047607421875, 0.01300048828125, 0.00390625, 0.022216796875, -0.017578125, 0.003753662109375, -0.01953125, -0.004913330078125, 0.033203125, 0.0191650390625, -0.0155029296875, 0.032958984375, 0...
[ 32036, 541, 140909, 502, 4867, 5303, 5759, 442, 47, 7722, 28282, 80854, 757, 10298, 53, 15700, 3917, 3501, 25632, 1650, 83, 70425, 98, 36298, 6637, 15824, 456, 64240, 6620, 139124, 186, 11782, 4552, 27983, 41018, 1884, 450 ]
[ 0.18603515625, 0.1734619140625, 0.1602783203125, 0.0687255859375, 0.1397705078125, 0.1260986328125, 0.07550048828125, 0.0241851806640625, 0.0221405029296875, 0.156494140625, 0.1607666015625, 0.195068359375, 0.18212890625, 0.1763916015625, 0.097412109375, 0.08685302734375, 0.111389160...
embed
22337724_c0
22337724
prolog
0
Title: how to determine if two numbers are relatively prime in prolog Problem title: how to determine if two numbers are relatively prime in prolog Tags: prolog, primes Problem: how to determine if two numbers are relatively prime in prolog How can you determine in prolog that two numbers are relatively primes? Does an...
how to determine if two numbers are relatively prime in prolog how to determine if two numbers are relatively prime in prolog prolog primes how to determine if two numbers are relatively prime in prolog How can you determine in prolog that two numbers are relatively primes? Does anyone know if there is a function for t...
[ -0.0220947265625, 0.005767822265625, 0.0322265625, 0.0206298828125, 0.020751953125, 0.021728515625, -0.00494384765625, -0.0147705078125, 0.000682830810546875, -0.02294921875, 0.0150146484375, 0.0011138916015625, -0.016357421875, -0.003692626953125, 0.013916015625, 0.007720947265625, ...
[ 3642, 47, 83324, 2174, 6626, 101935, 621, 35845, 538, 20809, 23, 502, 4867, 831, 450, 7, 3714, 32354, 903, 33022, 442, 209806, 80234 ]
[ 0.0482177734375, 0.044586181640625, 0.1566162109375, 0.09588623046875, 0.1328125, 0.1434326171875, 0.0838623046875, 0.18115234375, 0.1195068359375, 0.22314453125, 0.042449951171875, 0.135009765625, 0.1962890625, 0.013824462890625, 0.0072021484375, 0.080078125, 0.00909423828125, 0.1...
embed
13437276_c0
13437276
prolog
0
Title: prolog get a list of numbers from list of wildcards and numbers Problem title: prolog get a list of numbers from list of wildcards and numbers Tags: prolog Problem: prolog get a list of numbers from list of wildcards and numbers I wonder if it's possible to do something like the following in prolog L = [1,2,3,4,...
prolog get a list of numbers from list of wildcards and numbers prolog get a list of numbers from list of wildcards and numbers prolog list prolog get a list of numbers from list of wildcards and numbers I wonder if it's possible to do something like the following in prolog i want to do something like that returns R = ...
[ -0.00811767578125, -0.0018768310546875, -0.00640869140625, 0.013427734375, -0.0107421875, 0.012451171875, 0.0111083984375, 0.01806640625, 0.0189208984375, -0.01251220703125, 0.0380859375, -0.02294921875, -0.026123046875, 0.0037841796875, 0.0028839111328125, 0.0004291534423828125, 0.0...
[ 502, 4867, 2046, 5303, 111, 101935, 1295, 56409, 38931, 7, 136, 32195, 7722, 54, 25632, 23, 3444, 30646, 627, 2203, 133063, 82449, 135461, 124962 ]
[ 0.1611328125, 0.2471923828125, 0.092041015625, 0.1766357421875, 0.030029296875, 0.1962890625, 0.1090087890625, 0.1334228515625, 0.2210693359375, 0.027435302734375, 0.08251953125, 0.00262451171875, 0.064453125, 0.000274658203125, 0.031982421875, 0.0357666015625, 0.0250701904296875, ...
embed
60579216_c0
60579216
prolog
0
Title: How do I create a list with elements from 1 to N in prolog Problem title: How do I create a list with elements from 1 to N in prolog Tags: prolog Problem: How do I create a list with elements from 1 to N in prolog I've tried to create a program that makes a list with elements from 1 to N. increasing(L, N):- incr...
How do I create a list with elements from 1 to N in prolog How do I create a list with elements from 1 to N in prolog prolog 1 How How do I create a list with elements from 1 to N in prolog I've tried to create a program that makes a list with elements from 1 to N. But for some reason it doesn't work
[ 0.00897216796875, 0.00176239013671875, -0.01031494140625, -0.0006561279296875, 0.0013885498046875, 0.0155029296875, -0.00897216796875, 0.012451171875, 0.0035858154296875, -0.05126953125, 0.002532958984375, -0.00823974609375, -0.029296875, -0.006988525390625, -0.002227783203125, 0.00613...
[ 11249, 54, 87, 28282, 10, 5303, 678, 80854, 1295, 106, 47, 541, 23, 502, 4867, 37842, 1528, 30482, 22027, 18, 4488 ]
[ 0.0682373046875, 0.037384033203125, 0.056976318359375, 0.1732177734375, 0.047149658203125, 0.2176513671875, 0.0870361328125, 0.197021484375, 0.08343505859375, 0.1298828125, 0.10821533203125, 0.180419921875, 0.07147216796875, 0.1732177734375, 0.2493896484375, 0.0239715576171875, 0.118...
embed
46121102_c0
46121102
prolog
0
Title: Create a list from zero down to a negative number Problem title: Create a list from zero down to a negative number Tags: prolog Problem: Create a list from zero down to a negative number I want to make a program in which the user will give a negative number and it will return a list starting from zero till that ...
Create a list from zero down to a negative number Create a list from zero down to a negative number prolog zero Create Create a list from zero down to a negative number I want to make a program in which the user will give a negative number and it will return a list starting from zero till that number. Here is a desired...
[ 0.015869140625, 0.000766754150390625, -0.0220947265625, 0.0208740234375, -0.004058837890625, -0.0037689208984375, 0.00799560546875, 0.01519775390625, 0.0162353515625, -0.002105712890625, -0.001800537109375, -0.0245361328125, 0.000713348388671875, 0.0076904296875, -0.004791259765625, -0...
[ 151313, 10, 5303, 1295, 45234, 7565, 47, 40907, 14012, 502, 4867, 87, 3444, 3249, 1528, 70, 38937, 1221, 8337, 30646, 72134, 570, 11853, 104851, 140992, 27781, 28282, 10342, 4, 866, 339, 2203, 2389, 5759, 5428, 8316, 11565, 5809, 4358, 22...
[ 0.17919921875, 0.047943115234375, 0.2120361328125, 0.1474609375, 0.208984375, 0.1988525390625, 0.1531982421875, 0.261962890625, 0.2032470703125, 0.132080078125, 0.1907958984375, 0.010162353515625, 0.1290283203125, 0.0958251953125, 0.178955078125, 0.000457763671875, 0.1480712890625, ...
embed
16556240_c0
16556240
prolog
0
Title: confused about Prolog Response Problem title: confused about Prolog Response Tags: prolog Problem: confused about Prolog Response Consider: bar([], Ws, Ws). bar([X|Xs], Ys, [X|Zs]) :- bar(Xs, Ys, Zs). 1) How does this have no Solutions bar([1,2], [], [X,X]). 2) How does this have only One Solution when Z=5? bar(...
confused about Prolog Response confused about Prolog Response prolog Prolog Response confused about Prolog Response Consider: 1) How does this have no Solutions 2) How does this have only One Solution when Z=5? 3)How does this have only One Solution when Z=5 and Y = 5?
[ 0.0167236328125, 0.0123291015625, -0.001373291015625, 0.005340576171875, -0.00482177734375, 0.01708984375, 0.002655029296875, -0.00057220458984375, 0.01007080078125, 0.007781982421875, 0.01611328125, 0.0029754638671875, -0.003326416015625, 0.006591796875, 0.01202392578125, -0.002792358...
[ 55681, 5281, 1250, 4867, 92748, 502, 137399, 11249, 903, 765, 110, 109339, 14602, 4734, 6561, 187895, 567, 114997, 81826, 990, 190 ]
[ 0.12347412109375, 0.07061767578125, 0.1417236328125, 0.23779296875, 0.20947265625, 0.0972900390625, 0.01068115234375, 0.045562744140625, 0.068359375, 0.064697265625, 0.10614013671875, 0.18603515625, 0.00157928466796875, 0.03643798828125, 0.08306884765625, 0.157958984375, 0.1152954101...
embed
55411586_c0
55411586
prolog
0
Title: Prolog maximum term size Problem title: Prolog maximum term size Tags: prolog Problem: Prolog maximum term size I'm considering using some very long terms to describe coordinates on an xy grid, and/or the entire xy grid itself. I tried to find some info in documentation, but didn't have any luck. What's the maxi...
Prolog maximum term size Prolog maximum term size prolog Prolog Prolog maximum term size I'm considering using some very long terms to describe coordinates on an xy grid, and/or the entire xy grid itself. I tried to find some info in documentation, but didn't have any luck. What's the maximum size of a compound term, a...
[ 0.033447265625, 0.021728515625, 0.0029449462890625, -0.0032806396484375, -0.013916015625, 0.0022430419921875, 0.0128173828125, 0.01287841796875, -0.0054931640625, -0.0301513671875, 0.01007080078125, -0.02001953125, -0.017333984375, -0.01275634765625, 0.0302734375, 0.006195068359375, ...
[ 1250, 4867, 38132, 13579, 13267, 502, 179635, 17368, 4989, 69407, 98363, 176866, 90, 98, 1022, 53, 120067, 64194, 68034, 3004, 209806, 70, 217773, 7413, 4677, 159, 38969, 4527 ]
[ 0.159912109375, 0.26025390625, 0.1868896484375, 0.2548828125, 0.1986083984375, 0.103759765625, 0.05706787109375, 0.0474853515625, 0.091552734375, 0.2032470703125, 0.1334228515625, 0.171630859375, 0.052215576171875, 0.0107421875, 0.04644775390625, 0.056060791015625, 0.175537109375, ...
embed
57736615_c1
57736615
prolog
1
0x7eff37281170: END_OF_CLAUSEQ user:is_list__clause2/1 … This output—albeit somewhat cryptic—is giving me a feel of what's going on at the WAM level. I like! But there has got to a simpler way... please help! Code signals: How, WAM, SICStus, Prolog, is_list, is_list__clause1, dummy1, __clause1, is_list__clause2, dummy2...
0x7eff37281170: END_OF_CLAUSEQ user:is_list__clause2/1 … This output—albeit somewhat cryptic—is giving me a feel of what's going on at the WAM level. I like! But there has got to a simpler way... please help! Code signals: How, WAM, SICStus, Prolog, is_list, is_list__clause1, dummy1, __clause1, is_list__clause2, dummy2...
[ -0.00147247314453125, 0.00994873046875, -0.005584716796875, 0.03125, -0.0281982421875, 0.022216796875, 0.01104736328125, -0.01373291015625, 0.01361083984375, 0.000537872314453125, -0.0137939453125, 0.010009765625, 0.0003223419189453125, 0.0035400390625, 0.0047607421875, 0.004150390625,...
[ 757, 425, 966, 68053, 108265, 13556, 43243, 39015, 82341, 37486, 98031, 178102, 38937, 164, 6562, 18347, 4032, 304, 11583, 153, 140992, 208806, 91190, 112569, 68772, 12319, 7730, 98, 99, 4336, 594, 17366, 1884, 4163, 8781, 22936, 4358, 28864,...
[ 0.05950927734375, 0.015106201171875, 0.02313232421875, 0.13330078125, 0.11767578125, 0.083251953125, 0.1634521484375, 0.1876220703125, 0.2132568359375, 0.049072265625, 0.1158447265625, 0.2359619140625, 0.2044677734375, 0.136474609375, 0.2509765625, 0.078369140625, 0.120361328125, 0...
embed
79509857_c1
79509857
prolog
1
false. I also tried directly using =/3 and ;/3 to implement a version that only works for true values, but the results were even pretty much the same: or3(A,B,C) :- =( C, true, T), ;( ( A = true, B = true ), ( A = true, B = false ), T1 ), ;( T1=true, ( A = false, B = true), T). ?- or3(A,false,C). Correct to: "tri_logi...
false. I also tried directly using =/3 and ;/3 to implement a version that only works for true values, but the results were even pretty much the same: or3(A,B,C) :- =( C, true, T), ;( ( A = true, B = true ), ( A = true, B = false ), T1 ), ;( T1=true, ( A = false, B = true), T). ?- or3(A,false,C). Correct to: "tri_logi...
[ 0.00927734375, 0.01251220703125, 0.03125, 0.00160980224609375, -0.016845703125, 0.00439453125, -0.011474609375, 0.0167236328125, 0.010986328125, -0.013427734375, -0.005035400390625, -0.0081787109375, 0.023681640625, 0.0211181640625, 0.0152587890625, -0.00189971923828125, 0.0234375, ...
[ 98320, 37842, 105237, 17368, 2203, 18113, 136, 2819, 29479, 11389, 4734, 43240, 100, 29568, 142424, 50339, 3853, 28875, 5045, 5701, 707, 363, 284, 571, 441, 15772, 313, 384, 62, 335, 418, 9774, 8710, 46348, 15390, 47, 3996, 137043, 748, 7...
[ 0.231201171875, 0.03875732421875, 0.1085205078125, 0.03631591796875, 0.1221923828125, 0.2213134765625, 0.024383544921875, 0.018890380859375, 0.15234375, 0.1356201171875, 0.064208984375, 0.08685302734375, 0.051849365234375, 0.1876220703125, 0.1708984375, 0.05523681640625, 0.0161743164...
embed
66667489_c0
66667489
prolog
0
Title: Prolog: Wrong Evaluation? Problem title: Prolog: Wrong Evaluation? Tags: prolog Problem: Prolog: Wrong Evaluation? friend(a,b). friend(b,c). friend(b,d). friend(b,e). realFriends(X,Y) :- friend(X,Y);friend(Y,X). friendOfFriend(X,Y) :- realFriends(X,Z), realFriends(Z,Y). When I query friendOfFriend(a,X). I get: X...
Prolog: Wrong Evaluation? Prolog: Wrong Evaluation? prolog Prolog Wrong Evaluation Prolog: Wrong Evaluation? When I query friendOfFriend(a,X). I get: But why its outputting X = a ? friendOfFriend(a,a). should be false.
[ 0.029296875, 0.00469970703125, -0.0023956298828125, 0.0269775390625, -0.0152587890625, -0.00335693359375, -0.00970458984375, -0.01214599609375, 0.0047607421875, -0.00045013427734375, 0.00019741058349609375, -0.002716064453125, 0.0091552734375, 0.0155029296875, 0.024169921875, -0.016235...
[ 1250, 4867, 35133, 151228, 1363, 502, 601, 41, 1294, 34391, 132887, 919, 416, 3611, 11, 1542, 4966, 15400, 6863, 140992, 1916, 1193, 2203, 10, 5608, 186, 98320 ]
[ 0.154541015625, 0.2454833984375, 0.167236328125, 0.198486328125, 0.049896240234375, 0.07806396484375, 0.0235137939453125, 0.09423828125, 0.03326416015625, 0.1678466796875, 0.2203369140625, 0.0701904296875, 0.1185302734375, 0.1619873046875, 0.0438232421875, 0.0762939453125, 0.01974487...
embed
31022970_c0
31022970
prolog
0
Title: From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] Problem title: From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] Tags: prolog Problem: From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] From a list [n, k], I want to return a set of all possible list...
From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] prolog e.g From a given list (e.g. [2,4]), I want to get [ [1,2],[1,3],[1,4] ...] From a list [n, k], I want to return a set of all possible lists from 1 to k such that the lengt...
[ 0.00732421875, 0.0281982421875, -0.00146484375, -0.012451171875, -0.01904296875, -0.0032806396484375, -0.01092529296875, 0.0107421875, 0.0030975341796875, -0.01708984375, 0.01043701171875, -0.0026702880859375, 0.00689697265625, 0.0181884765625, -0.0228271484375, 0.0031280517578125, 0...
[ 28090, 34475, 5303, 177, 304, 617, 87, 3444, 47, 2046, 68252, 90173, 418, 96386, 163324, 153, 378, 268, 502, 4867, 247, 4, 10, 19, 472, 30646, 5423, 756, 7722, 7, 1295, 106, 6044, 140909, 83, 653, 89536, 8705, 5608 ]
[ 0.158447265625, 0.122314453125, 0.2352294921875, 0.02789306640625, 0.0794677734375, 0.167236328125, 0.0517578125, 0.1627197265625, 0.1102294921875, 0.16357421875, 0.042755126953125, 0.09906005859375, 0.039764404296875, 0.10986328125, 0.21826171875, 0.004547119140625, 0.00674438476562...
embed
66332449_c0
66332449
prolog
0
Title: level([X|_], X, 1). how to get the level of a given value on a tree? Problem title: level([X|_], X, 1). how to get the level of a given value on a tree? Tags: prolog Problem: level([X|_], X, 1). how to get the level of a given value on a tree? I've been trying to write a predicate to get the level of a given val...
level([X|_], X, 1). how to get the level of a given value on a tree? level([X|_], X, 1). how to get the level of a given value on a tree? prolog level([X|_], X, 1). how to get the level of a given value on a tree? I've been trying to write a predicate to get the level of a given value on tree: But it return : false why...
[ -0.009765625, 0.005706787109375, -0.005950927734375, -0.0028533935546875, 0.017822265625, 0.0203857421875, -0.021240234375, -0.0023345947265625, 0.0181884765625, -0.04443359375, 0.0184326171875, 0.0028228759765625, -0.01025390625, 0.007415771484375, 0.0301513671875, 0.00494384765625, ...
[ 17366, 1542, 454, 1193, 4879, 3642, 47, 2046, 70, 111, 34475, 34292, 98, 53201, 502, 4867, 58745, 31577, 1653, 2063, 67, 30646, 98320, 15400 ]
[ 0.24951171875, 0.049591064453125, 0.0333251953125, 0.053314208984375, 0.03363037109375, 0.05267333984375, 0.046661376953125, 0.1005859375, 0.02947998046875, 0.05413818359375, 0.056884765625, 0.162109375, 0.06207275390625, 0.1912841796875, 0.06182861328125, 0.1063232421875, 0.00119018...
embed
33879097_c1
33879097
prolog
1
2965], [_G3263,_G3299,_G3335,_G3371,_G3407],[_G3757,_G3793,_G3829,_G3865], [_G4157,_G4193,_G4229]] [[1,18,19],[1,2,16,19],[1,2,3,13,19],[1,2,16,19],[1,18,19]] true . ..as you can see the problem is that the elements are not unique, since I have used all_different() for every list separately and not for the whole list, ...
2965], [_G3263,_G3299,_G3335,_G3371,_G3407],[_G3757,_G3793,_G3829,_G3865], [_G4157,_G4193,_G4229]] [[1,18,19],[1,2,16,19],[1,2,3,13,19],[1,2,16,19],[1,18,19]] true . ..as you can see the problem is that the elements are not unique, since I have used all_different() for every list separately and not for the whole list, ...
[ -0.0220947265625, 0.004730224609375, 0.00787353515625, 0.0277099609375, -0.006988525390625, 0.0087890625, -0.01708984375, -0.00726318359375, 0.022705078125, 0.00193023681640625, -0.00616455078125, -0.00567626953125, 0.0308837890625, 0.0166015625, -0.03076171875, 0.009033203125, -0.01...
[ 1702, 12424, 268, 4, 724, 6460, 15748, 5046, 66000, 758, 118552, 10289, 8368, 178785, 141520, 363, 10991, 4235, 105742, 617, 145445, 8894, 11591, 86549, 418, 1819, 2947, 133063, 2485, 1065, 2681, 29568, 1468, 1957, 70, 2967, 80854, 621, 959...
[ 0.1788330078125, 0.23291015625, 0.039703369140625, 0.0237579345703125, 0.047393798828125, 0.111328125, 0.1761474609375, 0.1822509765625, 0.122802734375, 0.07000732421875, 0.1412353515625, 0.06353759765625, 0.1324462890625, 0.1119384765625, 0.08636474609375, 0.074462890625, 0.03359985...
embed
16173977_c1
16173977
prolog
1
would I go about omitting the true or false return in the ouput 11 ?- input. |: john is a dog ok true . 12 ?- input. |: Is john a dog yes true. 13 ?- input. |: Is abraham a dog unknown false. 14 ?- input. |: Is john a ham ERROR: action/1: Undefined procedure: ham/1 Exception: (8) ham(john) ? Code signals: Prolog, read...
would I go about omitting the true or false return in the ouput 11 ?- input. |: john is a dog ok true . 12 ?- input. |: Is john a dog yes true. 13 ?- input. |: Is abraham a dog unknown false. 14 ?- input. |: Is john a ham ERROR: action/1: Undefined procedure: ham/1 Exception: (8) ham(john) ? Code signals: Prolog, read...
[ -0.008056640625, 0.00262451171875, 0.0177001953125, 0.0179443359375, -0.0096435546875, 0.0228271484375, 0.017578125, -0.0020599365234375, -0.01025390625, -0.0322265625, -0.01397705078125, 0.00299072265625, -0.035888671875, -0.00982666015625, 0.01239013671875, -0.0007476806640625, 0.0...
[ 2806, 87, 1672, 171, 14, 19514, 29568, 707, 98320, 30646, 628, 7077, 534, 705, 9, 107730, 12, 35254, 19, 83, 10, 10269, 3664, 6, 427, 2071, 72272, 702, 2844, 3915, 51, 69723, 616, 2057, 151206, 24638, 22631, 11583, 79912, 5983, 297, 5...
[ 0.0226898193359375, 0.00384521484375, 0.041717529296875, 0.1429443359375, 0.061248779296875, 0.04119873046875, 0.23291015625, 0.082763671875, 0.241943359375, 0.225830078125, 0.1646728515625, 0.1624755859375, 0.17919921875, 0.045745849609375, 0.005706787109375, 0.2127685546875, 0.0106...
embed
8735391_c1
8735391
prolog
1
z( long(L,NouLong) ). inserirl(L,Pos,E):- long(L,X), XaPassar=X-1, retract(llista(L,Pos,E)), retract( long(L,X) ), assertz( long(L,XaPassar) ), inserirl(L, XaPassar,E), long(L,Y), Y2=Y+1, retract( long(L,Y) ), assertz( long(L,Y2) ), assertz(llista(L,Pos,E)). Goal inserirl(b,3,9). % 3 -> position % 9 -> element % b -> n...
z( long(L,NouLong) ). inserirl(L,Pos,E):- long(L,X), XaPassar=X-1, retract(llista(L,Pos,E)), retract( long(L,X) ), assertz( long(L,XaPassar) ), inserirl(L, XaPassar,E), long(L,Y), Y2=Y+1, retract( long(L,Y) ), assertz( long(L,Y2) ), assertz(llista(L,Pos,E)). Goal inserirl(b,3,9). % 3 -> position % 9 -> element % b -> n...
[ -0.005645751953125, 0.0023040771484375, 0.0047607421875, 0.02001953125, -0.011474609375, 0.006591796875, -0.0306396484375, -0.01531982421875, 0.01141357421875, -0.01611328125, 0.0186767578125, 0.01287841796875, 0.00016021728515625, -0.01177978515625, 0.0135498046875, 0.0037689208984375...
[ 97, 4989, 866, 5021, 34, 4021, 28046, 481, 141, 7192, 7, 647, 1542, 247, 8606, 139117, 147, 5759, 41499, 15390, 27374, 33657, 169, 1723, 990, 304, 1369, 21748, 2016, 289, 275, 125157, 138, 33079, 19069, 483, 12830, 876, 9351, 111, 5303,...
[ 0.1689453125, 0.136962890625, 0.117919921875, 0.099853515625, 0.08953857421875, 0.1697998046875, 0.1982421875, 0.061431884765625, 0.0963134765625, 0.0784912109375, 0.02862548828125, 0.0677490234375, 0.06890869140625, 0.03143310546875, 0.1434326171875, 0.144775390625, 0.14208984375, ...
embed
28050167_c0
28050167
prolog
0
Title: Prolog - Return false if element of a list is an empty list Problem title: Prolog - Return false if element of a list is an empty list Tags: prolog, list Problem: Prolog - Return false if element of a list is an empty list I would like to ensure a list does not contain an empty list, however my attempt does not ...
Prolog - Return false if element of a list is an empty list Prolog - Return false if element of a list is an empty list prolog list Prolog Predic Prolog - Return false if element of a list is an empty list I would like to ensure a list does not contain an empty list, however my attempt does not seem to be working: Can ...
[ -0.0172119140625, 0.004638671875, -0.00927734375, 0.00994873046875, -0.0147705078125, 0.0279541015625, 0.0159912109375, -0.0047607421875, 0.01141357421875, 0.00439453125, 0.0224609375, 0.01373291015625, -0.014404296875, 0.005126953125, 0.00885009765625, 0.0137939453125, 0.01123046875...
[ 1250, 4867, 173340, 98320, 2174, 12830, 111, 5303, 83, 201505, 502, 7145, 1771, 1884, 63284, 14602, 959, 70541, 81887, 48903, 20697, 18645, 26785, 3055, 30700 ]
[ 0.1561279296875, 0.228271484375, 0.16259765625, 0.2003173828125, 0.08831787109375, 0.1370849609375, 0.0230712890625, 0.18310546875, 0.039642333984375, 0.185302734375, 0.11981201171875, 0.1822509765625, 0.10821533203125, 0.029571533203125, 0.15283203125, 0.039825439453125, 0.085083007...
embed
46511644_c0
46511644
prolog
0
Title: After find all solutions, how to score the solution and choose one Problem title: After find all solutions, how to score the solution and choose one Tags: prolog Problem: After find all solutions, how to score the solution and choose one Here is the questions, setof returns a set of solutions solve([A1, A2, A3, ...
After find all solutions, how to score the solution and choose one After find all solutions, how to score the solution and choose one prolog After Set _G5594 _G5578 After find all solutions, how to score the solution and choose one Here is the questions, setof returns a set of solutions Then I find all solutions How do...
[ 0.005584716796875, 0.006500244140625, 0.0272216796875, 0.029296875, -0.02099609375, -0.014404296875, -0.02392578125, 0.0157470703125, 0.0201416015625, -0.0042724609375, 0.01165771484375, 0.01324462890625, 0.006622314453125, -0.00077056884765625, -0.008056640625, 0.01214599609375, -0....
[ 24372, 7413, 756, 51347, 3642, 47, 47763, 70, 29806, 136, 55076, 1632, 502, 4867, 19943, 160443, 617, 183282, 17582, 5423, 4390, 30646, 87, 46312, 50339, 18389, 384, 34292, 31592 ]
[ 0.083984375, 0.1429443359375, 0.13232421875, 0.2269287109375, 0.040679931640625, 0.0640869140625, 0.254150390625, 0.0020751953125, 0.2408447265625, 0.041290283203125, 0.1324462890625, 0.1175537109375, 0.10302734375, 0.163818359375, 0.1666259765625, 0.150634765625, 0.06695556640625, ...
embed
73014940_c0
73014940
prolog
0
Title: DFS BFS with cost in PROLOG Problem title: DFS BFS with cost in PROLOG Tags: prolog, depth-first-search, breadth-first-search Problem: DFS BFS with cost in PROLOG find the total cost of traveling from the start node to the end node using breadth-first search and depth-first search using prolog. Given here the st...
DFS BFS with cost in PROLOG DFS BFS with cost in PROLOG prolog depth-first-search breadth-first-search DFS BFS PROLOG DFS BFS with cost in PROLOG find the total cost of traveling from the start node to the end node using breadth-first search and depth-first search using prolog. Given here the start node as node “0” and...
[ 0.044189453125, 0.03076171875, -0.0162353515625, 0.01361083984375, -0.00165557861328125, -0.0031585693359375, -0.0191650390625, 0.01202392578125, -0.0021514892578125, -0.034423828125, 0.00823974609375, -0.029541015625, -0.002197265625, -0.0018768310546875, 0.015625, -0.01361083984375, ...
[ 391, 36381, 335, 678, 11034, 23, 10514, 47510, 502, 4867, 168867, 13448, 271, 86250, 179967, 927, 7413, 3622, 26983, 214, 1295, 4034, 110, 112, 47, 3564, 33938, 136, 17368, 237, 2389, 617, 121303, 37067, 2499, 6626, 988, 18695, 17721, 838...
[ 0.0662841796875, 0.2340087890625, 0.0960693359375, 0.08203125, 0.2406005859375, 0.051910400390625, 0.1812744140625, 0.2491455078125, 0.1597900390625, 0.2137451171875, 0.1629638671875, 0.07745361328125, 0.0242462158203125, 0.1688232421875, 0.137451171875, 0.055206298828125, 0.09399414...
embed
29945594_c0
29945594
prolog
0
Title: Convert A String to List in Prolog Problem title: Convert A String to List in Prolog Tags: prolog Problem: Convert A String to List in Prolog I am a Prolog newbie and am stuck at parsing a string to a list. I have a string of the form. I want to read polynomial as String and convert it into String. I want to con...
Convert A String to List in Prolog Convert A String to List in Prolog prolog Convert List Prolog Convert A String to List in Prolog I am a Prolog newbie and am stuck at parsing a string to a list. I have a string of the form. I want to read polynomial as String and convert it into String. I want to convert the input St...
[ -0.004119873046875, 0.003387451171875, -0.01385498046875, 0.03369140625, -0.014404296875, 0.0284423828125, 0.0018157958984375, -0.01220703125, -0.002593994140625, -0.0177001953125, 0.01458740234375, -0.00494384765625, -0.015869140625, -0.00653076171875, -0.013916015625, 0.0216064453125...
[ 1657, 11549, 23351, 214, 47, 32036, 23, 1250, 4867, 62, 502, 9014, 179933, 366, 6953, 79315, 5303, 3173, 3444, 12301, 35874, 1687, 15403, 237, 96760, 3934, 107730, 69307, 123309 ]
[ 0.0217437744140625, 0.14892578125, 0.2318115234375, 0.152587890625, 0.09027099609375, 0.23388671875, 0.0221710205078125, 0.1390380859375, 0.2413330078125, 0.02423095703125, 0.093994140625, 0.0701904296875, 0.0537109375, 0.05474853515625, 0.02197265625, 0.181640625, 0.1575927734375, ...
embed
8287948_c0
8287948
prolog
0
Title: Facts in Prolog Problem title: Facts in Prolog Tags: prolog Problem: Facts in Prolog I'm writing a program about roads... For example I have road(1, a, b, 2) (road no. 1 from a to b taking up 2 units of fuel). The point is if I have road(1, a, b, 2) I must also have road(1, b, a, 2) but if I use one I cannot use...
Facts in Prolog Facts in Prolog prolog Facts Prolog Facts in Prolog I'm writing a program about roads... For example I have road(1, a, b, 2) (road no. 1 from a to b taking up 2 units of fuel). The point is if I have road(1, a, b, 2) I must also have road(1, b, a, 2) but if I use one I cannot use another, otherwise the ...
[ 0.0235595703125, 0.000637054443359375, 0.00384521484375, -0.00494384765625, -0.01422119140625, -0.0004711151123046875, -0.000537872314453125, -0.00579833984375, 0.01007080078125, -0.0380859375, 0.004302978515625, 0.005340576171875, -0.0238037109375, -0.00494384765625, 0.0023040771484375,...
[ 132640, 7, 23, 1250, 4867, 502, 32562, 1528, 1672, 33816, 765, 41600, 876, 4958, 52562, 110, 106, 1295, 47, 35971, 1257, 116, 25072, 111, 160692, 6275, 2174, 8110, 2843, 4527, 1632, 53418, 15700, 1221, 40956, 33022, 221, 70, 15824 ]
[ 0.2183837890625, 0.0762939453125, 0.08526611328125, 0.178955078125, 0.265869140625, 0.13427734375, 0.13916015625, 0.1636962890625, 0.03289794921875, 0.206298828125, 0.063232421875, 0.0163116455078125, 0.0684814453125, 0.07110595703125, 0.1744384765625, 0.035980224609375, 0.0470581054...
embed
67626654_c0
67626654
prolog
0
Title: How to check if a number is power of 2 Problem title: How to check if a number is power of 2 Tags: prolog Problem: How to check if a number is power of 2 I want to create a function that takes a number and checks if this number is power of 2. Like: fn(0) is no, fn(1) is yes, fn(2) is yes, fn(3) is no etc... I tr...
How to check if a number is power of 2 How to check if a number is power of 2 prolog How How to check if a number is power of 2 I want to create a function that takes a number and checks if this number is power of 2. Like: fn(0) is no, fn(1) is yes, fn(2) is yes, fn(3) is no etc... I tried to make a power function like...
[ 0.00848388671875, -0.0107421875, 0.01806640625, 0.00787353515625, -0.0029754638671875, 0.0140380859375, -0.0184326171875, 0.0020751953125, -0.005706787109375, -0.038330078125, 0.00531005859375, -0.0079345703125, -0.03759765625, 0.01031494140625, 0.00225830078125, 0.0172119140625, 0.0...
[ 11249, 47, 12765, 2174, 14012, 83, 14537, 111, 116, 502, 4867, 10, 3444, 28282, 32354, 51776, 787, 14783, 177609, 110, 27750, 72272, 40970, 69829, 37842, 3249, 839, 605, 1052, 4488, 26458, 54753, 50490, 4358 ]
[ 0.07330322265625, 0.09375, 0.1917724609375, 0.116455078125, 0.2025146484375, 0.1138916015625, 0.2191162109375, 0.1907958984375, 0.2293701171875, 0.134765625, 0.1656494140625, 0.01458740234375, 0.038116455078125, 0.06842041015625, 0.1319580078125, 0.05474853515625, 0.18798828125, 0....
embed
53896488_c0
53896488
prolog
0
Title: How to get simple elements from term? Problem title: How to get simple elements from term? Tags: prolog Problem: How to get simple elements from term? I want to get simple elements from term and return them in list. My code: getSimple(T, R) :- compound(T), T =.. [_|R] This query works getSimple(f(1, 2, a), X) Ex...
How to get simple elements from term? How to get simple elements from term? prolog term How How to get simple elements from term? I want to get simple elements from term and return them in list. My code: This query works Example: This query returns wrong result: Example: Expected:
[ 0.01104736328125, 0.006561279296875, -0.0096435546875, 0.0091552734375, -0.01422119140625, -0.002288818359375, 0.0016021728515625, 0.0137939453125, -0.001556396484375, -0.05029296875, 0.0303955078125, 0.0079345703125, -0.0281982421875, 0.01220703125, -0.01007080078125, 0.00046539306640...
[ 11249, 47, 2046, 8781, 80854, 1295, 13579, 502, 4867, 3444, 30646, 5303, 18151, 41, 1294, 43240, 44691, 16750, 89536, 60075, 13 ]
[ 0.061767578125, 0.0679931640625, 0.1153564453125, 0.2313232421875, 0.2296142578125, 0.1279296875, 0.269775390625, 0.10498046875, 0.1656494140625, 0.034149169921875, 0.09808349609375, 0.1141357421875, 0.0673828125, 0.054901123046875, 0.032928466796875, 0.0234527587890625, 0.0706787109...
embed
60468428_c1
60468428
prolog
1
T3]] | [H2|T2]], [[T|T3]] | [H2|T2]]). queue(X, Y) remove_from_q( queue(X,[H|T]), queue(H,T). How do I define and work with a structure in Prolog, how would I add what would be in a OO language methods such as getHead or getTail , I have seen examples of how you would do this with just lists but I am not working with a...
T3]] | [H2|T2]], [[T|T3]] | [H2|T2]]). queue(X, Y) remove_from_q( queue(X,[H|T]), queue(H,T). How do I define and work with a structure in Prolog, how would I add what would be in a OO language methods such as getHead or getTail , I have seen examples of how you would do this with just lists but I am not working with a...
[ 0.046142578125, 0.0223388671875, -0.01416015625, 0.02197265625, -0.0145263671875, -0.003936767578125, 0.0098876953125, -0.03076171875, 0.0098876953125, -0.026123046875, 0.016845703125, 0.00616455078125, 0.00787353515625, -0.01171875, -0.0205078125, -0.0206298828125, 0.002716064453125...
[ 384, 96386, 841, 304, 618, 90173, 41, 13388, 1542, 990, 87388, 161063, 864, 61924, 4488, 678, 45646, 23, 1250, 4867, 15190, 30563, 46876, 150624, 2046, 13025, 712, 9874, 379, 27781, 5303, 20697, 944, 6626, 84797, 133903, 72856, 28864, 26073...
[ 0.05523681640625, 0.1395263671875, 0.04248046875, 0.046417236328125, 0.061920166015625, 0.012603759765625, 0.132568359375, 0.13427734375, 0.04302978515625, 0.08184814453125, 0.166015625, 0.1798095703125, 0.119140625, 0.16796875, 0.10418701171875, 0.1148681640625, 0.2432861328125, 0...
embed
37209489_c1
37209489
prolog
1
ua, Ukahama, Nqdwingi], []), s([Nqdwingi, Falup, Nqflua], []), is_set([Nqrrroah, Nqblubh, Nqflua, Nqdwingi, Nqlhalha, Ukahama, Mhboa, Sharabrab, Falup]). %is_set is True if the List is a proper list without duplicates We defined our grammar with the whole goldfish, shark, swim... before and that works absolutely correc...
ua, Ukahama, Nqdwingi], []), s([Nqdwingi, Falup, Nqflua], []), is_set([Nqrrroah, Nqblubh, Nqflua, Nqdwingi, Nqlhalha, Ukahama, Mhboa, Sharabrab, Falup]). %is_set is True if the List is a proper list without duplicates We defined our grammar with the whole goldfish, shark, swim... before and that works absolutely correc...
[ -0.0087890625, 0.01318359375, -0.0014495849609375, 0.011962890625, -0.017333984375, 0.0026702880859375, 0.00982666015625, 0.00017833709716796875, 0.01007080078125, 0.02685546875, -0.000782012939453125, -0.00049591064453125, 0.009521484375, 0.002685546875, -0.0021209716796875, 0.0052490...
[ 75, 11, 345, 161, 72883, 541, 864, 38164, 22242, 91, 22225, 2037, 18026, 83, 3509, 18304, 1366, 47491, 5871, 99247, 4200, 528, 76027, 26520, 16977, 1745, 164, 87599, 32036, 27798, 5303, 15490, 171763, 61924, 2446, 122092, 147, 678, 28271, ...
[ 0.08074951171875, 0.08953857421875, 0.06689453125, 0.0828857421875, 0.2509765625, 0.00408935546875, 0.076171875, 0.0946044921875, 0.21533203125, 0.0946044921875, 0.0579833984375, 0.1588134765625, 0.1861572265625, 0.145263671875, 0.2279052734375, 0.18359375, 0.138427734375, 0.123657...
embed
21764562_c0
21764562
prolog
0
Title: Simple Prolog setof Problem title: Simple Prolog setof Tags: prolog-setof, logic, prolog Problem: Simple Prolog setof this is simple yet cannot seem to grasp it I have these "colors" color(blue). color(red). color(white). using setof I need to get all possible combinations of these colors in a list It would be g...
Simple Prolog setof Simple Prolog setof prolog-setof logic prolog Simple Prolog Colors Simple Prolog setof this is simple yet cannot seem to grasp it I have these "colors" using setof I need to get all possible combinations of these colors in a list It would be great if you can provide a brief explanation. I tried this...
[ 0.005218505859375, 0.0006256103515625, 0.006195068359375, 0.017333984375, -0.0142822265625, 0.006744384765625, -0.01611328125, 0.00799560546875, 0.00726318359375, -0.03076171875, -0.00860595703125, 0.005157470703125, 0.01361083984375, 0.00653076171875, -0.004364013671875, 0.01062011718...
[ 60552, 1250, 4867, 5423, 4390, 502, 3509, 62775, 51193, 903, 8781, 14373, 53418, 48903, 47, 27689, 254, 442, 6097, 46133, 17368, 3871, 2046, 756, 7722, 162515, 111, 104988, 5303, 186, 59335, 187136, 5, 37842, 41, 1294, 1542, 78457, 25251, ...
[ 0.1715087890625, 0.1328125, 0.234130859375, 0.1749267578125, 0.2318115234375, 0.08306884765625, 0.1490478515625, 0.11279296875, 0.226318359375, 0.037445068359375, 0.1409912109375, 0.042877197265625, 0.0955810546875, 0.055999755859375, 0.03350830078125, 0.0927734375, 0.092041015625, ...
embed
36816529_c1
36816529
prolog
1
unhill',_,_), Hs), next(h(_,_,blend,_,_), h(_,cat,_,_,_), Hs), member(h(_,_,'Blue Master',beer,_), Hs), member(h(german,_,'Prince',_,_), Hs), next(h(norwegian,_,_,_,_), h(_,_,_,_,blue), Hs), next(h(_,_,'Blend',_,_), h(_,_,_,water,_), Hs), member(h(_,fish,_,_,_), Hs). next(A, B, Ls) :- append(_, [A,B|_], Ls). next(A, B,...
unhill',_,_), Hs), next(h(_,_,blend,_,_), h(_,cat,_,_,_), Hs), member(h(_,_,'Blue Master',beer,_), Hs), member(h(german,_,'Prince',_,_), Hs), next(h(norwegian,_,_,_,_), h(_,_,_,_,blue), Hs), next(h(_,_,'Blend',_,_), h(_,_,_,water,_), Hs), member(h(_,fish,_,_,_), Hs). next(A, B, Ls) :- append(_, [A,B|_], Ls). next(A, B,...
[ -0.006866455078125, 0.009033203125, 0.0128173828125, 0.0267333984375, 0.005126953125, 0.003387451171875, -0.02685546875, 0.0054931640625, 0.01123046875, -0.0216064453125, -0.0042724609375, 0.0108642578125, 0.01275634765625, 0.006988525390625, -0.0191650390625, 0.00087738037109375, -0...
[ 51, 78280, 25, 454, 572, 7, 11737, 127, 2661, 2208, 1096, 4460, 32786, 114567, 18897, 372, 56, 1505, 112079, 329, 13665, 1177, 34958, 143802, 571, 50771, 36448, 84433, 132, 284, 335, 339, 15772, 114689, 71, 58745, 194, 87, 765, 110, 652...
[ 0.1602783203125, 0.306640625, 0.033660888671875, 0.048370361328125, 0.0975341796875, 0.08331298828125, 0.2396240234375, 0.1416015625, 0.1390380859375, 0.1329345703125, 0.140869140625, 0.1595458984375, 0.2093505859375, 0.133544921875, 0.1817626953125, 0.1322021484375, 0.12890625, 0....
embed
33633942_c0
33633942
prolog
0
Title: Prolog, X before Y in a List Problem title: Prolog, X before Y in a List Tags: list, prolog Problem: Prolog, X before Y in a List I am having trouble understanding prolog, I have to find if X is before Y in a list. so I have a base case with an empty list before(X, Y, [ ]). Now I know that I want to check the in...
Prolog, X before Y in a List Prolog, X before Y in a List list prolog Prolog List Prolog, X before Y in a List I am having trouble understanding prolog, I have to find if X is before Y in a list. so I have a base case with an empty list Now I know that I want to check the index of X and the index of Y in List and if in...
[ 0.0059814453125, 0.01171875, 0.0072021484375, 0.00836181640625, -0.0164794921875, 0.0059814453125, -0.0047607421875, -0.003173828125, 0.0142822265625, -0.0025787353515625, 0.0084228515625, -0.0037841796875, -0.024169921875, -0.00830078125, -0.003753662109375, -0.00124359130859375, 0....
[ 1250, 4867, 1193, 8108, 990, 23, 10, 32036, 5303, 502, 63134, 100094, 7413, 2174, 83, 3647, 7225, 201505, 3714, 3444, 47, 12765, 63262, 111, 136, 1542, 4426, 1723, 36272, 73342, 8781, 54, 903 ]
[ 0.1744384765625, 0.277099609375, 0.2003173828125, 0.188720703125, 0.1871337890625, 0.12646484375, 0.035980224609375, 0.22021484375, 0.1932373046875, 0.1351318359375, 0.06396484375, 0.0704345703125, 0.1080322265625, 0.0760498046875, 0.06463623046875, 0.1038818359375, 0.073486328125, ...
embed
48808531_c0
48808531
prolog
0
Title: Declaring a global variable / alias Problem title: Declaring a global variable / alias Tags: prolog Problem: Declaring a global variable / alias In several places in my prolog code I am using a predicate of the form: node(state([7,0],[11,0]), 0, [], []). Instead of having to retype it every time, I want to assoc...
Declaring a global variable / alias Declaring a global variable / alias prolog Declaring Declaring a global variable / alias In several places in my prolog code I am using a predicate of the form: Instead of having to retype it every time, I want to associate it to an alias, so that I can rapidly change it in the futur...
[ 0.007080078125, 0.0030364990234375, -0.0079345703125, 0.000904083251953125, -0.01031494140625, 0.024169921875, 0.0024871826171875, 0.0135498046875, 0.016845703125, -0.033935546875, 0.0172119140625, -0.00225830078125, -0.01080322265625, -0.0098876953125, 0.01446533203125, 0.009399414062...
[ 25755, 320, 7964, 77336, 248, 55109, 214, 502, 4867, 40368, 44677, 18151, 17368, 1653, 2063, 67, 111, 3173, 175399, 456, 50986, 11907, 1733, 3444, 30699, 47, 142, 25545, 15549, 22690, 15490, 110527, 163846 ]
[ 0.1292724609375, 0.16748046875, 0.19287109375, 0.26611328125, 0.047698974609375, 0.273193359375, 0.0194549560546875, 0.1556396484375, 0.2322998046875, 0.046630859375, 0.06085205078125, 0.16162109375, 0.1170654296875, 0.1697998046875, 0.212890625, 0.135986328125, 0.00469970703125, 0...
embed
5520728_c1
5520728
prolog
1
verb(H))):- verb(H). vp([H|Rest],vp(verb(H),RestParsed),Rem):- verb(H), pp(Rest, RestParsed, Rem). vp([H|Rest],vp(verb(H),RestParsed),Rem):- verb(H), np(Rest, RestParsed, Rem). det(the). det(with). noun(cat). noun(mat). noun(mouse). noun(rabbit). noun(moon). verb(sat). verb(ate). verb(ran_away). prep(on). adj(big). adj...
verb(H))):- verb(H). vp([H|Rest],vp(verb(H),RestParsed),Rem):- verb(H), pp(Rest, RestParsed, Rem). vp([H|Rest],vp(verb(H),RestParsed),Rem):- verb(H), np(Rest, RestParsed, Rem). det(the). det(with). noun(cat). noun(mat). noun(mouse). noun(rabbit). noun(moon). verb(sat). verb(ate). verb(ran_away). prep(on). adj(big). adj...
[ -0.0009307861328125, -0.006256103515625, 0.0033111572265625, 0.010986328125, -0.0019378662109375, 0.01434326171875, 0.0045166015625, 0.010986328125, 0.01904296875, -0.04345703125, 0.0177001953125, -0.009765625, -0.016845703125, -0.0027008056640625, -0.0150146484375, 0.02392578125, -0...
[ 42792, 132, 841, 32149, 12, 9, 194, 81, 254, 58745, 1052, 525, 334, 81465, 28636, 5281, 4332, 39, 2077, 32261, 49756, 38645, 25037, 149, 2347, 76228, 110, 309, 4460, 2227, 432, 4032, 16977, 3137, 59533, 6489, 2182, 1603, 72274, 64503, 1...
[ 0.28173828125, 0.013671875, 0.2247314453125, 0.17822265625, 0.0692138671875, 0.049560546875, 0.031585693359375, 0.0654296875, 0.0750732421875, 0.01336669921875, 0.048828125, 0.1275634765625, 0.00677490234375, 0.149658203125, 0.09716796875, 0.0953369140625, 0.053009033203125, 0.1370...
embed
54937054_c0
54937054
prolog
0
Title: PROLOG Stack overflow recursive multiply Problem title: PROLOG Stack overflow recursive multiply Tags: prolog Problem: PROLOG Stack overflow recursive multiply multiply(A,0,0). multiply(A,B,C) :- D is B-1, multiply(A,D,E), C is E+A. After using this rule once and Prolog returns an answer, if I want it to continu...
PROLOG Stack overflow recursive multiply PROLOG Stack overflow recursive multiply prolog PROLOG Stack B-1 PROLOG Stack overflow recursive multiply After using this rule once and Prolog returns an answer, if I want it to continue searching (prompts A = 5 ? and I hit ;), Prolog crashes. I don't understand why? Would anyo...
[ -0.01324462890625, 0.031982421875, 0.01190185546875, 0.03955078125, -0.015380859375, -0.00323486328125, -0.023193359375, 0.007080078125, 0.0108642578125, -0.03515625, -0.01287841796875, -0.019775390625, -0.000701904296875, -0.00494384765625, 0.036865234375, -0.0142822265625, 0.026611...
[ 10514, 47510, 6512, 2594, 645, 118664, 195625, 5844, 6024, 62479, 502, 4867, 335, 5759, 17368, 903, 79986, 24145, 1250, 30646, 35166, 3444, 21342, 157318, 3454, 2676, 933, 62, 2203, 190, 705, 87, 5962, 6585, 150631, 90, 28219, 15400, 73342,...
[ 0.1724853515625, 0.25634765625, 0.12255859375, 0.0843505859375, 0.115234375, 0.1807861328125, 0.2105712890625, 0.0950927734375, 0.146240234375, 0.2386474609375, 0.0921630859375, 0.277099609375, 0.0364990234375, 0.053131103515625, 0.0831298828125, 0.0556640625, 0.1702880859375, 0.15...
embed
64689162_c3
64689162
prolog
3
2020), Code signals: Prolog, Get, Total, Royalty, Monthly, Cost, A255, Distributor, CSI, Las, Vegas, DVD, Streaming, A566, Ghost, Hunters, Cinema, A897, Sherlock, Holmes, BlueRay, TVP, A123, Lion, King, A453, A690, Robo, Siglo, Contract, A540, A120, A234, product_type, Film, Serie, Argentina, Zeland, Albania, get_net_...
2020), Code signals: Prolog, Get, Total, Royalty, Monthly, Cost, A255, Distributor, CSI, Las, Vegas, DVD, Streaming, A566, Ghost, Hunters, Cinema, A897, Sherlock, Holmes, BlueRay, TVP, A123, Lion, King, A453, A690, Robo, Siglo, Contract, A540, A120, A234, product_type, Film, Serie, Argentina, Zeland, Albania, get_net_...
[ 0.01019287109375, 0.006683349609375, -0.006683349609375, 0.0179443359375, -0.0007781982421875, -0.01068115234375, 0.007415771484375, 0.02001953125, 0.022216796875, 0.003265380859375, 0.0027008056640625, -0.004608154296875, -0.0050048828125, -0.0205078125, -0.0147705078125, 0.0059204101...
[ 11075, 247, 28864, 26073, 7, 12, 1250, 4867, 4, 20779, 33867, 25674, 939, 12982, 127, 538, 63099, 62, 135455, 75571, 1290, 6, 170687, 5599, 49190, 12352, 163274, 186225, 130966, 134327, 40572, 1019, 14773, 204860, 146288, 22928, 117707, 1910,...
[ 0.265380859375, 0.197998046875, 0.298583984375, 0.285888671875, 0.1502685546875, 0.07080078125, 0.2083740234375, 0.2802734375, 0.08355712890625, 0.172119140625, 0.1947021484375, 0.174560546875, 0.164794921875, 0.1466064453125, 0.1160888671875, 0.118896484375, 0.2210693359375, 0.148...
embed
59052682_c0
59052682
prolog
0
Title: How to retrieve elements of a list of lists recursively in Prolog? Problem title: How to retrieve elements of a list of lists recursively in Prolog? Tags: prolog Problem: How to retrieve elements of a list of lists recursively in Prolog? Assume you have a list like: L = [1,2, [4,5, [6], [7,8,9]], [1,2]]. Q: How ...
How to retrieve elements of a list of lists recursively in Prolog? How to retrieve elements of a list of lists recursively in Prolog? prolog How Prolog How to retrieve elements of a list of lists recursively in Prolog? It seems difficult when the depth of the lists can be arbitrary..
[ 0.005706787109375, -0.00077056884765625, 0.00823974609375, 0.0084228515625, -0.0034942626953125, 0.021484375, 0.00958251953125, -0.0166015625, -0.001953125, -0.032958984375, 0.0198974609375, -0.0224609375, -0.012451171875, -0.011474609375, 0.009521484375, -0.00640869140625, 0.0141601...
[ 11249, 456, 3996, 3134, 80854, 5303, 195625, 5844, 538, 1250, 4867, 47, 111, 7, 23, 502, 37202, 34844, 168867, 831, 61799 ]
[ 0.053863525390625, 0.096435546875, 0.155029296875, 0.11090087890625, 0.181640625, 0.201171875, 0.2188720703125, 0.169677734375, 0.057861328125, 0.1695556640625, 0.2474365234375, 0.02264404296875, 0.0228729248046875, 0.03375244140625, 0.0258026123046875, 0.0911865234375, 0.01369476318...
embed
23959757_c0
23959757
prolog
0
Title: Prolog combine two lists Problem title: Prolog combine two lists Tags: nested-lists, prolog, list Problem: Prolog combine two lists For example I have A = [a,b,c,d] and B = [[q,w,e],[r,t],[y,u],[i,o]] and I want to create pairs like that C = [[a,[q,w,e]],[b,[r,t]],[c,[y,u]],[d,[i,o]]]. I can create list of pairs...
Prolog combine two lists Prolog combine two lists nested-lists prolog list Prolog Prolog combine two lists For example I have A = [a,b,c,d] and B = [[q,w,e],[r,t],[y,u],[i,o]] and I want to create pairs like that C = [[a,[q,w,e]],[b,[r,t]],[c,[y,u]],[d,[i,o]]]. I can create list of pairs, but I don't want to combine ev...
[ 0.00689697265625, 0.028076171875, 0.00244140625, 0.025146484375, -0.01019287109375, 0.037353515625, -0.0162353515625, -0.004180908203125, 0.002471923828125, -0.0230712890625, 0.00958251953125, -0.009765625, 0.00482177734375, 0.00061798095703125, -0.01434326171875, -0.00689697265625, ...
[ 1250, 4867, 70163, 6626, 5303, 8512, 71, 6562, 502, 7, 27781, 765, 62, 2203, 275, 238, 335, 864, 434, 13, 42, 18, 53, 34, 14, 31, 3444, 28282, 80836, 1884, 313, 831, 111, 1284, 2301, 30309, 678, 12638, 3789, 23468, 3917, 54, 155965,...
[ 0.1795654296875, 0.2420654296875, 0.25048828125, 0.1871337890625, 0.26416015625, 0.19580078125, 0.1131591796875, 0.2349853515625, 0.138916015625, 0.012725830078125, 0.030517578125, 0.038665771484375, 0.0689697265625, 0.039031982421875, 0.031829833984375, 0.050323486328125, 0.05523681...
embed
16634200_c0
16634200
prolog
0
Title: How to sort by key AND value in SICStus Prolog? Problem title: How to sort by key AND value in SICStus Prolog? Tags: prolog, sorting Problem: How to sort by key AND value in SICStus Prolog? I have a list like L = [0-4, 0-3, 3-5, 1-2] and I would like to sort the list by key and value so the result would be L = [...
How to sort by key AND value in SICStus Prolog? How to sort by key AND value in SICStus Prolog? prolog sorting How SICStus Prolog How to sort by key AND value in SICStus Prolog? I have a list like and I would like to sort the list by key and value so the result would be I found keysort but it sorts only by key. I can w...
[ -0.0052490234375, 0.0179443359375, -0.00848388671875, -0.0341796875, -0.0169677734375, -0.004852294921875, -0.0191650390625, -0.0079345703125, -0.00555419921875, -0.01409912109375, 0.00933837890625, 0.038818359375, -0.0003814697265625, -0.0174560546875, -0.00180816650390625, -0.0225830...
[ 11249, 47, 12096, 390, 22799, 48762, 34292, 159, 102198, 2143, 1250, 4867, 23, 502, 214, 5303, 1884, 136, 16750, 14037, 62351, 4734, 33022, 35978, 3871, 93766, 29806 ]
[ 0.07781982421875, 0.04620361328125, 0.2332763671875, 0.1005859375, 0.22900390625, 0.2100830078125, 0.2069091796875, 0.08807373046875, 0.07171630859375, 0.1981201171875, 0.138671875, 0.2305908203125, 0.031463623046875, 0.1148681640625, 0.04010009765625, 0.117919921875, 0.0300140380859...
embed
12002356_c0
12002356
prolog
0
Title: deduction from two goals Problem title: deduction from two goals Tags: prolog Problem: deduction from two goals Suppose I have such goals: times(0,_,0). % zero times X is zero times(X,Y,Z) :- times(Y,X,Z) ,!. % X * Y = Y * X When I try to ask: ?- times(0,1,X). I get the double answer : X = 0 ; X = 0. Possibly be...
deduction from two goals deduction from two goals prolog two deduction from two goals Suppose I have such goals: When I try to ask: I get the double answer : Possibly because first answer is deduced from the fact and second - from the rule . Question - how to make prolog to give only one answer instead of two ?
[ 0.0098876953125, 0.010498046875, 0.00787353515625, 0.0098876953125, -0.0040283203125, -0.013427734375, -0.0184326171875, 0.00885009765625, -0.00439453125, -0.053955078125, -0.00836181640625, -0.0079345703125, -0.005645751953125, 0.00750732421875, -0.01153564453125, 0.0106201171875, 0...
[ 8, 77391, 1295, 6626, 109458, 502, 4867, 765, 6044, 9790, 26458, 2046, 70, 41929, 35166, 115861, 38526, 6637, 5117, 106357, 15824, 136, 17932, 79986, 3642, 3249, 47, 8337, 4734, 1632, 64457 ]
[ 0.158447265625, 0.1812744140625, 0.0902099609375, 0.168701171875, 0.2264404296875, 0.1658935546875, 0.2415771484375, 0.001224517822265625, 0.016998291015625, 0.075927734375, 0.1346435546875, 0.02630615234375, 0.0034847259521484375, 0.1768798828125, 0.2105712890625, 0.057037353515625, ...
embed
67012233_c0
67012233
prolog
0
Title: Writing a union operation in prolog for multisets Problem title: Writing a union operation in prolog for multisets Tags: multiset, prolog Problem: Writing a union operation in prolog for multisets In the prolog there is a standard way to define union of two sets But I want to write union function for multisets. ...
Writing a union operation in prolog for multisets Writing a union operation in prolog for multisets multiset prolog Writing Writing a union operation in prolog for multisets In the prolog there is a standard way to define union of two sets But I want to write union function for multisets. That would mean if first set h...
[ 0.01708984375, 0.0302734375, 0.01007080078125, -0.008056640625, -0.0096435546875, 0.0037689208984375, -0.0159912109375, -0.0023956298828125, 0.017333984375, -0.0299072265625, -0.000020265579223632812, 0.0164794921875, 0.00848388671875, 0.004364013671875, -0.00157928466796875, 0.0133056...
[ 213185, 69941, 41018, 502, 4867, 100, 6024, 3509, 23, 5570, 3917, 61924, 111, 6626, 5423, 3444, 33022, 32354, 29459, 2174, 5117, 1556, 68252, 4, 90173, 17932, 155761, 140992, 5608, 133063, 1672, 32562, 6044, 5 ]
[ 0.180419921875, 0.29833984375, 0.2109375, 0.169189453125, 0.214111328125, 0.057861328125, 0.202392578125, 0.26123046875, 0.00408935546875, 0.1220703125, 0.035400390625, 0.14892578125, 0.032928466796875, 0.13671875, 0.2449951171875, 0.0633544921875, 0.18115234375, 0.1923828125, 0....
embed
15146810_c0
15146810
prolog
0
Title: Getting the product of a list from left to right Problem title: Getting the product of a list from left to right Tags: prolog Problem: Getting the product of a list from left to right How do you get the product of a list from left to right? For example: ?- product([1,2,3,4], P). P = [1, 2, 6, 24] . I think one w...
Getting the product of a list from left to right Getting the product of a list from left to right prolog left Getting Lst Getting the product of a list from left to right How do you get the product of a list from left to right? For example: I think one way is to overload the functor and use 3 arguments: product([H|T], ...
[ 0.00823974609375, 0.0240478515625, 0.01531982421875, 0.001617431640625, -0.0172119140625, -0.0019989013671875, -0.01226806640625, -0.00127410888671875, -0.000331878662109375, -0.044189453125, 0.00897216796875, 0.0101318359375, -0.0284423828125, -0.00946044921875, 0.00390625, -0.0053100...
[ 210732, 70, 12996, 111, 5303, 1295, 25737, 47, 7108, 10, 502, 4867, 339, 271, 11249, 54, 398, 2046, 27781, 5351, 3917, 645, 63033, 7477, 18770, 4527, 138, 10750, 841, 58745, 618, 15772, 572, 9077 ]
[ 0.1409912109375, 0.0968017578125, 0.288330078125, 0.111572265625, 0.2261962890625, 0.1170654296875, 0.187255859375, 0.13720703125, 0.199951171875, 0.00445556640625, 0.106201171875, 0.16943359375, 0.051513671875, 0.1240234375, 0.03558349609375, 0.0235748291015625, 0.01611328125, 0.1...
embed
34661810_c0
34661810
prolog
0
Title: Splitting list based on conditional atoms in prolog Problem title: Splitting list based on conditional atoms in prolog Tags: swi-prolog, prolog Problem: Splitting list based on conditional atoms in prolog I have a list X = [-n,-b,-s,hello,world] The output i require Z1 = [-n,-b,-s] Z2 = [hello,world] If the stri...
Splitting list based on conditional atoms in prolog Splitting list based on conditional atoms in prolog swi-prolog prolog Splitting Splitting list based on conditional atoms in prolog I have a list The output i require If the string begins with - it should be part of Z1 list, else part of Z2 list. Could someone provide...
[ -0.00191497802734375, -0.007293701171875, -0.01092529296875, 0.029296875, -0.0164794921875, 0.0130615234375, 0.01318359375, 0.02880859375, -0.006927490234375, 0.0201416015625, 0.01519775390625, -0.002044677734375, -0.0050048828125, -0.01068115234375, 0.00164794921875, 0.025146484375, ...
[ 46474, 1916, 5303, 35509, 35431, 289, 34627, 7, 502, 4867, 2452, 3454, 23, 140992, 64209, 79315, 9842, 678, 5608, 2831, 567, 418, 37076, 304, 62822, 58868, 29479 ]
[ 0.1824951171875, 0.10406494140625, 0.194091796875, 0.0682373046875, 0.1864013671875, 0.1103515625, 0.1953125, 0.0276031494140625, 0.1234130859375, 0.198974609375, 0.1259765625, 0.0892333984375, 0.0204925537109375, 0.144775390625, 0.122314453125, 0.1829833984375, 0.078125, 0.0532226...
embed
9793352_c0
9793352
prolog
0
Title: Prolog Summing Fields in a Database Problem title: Prolog Summing Fields in a Database Tags: prolog Problem: Prolog Summing Fields in a Database I am learning Prolog and I understand how to calculate the sum of a list but I can't figure out how to compute the sum of the fields of a database. Sample database: tas...
Prolog Summing Fields in a Database Prolog Summing Fields in a Database prolog Prolog Summing Fields Database Sample Prolog Summing Fields in a Database I am learning Prolog and I understand how to calculate the sum of a list but I can't figure out how to compute the sum of the fields of a database.
[ 0.0172119140625, 0.0023956298828125, 0.002197265625, 0.031982421875, -0.010986328125, 0.0191650390625, -0.005584716796875, 0.0135498046875, 0.0152587890625, -0.03125, -0.00518798828125, -0.01226806640625, -0.0074462890625, -0.017578125, 0, -0.0096435546875, 0.001556396484375, 0, ...
[ 1250, 4867, 1832, 58838, 117657, 23, 187781, 502, 947, 33209, 52080, 28219, 74481, 10554, 5303, 26366, 3642, 9969, 6743, 111, 44457, 63399 ]
[ 0.144775390625, 0.247314453125, 0.185302734375, 0.184326171875, 0.263671875, 0.0007243156433105469, 0.2093505859375, 0.09295654296875, 0.0091094970703125, 0.07940673828125, 0.03558349609375, 0.03778076171875, 0.1024169921875, 0.2362060546875, 0.12139892578125, 0.040802001953125, 0.02...
embed
53380224_c0
53380224
prolog
0
Title: Define operator in SWI Prolog Problem title: Define operator in SWI Prolog Tags: operators, prolog Problem: Define operator in SWI Prolog I am trying to define an operator in SWI Prolog. :- op(700, xfx, and). when I load file with above line, it returns true , but when I try p and q , I get back: ERROR: Undefine...
Define operator in SWI Prolog Define operator in SWI Prolog operators prolog Define SWI Prolog ERROR Undefined DWIM Define operator in SWI Prolog I am trying to define an operator in SWI Prolog. when I load file with above line, it returns true , but when I try p and q , I get back: I looked through documentation, but ...
[ 0.02978515625, 0.0035552978515625, 0.0184326171875, 0.017578125, -0.00946044921875, 0.01409912109375, 0.000766754150390625, 0.01544189453125, -0.0029449462890625, -0.00726318359375, -0.0012054443359375, -0.0208740234375, 0.0042724609375, -0.0201416015625, 0.012451171875, 0.005493164062...
[ 262, 64552, 39933, 159, 38969, 1250, 4867, 23, 502, 151206, 24638, 79912, 5983, 30439, 17199, 31577, 61924, 72367, 11435, 36917, 13315, 30646, 29568, 9790, 915, 136, 8096, 4420, 209806, 442, 83, 4552, 20187 ]
[ 0.076171875, 0.1806640625, 0.296142578125, 0.0777587890625, 0.2393798828125, 0.1263427734375, 0.204833984375, 0.024627685546875, 0.08355712890625, 0.107177734375, 0.03125, 0.03582763671875, 0.159912109375, 0.10223388671875, 0.1829833984375, 0.0197601318359375, 0.1632080078125, 0.10...
embed
8482825_c0
8482825
prolog
0
Title: Poker Hand in Prolog Problem title: Poker Hand in Prolog Tags: dcg, prolog Problem: Poker Hand in Prolog I am trying to write a predicate to analyse common poker hands; for example given a list of "cards" identify if the player has 4 of a kind; 3 of a kind; pair etc: My idea was to check for similar rank and rem...
Poker Hand in Prolog Poker Hand in Prolog dcg prolog Poker Hand Prolog Poker Hand in Prolog I am trying to write a predicate to analyse common poker hands; for example given a list of "cards" identify if the player has 4 of a kind; 3 of a kind; pair etc: My idea was to check for similar rank and remove if not: this wor...
[ -0.01507568359375, -0.004913330078125, 0.0113525390625, 0.0019378662109375, 0.0005340576171875, 0.015380859375, -0.019287109375, -0.015625, 0.00927734375, -0.0159912109375, -0.002166748046875, 0.0076904296875, 0.0108642578125, -0.0093994140625, -0.01708984375, -0.004913330078125, 0.0...
[ 36450, 10639, 23, 1250, 4867, 177, 502, 31577, 33022, 1653, 2063, 67, 51422, 39210, 25600, 44540, 5303, 38931, 135812, 2174, 58585, 1556, 201, 111, 8562, 74, 138, 80836, 6528, 12765, 100, 21373, 30648, 87388, 959, 43240, 22759, 71258, 68347...
[ 0.1888427734375, 0.2227783203125, 0.07720947265625, 0.15234375, 0.2158203125, 0.057861328125, 0.098876953125, 0.0249481201171875, 0.027862548828125, 0.0657958984375, 0.1009521484375, 0.0280914306640625, 0.12255859375, 0.114013671875, 0.1756591796875, 0.1517333984375, 0.0731201171875,...
embed
14352293_c0
14352293
prolog
0
Title: How to select elements randomly from a list? Problem title: How to select elements randomly from a list? Tags: prolog Problem: How to select elements randomly from a list? The following implementation will loop forever. pick_nums(0,_,_). pick_nums(Count,From,To) :- random_member(X,From), ( member(X,To) -> pick_n...
How to select elements randomly from a list? How to select elements randomly from a list? prolog a How pick_nums Count random_member Count-1 How to select elements randomly from a list? The following implementation will loop forever.
[ -0.0045166015625, 0.0026397705078125, 0.0260009765625, -0.01519775390625, -0.01904296875, 0.014892578125, -0.00836181640625, -0.001678466796875, 0.003021240234375, -0.0277099609375, 0.02099609375, -0.0108642578125, 0.007354736328125, 0.01513671875, 0.01202392578125, -0.01055908203125, ...
[ 11249, 47, 36849, 80854, 96759, 538, 1295, 5303, 502, 4867, 39580, 2606, 7, 108210, 39, 27417, 5759, 25632, 208124, 1221, 40956, 136993 ]
[ 0.0914306640625, 0.06500244140625, 0.20751953125, 0.1993408203125, 0.2117919921875, 0.1151123046875, 0.09942626953125, 0.1995849609375, 0.07354736328125, 0.12548828125, 0.1363525390625, 0.1461181640625, 0.01483154296875, 0.1573486328125, 0.0268402099609375, 0.1602783203125, 0.0980834...
embed
75779187_c1
75779187
prolog
1
< H2. alessx([H,T1], [H,T2]) :- alessx(T1,T2). Apart from the fact that they used variable names like X , Y and so on, which I thought weren't very descriptive, my code seems to be exactly the same as theirs. However, although it is true for the following... aless(a, b). ..it is false for... aless(ab, ac). Anyone able...
< H2. alessx([H,T1], [H,T2]) :- alessx(T1,T2). Apart from the fact that they used variable names like X , Y and so on, which I thought weren't very descriptive, my code seems to be exactly the same as theirs. However, although it is true for the following... aless(a, b). ..it is false for... aless(ab, ac). Anyone able...
[ 0.0208740234375, -0.0014190673828125, 0.000919342041015625, 0.01470947265625, -0.01239013671875, -0.000823974609375, 0.00982666015625, -0.010009765625, 0.0087890625, 0.017578125, 0.025146484375, 0.0130615234375, -0.003662109375, 0.00823974609375, 0.01348876953125, -0.020263671875, 0....
[ 4426, 572, 5442, 10, 9393, 425, 132, 841, 618, 76172, 4, 90173, 15772, 418, 10461, 11814, 77336, 123055, 1193, 990, 17569, 32032, 759, 18151, 37202, 66161, 5701, 2363, 102971, 442, 29568, 25632, 11, 876, 83, 98320, 100, 2055, 1030, 19048,...
[ 0.1087646484375, 0.14453125, 0.200439453125, 0.1029052734375, 0.25927734375, 0.221435546875, 0.0204010009765625, 0.172607421875, 0.09716796875, 0.1285400390625, 0.01123046875, 0.18359375, 0.0289764404296875, 0.0887451171875, 0.191650390625, 0.060089111328125, 0.1910400390625, 0.070...
embed
40324211_c0
40324211
prolog
0
Title: Prolog can somebody explain this recursion Problem title: Prolog can somebody explain this recursion Tags: prolog Problem: Prolog can somebody explain this recursion Can someone explain how the following Prolog recursion works ? findRoute(A,A,_). findRoute(A,C,Path) :- nextCnvZone(A,B), \+ member(B,Path), findRo...
Prolog can somebody explain this recursion Prolog can somebody explain this recursion prolog Prolog Path Prolog can somebody explain this recursion Can someone explain how the following Prolog recursion works ? I can understand the second part but could not understand the first part i.e what is the first findRoute(A,A,...
[ 0.010498046875, 0.0205078125, 0.007537841796875, 0.037353515625, 0.011962890625, -0.003173828125, 0.0022735595703125, 0.005340576171875, 0.009521484375, -0.02587890625, 0.002105712890625, 0.0111083984375, -0.005584716796875, 0.0167236328125, 0.0159912109375, -0.01025390625, -0.008056...
[ 1250, 4867, 831, 176256, 73342, 903, 195625, 1830, 502, 108421, 22008, 3642, 25632, 43240, 28219, 17932, 2831, 5809, 959, 5117, 2367, 7413, 12724, 6743, 284, 4, 454, 194, 20594 ]
[ 0.16943359375, 0.2337646484375, 0.0116424560546875, 0.0941162109375, 0.180908203125, 0.07177734375, 0.2069091796875, 0.12054443359375, 0.11016845703125, 0.180419921875, 0.00638580322265625, 0.049468994140625, 0.10125732421875, 0.12255859375, 0.12127685546875, 0.059844970703125, 0.062...
embed
42452680_c0
42452680
prolog
0
Title: Prolog methods not calling base case Problem title: Prolog methods not calling base case Tags: prolog Problem: Prolog methods not calling base case I am trying to build a program that takes two integers (for example, 4 and 15) and returns the multiples of the first integer that divide into the second integer. My...
Prolog methods not calling base case Prolog methods not calling base case prolog Prolog divisible_ext Call _G9543 Fail Redo Exit _G9622 _G9625 _G9628 _G9631 Prolog methods not calling base case I am trying to build a program that takes two integers (for example, 4 and 15) and returns the multiples of the first integer ...
[ -0.0123291015625, 0.0089111328125, 0.03857421875, 0.004638671875, -0.0076904296875, 0.0152587890625, -0.0269775390625, -0.02099609375, 0.025390625, -0.01190185546875, 0.00543212890625, 0.002593994140625, 0.01312255859375, 0.0269775390625, 0.0074462890625, -0.00048828125, 0.0238037109...
[ 1250, 4867, 150624, 959, 159029, 3647, 7225, 502, 45, 99017, 3355, 18, 26265, 724, 8821, 11548, 190355, 6096, 31, 5443, 217, 11648, 4015, 2588, 3882, 5016, 31577, 45367, 1528, 51776, 6626, 892, 26255, 201, 136, 423, 30646, 48716, 5117, 10...
[ 0.16455078125, 0.264404296875, 0.176025390625, 0.0308837890625, 0.175537109375, 0.2489013671875, 0.2396240234375, 0.1080322265625, 0.062744140625, 0.1988525390625, 0.095947265625, 0.02447509765625, 0.1162109375, 0.0108642578125, 0.1065673828125, 0.1339111328125, 0.14208984375, 0.07...
embed
49983371_c0
49983371
prolog
0
Title: Prolog equivalent for haskell concat Problem title: Prolog equivalent for haskell concat Tags: concatenation, list, prolog Problem: Prolog equivalent for haskell concat I am trying to find an equivalent for haskell's concat in prolog. For example lets have a list like this: [[[a],[b]],[[c],[d]]] . And I need thi...
Prolog equivalent for haskell concat Prolog equivalent for haskell concat concatenation list prolog Prolog Prolog equivalent for haskell concat I am trying to find an equivalent for haskell's concat in prolog. For example lets have a list like this: [[[a],[b]],[[c],[d]]] . And I need this list to be concatenated to a l...
[ 0.0125732421875, 0.0167236328125, 0.0169677734375, 0.002288818359375, -0.0029754638671875, 0.012939453125, -0.0166015625, 0.01177978515625, 0.01226806640625, -0.04150390625, -0.007232666015625, -0.0272216796875, -0.0093994140625, -0.0184326171875, -0.003265380859375, -0.00457763671875,...
[ 1250, 4867, 183234, 100, 1556, 142508, 158, 4460, 33, 5303, 502, 31577, 7413, 142, 2633, 1884, 903, 275, 238, 71, 3871, 27686, 47, 11, 37842, 18151, 114689, 29806 ]
[ 0.1568603515625, 0.2431640625, 0.181640625, 0.0283050537109375, 0.1365966796875, 0.197998046875, 0.13330078125, 0.224853515625, 0.090087890625, 0.153564453125, 0.1141357421875, 0.036529541015625, 0.051055908203125, 0.00518798828125, 0.006134033203125, 0.04864501953125, 0.028442382812...
embed
50781714_c1
50781714
prolog
1
Score),Pairs), last(Pairs, BestMotherboard), write(BestMotherboard). I get this: ?- start. 3-Gigabyte B360M Aourus Gaming 3 true ; 4-MSI B350M Mortar true ; 6-ASUS ROG Strix B350-F true ; 7-MSI Z370 Tomahawk true ; 8-Gigabyte Aorus AX370 Gaming K7 true. Code signals: Gigabyte, B360M, Aourus, Gaming, low_range, MSI, B3...
Score),Pairs), last(Pairs, BestMotherboard), write(BestMotherboard). I get this: ?- start. 3-Gigabyte B360M Aourus Gaming 3 true ; 4-MSI B350M Mortar true ; 6-ASUS ROG Strix B350-F true ; 7-MSI Z370 Tomahawk true ; 8-Gigabyte Aorus AX370 Gaming K7 true. Code signals: Gigabyte, B360M, Aourus, Gaming, low_range, MSI, B3...
[ -0.0142822265625, -0.00092315673828125, 0.0091552734375, 0.017822265625, -0.003997802734375, 0.0341796875, -0.00872802734375, -0.0123291015625, 0.01300048828125, -0.00115203857421875, 0.028564453125, 0.00286865234375, 0.010498046875, -0.0179443359375, 0.004486083984375, -0.009582519531...
[ 168071, 247, 8335, 481, 7, 4568, 11345, 594, 126340, 24351, 33022, 110601, 194, 87, 2046, 903, 705, 9, 4034, 5, 5691, 724, 1758, 61028, 335, 38230, 15819, 26890, 131337, 138, 29568, 2819, 7306, 9902, 45160, 5919, 867, 13007, 70603, 147296...
[ 0.208984375, 0.033203125, 0.145751953125, 0.1392822265625, 0.0743408203125, 0.1651611328125, 0.13427734375, 0.1278076171875, 0.1358642578125, 0.2607421875, 0.143310546875, 0.1597900390625, 0.0295257568359375, 0.0653076171875, 0.0877685546875, 0.099365234375, 0.061737060546875, 0.03...
embed
72232401_c0
72232401
prolog
0
Title: Output is a list of three elements [A,B,C] taken from items that together add up to goal. The Output inside the items list in that order Problem title: Output is a list of three elements [A,B,C] taken from items that together add up to goal. The Output inside the items list in that order Tags: prolog Problem: Ou...
Output is a list of three elements [A,B,C] taken from items that together add up to goal. The Output inside the items list in that order Output is a list of three elements [A,B,C] taken from items that together add up to goal. The Output inside the items list in that order prolog items Output Sum Output is a list of th...
[ 0.011474609375, 0.01031494140625, 0.01165771484375, 0.0198974609375, -0.0283203125, 0.007171630859375, -0.0184326171875, 0.000728607177734375, -0.004241943359375, 0.005279541015625, -0.00147247314453125, -0.0166015625, 0.017822265625, 0.01043701171875, 0.01202392578125, 0.0126342773437...
[ 13538, 7077, 83, 10, 5303, 17262, 80854, 284, 571, 441, 39958, 1295, 55769, 25842, 15190, 1257, 47, 69236, 581, 46132, 12989, 502, 4867, 36335, 111, 5, 70, 5608, 3249, 16750, 2203, 29334, 1363, 138, 17497, 82800 ]
[ 0.293701171875, 0.328857421875, 0.140380859375, 0.039581298828125, 0.1785888671875, 0.160400390625, 0.204833984375, 0.0235595703125, 0.03643798828125, 0.04608154296875, 0.1259765625, 0.081298828125, 0.1971435546875, 0.0906982421875, 0.1292724609375, 0.0826416015625, 0.059326171875, ...
embed
73550353_c0
73550353
prolog
0
Title: Fill unbound variables by a range Problem title: Fill unbound variables by a range Tags: prolog, logic, clpfd Problem: Fill unbound variables by a range lets say that L is L = [[1,100,_], [200, _,94]]. I have a code where I use append(List, L), L ins 1..90, ....... L ins 1..90 is false because there are elements...
Fill unbound variables by a range Fill unbound variables by a range prolog logic clpfd Fill List Fill unbound variables by a range lets say that L is L = [[1,100,_], [200, _,94]]. I have a code where I use append(List, L), L ins 1..90, ....... L ins 1..90 is false because there are elements which are not in the domain....
[ -0.004119873046875, 0.00811767578125, 0.01336669921875, -0.01220703125, -0.01708984375, 0.01373291015625, 0.00738525390625, 0.007598876953125, 0.01287841796875, 0.0001392364501953125, -0.0040283203125, -0.013427734375, 0.020751953125, 0.0223388671875, 0.0108642578125, 0.01953125, 0.0...
[ 140423, 51, 99091, 77336, 390, 37457, 502, 4867, 62775, 33139, 39557, 71, 32036, 339, 3559, 5955, 14889, 18151, 114689, 154663, 23, 615, 5039, 98320, 80854, 959, 77758, 3444, 7, 47, 4734, 40140, 18929, 28271, 5303, 3917 ]
[ 0.231201171875, 0.115234375, 0.2103271484375, 0.2548828125, 0.12548828125, 0.2301025390625, 0.1156005859375, 0.1942138671875, 0.131591796875, 0.04034423828125, 0.0797119140625, 0.1046142578125, 0.1673583984375, 0.1116943359375, 0.1365966796875, 0.1231689453125, 0.1885986328125, 0.1...
embed
27259932_c0
27259932
prolog
0
Title: Caesar cipher, how do I pass arguments? Problem title: Caesar cipher, how do I pass arguments? Tags: prolog Problem: Caesar cipher, how do I pass arguments? I'm writing a cipher in Prolog but I'm not sure how to pass arguments so I can both cipher and decipher the input. caesar(L1,L2,L3) :- maplist(cipher, L1, P...
Caesar cipher, how do I pass arguments? Caesar cipher, how do I pass arguments? prolog Caesar string_to_list A-1 Caesar cipher, how do I pass arguments? I'm writing a cipher in Prolog but I'm not sure how to pass arguments so I can both cipher and decipher the input.
[ 0.007232666015625, -0.0130615234375, -0.0233154296875, 0.00167083740234375, -0.005462646484375, -0.0047607421875, 0.019775390625, 0.00180816650390625, 0.007110595703125, -0.0103759765625, -0.009521484375, -0.01361083984375, -0.010498046875, 0.041748046875, -0.007415771484375, -0.007171...
[ 64914, 1059, 94266, 3642, 54, 87, 27875, 10750, 7, 502, 4867, 79315, 188, 6562, 62, 5759, 32562, 23, 1250, 9077, 15044, 136, 32380, 107730 ]
[ 0.2493896484375, 0.1202392578125, 0.2489013671875, 0.0811767578125, 0.03338623046875, 0.0689697265625, 0.1622314453125, 0.2333984375, 0.12353515625, 0.10369873046875, 0.2022705078125, 0.1297607421875, 0.1025390625, 0.157958984375, 0.08001708984375, 0.08770751953125, 0.08172607421875,...
embed
73474087_c0
73474087
prolog
0
Title: I&#x27;m trying to do a voting system using Prolog Problem title: I&#x27;m trying to do a voting system using Prolog Tags: prolog Problem: I'm trying to do a voting system using Prolog My code: voterid(X):- (X>=18), write("Candidate is eligible for casting a vote"). voterid(X):- (X=<18), write("Candidate is not ...
I&#x27;m trying to do a voting system using Prolog I&#x27;m trying to do a voting system using Prolog prolog Prolog Candidate I'm trying to do a voting system using Prolog My code: My query: I want to check the nationality of the voter - must be American to be eligible. How do I do it?
[ 0.01104736328125, -0.00579833984375, 0.0196533203125, 0.018798828125, 0.00799560546875, 0.00193023681640625, 0.007080078125, 0.01025390625, -0.018798828125, -0.0064697265625, 0.004974365234375, -0.0206298828125, -0.01190185546875, -0.02490234375, -0.010986328125, -0.006805419921875, ...
[ 87, 3768, 31577, 54, 20875, 214, 5426, 17368, 1250, 4867, 502, 194215, 13, 18151, 41, 3444, 47, 12765, 70, 15889, 2481, 111, 169454, 8110, 186, 15672, 224943, 11249, 442 ]
[ 0.025177001953125, 0.05059814453125, 0.091552734375, 0.06695556640625, 0.171630859375, 0.09698486328125, 0.1334228515625, 0.075439453125, 0.146240234375, 0.2408447265625, 0.10546875, 0.159912109375, 0.05755615234375, 0.1409912109375, 0.0299072265625, 0.081298828125, 0.04296875, 0.2...
embed
46668250_c0
46668250
prolog
0
Title: Generate random number of 5 digits in Prolog Problem title: Generate random number of 5 digits in Prolog Tags: prolog Problem: Generate random number of 5 digits in Prolog I want to generate a random number of 5 digits using assert/1 and retract/1. I already have the following code, but I don't know how to gener...
Generate random number of 5 digits in Prolog Generate random number of 5 digits in Prolog prolog Generate Prolog random_between Generate random number of 5 digits in Prolog I want to generate a random number of 5 digits using assert/1 and retract/1. I already have the following code, but I don't know how to generate a ...
[ -0.01434326171875, 0.014892578125, 0.0120849609375, -0.00750732421875, -0.0128173828125, 0.0247802734375, -0.0036163330078125, 0.011962890625, 0.015869140625, -0.03955078125, 0.01324462890625, -0.01019287109375, -0.0203857421875, 0.024658203125, 0.02587890625, -0.00150299072265625, 0...
[ 155370, 67, 96759, 14012, 111, 190, 153939, 7, 23, 1250, 4867, 502, 4626, 1177, 33, 3444, 139392, 17368, 237, 33657, 11583, 136, 41499, 15390, 21771, 765, 25632, 18151, 87, 3714, 3642, 47, 678 ]
[ 0.174072265625, 0.06707763671875, 0.21337890625, 0.181396484375, 0.016326904296875, 0.2001953125, 0.226806640625, 0.05194091796875, 0.07421875, 0.1900634765625, 0.2578125, 0.1385498046875, 0.1029052734375, 0.1412353515625, 0.10302734375, 0.074951171875, 0.1973876953125, 0.028945922...
embed
59230969_c0
59230969
prolog
0
Title: How do I open an image in prolog and display it in terminal? Problem title: How do I open an image in prolog and display it in terminal? Tags: terminal, prolog, jpeg, image, display Problem: How do I open an image in prolog and display it in terminal? I'm working on a minesweeper program and would like to know i...
How do I open an image in prolog and display it in terminal? How do I open an image in prolog and display it in terminal? terminal prolog jpeg image display How How do I open an image in prolog and display it in terminal? I'm working on a minesweeper program and would like to know if there is a way to open an image fil...
[ 0.038818359375, 0.007293701171875, -0.00640869140625, 0.013427734375, 0.004669189453125, 0.019775390625, 0.009033203125, -0.002349853515625, 0.0002899169921875, -0.045166015625, 0.01165771484375, 0.0233154296875, -0.0284423828125, 0.0042724609375, 0.009765625, -0.01116943359375, 0.01...
[ 11249, 9803, 29569, 23, 502, 4867, 136, 44116, 442, 33949, 215109, 54, 87, 20697, 5665, 7, 1177, 13, 1264, 1528, 1884, 3714, 3917, 11435, 1295, 86983, 51042, 20271, 38415, 127877 ]
[ 0.06011962890625, 0.1734619140625, 0.2105712890625, 0.0751953125, 0.1619873046875, 0.2318115234375, 0.031005859375, 0.1719970703125, 0.038909912109375, 0.26025390625, 0.2095947265625, 0.01666259765625, 0.000091552734375, 0.036865234375, 0.1258544921875, 0.006988525390625, 0.096801757...
embed
34168304_c0
34168304
prolog
0
Title: How to compare elements in dynamic Problem title: How to compare elements in dynamic Tags: prolog Problem: How to compare elements in dynamic I have two dynamics of /2. One of the lists, lets call it D2 has set values inside of it. For example: 2 and 3, 4 and 5. How can I check if my dynamic 1 aka. D1 has all th...
How to compare elements in dynamic How to compare elements in dynamic prolog How How to compare elements in dynamic I have two dynamics of /2. One of the lists, lets call it D2 has set values inside of it. For example: 2 and 3, 4 and 5. How can I check if my dynamic 1 aka. D1 has all the values inside of it that D2 has...
[ -0.00032806396484375, -0.0150146484375, 0.00360107421875, 0.0012969970703125, -0.004638671875, 0.01141357421875, -0.0052490234375, 0.014892578125, 0.003173828125, -0.0189208984375, 0.01385498046875, 0.01153564453125, 0.0159912109375, -0.0225830078125, -0.0025634765625, -0.0055541992187...
[ 11249, 47, 69101, 80854, 23, 84079, 502, 4867, 6626, 7, 12477, 5303, 391, 304, 1556, 5423, 142424, 46132, 111, 116, 138, 201, 1892, 831, 12765, 2174, 106, 15623, 418, 756, 70, 30646, 29568 ]
[ 0.06591796875, 0.042327880859375, 0.2216796875, 0.220703125, 0.08160400390625, 0.22900390625, 0.139892578125, 0.2034912109375, 0.037353515625, 0.00836181640625, 0.1483154296875, 0.1002197265625, 0.079833984375, 0.1129150390625, 0.03662109375, 0.0880126953125, 0.134033203125, 0.1010...
embed
55273722_c0
55273722
prolog
0
Title: Printing first letter of an atom Prolog Problem title: Printing first letter of an atom Prolog Tags: prolog Problem: Printing first letter of an atom Prolog Print the first letter of two atoms in a list. I can't even get the first letter of one of the two atoms in the list to print. grab_letter([],[]). grab_lett...
Printing first letter of an atom Prolog Printing first letter of an atom Prolog prolog Printing Prolog grab_letter First Second Printing first letter of an atom Prolog Print the first letter of two atoms in a list. I can't even get the first letter of one of the two atoms in the list to print. How do I get it to print ...
[ 0.0216064453125, -0.006072998046875, 0.0017547607421875, 0.037353515625, -0.011474609375, 0.01397705078125, 0.01348876953125, 0.01318359375, -0.0026702880859375, 0.01416015625, 0.0026092529296875, 0.0025177001953125, 0.0072021484375, 0.019775390625, -0.00171661376953125, 0.009033203125...
[ 39754, 214, 5117, 31330, 111, 34627, 1250, 4867, 502, 59102, 63049, 23972, 77648, 6626, 23, 10, 5303, 831, 18, 2046, 1632, 28412, 11249, 47, 11 ]
[ 0.2052001953125, 0.051177978515625, 0.169189453125, 0.2149658203125, 0.054351806640625, 0.2205810546875, 0.1387939453125, 0.208984375, 0.09735107421875, 0.18115234375, 0.1956787109375, 0.11346435546875, 0.1190185546875, 0.126220703125, 0.0221710205078125, 0.01549530029296875, 0.17065...
embed
11351653_c1
11351653
prolog
1
('), write(LOCAL), write(',\''), write(NOME), write('\',\''), write(POSICAO), write('\',\''), write(RESUMO), write('\',\''), write(UNIDADE), write('\',\''), write(CURSO), write('\',\''), write(DISCIPLINA), write('\','), write(ALUNOS), write(','), write(REFERENCIA), write(').\n'), make. Does someone know how to make it ...
('), write(LOCAL), write(',\''), write(NOME), write('\',\''), write(POSICAO), write('\',\''), write(RESUMO), write('\',\''), write(UNIDADE), write('\',\''), write(CURSO), write('\',\''), write(DISCIPLINA), write('\','), write(ALUNOS), write(','), write(REFERENCIA), write(').\n'), make. Does someone know how to make it ...
[ 0.00634765625, 0.0216064453125, 0.0033721923828125, 0.046875, -0.00482177734375, 0.01190185546875, -0.036376953125, -0.01177978515625, 0.005218505859375, -0.031494140625, -0.00634765625, -0.01202392578125, 0.0135498046875, 0.001495361328125, 0.0093994140625, -0.00653076171875, -0.008...
[ 15, 25, 247, 33022, 124448, 7842, 41872, 4765, 102298, 647, 91383, 30941, 670, 34465, 11893, 14006, 107042, 121063, 133697, 17304, 21130, 13933, 89994, 69145, 11766, 66804, 117424, 3249, 5, 22008, 3714, 3642, 442, 29481, 79315, 155965, 28864, ...
[ 0.0145416259765625, 0.1226806640625, 0.0310211181640625, 0.197998046875, 0.2275390625, 0.195556640625, 0.031829833984375, 0.0167236328125, 0.189208984375, 0.1683349609375, 0.1815185546875, 0.1409912109375, 0.169921875, 0.1175537109375, 0.2034912109375, 0.1448974609375, 0.14208984375,...
embed
12539523_c1
12539523
prolog
1
if X.synonym_of(Y).and Y.synonym(Z) gives the very strange output Synonyms for math: [:mathematics, :maths, :math, :mathematics] Synonyms for maths: [:mathematics] Synonyms for mathematics: [:maths, :math, :mathematics] Very curious! What do you think? Code signals: Rubylog::DSL::Constants, Prolog, Symbol.rubylog_funct...
if X.synonym_of(Y).and Y.synonym(Z) gives the very strange output Synonyms for math: [:mathematics, :maths, :math, :mathematics] Synonyms for maths: [:mathematics] Synonyms for mathematics: [:maths, :math, :mathematics] Very curious! What do you think? Code signals: Rubylog::DSL::Constants, Prolog, Symbol.rubylog_funct...
[ -0.01153564453125, 0.008056640625, -0.006622314453125, 0.0306396484375, 0.00811767578125, 0.01043701171875, 0.0113525390625, -0.004364013671875, 0.018310546875, -0.0235595703125, 0.00360107421875, 0.01409912109375, -0.0017242431640625, -0.003875732421875, -0.0087890625, 0.0035552978515...
[ 2174, 1193, 12654, 45757, 4390, 1723, 2940, 990, 1511, 76199, 4552, 114453, 140992, 19010, 100, 48909, 140363, 41637, 125458, 7, 291, 4, 192, 99342, 193844, 5351, 28864, 26073, 158189, 4867, 114479, 11935, 42539, 1250, 131899, 882, 1272, 1649...
[ 0.068115234375, 0.1435546875, 0.1597900390625, 0.2222900390625, 0.23388671875, 0.194580078125, 0.051025390625, 0.163818359375, 0.1485595703125, 0.018829345703125, 0.071533203125, 0.1856689453125, 0.1669921875, 0.16259765625, 0.051971435546875, 0.188720703125, 0.1455078125, 0.125854...
embed
35855653_c0
35855653
prolog
0
Title: Difference between assert and asserta - PROLOG Problem title: Difference between assert and asserta - PROLOG Tags: prolog Problem: Difference between assert and asserta - PROLOG I am really not clear about the difference between assert and asserta, as when I was trying to make a fibonacci program in linear time....
Difference between assert and asserta - PROLOG Difference between assert and asserta - PROLOG prolog Difference PROLOG Difference between assert and asserta - PROLOG I am really not clear about the difference between assert and asserta, as when I was trying to make a fibonacci program in linear time. Asserta worked rea...
[ 0.0233154296875, 0.008544921875, -0.001983642578125, 0.02783203125, -0.016357421875, -0.0023956298828125, -0.0052490234375, 0.015869140625, 0.00982666015625, -0.014892578125, 0.019775390625, 0.00567626953125, -0.0177001953125, 0.0196533203125, 0.030029296875, 0.0072021484375, 0.02856...
[ 803, 18234, 6620, 17721, 237, 33657, 136, 110965, 10514, 47510, 502, 4867, 6183, 959, 34735, 60212, 31577, 809, 20990, 52544, 1528, 192617, 1733, 1301, 79786, 4271, 7440, 162, 26038, 163, 18499, 73342, 15400, 83, 11522, 3501, 3060, 50218, 2...
[ 0.0921630859375, 0.201171875, 0.123779296875, 0.116455078125, 0.15625, 0.30419921875, 0.1143798828125, 0.294921875, 0.1309814453125, 0.188720703125, 0.060455322265625, 0.1292724609375, 0.05804443359375, 0.03668212890625, 0.10546875, 0.20068359375, 0.0281982421875, 0.0711669921875, ...
embed
4778184_c0
4778184
prolog
0
Title: Time comparison in Prolog Problem title: Time comparison in Prolog Tags: prolog Problem: Time comparison in Prolog Say I have a structure time with the format time(hour, minute) . How would I go about writing a rule to compare them? Something along the lines of compareTime(time1,time2) that returns yes if time1 ...
Time comparison in Prolog Time comparison in Prolog prolog Time Prolog Time comparison in Prolog Say I have a structure time with the format time(hour, minute) . How would I go about writing a rule to compare them? Something along the lines of compareTime(time1,time2) that returns yes if time1 is strictly before time2....
[ 0.0072021484375, 0.02197265625, 0.019287109375, 0.006256103515625, -0.0091552734375, -0.01104736328125, -0.01519775390625, 0.0032501220703125, -0.01397705078125, -0.0238037109375, 0.01171875, 0.027587890625, -0.0162353515625, -0.0019989013671875, 0.013916015625, -0.00823974609375, -0...
[ 19055, 225490, 23, 1250, 4867, 502, 45646, 1733, 9384, 497, 474, 15393, 1672, 32562, 79986, 47, 69101, 124519, 70059, 6032, 418, 10461, 30646, 72272, 2174, 81113, 8108, 5442, 20697, 313, 64194, 46876, 4552, 55681, 6953 ]
[ 0.185546875, 0.2135009765625, 0.0400390625, 0.1651611328125, 0.24658203125, 0.116943359375, 0.164306640625, 0.1734619140625, 0.142822265625, 0.07562255859375, 0.09832763671875, 0.1763916015625, 0.03338623046875, 0.1026611328125, 0.1661376953125, 0.026824951171875, 0.204833984375, 0...
embed
54264072_c0
54264072
prolog
0
Title: How to use append/3 in Prolog to find the last 2 elements of a list Problem title: How to use append/3 in Prolog to find the last 2 elements of a list Tags: prolog Problem: How to use append/3 in Prolog to find the last 2 elements of a list Using system predicate append/3 , write predicates to return: the last e...
How to use append/3 in Prolog to find the last 2 elements of a list How to use append/3 in Prolog to find the last 2 elements of a list prolog How Prolog How to use append/3 in Prolog to find the last 2 elements of a list Using system predicate append/3 , write predicates to return: the last element of a list the last ...
[ 0.00836181640625, 0.015869140625, 0.006072998046875, 0.012451171875, -0.0101318359375, 0.027587890625, 0.00604248046875, 0.0155029296875, 0.014404296875, -0.0284423828125, 0.0260009765625, -0.040283203125, -0.00799560546875, -0.006103515625, 0.006500244140625, 0.00057220458984375, 0....
[ 11249, 4527, 114689, 71, 18113, 1250, 4867, 7413, 4568, 116, 80854, 5303, 111, 502, 345, 5426, 1653, 2063, 67, 33022, 1636, 30646, 12830, 653, 4358 ]
[ 0.01678466796875, 0.066650390625, 0.1605224609375, 0.1180419921875, 0.25634765625, 0.1357421875, 0.2073974609375, 0.1060791015625, 0.193115234375, 0.1396484375, 0.18017578125, 0.168701171875, 0.0221405029296875, 0.080078125, 0.00482177734375, 0.08447265625, 0.09088134765625, 0.0953...
embed
38421409_c0
38421409
prolog
0
Title: bagof only gives one item, though multiple items fit Problem title: bagof only gives one item, though multiple items fit Tags: prolog Problem: bagof only gives one item, though multiple items fit This code works as expected: ?- bagof(R,member(r(R),[r(a),r(b),r(c),r(d)]),Rs). Rs = [a, b, c, d]. but a similar call...
bagof only gives one item, though multiple items fit bagof only gives one item, though multiple items fit prolog bagof only gives one item, though multiple items fit This code works as expected: but a similar call, the one I really want, does not: ; gives me more answers -- but I want [a,b,c,d] . What's my fix?
[ -0.01019287109375, -0.009765625, 0.00927734375, 0.01031494140625, -0.01007080078125, 0.0152587890625, 0.0020904541015625, -0.0013275146484375, 0.01385498046875, -0.019287109375, 0.01220703125, -0.0034942626953125, 0.0050048828125, -0.005615234375, 0.00124359130859375, 0.008056640625, ...
[ 41780, 420, 4734, 76199, 1632, 35735, 21208, 48716, 55769, 11177, 502, 4867, 18151, 43240, 84751, 1284, 21373, 11782, 6183, 3444, 14602, 959, 163, 1286, 35166, 11, 275, 238, 71, 30022 ]
[ 0.149658203125, 0.2408447265625, 0.12432861328125, 0.1048583984375, 0.1197509765625, 0.1739501953125, 0.06622314453125, 0.1702880859375, 0.178955078125, 0.203857421875, 0.1390380859375, 0.1993408203125, 0.189208984375, 0.031494140625, 0.044403076171875, 0.0208587646484375, 0.10046386...
embed
11702301_c0
11702301
prolog
0
Title: BDD implementations in Java Problem title: BDD implementations in Java Tags: theorem-proving, prolog, java, binary-decision-diagram Problem: BDD implementations in Java Anyone has suggestions for BDD (binary decision diagrams) implementations in Java (or one that provides Java bindings)? I found this page online...
BDD implementations in Java BDD implementations in Java theorem-proving prolog java binary-decision-diagram BDD Java BDD implementations in Java Anyone has suggestions for BDD (binary decision diagrams) implementations in Java (or one that provides Java bindings)? I found this page online: http://www.mancoosi.org/~abat...
[ 0.00830078125, 0.0189208984375, 0.01904296875, 0.0155029296875, 0.0021514892578125, 0.0181884765625, -0.0179443359375, 0.00830078125, -0.0167236328125, -0.0031585693359375, -0.0025177001953125, 0.01275634765625, -0.0159912109375, 0.01226806640625, 0.006683349609375, 0.0032806396484375,...
[ 335, 24057, 208124, 7, 23, 41925, 70, 58391, 70628, 502, 4867, 79, 330, 2394, 6635, 112, 318, 6889, 3390, 25561, 3630, 1556, 157666, 19155, 1294, 51957, 117233, 1632, 87344, 128239, 14037, 903, 9191, 1118, 5, 669, 587, 12607, 8474, 67, ...
[ 0.1298828125, 0.28173828125, 0.2203369140625, 0.031646728515625, 0.0938720703125, 0.256103515625, 0.003204345703125, 0.1390380859375, 0.10760498046875, 0.1190185546875, 0.1998291015625, 0.1068115234375, 0.1397705078125, 0.129150390625, 0.0848388671875, 0.0552978515625, 0.099487304687...
embed
19954314_c0
19954314
prolog
0
Title: Divison and remainder in Prolog Problem title: Divison and remainder in Prolog Tags: prolog, division, integer, modulus Problem: Divison and remainder in Prolog Trying to figure out how to write a recursive predicate divide_by(X, D, I, R) that takes as input a positive integer X and a divisor D, and returns the ...
Divison and remainder in Prolog Divison and remainder in Prolog prolog division integer modulus Divison Prolog Divison and remainder in Prolog Trying to figure out how to write a recursive predicate divide_by(X, D, I, R) that takes as input a positive integer X and a divisor D, and returns the answer as the whole numbe...
[ -0.0108642578125, 0.0250244140625, -0.00885009765625, 0.006805419921875, -0.01116943359375, 0.02099609375, 0.001983642578125, 0.00106048583984375, -0.00171661376953125, -0.0439453125, 0.01397705078125, -0.004119873046875, -0.0145263671875, 0.0172119140625, 0.0081787109375, -0.008056640...
[ 76278, 1681, 136, 47143, 820, 23, 1250, 4867, 502, 91853, 892, 1505, 17055, 26366, 33022, 195625, 5844, 1653, 2063, 67, 101637, 1272, 1542, 391, 87, 627, 107730, 24491, 1193, 45, 51858, 30646, 35166, 28271, 14012, 2831, 10336 ]
[ 0.18994140625, 0.11572265625, 0.12744140625, 0.19140625, 0.139404296875, 0.042510986328125, 0.161376953125, 0.201904296875, 0.1085205078125, 0.1827392578125, 0.112548828125, 0.01373291015625, 0.132080078125, 0.0126953125, 0.07275390625, 0.13134765625, 0.032745361328125, 0.100830078...
embed
8216695_c0
8216695
prolog
0
Title: Incrementing numbers in Prolog Problem title: Incrementing numbers in Prolog Tags: prolog, increment Problem: Incrementing numbers in Prolog I'm trying to implement an increment in prolog, and have written the following code: coordinate(X,Y,Z):- X is 1, Y is 1, Z is 1, coordinate(X1,Y1,Z1), X1 is X+1, Y1 is Y+1,...
Incrementing numbers in Prolog Incrementing numbers in Prolog prolog increment Incrementing Prolog Incrementing numbers in Prolog I'm trying to implement an increment in prolog, and have written the following code: I also tried: Neither of these work. Can anyone explain why?
[ 0.0185546875, 0.0118408203125, -0.0020599365234375, 0.0255126953125, 0.005645751953125, 0.004058837890625, 0.0186767578125, 0.00335693359375, -0.007568359375, -0.01483154296875, -0.00628662109375, -0.000316619873046875, -0.015869140625, -0.000873565673828125, 0.0299072265625, 0.0014801...
[ 8942, 107, 674, 214, 101935, 23, 1250, 4867, 502, 158661, 31577, 29479, 59121, 25632, 18151, 2843, 37842, 30097, 9319, 4488, 73342, 15400 ]
[ 0.109619140625, 0.1322021484375, 0.1278076171875, 0.040496826171875, 0.140869140625, 0.04229736328125, 0.15673828125, 0.2259521484375, 0.1337890625, 0.235595703125, 0.04791259765625, 0.1165771484375, 0.029388427734375, 0.00492095947265625, 0.0665283203125, 0.00954437255859375, 0.0864...
embed
20688099_c2
20688099
prolog
2
every point within S 's domain, and use this constraining list to label a proper S afterwards. Example of unification: ?- S in 0..2, L0 = [0,0,0,0], overlap(L0, [1,2], 0, S, L1), overlap(L1, [1,2], 1, S, L2), overlap(L2, [1,2], 2, S, L). L = [_G1, _G2, _G3, _G4] _G1 #= 1 #<== S #= 0 _G1 #= 0 #<== S #> 0 _G2 #= 2 #<== ...
every point within S 's domain, and use this constraining list to label a proper S afterwards. Example of unification: ?- S in 0..2, L0 = [0,0,0,0], overlap(L0, [1,2], 0, S, L1), overlap(L1, [1,2], 1, S, L2), overlap(L2, [1,2], 2, S, L). L = [_G1, _G2, _G3, _G4] _G1 #= 1 #<== S #= 0 _G1 #= 0 #<== S #> 0 _G2 #= 2 #<== ...
[ 0.0036163330078125, 0.010986328125, 0.0089111328125, -0.00830078125, -0.0059814453125, -0.01611328125, -0.034912109375, 0.01611328125, 0.0179443359375, 0.015869140625, 0.01104736328125, -0.00946044921875, 0.0189208984375, 0.00567626953125, 0.0023040771484375, 0.0269775390625, 0.01953...
[ 11907, 6275, 28032, 159, 77758, 4, 136, 4527, 903, 158, 7, 118862, 5303, 47, 67967, 27798, 19364, 5, 89536, 8705, 111, 51, 41274, 12, 705, 9, 23, 757, 304, 339, 2389, 63527, 645, 6324, 90173, 17727, 866, 418, 106, 10461, 116, 194, 2...
[ 0.1495361328125, 0.171875, 0.1259765625, 0.1790771484375, 0.2117919921875, 0.021026611328125, 0.029449462890625, 0.079833984375, 0.058837890625, 0.1109619140625, 0.08270263671875, 0.27197265625, 0.200439453125, 0.0280914306640625, 0.273193359375, 0.15966796875, 0.039642333984375, 0...
embed
77595629_c0
77595629
prolog
0
Title: Nested list in Prolog Problem title: Nested list in Prolog Tags: prolog Problem: Nested list in Prolog How can I make a nested list like (3 (2 (1) 2) 3) from (3 2 1 2 3) in PROLOG? There is a condition: it is not allowed to use looping operators, direct access functions to list elements, or high-level list proce...
Nested list in Prolog Nested list in Prolog prolog Nested Prolog nested_list NestedT Nested list in Prolog How can I make a nested list like (3 (2 (1) 2) 3) from (3 2 1 2 3) in PROLOG? There is a condition: it is not allowed to use looping operators, direct access functions to list elements, or high-level list processi...
[ -0.017333984375, 0.02197265625, 0.0096435546875, -0.0034332275390625, 0.01055908203125, 0.0274658203125, -0.019775390625, -0.00726318359375, 0.007568359375, -0.0220947265625, -0.0033111572265625, -0.023681640625, -0.00439453125, 0.03369140625, -0.00201416015625, -0.0035247802734375, ...
[ 28701, 71, 5303, 23, 1250, 4867, 502, 8512, 6562, 618, 831, 3249, 10, 1884, 6896, 4700, 798, 4958, 8439, 1295, 116, 106, 10514, 47510, 35431, 959, 107003, 4527, 40956, 214, 39933, 8951, 17203, 32354, 80854, 67919, 9433, 4488 ]
[ 0.281982421875, 0.1937255859375, 0.26416015625, 0.028228759765625, 0.185791015625, 0.263671875, 0.1263427734375, 0.292724609375, 0.1912841796875, 0.055755615234375, 0.05596923828125, 0.1298828125, 0.015228271484375, 0.0972900390625, 0.126220703125, 0.0537109375, 0.08697509765625, 0...
embed
68850347_c1
68850347
prolog
1
30, last-call: 100%, Choice points: 13 In: [2,503,730] sum('<garbage_collected>', _1328, _1330) [38] prod('<garbage_collected>', <compound s/1>, '<garbage_collected>') [33] fact('<garbage_collected>', <compound s/1>) [32] fact('<garbage_collected>', <compound s/1>) [31] swish_trace:swish_call('<garbage_collected>') How...
30, last-call: 100%, Choice points: 13 In: [2,503,730] sum('<garbage_collected>', _1328, _1330) [38] prod('<garbage_collected>', <compound s/1>, '<garbage_collected>') [33] fact('<garbage_collected>', <compound s/1>) [32] fact('<garbage_collected>', <compound s/1>) [31] swish_trace:swish_call('<garbage_collected>') How...
[ 0.005157470703125, 0.02392578125, -0.012451171875, 0.00787353515625, -0.01025390625, 0.0016326904296875, 0.0027313232421875, 0.004913330078125, 0.007720947265625, -0.0032806396484375, 0.00323486328125, 0.0002727508544921875, -0.02197265625, 0.00213623046875, 0.0086669921875, -0.0147094...
[ 496, 4568, 85763, 3555, 181948, 26847, 702, 360, 197638, 363, 966, 1197, 10554, 1970, 402, 429, 196352, 297, 2681, 3882, 62946, 239790, 502, 71, 771, 7030, 91, 11583, 226429, 15824, 218550, 209297, 114686, 39989, 13, 11249, 29479, 31461, 15...
[ 0.1759033203125, 0.1341552734375, 0.216552734375, 0.1776123046875, 0.2314453125, 0.213134765625, 0.135498046875, 0.053375244140625, 0.134521484375, 0.15478515625, 0.051849365234375, 0.1925048828125, 0.2169189453125, 0.078369140625, 0.19189453125, 0.108642578125, 0.212646484375, 0.1...
embed
10924356_c0
10924356
prolog
0
Title: Check if variable is equal to rules in Prolog Problem title: Check if variable is equal to rules in Prolog Tags: prolog Problem: Check if variable is equal to rules in Prolog I want to check if a variable informed by the user is equal to some existing rules, for example: I have the following rules general(mammal...
Check if variable is equal to rules in Prolog Check if variable is equal to rules in Prolog prolog Check Prolog Check if variable is equal to rules in Prolog I want to check if a variable informed by the user is equal to some existing rules, for example: I have the following rules then i do and I want to check if X is ...
[ -0.000904083251953125, 0.00634765625, 0.00958251953125, 0.02880859375, 0.004547119140625, 0.0078125, -0.00665283203125, 0.00970458984375, 0.001251220703125, -0.0296630859375, -0.00057220458984375, -0.02099609375, 0.00689697265625, -0.00946044921875, 0.030029296875, 0.004730224609375, ...
[ 38679, 2174, 77336, 83, 105950, 47, 91736, 23, 1250, 4867, 502, 3444, 12765, 27257, 38937, 144573, 1193, 21968, 141, 263, 71 ]
[ 0.1248779296875, 0.05560302734375, 0.263427734375, 0.045501708984375, 0.1575927734375, 0.1385498046875, 0.2012939453125, 0.06829833984375, 0.1365966796875, 0.22509765625, 0.0997314453125, 0.017974853515625, 0.1446533203125, 0.0831298828125, 0.08062744140625, 0.099853515625, 0.0681152...
embed
45118134_c0
45118134
prolog
0
Title: Using a univ operator in Prolog Problem title: Using a univ operator in Prolog Tags: prolog Problem: Using a univ operator in Prolog I am trying to develop a prolog procedure that will convert numbers in any given list to a list of their square roots, using the univ ( =.. ). So far I have convert(X,Y): number(X)...
Using a univ operator in Prolog Using a univ operator in Prolog prolog Using Prolog Using a univ operator in Prolog I am trying to develop a prolog procedure that will convert numbers in any given list to a list of their square roots, using the univ ( =.. ). So far I have This evaluates false, what could be wrong in my...
[ -0.004058837890625, 0.01348876953125, 0.0120849609375, 0.00003409385681152344, 0.0029296875, -0.01190185546875, -0.0012664794921875, 0.00897216796875, -0.00335693359375, -0.019775390625, -0.0014495849609375, 0.000701904296875, 0.00421142578125, -0.020263671875, -0.00909423828125, -0.01...
[ 345, 51, 4371, 39933, 1250, 4867, 23, 502, 31577, 85493, 50491, 96760, 101935, 2499, 34475, 5303, 47, 2363, 108047, 74855, 17368, 70, 2203, 5, 2060, 3293, 151575, 98320, 5809, 44691, 62775, 71924 ]
[ 0.044677734375, 0.1678466796875, 0.2578125, 0.251708984375, 0.152587890625, 0.263916015625, 0.005401611328125, 0.0960693359375, 0.04541015625, 0.09735107421875, 0.1087646484375, 0.1507568359375, 0.13671875, 0.00836181640625, 0.010986328125, 0.135498046875, 0.007659912109375, 0.0048...
embed