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
27681217_c0
27681217
prolog
0
Title: Calling Prolog from R Problem title: Calling Prolog from R Tags: ffi, prolog, r Problem: Calling Prolog from R It is possible to call R from within Prolog, using a library recently implemented in SWI and YAP Prolog variants. Reciprocally, is there any way of calling Prolog from within R ? In the absence of a dir...
Calling Prolog from R Calling Prolog from R ffi prolog r R Calling Prolog Calling Prolog from R It is possible to call R from within Prolog, using a library recently implemented in SWI and YAP Prolog variants. Reciprocally, is there any way of calling Prolog from within R ? In the absence of a direct R - Prolog interfa...
[ 0.03271484375, 0.0031890869140625, -0.003753662109375, 0.00101470947265625, 0.00225830078125, -0.0016632080078125, 0.0150146484375, -0.006439208984375, 0.004974365234375, -0.07861328125, 0.006103515625, 0.005279541015625, -0.0233154296875, 0.002227783203125, 0.0172119140625, -0.0049133...
[ 26265, 214, 1250, 4867, 1295, 627, 24500, 502, 1690, 7722, 11782, 28032, 17368, 35773, 29479, 38969, 128706, 20117, 3917, 159029, 112199, 8951, 101758, 87709, 128239, 69407, 47, 238, 6366, 68557, 37223, 36746, 116361, 69307, 464, 18151, 55720, ...
[ 0.1676025390625, 0.0282745361328125, 0.198486328125, 0.28515625, 0.1348876953125, 0.2327880859375, 0.155517578125, 0.1456298828125, 0.1441650390625, 0.111083984375, 0.18896484375, 0.141357421875, 0.004913330078125, 0.13330078125, 0.07989501953125, 0.1322021484375, 0.135009765625, 0...
embed
44210670_c0
44210670
prolog
0
Title: Representation without " '' " in lists with atomic_list_concat/3 with operator defined (~) Problem title: Representation without " '' " in lists with atomic_list_concat/3 with operator defined (~) Tags: prolog Problem: Representation without " '' " in lists with atomic_lis...
Representation without " '' " in lists with atomic_list_concat/3 with operator defined (~) Representation without " '' " in lists with atomic_list_concat/3 with operator defined (~) prolog Representation atomic_list_concat Representation without " '' " in lists with atomic_list_c...
[ 0.0289306640625, 0.0004329681396484375, 0.00927734375, 0.032958984375, 0.0001544952392578125, 0.0093994140625, 0.00579833984375, 0.02880859375, -0.00836181640625, -0.0130615234375, -0.000965118408203125, -0.00897216796875, 0.005340576171875, 0.01055908203125, -0.01348876953125, 0.00885...
[ 130877, 15490, 3768, 5303, 678, 34627, 6562, 2271, 4460, 18113, 39933, 61924, 2306, 1363, 502, 4867, 5106, 23, 2967, 41, 1294, 3642, 831, 54, 47, 87388, 8382, 44, 80854, 765, 71, 3871, 2046 ]
[ 0.2464599609375, 0.1583251953125, 0.061279296875, 0.1903076171875, 0.03240966796875, 0.1212158203125, 0.1478271484375, 0.0941162109375, 0.19482421875, 0.1627197265625, 0.2467041015625, 0.1629638671875, 0.144287109375, 0.0269622802734375, 0.119873046875, 0.189208984375, 0.142456054687...
embed
26523039_c0
26523039
prolog
0
Title: Append lists prolog Problem title: Append lists prolog Tags: list, prolog Problem: Append lists prolog Given the list as input (in the format mentioned below) , I need to get the output that is a simple list of lists, If the given input list is empty then the predicate should return an empty list, Given the inpu...
Append lists prolog Append lists prolog list prolog Append Head Tail Append lists prolog Given the list as input (in the format mentioned below) , I need to get the output that is a simple list of lists, If the given input list is empty then the predicate should return an empty list, Given the input I need to get the o...
[ 0.0013275146484375, 0.0076904296875, 0.005889892578125, 0.01519775390625, -0.00982666015625, 0.01708984375, 0.004302978515625, 0.01422119140625, 0.01336669921875, -0.03271484375, 0.0203857421875, -0.00811767578125, -0.019775390625, 0.00445556640625, 0.0213623046875, 0.004913330078125, ...
[ 5659, 3611, 5303, 502, 4867, 44816, 1218, 379, 237, 107730, 9384, 3871, 2046, 140992, 8781, 7, 34475, 201505, 1653, 2063, 67, 5608, 30646, 63134, 51339, 195625, 1830, 18151, 37842, 35064, 1636, 5117, 12830, 87388, 31251 ]
[ 0.0902099609375, 0.1083984375, 0.2274169921875, 0.1148681640625, 0.16162109375, 0.1505126953125, 0.109619140625, 0.08721923828125, 0.0081787109375, 0.1671142578125, 0.0997314453125, 0.03131103515625, 0.046173095703125, 0.178955078125, 0.1025390625, 0.00927734375, 0.0275115966796875, ...
embed
64901679_c0
64901679
prolog
0
Title: writing a Prolog isSquare function Problem title: writing a Prolog isSquare function Tags: prolog Problem: writing a Prolog isSquare function I am trying to write a simple function that checks if a list of entered coordinates are a square in prolog for example: isSquare(x1,y1,x2,y2,x3,y3,x4,y4) and the response ...
writing a Prolog isSquare function writing a Prolog isSquare function prolog Prolog Slope1 Slope2 Slope3 Slope4 writing a Prolog isSquare function I am trying to write a simple function that checks if a list of entered coordinates are a square in prolog for example: isSquare(x1,y1,x2,y2,x3,y3,x4,y4) and the response wo...
[ 0.022705078125, -0.0023193359375, -0.0002727508544921875, -0.0166015625, -0.016357421875, -0.006072998046875, 0.00616455078125, 0.003082275390625, -0.01611328125, 0.027099609375, 0.0162353515625, 0.017822265625, -0.009765625, -0.03076171875, -0.00653076171875, -0.00072479248046875, -...
[ 32562, 1250, 4867, 83, 294, 94727, 13, 32354, 502, 89059, 418, 363, 617, 31577, 33022, 8781, 12765, 2174, 5303, 111, 30957, 297, 176866, 90, 621, 10, 108047, 23, 425, 53, 304, 29557, 57553, 40101, 29568, 707, 98320, 82424, 25632, 17, 76...
[ 0.13330078125, 0.16015625, 0.2421875, 0.204833984375, 0.058746337890625, 0.2330322265625, 0.153076171875, 0.18359375, 0.1544189453125, 0.1806640625, 0.043121337890625, 0.104736328125, 0.1202392578125, 0.052032470703125, 0.1209716796875, 0.10064697265625, 0.1663818359375, 0.09002685...
embed
20621676_c0
20621676
prolog
0
Title: Swapping binary trees in prolog Problem title: Swapping binary trees in prolog Tags: swap, recursion, prolog Problem: Swapping binary trees in prolog This is exercise 3.5 from Learn Prolog Now . They put it before explaining lists so I need a procedure that doesn't involve lists. The task is to swap the leaves o...
Swapping binary trees in prolog Swapping binary trees in prolog swap recursion prolog Swapping Swapping binary trees in prolog This is exercise 3.5 from Learn Prolog Now . They put it before explaining lists so I need a procedure that doesn't involve lists. The task is to swap the leaves of nested binary trees. If the ...
[ 0.01458740234375, 0.0157470703125, -0.0032196044921875, -0.0079345703125, 0.000728607177734375, 0.006011962890625, -0.035888671875, -0.00811767578125, -0.002044677734375, -0.017333984375, -0.00628662109375, 0.00518798828125, -0.006072998046875, 0.0240478515625, 0.0223388671875, -0.0025...
[ 43062, 26783, 2394, 6635, 1360, 90, 23, 502, 4867, 202317, 195625, 1830, 81979, 38704, 134031, 1250, 14240, 73342, 5303, 3871, 50491, 66211, 31358, 7, 8512, 71, 41, 1294, 35166, 17106, 87, 2046, 1301, 1957, 95, 2407, 27750, 136, 40970, 15...
[ 0.2095947265625, 0.07421875, 0.185791015625, 0.0621337890625, 0.2080078125, 0.054473876953125, 0.02227783203125, 0.133544921875, 0.2274169921875, 0.23291015625, 0.1614990234375, 0.04534912109375, 0.1083984375, 0.06494140625, 0.029510498046875, 0.066650390625, 0.0253143310546875, 0....
embed
59698808_c0
59698808
prolog
0
Title: Listing elemets of a list as i want, in Prolog Problem title: Listing elemets of a list as i want, in Prolog Tags: list, prolog Problem: Listing elemets of a list as i want, in Prolog This is my list in Prolog: myList([a,b,c,d,e]). I am trying to write a predicate. That predicate should give me this result: ab a...
Listing elemets of a list as i want, in Prolog Listing elemets of a list as i want, in Prolog list prolog Listing Prolog Listing elemets of a list as i want, in Prolog This is my list in Prolog: I am trying to write a predicate. That predicate should give me this result: I found a solution that's near to my goal. But i...
[ 0.012939453125, -0.0036163330078125, 0.0017852783203125, 0.01043701171875, -0.01361083984375, 0.007171630859375, -0.0076904296875, 0.007049560546875, 0.0016021728515625, -0.0181884765625, 0.0147705078125, -0.003326416015625, 0.0040283203125, 0.0008087158203125, -0.01416015625, -0.00297...
[ 32036, 214, 114128, 933, 111, 5303, 237, 17, 3444, 1250, 4867, 23, 502, 31577, 33022, 1653, 2063, 67, 5608, 16750, 14037, 29806, 43573, 47, 69236, 4966, 959, 66161, 2367, 13319, 10, 11, 707, 5125, 10060, 2685, 21771, 1030, 13438, 377, 9...
[ 0.214599609375, 0.056182861328125, 0.1976318359375, 0.1229248046875, 0.05450439453125, 0.195556640625, 0.1671142578125, 0.07696533203125, 0.205322265625, 0.176513671875, 0.23486328125, 0.041046142578125, 0.1253662109375, 0.0640869140625, 0.08514404296875, 0.156005859375, 0.1746826171...
embed
75102971_c0
75102971
prolog
0
Title: prolog predicates cf boolean valued functions Problem title: prolog predicates cf boolean valued functions Tags: prolog Problem: prolog predicates cf boolean valued functions Guides teaching prolog are careful to dissuade students from thinking that predicates are functions . After some thought, the idea that pr...
prolog predicates cf boolean valued functions prolog predicates cf boolean valued functions prolog prolog predicates cf boolean valued functions Guides teaching prolog are careful to dissuade students from thinking that predicates are functions . After some thought, the idea that predicates are boolean functions seems ...
[ 0.0157470703125, -0.003753662109375, 0.01312255859375, -0.022216796875, 0.005340576171875, 0.016357421875, 0.01434326171875, -0.01806640625, -0.002685546875, -0.024658203125, -0.0086669921875, 0.00077056884765625, -0.0294189453125, -0.007781982421875, 0.01708984375, 0.00439453125, 0....
[ 502, 4867, 1653, 2063, 1636, 67466, 337, 31, 34677, 34292, 71, 32354, 44583, 128169, 54607, 25921, 47644, 621, 6528, 35604, 7145, 765, 45234, 94418, 107730, 171859, 140992, 29568, 98320, 36272, 707, 35782, 2071, 903, 169907, 5351, 237, 205969...
[ 0.1751708984375, 0.238525390625, 0.2337646484375, 0.26904296875, 0.189453125, 0.1400146484375, 0.07171630859375, 0.147216796875, 0.201904296875, 0.1719970703125, 0.05657958984375, 0.2178955078125, 0.05242919921875, 0.08587646484375, 0.041015625, 0.100341796875, 0.0704345703125, 0.0...
embed
65547022_c0
65547022
prolog
0
Title: Prolog combinatoric of two lists ignoring the last items Problem title: Prolog combinatoric of two lists ignoring the last items Tags: prolog Problem: Prolog combinatoric of two lists ignoring the last items I'm trying to get the combinatorics of two lists ignoring the last element of both. the code: isady(_, [_...
Prolog combinatoric of two lists ignoring the last items Prolog combinatoric of two lists ignoring the last items prolog Prolog Prolog combinatoric of two lists ignoring the last items I'm trying to get the combinatorics of two lists ignoring the last element of both. the code: output: expected output: As you can see, ...
[ -0.0172119140625, 0.0169677734375, 0.0084228515625, 0.002197265625, -0.00982666015625, 0.0098876953125, -0.013916015625, 0.004547119140625, 0.0068359375, -0.0152587890625, -0.004608154296875, -0.004425048828125, 0.0150146484375, 0.0034942626953125, 0.007568359375, -0.00994873046875, ...
[ 1250, 4867, 22321, 3826, 238, 111, 6626, 5303, 47438, 214, 4568, 55769, 502, 31577, 2046, 4439, 7, 12830, 15044, 18151, 140992, 84751, 1957, 442, 22027, 18, 7279, 3229, 1556, 47, 93002, 15400 ]
[ 0.1397705078125, 0.2283935546875, 0.181884765625, 0.0994873046875, 0.04412841796875, 0.01226806640625, 0.1329345703125, 0.176513671875, 0.1644287109375, 0.0229034423828125, 0.12939453125, 0.133544921875, 0.10211181640625, 0.0170135498046875, 0.02520751953125, 0.05548095703125, 0.0017...
embed
67851350_c0
67851350
prolog
0
Title: How to return once with prolog query? Problem title: How to return once with prolog query? Tags: predicate, prolog Problem: How to return once with prolog query? I want to check if a person lives in a specific house ismemberof(NAME, HOUSE) -> (true Or false once). My code is as below. The problem is it checks al...
How to return once with prolog query? How to return once with prolog query? predicate prolog How Facts house1 house2 house3 Rules NAME HOUSE Queries How to return once with prolog query? I want to check if a person lives in a specific house ismemberof(NAME, HOUSE) -> (true Or false once). My code is as below. The probl...
[ 0.01177978515625, 0.000843048095703125, 0.0322265625, -0.000324249267578125, -0.00860595703125, 0.004791259765625, 0.0076904296875, 0.0211181640625, 0.00168609619140625, -0.059326171875, 0.0137939453125, -0.00933837890625, 0.006591796875, 0.00128936767578125, 0.00909423828125, 0.005554...
[ 11249, 47, 30646, 24145, 678, 502, 4867, 41, 1294, 1653, 2063, 67, 132640, 18276, 304, 363, 139118, 182512, 21997, 78441, 5813, 10484, 3444, 12765, 2174, 3445, 60742, 23, 29458, 83, 39, 27417, 4390, 9774, 3347, 98320, 18151, 35064, 2967, ...
[ 0.08563232421875, 0.060394287109375, 0.2880859375, 0.2607421875, 0.1068115234375, 0.1781005859375, 0.259765625, 0.172119140625, 0.1658935546875, 0.068603515625, 0.0780029296875, 0.0268707275390625, 0.1395263671875, 0.143798828125, 0.046630859375, 0.0936279296875, 0.1243896484375, 0...
embed
6962074_c0
6962074
prolog
0
Title: Why does gprolog not chain together uses of modus ponens? Problem title: Why does gprolog not chain together uses of modus ponens? Tags: gnu-prolog, prolog Problem: Why does gprolog not chain together uses of modus ponens? I am reading Learn Prolog Now , 1.1.2 Knowledge Base 2 where they write about chaining tog...
Why does gprolog not chain together uses of modus ponens? Why does gprolog not chain together uses of modus ponens? gnu-prolog prolog Why Why does gprolog not chain together uses of modus ponens? I am reading Learn Prolog Now , 1.1.2 Knowledge Base 2 where they write about chaining together uses of modus ponens. The KB...
[ -0.0020751953125, 0.00909423828125, 0.0185546875, 0.007293701171875, 0.004180908203125, 0.028564453125, 0.0074462890625, -0.0020599365234375, 0.020263671875, -0.0244140625, 0.003570556640625, -0.0181884765625, -0.013916015625, 0.0103759765625, 0.0005950927734375, -0.0032501220703125, ...
[ 44084, 14602, 706, 3454, 4867, 959, 121293, 25842, 4527, 42475, 15266, 1755, 104155, 502, 134031, 1250, 14240, 61747, 304, 191428, 44978, 1608, 14653, 30742, 5442, 2424, 11435, 41, 1294, 230121, 134598, 35644, 72272, 53498, 3005, 23444, 83, 1...
[ 0.125244140625, 0.0179901123046875, 0.091796875, 0.1796875, 0.21142578125, 0.1392822265625, 0.2115478515625, 0.1634521484375, 0.10626220703125, 0.1888427734375, 0.1278076171875, 0.1551513671875, 0.14306640625, 0.1129150390625, 0.03564453125, 0.1192626953125, 0.048095703125, 0.00033...
embed
39918961_c0
39918961
prolog
0
Title: prolog predicate [sublist(Xs, Ys)] Problem title: prolog predicate [sublist(Xs, Ys)] Tags: prolog, list, append Problem: prolog predicate [sublist(Xs, Ys)] I am a new learner for prolog. Here is the question of our workshop, I have no idea where start it. Would really appreciate any help with this. sublist(Xs, Y...
prolog predicate [sublist(Xs, Ys)] prolog predicate [sublist(Xs, Ys)] prolog list append prolog predicate [sublist(Xs, Ys)] I am a new learner for prolog. Here is the question of our workshop, I have no idea where start it. Would really appreciate any help with this. sublist(Xs, Ys) This holds when Xs is a list contain...
[ 0.01251220703125, -0.016845703125, 0.026611328125, -0.00201416015625, -0.0172119140625, 0.017822265625, -0.0017547607421875, 0.020263671875, 0.01806640625, 0.000530242919921875, 0.0224609375, 0.00347900390625, -0.00653076171875, -0.007049560546875, -0.01513671875, 0.01361083984375, 0...
[ 502, 4867, 1653, 2063, 67, 22144, 6562, 1542, 990, 7, 5303, 114689, 71, 3525, 30698, 9655, 42819, 6528, 4034, 77947, 4358, 1614, 132, 4, 16401, 3229, 1193, 70541, 3060, 80854, 5701, 12989, 108975, 5608, 4488, 217684, 27798, 238, 275, 2144...
[ 0.1827392578125, 0.2247314453125, 0.1671142578125, 0.193359375, 0.06488037109375, 0.2105712890625, 0.268798828125, 0.1737060546875, 0.19140625, 0.1566162109375, 0.1829833984375, 0.154052734375, 0.053741455078125, 0.000274658203125, 0.028472900390625, 0.01702880859375, 0.1470947265625...
embed
33899606_c0
33899606
prolog
0
Title: ERROR: >/2: Arguments are not sufficiently instantiated Problem title: ERROR: >/2: Arguments are not sufficiently instantiated Tags: prolog Problem: ERROR: >/2: Arguments are not sufficiently instantiated I want to get the length for the maximum sequence of even numbers but i get this error ERROR: >/2: Arg...
ERROR: >/2: Arguments are not sufficiently instantiated ERROR: >/2: Arguments are not sufficiently instantiated prolog ERROR Arguments max1 ERROR: >/2: Arguments are not sufficiently instantiated I want to get the length for the maximum sequence of even numbers but i get this error ERROR: >/2: Arguments are not s...
[ -0.0025787353515625, 0.04638671875, -0.0032196044921875, -0.007568359375, 0.015380859375, 0.030029296875, -0.004119873046875, 0.01458740234375, 0.0198974609375, -0.031005859375, 0.01348876953125, -0.022216796875, 0.00238037109375, 0.003570556640625, 0.04541015625, -0.003387451171875, ...
[ 151206, 24638, 5386, 12477, 12, 112140, 7, 621, 959, 129980, 538, 34648, 14, 27686, 502, 4867, 18389, 418, 977, 3444, 2046, 140909, 100, 38132, 40, 944, 3956, 3853, 101935, 18499, 12301, 1118, 831, 28219, 89536, 18151 ]
[ 0.156005859375, 0.1336669921875, 0.10516357421875, 0.275634765625, 0.05841064453125, 0.28466796875, 0.1055908203125, 0.059539794921875, 0.15234375, 0.203857421875, 0.0843505859375, 0.15625, 0.152587890625, 0.1119384765625, 0.142822265625, 0.178955078125, 0.171142578125, 0.061340332...
embed
36816758_c0
36816758
prolog
0
Title: Prolog: searching for sublists of length>=3 Problem title: Prolog: searching for sublists of length>=3 Tags: list, prolog Problem: Prolog: searching for sublists of length>=3 I'd like to produce a predicate which is able to check whether a list will divide into sublists each containing at least three atoms...
Prolog: searching for sublists of length>=3 Prolog: searching for sublists of length>=3 list prolog Prolog Prolog: searching for sublists of length>=3 I'd like to produce a predicate which is able to check whether a list will divide into sublists each containing at least three atoms. For example: Has solutions su...
[ 0.00823974609375, 0.02392578125, 0.01409912109375, -0.0025177001953125, -0.01068115234375, 0.03125, 0.01226806640625, 0.002593994140625, 0.0177001953125, -0.0164794921875, 0.006439208984375, -0.0079345703125, 0.007415771484375, 0.000705718994140625, 0.00860595703125, 0.025634765625, ...
[ 1250, 4867, 157318, 100, 1614, 6562, 7, 111, 140909, 5386, 76067, 12, 5303, 502, 1884, 27489, 1653, 2063, 67, 19048, 47, 12765, 36766, 1221, 101637, 3934, 12638, 70541, 99, 19713, 17262, 34627, 27781, 51347, 33306, 4, 25632, 35782, 765, 5...
[ 0.1856689453125, 0.2349853515625, 0.1754150390625, 0.0653076171875, 0.24560546875, 0.25390625, 0.0733642578125, 0.0096435546875, 0.1290283203125, 0.04595947265625, 0.1990966796875, 0.010498046875, 0.2235107421875, 0.140869140625, 0.0772705078125, 0.0853271484375, 0.1478271484375, 0...
embed
47586492_c0
47586492
prolog
0
Title: Splitting a list into 2 lists at a pivot in prolog Problem title: Splitting a list into 2 lists at a pivot in prolog Tags: prolog Problem: Splitting a list into 2 lists at a pivot in prolog I want to split a list into 2 lists at a pivot P, if the number is less than P it goes into L1 and if it is greater than P ...
Splitting a list into 2 lists at a pivot in prolog Splitting a list into 2 lists at a pivot in prolog prolog Splitting Splitting a list into 2 lists at a pivot in prolog I want to split a list into 2 lists at a pivot P, if the number is less than P it goes into L1 and if it is greater than P then it will go into L2. Th...
[ -0.01422119140625, 0.00457763671875, -0.0068359375, -0.0167236328125, -0.024169921875, 0.00555419921875, -0.00921630859375, -0.0032196044921875, 0.0098876953125, -0.0004749298095703125, 0.014404296875, 0.0021514892578125, -0.0106201171875, 0.009765625, 0.0018463134765625, 0.01770019531...
[ 46474, 1916, 5303, 3934, 116, 99, 80953, 18, 502, 4867, 23, 3444, 65450, 436, 14012, 40715, 339, 418, 117396, 5442, 19048, 3173, 7, 304, 54 ]
[ 0.1922607421875, 0.04400634765625, 0.2244873046875, 0.12890625, 0.1539306640625, 0.08636474609375, 0.200927734375, 0.1263427734375, 0.15234375, 0.2078857421875, 0.0125732421875, 0.0565185546875, 0.216552734375, 0.0694580078125, 0.06622314453125, 0.0989990234375, 0.090576171875, 0.0...
embed
23280799_c0
23280799
prolog
0
Title: How can I read in a filename in Prolog? Problem title: How can I read in a filename in Prolog? Tags: prolog Problem: How can I read in a filename in Prolog? this is the format that I need it to be in for the project. Enter file name: filename.txt. My code so far is: choice(2, X) :- nl, write('\tStore roster to a...
How can I read in a filename in Prolog? How can I read in a filename in Prolog? prolog How Prolog Enter filename.txt Stream Roster ERROR user_input:21:102 Syntax Operator How can I read in a filename in Prolog? this is the format that I need it to be in for the project. My code so far is: This gives the error: I'd appr...
[ 0.01104736328125, -0.0023193359375, 0.00927734375, 0.01458740234375, -0.024169921875, 0.0157470703125, 0.004638671875, 0.006866455078125, 0.00127410888671875, 0.01031494140625, 0.0098876953125, 0.00145721435546875, -0.01129150390625, -0.01904296875, 0.00848388671875, -0.00885009765625,...
[ 11249, 831, 12301, 23, 11435, 11627, 1250, 4867, 502, 60816, 124326, 115061, 2777, 1515, 151206, 24638, 38937, 73, 7077, 25619, 49150, 19010, 86531, 150922, 87, 9384, 3871, 13452, 18151, 2060, 3293, 76199, 18499, 71, 77947, 2499, 4358, 31577,...
[ 0.03057861328125, 0.0628662109375, 0.22802734375, 0.2080078125, 0.1610107421875, 0.234619140625, 0.182373046875, 0.2646484375, 0.1029052734375, 0.1175537109375, 0.194091796875, 0.132568359375, 0.11376953125, 0.0667724609375, 0.080078125, 0.035552978515625, 0.119873046875, 0.0227661...
embed
63059850_c0
63059850
prolog
0
Title: How to invoke a predicate functor based on a variable instead of a name Problem title: How to invoke a predicate functor based on a variable instead of a name Tags: prolog Problem: How to invoke a predicate functor based on a variable instead of a name Let's say I've declared predicates a and c as follows: a(b)....
How to invoke a predicate functor based on a variable instead of a name How to invoke a predicate functor based on a variable instead of a name prolog How How to invoke a predicate functor based on a variable instead of a name Let's say I've declared predicates a and c as follows: I'd like to believe that c(a, b) succe...
[ 0.0084228515625, 0.002899169921875, 0.00665283203125, 0.01318359375, 0.0078125, 0.0115966796875, 0.00537109375, 0.00872802734375, -0.002532958984375, -0.048828125, -0.0078125, -0.00140380859375, -0.01251220703125, -0.00640869140625, 0.0068359375, 0.0011444091796875, -0.010986328125, ...
[ 11249, 23, 23253, 13, 1653, 2063, 67, 7477, 18770, 35509, 77336, 64457, 9351, 47, 10, 98, 502, 4867, 159978, 1636, 136, 501, 1884, 18822, 876, 214493, 391, 647, 14858, 99091, 241, 159, 38969, 1250, 6002, 86531, 175199, 16487, 39933, 25632...
[ 0.080810546875, 0.0966796875, 0.2108154296875, 0.07861328125, 0.2060546875, 0.236572265625, 0.1248779296875, 0.19921875, 0.2200927734375, 0.1728515625, 0.293212890625, 0.1947021484375, 0.140625, 0.0770263671875, 0.038421630859375, 0.0478515625, 0.113525390625, 0.174560546875, 0.1...
embed
12372309_c0
12372309
prolog
0
Title: Prolog - what sort of sentences can't be expressed Problem title: Prolog - what sort of sentences can't be expressed Tags: first-order-logic, logic-programming, logic, prolog Problem: Prolog - what sort of sentences can't be expressed I was wondering what sort of sentences can't you express in Prolog? ...
Prolog - what sort of sentences can't be expressed Prolog - what sort of sentences can't be expressed first-order-logic logic-programming logic prolog Prolog Prolog - what sort of sentences can't be expressed I was wondering what sort of sentences can't you express in Prolog? I've been researching into logic ...
[ 0.0238037109375, 0.011474609375, -0.00244140625, -0.00811767578125, -0.0076904296875, 0.01214599609375, 0.01416015625, -0.00921630859375, 0.0031585693359375, -0.016357421875, -0.006866455078125, -0.000270843505859375, -0.00677490234375, -0.01239013671875, 0.008544921875, 0.015380859375...
[ 1250, 4867, 12096, 149357, 7, 831, 3768, 18, 186, 36510, 2367, 80596, 137043, 62775, 28966, 502, 297, 23, 56037, 5117, 1286, 71496, 70731, 91658, 19, 35509, 25632, 450, 64111, 618, 15400 ]
[ 0.175048828125, 0.248046875, 0.129150390625, 0.228759765625, 0.050140380859375, 0.1104736328125, 0.012603759765625, 0.1336669921875, 0.043182373046875, 0.200927734375, 0.007110595703125, 0.1004638671875, 0.08355712890625, 0.1181640625, 0.037689208984375, 0.0933837890625, 0.0460510253...
embed
9238452_c1
9238452
prolog
1
only operate on positive integers, the second rule says not to run out of inputs, and the first rule signals that the partition is valid when N reaches zero. Problem is, I only get: | ?- partition(4, [1, 2, 3], X). no The first and second rules make sense to me, the third and fourth seem iffy but I can't find anything...
only operate on positive integers, the second rule says not to run out of inputs, and the first rule signals that the partition is valid when N reaches zero. Problem is, I only get: | ?- partition(4, [1, 2, 3], X). no The first and second rules make sense to me, the third and fourth seem iffy but I can't find anything...
[ -0.018310546875, 0.01348876953125, 0.0152587890625, 0.00665283203125, -0.003936767578125, 0.00164794921875, -0.00170135498046875, -0.0107421875, -0.01239013671875, 0.031982421875, -0.00138092041015625, -0.0135498046875, 0.000156402587890625, 0.0034332275390625, 0.00836181640625, -0.003...
[ 4734, 160404, 98, 24491, 892, 26255, 17932, 79986, 959, 11675, 1810, 111, 107730, 5117, 26073, 2878, 1363, 35604, 3229, 541, 58359, 45234, 15649, 2046, 58745, 705, 9, 105801, 68252, 116, 138, 1193, 110, 91736, 10422, 50960, 22759, 927, 4890...
[ 0.0921630859375, 0.1650390625, 0.07879638671875, 0.1829833984375, 0.132568359375, 0.111572265625, 0.07147216796875, 0.169189453125, 0.0305633544921875, 0.0745849609375, 0.1024169921875, 0.01165771484375, 0.1895751953125, 0.04046630859375, 0.1553955078125, 0.24169921875, 0.12438964843...
embed
22722675_c0
22722675
prolog
0
Title: Singleton Variable Prolog Problem title: Singleton Variable Prolog Tags: prolog Problem: Singleton Variable Prolog I would like to create a rule in Prolog that defines daughter_of and son_of in my database as follows. However I am getting a singleton error, with Y, M, and F in the new rules. I thought this only ...
Singleton Variable Prolog Singleton Variable Prolog prolog Singleton Variable Prolog sister_of brother_of daughter_of son_of Singleton Variable Prolog I would like to create a rule in Prolog that defines daughter_of and son_of in my database as follows. However I am getting a singleton error, with Y, M, and F in the ne...
[ 0.0296630859375, 0.00110626220703125, -0.01507568359375, 0.00616455078125, -0.0037078857421875, 0.0120849609375, -0.0162353515625, -0.0023345947265625, 0.0198974609375, -0.047607421875, -0.01385498046875, -0.0263671875, -0.005889892578125, 0.00604248046875, 0.0289306640625, -0.01989746...
[ 43609, 1507, 84572, 2886, 1250, 4867, 502, 114015, 4390, 82953, 76849, 775, 1884, 28282, 79986, 61924, 136, 63399, 28960, 11001, 18499, 990, 276, 563, 3525, 91736, 1257, 77336, 11814, 234311, 7108, 33022, 196219, 77947 ]
[ 0.18408203125, 0.235595703125, 0.1822509765625, 0.07244873046875, 0.1343994140625, 0.2286376953125, 0.0706787109375, 0.1881103515625, 0.20263671875, 0.1439208984375, 0.2005615234375, 0.1441650390625, 0.00872802734375, 0.08233642578125, 0.180908203125, 0.1707763671875, 0.0687255859375...
embed
37710181_c0
37710181
prolog
0
Title: return elements from list of lists - prolog Problem title: return elements from list of lists - prolog Tags: list, prolog Problem: return elements from list of lists - prolog I have a list of lists that contain titles and scores like : [ [ 'title1',100 ],[ 'title2',200 ],...] . I have to make a predicate that re...
return elements from list of lists - prolog return elements from list of lists - prolog list prolog list title1 title2 find_title Score ListOfTitles return_title return elements from list of lists - prolog I have a list of lists that contain titles and scores like : [ [ 'title1',100 ],[ 'title2',200 ],...] . I have to ...
[ 0.0174560546875, 0.011474609375, 0.00154876708984375, -0.0026702880859375, -0.0059814453125, 0.004180908203125, 0.0096435546875, 0.00494384765625, 0.0042724609375, -0.0281982421875, 0.0218505859375, -0.00543212890625, -0.01336669921875, 0.0111083984375, 0.0115966796875, 0.021728515625,...
[ 30646, 80854, 1295, 5303, 111, 7, 502, 4867, 44759, 418, 304, 7413, 5440, 168071, 32036, 132887, 618, 217, 1577, 70541, 136, 47763, 3559, 5955, 1653, 2063, 67, 2174, 765, 24233, 30854, 154663, 5701, 31577, 4343, 23, 37842, 18, 4488, 25647...
[ 0.18994140625, 0.1680908203125, 0.110107421875, 0.191162109375, 0.08349609375, 0.050140380859375, 0.1231689453125, 0.1568603515625, 0.1986083984375, 0.030120849609375, 0.03326416015625, 0.09234619140625, 0.1865234375, 0.1527099609375, 0.1497802734375, 0.1441650390625, 0.04150390625, ...
embed
72866486_c0
72866486
prolog
0
Title: Parameter arithmetic in Prolog Problem title: Parameter arithmetic in Prolog Tags: induction, prolog, syntax Problem: Parameter arithmetic in Prolog In Prolog, I would like to implement a trivial logical induction predicate i as (1): i(0). i(N) :- i(N-1). or (2): i(0). i(N+1) :- i(N). But this doesn't work; with...
Parameter arithmetic in Prolog Parameter arithmetic in Prolog induction prolog syntax Parameter Prolog N-1 Parameter arithmetic in Prolog In Prolog, I would like to implement a trivial logical induction predicate i as (1): or (2): But this doesn't work; with (1), query i(3). causes a stack overflow; with (2), i(3). ret...
[ -0.018798828125, 0.00408935546875, -0.0029144287109375, 0.01214599609375, -0.004913330078125, 0.00634765625, 0.00982666015625, 0.0167236328125, 0.006256103515625, -0.0263671875, 0.0025634765625, -0.01416015625, -0.0250244140625, -0.005157470703125, 0.04345703125, -0.028076171875, 0.0...
[ 1720, 29089, 187, 8962, 282, 1250, 4867, 23, 77391, 502, 6002, 541, 5759, 1884, 29479, 1927, 686, 62775, 289, 1653, 2063, 67, 17, 237, 798, 707, 1737, 903, 22027, 18, 4488, 41, 1294, 69829, 113660, 177261, 645, 118664, 30646, 98320, 278...
[ 0.13330078125, 0.16259765625, 0.018157958984375, 0.162841796875, 0.1075439453125, 0.1861572265625, 0.267333984375, 0.126953125, 0.1888427734375, 0.1114501953125, 0.0555419921875, 0.012847900390625, 0.0855712890625, 0.0256500244140625, 0.11572265625, 0.05859375, 0.087646484375, 0.09...
embed
27263004_c0
27263004
prolog
0
Title: Flattening only one level of a list in Prolog Problem title: Flattening only one level of a list in Prolog Tags: list, prolog, flatten Problem: Flattening only one level of a list in Prolog I'm working on a problem to flatten only one level of a list in Prolog. For example, [[1],[2,3]] would become [1,2,3] , but...
Flattening only one level of a list in Prolog Flattening only one level of a list in Prolog list prolog flatten Flattening Prolog my_flatten is_list Flattening only one level of a list in Prolog I'm working on a problem to flatten only one level of a list in Prolog. For example, [[1],[2,3]] would become [1,2,3] , but [...
[ 0.01190185546875, 0.02099609375, 0.0223388671875, 0.0030670166015625, -0.000667572021484375, 0.00384521484375, -0.00506591796875, 0.002166748046875, 0.0216064453125, -0.013916015625, 0.015625, -0.00787353515625, -0.0120849609375, 0.01226806640625, 0.00518798828125, -0.00002098083496093...
[ 106516, 67, 592, 4734, 1632, 17366, 5303, 1250, 4867, 502, 49878, 510, 759, 150632, 83, 6562, 23, 20697, 2967, 25256, 155761, 86245, 2806, 24209, 1284, 418, 39556, 96386, 7565, 47, 68252, 18151, 4488, 3034, 50218, 43240 ]
[ 0.23388671875, 0.173095703125, 0.011077880859375, 0.133056640625, 0.14697265625, 0.260009765625, 0.207275390625, 0.1632080078125, 0.2484130859375, 0.1138916015625, 0.2286376953125, 0.21826171875, 0.09674072265625, 0.213623046875, 0.1212158203125, 0.1971435546875, 0.01336669921875, ...
embed
49490302_c0
49490302
prolog
0
Title: Are PROLOG facts bilateral? Problem title: Are PROLOG facts bilateral? Tags: prolog Problem: Are PROLOG facts bilateral? So I have just started programming in PROLOG (SWI distribution). I have good logic bases and I am familiar with facts, rules, quantification and all that vocabulary. As far as I know, you can ...
Are PROLOG facts bilateral? Are PROLOG facts bilateral? prolog PROLOG Are PROLOG facts bilateral? So I have just started programming in PROLOG (SWI distribution). I have good logic bases and I am familiar with facts, rules, quantification and all that vocabulary. As far as I know, you can define a fact such as: And I k...
[ 0.035400390625, 0.0030975341796875, 0.0185546875, 0.0162353515625, -0.01611328125, 0.017333984375, 0.002716064453125, -0.01495361328125, 0.00098419189453125, 0.007080078125, 0.003326416015625, -0.0216064453125, -0.033203125, -0.005889892578125, -0.007049560546875, 0.005340576171875, ...
[ 15901, 10514, 47510, 15824, 7, 160617, 502, 4867, 26859, 56037, 449, 23, 38969, 113068, 62775, 51039, 16031, 91736, 55230, 41274, 190219, 3714, 831, 61924, 10, 237, 3249, 41, 1884, 35166, 1221, 186, 11, 36663, 79986, 11814, 198395, 159978, ...
[ 0.06011962890625, 0.1917724609375, 0.28271484375, 0.2388916015625, 0.114990234375, 0.302001953125, 0.1439208984375, 0.231201171875, 0.01080322265625, 0.1197509765625, 0.014007568359375, 0.008148193359375, 0.146728515625, 0.14306640625, 0.1358642578125, 0.012359619140625, 0.0546264648...
embed
1924651_c0
1924651
prolog
0
Title: prolog: fixing multiple answers (using cut?) Problem title: prolog: fixing multiple answers (using cut?) Tags: prolog Problem: prolog: fixing multiple answers (using cut?) i'm counting number of instances in a list... count(_,[],N,N). count(Elem,[Elem|List],N,M) :- !, N1 is N+1, count(Elem,List,N1,M). count(Elem...
prolog: fixing multiple answers (using cut?) prolog: fixing multiple answers (using cut?) prolog cut Elem List count2 Lnew prolog: fixing multiple answers (using cut?) i'm counting number of instances in a list... So, i wrote this up two ways in prolog, and the first one works (above), but i was curious to know why the...
[ 0.00823974609375, -0.0035858154296875, 0.01483154296875, 0.002471923828125, 0.00518798828125, 0.014892578125, -0.01263427734375, -0.00860595703125, 0.0306396484375, -0.032470703125, -0.021728515625, -0.0208740234375, 0.024658203125, 0.015380859375, 0.026611328125, -0.00830078125, 0.0...
[ 502, 4867, 30022, 214, 48716, 35166, 59226, 540, 195, 32036, 54529, 304, 54936, 223, 14012, 110527, 5303, 54397, 903, 1257, 6626, 48322, 43240, 193844, 15400, 17932, 22027, 18, 8337, 4734, 5117, 26785 ]
[ 0.1502685546875, 0.22265625, 0.1278076171875, 0.07257080078125, 0.2059326171875, 0.1788330078125, 0.161865234375, 0.051483154296875, 0.1224365234375, 0.1337890625, 0.1910400390625, 0.0806884765625, 0.107666015625, 0.009033203125, 0.09222412109375, 0.23095703125, 0.1513671875, 0.044...
embed
30575450_c0
30575450
prolog
0
Title: How to keep punctuation as a separate element in split_string in Prolog Problem title: How to keep punctuation as a separate element in split_string in Prolog Tags: prolog, punctuation, split, string, swi-prolog Problem: How to keep punctuation as a separate element in split_string in Prolog I'm doing an assignm...
How to keep punctuation as a separate element in split_string in Prolog How to keep punctuation as a separate element in split_string in Prolog prolog punctuation split string swi-prolog How split_string Prolog Hello Temp How to keep punctuation as a separate element in split_string in Prolog I'm doing an assignment in...
[ 0.0036773681640625, 0.007080078125, -0.00185394287109375, 0.0172119140625, -0.045166015625, 0.0130615234375, -0.00201416015625, -0.00909423828125, -0.000469207763671875, -0.01123046875, 0.0174560546875, -0.00921630859375, -0.017578125, -0.00185394287109375, -0.0159912109375, 0.00014305...
[ 11249, 13695, 33595, 34, 2320, 237, 84797, 12830, 65450, 91693, 1250, 4867, 454, 502, 79315, 2452, 3454, 35378, 37446, 23, 95486, 9014, 2967, 5303, 80854, 1884, 903, 1810, 62822, 30646, 15549, 4358 ]
[ 0.065185546875, 0.18798828125, 0.1986083984375, 0.1632080078125, 0.12451171875, 0.07122802734375, 0.1600341796875, 0.1739501953125, 0.2099609375, 0.2293701171875, 0.1572265625, 0.2230224609375, 0.0284881591796875, 0.09930419921875, 0.234130859375, 0.0869140625, 0.0848388671875, 0.0...
embed
74392226_c0
74392226
prolog
0
Title: Writing predicates in prolog, data search Problem title: Writing predicates in prolog, data search Tags: swish, prolog, predicate, logic Problem: Writing predicates in prolog, data search Write the predicate, reach(Departure, Arrivals) to find all points you can get into from the Departure point. We have this fa...
Writing predicates in prolog, data search Writing predicates in prolog, data search swish prolog predicate logic Writing Price Point Writing predicates in prolog, data search Write the predicate, reach(Departure, Arrivals) to find all points you can get into from the Departure point. We have this facts: For example ?- ...
[ 0.01202392578125, 0.03125, 0.023681640625, -0.00096893310546875, -0.00799560546875, 0.0120849609375, 0.004058837890625, -0.006072998046875, 0.0252685546875, -0.031982421875, -0.013427734375, 0.00933837890625, -0.00946044921875, -0.01177978515625, 0.019287109375, 0.01373291015625, 0.0...
[ 213185, 1653, 2063, 1636, 23, 502, 4867, 4, 2053, 33938, 91, 114686, 67, 62775, 48025, 41097, 601, 18781, 58359, 4657, 2500, 6644, 205545, 8080, 16, 47, 7413, 756, 26847, 831, 2046, 3934, 1295, 262, 6275, 5, 765, 903, 15824, 1326, 27781...
[ 0.2188720703125, 0.21484375, 0.25732421875, 0.16064453125, 0.0570068359375, 0.16162109375, 0.250244140625, 0.01226806640625, 0.1507568359375, 0.223388671875, 0.07244873046875, 0.254150390625, 0.142822265625, 0.1943359375, 0.2125244140625, 0.1728515625, 0.1263427734375, 0.0955810546...
embed
3007279_c0
3007279
prolog
0
Title: Prolog simple question Problem title: Prolog simple question Tags: if-statement, prolog Problem: Prolog simple question I'm still figuring out how prolog really works and was trying to develop an small test program with an if statment but can't really get the value I need out. prog(Sx,Sy) :- Sx > 0 -> update(Sx,...
Prolog simple question Prolog simple question if-statement prolog Prolog RES S-V Prolog simple question I'm still figuring out how prolog really works and was trying to develop an small test program with an if statment but can't really get the value I need out. I want prog to give Sy as an answer instead of true so I c...
[ 0.00885009765625, 0.0181884765625, 0.004302978515625, 0.006866455078125, -0.00921630859375, 0.030029296875, -0.003753662109375, 0.037353515625, 0.006988525390625, -0.001953125, 0.013916015625, 0.005279541015625, -0.033935546875, -0.0101318359375, 0.0164794921875, 0.00933837890625, 0....
[ 1250, 4867, 8781, 9655, 2174, 61340, 674, 502, 61661, 856, 43240, 85493, 3034, 1528, 13254, 34292, 3871, 1810, 3444, 67973, 8337, 4843, 237, 35166, 64457, 29568, 4527, 10750, 1653, 2063, 18151, 76199, 18499, 3229, 35431, 98320, 37842, 30646 ]
[ 0.154296875, 0.2481689453125, 0.1572265625, 0.09716796875, 0.18310546875, 0.17236328125, 0.03814697265625, 0.143798828125, 0.0833740234375, 0.123046875, 0.082763671875, 0.0133056640625, 0.1202392578125, 0.0714111328125, 0.15185546875, 0.065673828125, 0.0180511474609375, 0.020050048...
embed
50252794_c0
50252794
prolog
0
Title: Prolog - getting a list of friends of friends Problem title: Prolog - getting a list of friends of friends Tags: recursion, prolog, prolog-findall Problem: Prolog - getting a list of friends of friends I'm struggling to get a decent result, I have some friends, friend(a,b). friend(a,b2). friend(a,b3). friend(b,c...
Prolog - getting a list of friends of friends Prolog - getting a list of friends of friends recursion prolog prolog-findall Prolog List Prolog - getting a list of friends of friends I'm struggling to get a decent result, I have some friends, Using findall(X,friend(a,X),List) I'm getting all direct friends of a For exam...
[ 0.021240234375, -0.0021209716796875, 0.00335693359375, 0.0220947265625, 0.00738525390625, -0.00445556640625, -0.0142822265625, 0.001922607421875, 0.00762939453125, -0.03857421875, 0.0029449462890625, -0.0262451171875, -0.00994873046875, 0.02734375, 0.0228271484375, 0.00689697265625, ...
[ 1250, 4867, 20949, 5303, 111, 23902, 10, 195625, 1830, 502, 111607, 5584, 32036, 237875, 2046, 16797, 16750, 765, 3060, 7413, 1542, 84240, 11, 154663, 756, 8951, 3444, 138, 17366, 26950, 304, 363, 210732, 31577, 26818, 831, 4734, 39527, 114...
[ 0.1644287109375, 0.2412109375, 0.10791015625, 0.203125, 0.1556396484375, 0.2310791015625, 0.0377197265625, 0.1474609375, 0.04669189453125, 0.1297607421875, 0.077880859375, 0.1444091796875, 0.1715087890625, 0.065185546875, 0.122802734375, 0.029296875, 0.0809326171875, 0.034027099609...
embed
71030701_c0
71030701
prolog
0
Title: Print Answer using Facts Problem title: Print Answer using Facts Tags: prolog Problem: Print Answer using Facts I am trying to print the values present in Facts. For example when I have the following Facts: terrain(2,(2,4,3,1)). terrain(2,(3,1,2,4)). terrain(1,(4,3,1,2)). terrain(3,(1,2,4,3)). Input: v([1,2,3],R...
Print Answer using Facts Print Answer using Facts prolog Facts Print Answer Print Answer using Facts I am trying to print the values present in Facts. For example when I have the following Facts: Input: It should give me: But the code isn't printing the second value of 2 i.e. (3,1,2,4) present in Facts. I am getting: H...
[ 0.0126953125, -0.005340576171875, -0.006591796875, 0.00408935546875, -0.005340576171875, 0.0089111328125, -0.01385498046875, 0.00799560546875, -0.01171875, -0.0101318359375, 0.0034027099609375, -0.00171661376953125, 0.01324462890625, 0.01141357421875, -0.02294921875, -0.00543212890625,...
[ 39754, 130373, 17368, 132640, 7, 502, 4867, 31577, 28412, 142424, 13379, 23, 25632, 360, 7077, 5608, 8337, 163, 4966, 70, 18151, 18, 2448, 1916, 17932, 34292, 111, 116, 6896, 133063, 29557, 11249, 54, 87, 2046, 756, 7722, 100, 24233, 10 ]
[ 0.2257080078125, 0.2529296875, 0.1322021484375, 0.29296875, 0.162841796875, 0.1226806640625, 0.1771240234375, 0.0745849609375, 0.211181640625, 0.2109375, 0.1845703125, 0.07293701171875, 0.04248046875, 0.04925537109375, 0.076171875, 0.04864501953125, 0.08831787109375, 0.026336669921...
embed
37008560_c0
37008560
prolog
0
Title: Finding the oldest person in Prolog Query Problem title: Finding the oldest person in Prolog Query Tags: prolog Problem: Finding the oldest person in Prolog Query I have a question to this: Finding the oldest person in Prolog Data: age(john, 10). age(mary, 15). age(rose, 75). age(jack, 49). age(carl, 17). age(lu...
Finding the oldest person in Prolog Query Finding the oldest person in Prolog Query prolog Finding Prolog Query Finding the oldest person in Prolog Query I have a question to this: Finding the oldest person in Prolog Data: So this query will return the oldest person: I am new to Prolog and I am having a hard time to un...
[ 0.0123291015625, 0.038818359375, 0.006866455078125, 0.01409912109375, -0.01220703125, 0.01483154296875, 0.00182342529296875, -0.001861572265625, -0.00518798828125, -0.06494140625, 0.0052490234375, -0.0142822265625, -0.009521484375, -0.003570556640625, 0.0135498046875, -0.00174713134765...
[ 26040, 214, 70, 10332, 525, 3445, 23, 1250, 4867, 58836, 53, 502, 9655, 11809, 903, 41, 1294, 1221, 30646, 3525, 7941, 1733, 28219, 41872, 1328, 2831, 47, 2046, 5646, 756, 32070, 1193, 15490, 990, 167785, 2806, 27150, 55681, 4358, 16454 ]
[ 0.133056640625, 0.042449951171875, 0.045562744140625, 0.2181396484375, 0.21826171875, 0.1795654296875, 0.059844970703125, 0.1717529296875, 0.25244140625, 0.183837890625, 0.0787353515625, 0.1094970703125, 0.0435791015625, 0.109375, 0.04681396484375, 0.1290283203125, 0.1356201171875, ...
embed
39687258_c0
39687258
prolog
0
Title: Why do I not get the value from length in this Prolog Query? Problem title: Why do I not get the value from length in this Prolog Query? Tags: prolog, list Problem: Why do I not get the value from length in this Prolog Query? I have something like this in my .pl file: ... path_length(A, B, length(L, size)) :- pa...
Why do I not get the value from length in this Prolog Query? Why do I not get the value from length in this Prolog Query? prolog list length Why Prolog Query path_length path_record Why do I not get the value from length in this Prolog Query? I have something like this in my .pl file: And when i do: I get: But what I w...
[ 0.006561279296875, 0.021728515625, 0.0029144287109375, 0.01531982421875, -0.00860595703125, -0.002044677734375, -0.01483154296875, -0.0037078857421875, 0.0191650390625, -0.050048828125, 0.00159454345703125, 0.01348876953125, -0.0230712890625, 0.0240478515625, 0.00860595703125, 0.000102...
[ 44084, 959, 2046, 34292, 1295, 140909, 903, 1250, 4867, 58836, 53, 54, 502, 5303, 60875, 23986, 927, 107, 32271, 70, 23, 5, 2424, 11435, 3444, 41, 1294, 30646, 444, 20594, 44691, 162520, 120592, 4358 ]
[ 0.1163330078125, 0.155029296875, 0.11865234375, 0.2010498046875, 0.13134765625, 0.2301025390625, 0.0579833984375, 0.1474609375, 0.214111328125, 0.169677734375, 0.09942626953125, 0.0107421875, 0.1080322265625, 0.12841796875, 0.1688232421875, 0.142578125, 0.07672119140625, 0.01208496...
embed
45525731_c0
45525731
prolog
0
Title: ERROR: Out of global stack Problem title: ERROR: Out of global stack Tags: prolog Problem: ERROR: Out of global stack I'm trying to create a predicate that will output all the lists minus one element each time. For a list [a, b, c], I want predicate return a, [b, c] b, [a, c] c, [a, b] I've created the follow pr...
ERROR: Out of global stack ERROR: Out of global stack prolog ERROR Out elem_list Elems ElemsNoX ElemsA ElemsAX ElemsB ERROR: Out of global stack I'm trying to create a predicate that will output all the lists minus one element each time. For a list [a, b, c], I want predicate return I've created the follow predicate: W...
[ 0.019287109375, 0.023193359375, -0.01239013671875, 0.001251220703125, -0.017578125, 0.0269775390625, 0.0021209716796875, 0.003936767578125, 0.01123046875, -0.033447265625, 0.01312255859375, -0.0008544921875, 0.00897216796875, -0.00555419921875, 0.022216796875, 0.00640869140625, 0.018...
[ 151206, 24638, 13538, 111, 7964, 177261, 12, 502, 4867, 88, 195, 6562, 540, 5021, 1542, 7, 284, 72850, 571, 31577, 28282, 1653, 2063, 67, 140992, 756, 5303, 26948, 1632, 12830, 12638, 1733, 11, 876, 501, 3444, 30646, 75935, 28960, 37202, ...
[ 0.1593017578125, 0.1181640625, 0.2342529296875, 0.25146484375, 0.236572265625, 0.265869140625, 0.028076171875, 0.149658203125, 0.2340087890625, 0.0570068359375, 0.15576171875, 0.2054443359375, 0.052642822265625, 0.0810546875, 0.1221923828125, 0.008026123046875, 0.0714111328125, 0.1...
embed
49291687_c0
49291687
prolog
0
Title: PROLOG local stack overflow Problem title: PROLOG local stack overflow Tags: prolog Problem: PROLOG local stack overflow The following code is giving me a fatal local stack overflow error (after all solutions are found, instead of "no"), and I don't understand why. I'm pretty sure that it has something to do wit...
PROLOG local stack overflow PROLOG local stack overflow prolog PROLOG Yrange Rest Y1-Y X1-X N-1 PROLOG local stack overflow The following code is giving me a fatal local stack overflow error (after all solutions are found, instead of "no"), and I don't understand why. I'm pretty sure that it has something to do with th...
[ -0.00185394287109375, 0.0078125, 0.0054931640625, 0.01904296875, -0.0164794921875, -0.007476806640625, -0.030517578125, 0.00872802734375, 0.016357421875, -0.0247802734375, 0.0078125, 0.0172119140625, 0.024658203125, -0.01708984375, 0.03515625, 0.004180908203125, 0.00153350830078125, ...
[ 10514, 47510, 4000, 177261, 645, 118664, 502, 4867, 990, 94250, 49756, 20268, 1723, 1193, 1542, 5759, 25632, 18151, 68772, 163, 85235, 18499, 46327, 756, 51347, 14037, 64457, 157, 18, 28219, 15400, 37457, 1653, 2063, 67, 91995, 5303, 216806 ]
[ 0.184814453125, 0.2308349609375, 0.171142578125, 0.19580078125, 0.144775390625, 0.26171875, 0.1287841796875, 0.142822265625, 0.0694580078125, 0.2291259765625, 0.165283203125, 0.045928955078125, 0.080322265625, 0.025299072265625, 0.049102783203125, 0.07904052734375, 0.087890625, 0.1...
embed
64549904_c0
64549904
prolog
0
Title: How can I substract in prolog the elements from this structure: s(1, [[],[],[],[]] )? I need the integer and the matrix Problem title: How can I substract in prolog the elements from this structure: s(1, [[],[],[],[]] )? I need the integer and the matrix Tags: prolog Problem: How can I substract in prolog the el...
How can I substract in prolog the elements from this structure: s(1, [[],[],[],[]] )? I need the integer and the matrix How can I substract in prolog the elements from this structure: s(1, [[],[],[],[]] )? I need the integer and the matrix prolog this How How can I substract in prolog the elements from this structure: ...
[ 0.0034332275390625, 0.01318359375, 0.01513671875, 0.003662109375, 0.0000743865966796875, 0.00250244140625, -0.00616455078125, 0.01031494140625, 0.0128173828125, -0.025146484375, 0.0020599365234375, 0.0107421875, -0.031494140625, -0.007293701171875, -0.01556396484375, -0.01226806640625,...
[ 11249, 831, 1614, 2816, 15390, 23, 502, 4867, 80854, 1295, 903, 45646, 91, 41600, 110558, 3871, 892, 1505, 136, 50944, 425, 70, 4, 1065, 86245, 3525, 435, 959, 26366, 3642, 590, 798, 24763, 37842, 32354, 125663, 5303, 192, 19077, 38246, ...
[ 0.039794921875, 0.05645751953125, 0.1776123046875, 0.209716796875, 0.131103515625, 0.0736083984375, 0.18017578125, 0.2393798828125, 0.1971435546875, 0.10308837890625, 0.0606689453125, 0.172607421875, 0.1685791015625, 0.11865234375, 0.10052490234375, 0.10345458984375, 0.1324462890625,...
embed
21775220_c0
21775220
prolog
0
Title: Prolog- How does a cut work in combination with OR operator? Problem title: Prolog- How does a cut work in combination with OR operator? Tags: prolog, prolog-cut Problem: Prolog- How does a cut work in combination with OR operator? I have written this little program: married(guy1, fem1). married(guy2, fem2). mar...
Prolog- How does a cut work in combination with OR operator? Prolog- How does a cut work in combination with OR operator? prolog prolog-cut Prolog How guy1 fem1 guy2 fem2 married_to Prolog- How does a cut work in combination with OR operator? I have written this little program: Prints: My purpose was to print the marri...
[ 0.0142822265625, 0.01055908203125, 0.0206298828125, 0.02783203125, -0.016845703125, 0.0045166015625, -0.01171875, 0.01220703125, 0.02197265625, -0.041259765625, -0.01470947265625, -0.0274658203125, 0.0023651123046875, -0.00848388671875, 0.00970458984375, -0.004119873046875, 0.0102539...
[ 1250, 4867, 9, 11249, 14602, 10, 59226, 4488, 23, 162515, 678, 33172, 39933, 502, 19774, 48948, 418, 6854, 304, 139505, 188, 59121, 903, 10176, 1528, 39754, 60042, 509, 28412, 70, 24941, 1284, 1632, 1733, 12638, 36917, 79986, 43240, 100, ...
[ 0.182373046875, 0.234130859375, 0.0189971923828125, 0.09765625, 0.0867919921875, 0.06585693359375, 0.234619140625, 0.171630859375, 0.0587158203125, 0.177490234375, 0.1220703125, 0.23388671875, 0.240478515625, 0.1356201171875, 0.21044921875, 0.144775390625, 0.042266845703125, 0.1683...
embed
39814261_c0
39814261
prolog
0
Title: Intuitive Input-Output in Prolog Problem title: Intuitive Input-Output in Prolog Tags: prolog, output, user-input Problem: Intuitive Input-Output in Prolog I am implementing a checkers game in Prolog, and have two unrelated questions: When asking the user for inputs (for example, choosing white/black for its col...
Intuitive Input-Output in Prolog Intuitive Input-Output in Prolog prolog output user-input Intuitive Input-Output Prolog Intuitive Input-Output in Prolog I am implementing a checkers game in Prolog, and have two unrelated questions: When asking the user for inputs (for example, choosing white/black for its color), I us...
[ 0.00213623046875, -0.011962890625, 0.00958251953125, 0.00823974609375, -0.0198974609375, 0.009765625, 0.0069580078125, 0.006439208984375, -0.013427734375, -0.0186767578125, 0.0020294189453125, 0.0172119140625, -0.0052490234375, -0.00738525390625, 0.0169677734375, -0.004547119140625, ...
[ 360, 18425, 4935, 7077, 79858, 23, 1250, 4867, 502, 140992, 38937, 73, 29479, 12765, 1314, 6712, 174822, 17582, 113292, 107730, 218873, 35011, 64, 151675, 6863, 10576, 4527, 12301, 132, 10625, 1484, 84616, 3564, 678, 4393, 7279, 11249, 71864,...
[ 0.123779296875, 0.2244873046875, 0.127685546875, 0.1805419921875, 0.205322265625, 0.0552978515625, 0.1610107421875, 0.243408203125, 0.1085205078125, 0.160400390625, 0.1385498046875, 0.0653076171875, 0.11328125, 0.203125, 0.1822509765625, 0.12548828125, 0.017791748046875, 0.03149414...
embed
58805565_c2
58805565
prolog
2
Donskoy', 'Vasiliy I'). parent('Vasiliy I', 'Vasiliy II Temniy'). parent('Vasiliy II Temniy', 'Ioan III'). parent('Ioan III', 'Vasiliy III'). parent('Vasiliy III', 'Ioan IV'). parent('Ioan IV', 'Fedor'). relations(X,Z) :- parent(X,Z). relations(X,Z) :- parent(X,Y), ancestor(Y,Z). Example: ?- relations('Rurik', 'Oleg')...
Donskoy', 'Vasiliy I'). parent('Vasiliy I', 'Vasiliy II Temniy'). parent('Vasiliy II Temniy', 'Ioan III'). parent('Ioan III', 'Vasiliy III'). parent('Vasiliy III', 'Ioan IV'). parent('Ioan IV', 'Fedor'). relations(X,Z) :- parent(X,Z). relations(X,Z) :- parent(X,Y), ancestor(Y,Z). Example: ?- relations('Rurik', 'Oleg')...
[ -0.028564453125, 0.01422119140625, 0.00823974609375, 0.023193359375, -0.01141357421875, -0.00909423828125, -0.01043701171875, 0.016845703125, -0.00927734375, -0.043212890625, 0.01373291015625, -0.011962890625, -0.004669189453125, 0.0096435546875, 0.0006256103515625, -0.0101318359375, ...
[ 7650, 1579, 53, 25, 28563, 21050, 87, 49129, 1995, 21217, 93, 568, 57114, 4830, 7610, 30154, 1846, 91582, 1542, 1511, 1723, 60502, 1290, 89536, 705, 26951, 2154, 670, 2828, 4518, 180, 60887, 1236, 28864, 26073, 11249, 81068, 129695, 33214, ...
[ 0.25244140625, 0.25537109375, 0.213623046875, 0.029205322265625, 0.15869140625, 0.211181640625, 0.130126953125, 0.2083740234375, 0.072265625, 0.1722412109375, 0.1240234375, 0.013671875, 0.128662109375, 0.10589599609375, 0.131591796875, 0.063720703125, 0.1527099609375, 0.20141601562...
embed
44295291_c0
44295291
prolog
0
Title: How do I check if a specific fact exists in my prolog database Problem title: How do I check if a specific fact exists in my prolog database Tags: prolog Problem: How do I check if a specific fact exists in my prolog database I'm making a question and answer system in prolog. If I say, "the color of the car is b...
How do I check if a specific fact exists in my prolog database How do I check if a specific fact exists in my prolog database prolog How How do I check if a specific fact exists in my prolog database I'm making a question and answer system in prolog. If I say, "the color of the car is blue," fact(car, color, blue) is a...
[ 0.0283203125, -0.000522613525390625, -0.001373291015625, 0.0186767578125, 0.0003566741943359375, 0.01025390625, 0.006011962890625, -0.0040283203125, -0.0027923583984375, -0.042724609375, 0.00021839141845703125, -0.00083160400390625, -0.018798828125, -0.0174560546875, -0.006683349609375, ...
[ 11249, 54, 87, 12765, 2174, 10, 29458, 15824, 32316, 7, 23, 759, 502, 4867, 63399, 20662, 9655, 136, 35166, 5426, 4263, 5154, 10576, 111, 70, 2258, 83, 57571, 3284, 49814, 30646, 9092, 450, 903, 831, 1653, 2063, 1636, 3444, 3714, 3642, ...
[ 0.0963134765625, 0.05450439453125, 0.01251220703125, 0.2481689453125, 0.1566162109375, 0.0386962890625, 0.2083740234375, 0.24560546875, 0.23583984375, 0.1268310546875, 0.1268310546875, 0.05364990234375, 0.1771240234375, 0.229248046875, 0.2177734375, 0.0200958251953125, 0.080505371093...
embed
47763351_c0
47763351
prolog
0
Title: Why is my delete_all method returning a list with a random memory location in prolog? Problem title: Why is my delete_all method returning a list with a random memory location in prolog? Tags: list, prolog, prolog-toplevel Problem: Why is my delete_all method returning a list with a random memory location in pro...
Why is my delete_all method returning a list with a random memory location in prolog? Why is my delete_all method returning a list with a random memory location in prolog? list prolog prolog-toplevel Why delete_all Result _G1355 mydelete_all ThowAway Tail Why is my delete_all method returning a list with a random memor...
[ 0.01422119140625, 0.005523681640625, -0.0001773834228515625, 0.00909423828125, 0.00015544891357421875, 0.0245361328125, 0.007568359375, -0.015869140625, 0.002227783203125, -0.024658203125, 0.0277099609375, -0.007415771484375, -0.016357421875, 0.01336669921875, 0.01214599609375, 0.00531...
[ 44084, 83, 154109, 5584, 55300, 30646, 214, 5303, 96759, 98323, 31913, 502, 4867, 678, 13784, 67919, 126684, 11663, 759, 8520, 67, 32238, 434, 7514, 1218, 379, 454, 23, 31577, 756, 80854, 7440, 990, 10, 4488, 2967, 44691, 13580, 16750, 18...
[ 0.09619140625, 0.034210205078125, 0.2203369140625, 0.2230224609375, 0.1304931640625, 0.1463623046875, 0.030364990234375, 0.1353759765625, 0.1365966796875, 0.1285400390625, 0.146484375, 0.122314453125, 0.207763671875, 0.039642333984375, 0.05084228515625, 0.1375732421875, 0.15417480468...
embed
67013819_c0
67013819
prolog
0
Title: Prolog: Why doesn't this predicate fail with an empty list passed as an argument Problem title: Prolog: Why doesn't this predicate fail with an empty list passed as an argument Tags: prolog Problem: Prolog: Why doesn't this predicate fail with an empty list passed as an argument I made a pretty basic p...
Prolog: Why doesn't this predicate fail with an empty list passed as an argument Prolog: Why doesn't this predicate fail with an empty list passed as an argument prolog Prolog Why Prolog: Why doesn't this predicate fail with an empty list passed as an argument I made a pretty basic predicate to explain my pro...
[ 0.0146484375, 0.00787353515625, 0.01312255859375, 0.0072021484375, -0.0142822265625, 0.015625, 0.005523681640625, -0.01312255859375, 0.0048828125, 0.035888671875, 0.01190185546875, 0.00347900390625, -0.0155029296875, 0.00139617919921875, -0.0027618408203125, 0.00762939453125, 0.03100...
[ 1250, 4867, 44084, 22027, 18, 903, 1653, 2063, 67, 35782, 678, 201505, 5303, 115081, 10750, 3768, 237, 502, 335, 30957, 41, 1294, 705, 6954, 1065, 1542, 175399, 30646, 98320, 134598, 71924, 140992, 23742, 3853, 2174 ]
[ 0.15576171875, 0.197021484375, 0.1224365234375, 0.06243896484375, 0.09228515625, 0.09503173828125, 0.154296875, 0.1812744140625, 0.08868408203125, 0.1915283203125, 0.046478271484375, 0.1988525390625, 0.187255859375, 0.09356689453125, 0.191162109375, 0.005889892578125, 0.0293426513671...
embed
5399795_c0
5399795
prolog
0
Title: Creating a list from a from a set of atoms in Prolog Problem title: Creating a list from a from a set of atoms in Prolog Tags: prolog Problem: Creating a list from a from a set of atoms in Prolog Eventually, I will need to create a list of lists in Prolog, but currently, I am having difficulty taking atoms and c...
Creating a list from a from a set of atoms in Prolog Creating a list from a from a set of atoms in Prolog prolog a Creating Prolog Creating a list from a from a set of atoms in Prolog Eventually, I will need to create a list of lists in Prolog, but currently, I am having difficulty taking atoms and creating an initial ...
[ 0.03271484375, 0.00032806396484375, 0.006072998046875, 0.017333984375, -0.0042724609375, 0.01483154296875, -0.0147705078125, 0.02587890625, -0.0106201171875, -0.0211181640625, 0.000885009765625, 0.00341796875, 0.009521484375, -0.0125732421875, 0.00118255615234375, 0.01519775390625, -...
[ 56781, 5303, 1295, 10, 5423, 34627, 1250, 4867, 7, 502, 1916, 28282, 23, 82424, 34844, 35971, 105233, 61475, 765, 7515, 1653, 2063, 67, 5646, 10576, 91566, 9351, 33636, 5, 14838, 76195, 148477, 38265, 66, 123, 5739, 7793, 39209, 143802, 2...
[ 0.1260986328125, 0.2298583984375, 0.1424560546875, 0.138427734375, 0.1124267578125, 0.2161865234375, 0.1485595703125, 0.2213134765625, 0.0406494140625, 0.1119384765625, 0.0156097412109375, 0.1302490234375, 0.04656982421875, 0.00048828125, 0.08953857421875, 0.042694091796875, 0.118530...
embed
35883481_c0
35883481
prolog
0
Title: Recursively finding sum in prolog Problem title: Recursively finding sum in prolog Tags: prolog Problem: Recursively finding sum in prolog I'm trying to use Prolog to find a sum of a path using recursion. I need to pass a list of nodes of a graph, then have it return the sum of their weights. This is what I've t...
Recursively finding sum in prolog Recursively finding sum in prolog prolog Recursively list_sum Head Tail TotalSum Sum1 Sum Recursively finding sum in prolog I'm trying to use Prolog to find a sum of a path using recursion. I need to pass a list of nodes of a graph, then have it return the sum of their weights. This is...
[ 0.0023345947265625, 0.019287109375, 0.0169677734375, 0.01104736328125, -0.018798828125, 0.0078125, -0.036865234375, 0.00921630859375, 0.01043701171875, -0.043212890625, 0.00665283203125, -0.037353515625, -0.017578125, 0.0005950927734375, 0.019775390625, 0.00054168701171875, 0.0058288...
[ 853, 48650, 5844, 90791, 10554, 502, 4867, 23, 5303, 11832, 44816, 1218, 379, 33867, 294, 316, 36335, 418, 31577, 4527, 1250, 7413, 111, 60875, 17368, 195625, 1830, 3871, 27875, 110, 988, 41382, 765, 30646, 57888, 37842, 9077, 7108, 28560, ...
[ 0.049530029296875, 0.1654052734375, 0.1380615234375, 0.1104736328125, 0.2115478515625, 0.13623046875, 0.21826171875, 0.0142669677734375, 0.1099853515625, 0.1895751953125, 0.1107177734375, 0.07489013671875, 0.0853271484375, 0.0987548828125, 0.06097412109375, 0.19580078125, 0.186523437...
embed
2260197_c0
2260197
prolog
0
Title: Othello (Reversi) game, flipping pieces, Prolog Problem title: Othello (Reversi) game, flipping pieces, Prolog Tags: prolog Problem: Othello (Reversi) game, flipping pieces, Prolog I am implementing Othello game in Prolog. The game board is represented as list of lists. I am facing a problem with flipping pieces...
Othello (Reversi) game, flipping pieces, Prolog Othello (Reversi) game, flipping pieces, Prolog prolog Othello Reversi Prolog Othello (Reversi) game, flipping pieces, Prolog I am implementing Othello game in Prolog. The game board is represented as list of lists. I am facing a problem with flipping pieces after making ...
[ 0.00168609619140625, 0.01275634765625, 0.02587890625, 0.005889892578125, -0.018310546875, 0.03125, 0.0172119140625, 0.00665283203125, -0.00836181640625, 0.011962890625, -0.0150146484375, 0.05419921875, -0.01507568359375, -0.0096435546875, 0.0224609375, 0.0005340576171875, 0.028320312...
[ 180, 927, 13817, 4332, 39799, 6712, 33977, 26783, 126371, 1250, 4867, 502, 853, 29479, 45443, 33636, 237, 5303, 7808, 2967, 7103, 20662, 25813, 113857, 6713, 756, 382, 48225, 19069, 158012, 63847, 22556, 7413, 63499, 147505, 11907, 35011, 177...
[ 0.1280517578125, 0.136474609375, 0.268310546875, 0.0819091796875, 0.2081298828125, 0.1099853515625, 0.174560546875, 0.1400146484375, 0.2166748046875, 0.1292724609375, 0.2158203125, 0.06793212890625, 0.06219482421875, 0.10205078125, 0.1854248046875, 0.165283203125, 0.064453125, 0.16...
embed
66934989_c0
66934989
prolog
0
Title: Find people who have children in common and form couples Problem title: Find people who have children in common and form couples Tags: prolog Problem: Find people who have children in common and form couples I am learning prolog and I have the following facts: parent(joseph,thiago). parent(camilla,thiago). paren...
Find people who have children in common and form couples Find people who have children in common and form couples prolog Find Find people who have children in common and form couples I am learning prolog and I have the following facts: I'm trying to find couples based on this rule: "A couple is made up of two people wh...
[ 0.0228271484375, -0.00555419921875, -0.0033416748046875, 0.005126953125, -0.000820159912109375, 0.00848388671875, -0.000255584716796875, 0.007720947265625, 0.0269775390625, -0.055908203125, -0.00274658203125, -0.019287109375, -0.01031494140625, 0.0264892578125, 0, 0.01611328125, 0.01...
[ 26040, 3395, 2750, 765, 20020, 23, 39210, 136, 3173, 24941, 502, 4867, 7, 52080, 25632, 15824, 31577, 47, 7413, 35509, 98, 903, 79986, 284, 7228, 1257, 111, 6626, 2967, 3060, 50339, 30646, 214, 119140, 27863 ]
[ 0.155517578125, 0.1630859375, 0.1236572265625, 0.162353515625, 0.256591796875, 0.12353515625, 0.2080078125, 0.047698974609375, 0.1861572265625, 0.292236328125, 0.1263427734375, 0.1878662109375, 0.09918212890625, 0.06719970703125, 0.02325439453125, 0.0662841796875, 0.05682373046875, ...
embed
79200857_c0
79200857
prolog
0
Title: PROLOG predicate returns false and negation does as well (using not) Problem title: PROLOG predicate returns false and negation does as well (using not) Tags: negation, prolog Problem: PROLOG predicate returns false and negation does as well (using not) I have the following rules set up. pokemonOfType(charmander...
PROLOG predicate returns false and negation does as well (using not) PROLOG predicate returns false and negation does as well (using not) negation prolog not PROLOG Winner Loser TypeWinner TypeLoser PROLOG predicate returns false and negation does as well (using not) I have the following rules set up. If I run ?-pokemo...
[ 0.01324462890625, -0.0004749298095703125, 0.017822265625, 0.020263671875, -0.007659912109375, -0.005218505859375, 0.01336669921875, -0.028564453125, -0.0162353515625, 0.0098876953125, 0.0028228759765625, -0.01116943359375, 0.008544921875, -0.004058837890625, 0.0064697265625, 0.01269531...
[ 10514, 47510, 1653, 2063, 67, 30646, 98320, 108, 125682, 14602, 223, 214, 959, 5299, 502, 4867, 209447, 3731, 60457, 92049, 100604, 25632, 91736, 5423, 1257, 11675, 24468, 74768, 9254, 669, 820, 6057, 9076, 140992, 8710, 705, 10869 ]
[ 0.1651611328125, 0.2467041015625, 0.1502685546875, 0.1986083984375, 0.0311279296875, 0.14404296875, 0.22314453125, 0.1556396484375, 0.1641845703125, 0.0217742919921875, 0.06622314453125, 0.0335693359375, 0.2174072265625, 0.002197265625, 0.134033203125, 0.2373046875, 0.1722412109375, ...
embed
55687499_c0
55687499
prolog
0
Title: Matrix Multiplication Prolog Problem title: Matrix Multiplication Prolog Tags: number-crunching, prolog Problem: Matrix Multiplication Prolog I found this code online for matrix multiplication in Prolog, can anyone who has experience in Prolog explain it to me? % SWI-Prolog has transpose/2 in its clpfd library :...
Matrix Multiplication Prolog Matrix Multiplication Prolog number-crunching prolog Matrix Multiplication Prolog SWI-Prolog use_module mm_helper Matrix Multiplication Prolog I found this code online for matrix multiplication in Prolog, can anyone who has experience in Prolog explain it to me?
[ -0.003753662109375, 0.012451171875, 0.0162353515625, 0.00445556640625, -0.00750732421875, -0.00162506103515625, -0.0238037109375, -0.012939453125, 0.0018768310546875, -0.040283203125, -0.0025177001953125, -0.0025482177734375, -0.02392578125, -0.03515625, -0.020263671875, -0.01062011718...
[ 194234, 19335, 182867, 1250, 4867, 14012, 47913, 19, 59207, 502, 38969, 10752, 4527, 83279, 2866, 73866, 14037, 903, 18151, 1118, 100, 50944, 425, 127664, 1363, 23, 831, 35672, 1556, 16981, 73342, 442, 163 ]
[ 0.1875, 0.11932373046875, 0.1300048828125, 0.168701171875, 0.2451171875, 0.06451416015625, 0.07098388671875, 0.0777587890625, 0.034149169921875, 0.09674072265625, 0.1251220703125, 0.13134765625, 0.0667724609375, 0.114013671875, 0.1328125, 0.19580078125, 0.049346923828125, 0.0747680...
embed
59231757_c0
59231757
prolog
0
Title: Prolog - System of equations solver Problem title: Prolog - System of equations solver Tags: prolog, clpfd Problem: Prolog - System of equations solver I trying to create compact code in prolog that sovles systems of equations. For example, in this case, the assumptions must be A+B-C-D=4, A+B+C+D=14, A-B+C-D=2. ...
Prolog - System of equations solver Prolog - System of equations solver prolog clpfd Prolog System B-C-D A-B C-D Prolog - System of equations solver I trying to create compact code in prolog that sovles systems of equations. For example, in this case, the assumptions must be A+B-C-D=4, A+B+C+D=14, A-B+C-D=2. I'm trying...
[ -0.004791259765625, 0.0157470703125, -0.003265380859375, 0.02099609375, -0.0224609375, -0.00421142578125, -0.030029296875, 0.015869140625, 0.006378173828125, -0.007049560546875, -0.0220947265625, -0.004119873046875, 0.0272216796875, 0.0224609375, -0.004974365234375, 0.0078125, -0.012...
[ 1250, 4867, 12353, 111, 13722, 5256, 3115, 814, 28, 502, 39557, 71, 335, 441, 397, 62, 9, 571, 313, 31577, 28282, 94928, 18151, 23, 45438, 1577, 76519, 237259, 8110, 1328, 107947, 2592, 55257, 86869, 756, 162515, 7722, 100, 391, 1284, 4...
[ 0.1805419921875, 0.250732421875, 0.1900634765625, 0.0615234375, 0.18896484375, 0.077392578125, 0.1212158203125, 0.1461181640625, 0.03594970703125, 0.135009765625, 0.0675048828125, 0.06365966796875, 0.086669921875, 0.07452392578125, 0.1563720703125, 0.08477783203125, 0.03155517578125,...
embed
30418287_c0
30418287
prolog
0
Title: Prolog assigning values to elements of a list Problem title: Prolog assigning values to elements of a list Tags: prolog Problem: Prolog assigning values to elements of a list I am new to Prolog and the problem I am dealing with is the following: Given a list of variables, I want to assign a value for each elemen...
Prolog assigning values to elements of a list Prolog assigning values to elements of a list prolog Prolog Restriction Prolog assigning values to elements of a list I am new to Prolog and the problem I am dealing with is the following: Given a list of variables, I want to assign a value for each element of that list, an...
[ -0.00104522705078125, -0.004638671875, 0.0086669921875, -0.00103759765625, 0.0054931640625, 0.001251220703125, 0.0137939453125, 0.01806640625, 0.007080078125, -0.0205078125, 0.0264892578125, 0.0159912109375, 0.01068115234375, -0.00994873046875, 0.00518798828125, -0.0027618408203125, ...
[ 1250, 4867, 95486, 142424, 47, 80854, 5303, 502, 853, 7655, 111, 3525, 2967, 77336, 3444, 34292, 12638, 12830, 12765, 2174, 185190, 70541, 29568, 27781, 17569, 4488, 33022, 130250, 707, 756, 30646, 98320, 151117, 62, 335, 313, 183234, 106, ...
[ 0.166748046875, 0.2430419921875, 0.1947021484375, 0.2197265625, 0.0787353515625, 0.1683349609375, 0.185546875, 0.115234375, 0.02288818359375, 0.14599609375, 0.0145721435546875, 0.0166015625, 0.06964111328125, 0.1771240234375, 0.0173492431640625, 0.148193359375, 0.0262298583984375, ...
embed
69143322_c0
69143322
prolog
0
Title: I want to make a filtered list out of a existing list in prolog Problem title: I want to make a filtered list out of a existing list in prolog Tags: prolog, list, recursion Problem: I want to make a filtered list out of a existing list in prolog The problem is; I have a list of mixed elements [Y, donkey, horse, ...
I want to make a filtered list out of a existing list in prolog I want to make a filtered list out of a existing list in prolog prolog list recursion Result I want to make a filtered list out of a existing list in prolog The problem is; I have a list of mixed elements [Y, donkey, horse, 30, father(max)] . I want to mak...
[ 0.0034637451171875, 0.0133056640625, 0.01483154296875, 0.0164794921875, -0.0030059814453125, 0.0267333984375, -0.00390625, 0.02587890625, -0.0021820068359375, -0.037353515625, 0.00799560546875, -0.018798828125, -0.020751953125, -0.002899169921875, 0.01171875, 0.01953125, 0.0196533203...
[ 87, 3444, 3249, 46312, 297, 5303, 1810, 111, 10, 144573, 23, 502, 4867, 195625, 126684, 2967, 765, 17664, 80854, 1723, 2301, 19770, 111649, 496, 67373, 24084, 3525, 903, 97629, 34627, 33022, 1250, 1653, 2063, 67, 35839, 7, 12477, 120384, ...
[ 0.011749267578125, 0.12744140625, 0.099853515625, 0.2481689453125, 0.110107421875, 0.2254638671875, 0.111572265625, 0.10296630859375, 0.002197265625, 0.1929931640625, 0.0156707763671875, 0.15234375, 0.2327880859375, 0.1419677734375, 0.07025146484375, 0.08514404296875, 0.0039367675781...
embed
47685574_c0
47685574
prolog
0
Title: prolog - check if item is somewhere on the right/left/between in a list Problem title: prolog - check if item is somewhere on the right/left/between in a list Tags: prolog Problem: prolog - check if item is somewhere on the right/left/between in a list I have to figure out how to find out if the item is in betwe...
prolog - check if item is somewhere on the right/left/between in a list prolog - check if item is somewhere on the right/left/between in a list prolog prolog - check if item is somewhere on the right/left/between in a list I have to figure out how to find out if the item is in between of two other items in the list. My...
[ -0.00107574462890625, -0.00063323974609375, 0.0177001953125, -0.0177001953125, -0.01397705078125, 0.021240234375, -0.004302978515625, -0.00335693359375, 0.0021514892578125, -0.0233154296875, 0.027587890625, -0.002655029296875, 0.00022792816162109375, -0.0001354217529296875, 0.01586914062...
[ 502, 4867, 12765, 2174, 35735, 83, 174653, 98, 70, 7108, 64, 133, 2480, 4626, 1177, 33, 23, 5303, 765, 26366, 7413, 1810, 17721, 111, 6626, 3789, 55769, 47644, 136, 54969, 32354, 4527, 3917, 1542, 1723, 1511, 866, 29479, 47, 990, 384, ...
[ 0.1614990234375, 0.2298583984375, 0.21337890625, 0.1268310546875, 0.2110595703125, 0.11279296875, 0.2132568359375, 0.1298828125, 0.022369384765625, 0.1878662109375, 0.0657958984375, 0.0723876953125, 0.16796875, 0.11279296875, 0.208740234375, 0.1629638671875, 0.1513671875, 0.1988525...
embed
18855146_c2
18855146
prolog
2
13) pack([c], [c], [[a, a, a, a], [b]]) ? creep Call: (14) _G1127=[c, c] ? creep Exit: (14) [c, c]=[c, c] ? creep Call: (14) lists:append([[a, a, a, a], [b]], [[c, c]], _G1132) ? creep Exit: (14) lists:append([[a, a, a, a], [b]], [[c, c]], [[a, a, a, a], [b], [c, c]]) ? creep Exit: (13) pack([c], [c], [[a, a, a, a], [b...
13) pack([c], [c], [[a, a, a, a], [b]]) ? creep Call: (14) _G1127=[c, c] ? creep Exit: (14) [c, c]=[c, c] ? creep Call: (14) lists:append([[a, a, a, a], [b]], [[c, c]], _G1132) ? creep Exit: (14) lists:append([[a, a, a, a], [b]], [[c, c]], [[a, a, a, a], [b], [c, c]]) ? creep Exit: (13) pack([c], [c], [[a, a, a, a], [b...
[ 0.031494140625, 0.0128173828125, 0.01544189453125, 0.0303955078125, 0.00543212890625, 0.0206298828125, -0.006561279296875, -0.0128173828125, 0.0286865234375, 0.022216796875, 0.0255126953125, 0.00921630859375, -0.01263427734375, 0.01239013671875, -0.004150390625, -0.001678466796875, 0...
[ 702, 16, 43824, 132, 238, 4, 11, 10, 275, 705, 49512, 254, 26265, 12, 31203, 101, 724, 1662, 3768, 501, 5443, 217, 5303, 9007, 3611, 91887, 28261, 23676, 21282, 86245, 17857, 11438, 6791, 28864, 26073, 56607, 1250, 4867, 29899, 418, 204...
[ 0.2294921875, 0.059326171875, 0.279541015625, 0.038818359375, 0.1170654296875, 0.0144805908203125, 0.045013427734375, 0.071044921875, 0.09979248046875, 0.040802001953125, 0.2095947265625, 0.169189453125, 0.2010498046875, 0.0238189697265625, 0.14404296875, 0.0185546875, 0.045837402343...
embed
15464980_c0
15464980
prolog
0
Title: How to get two values from the user by using SWI prolog Problem title: How to get two values from the user by using SWI prolog Tags: prolog Problem: How to get two values from the user by using SWI prolog Im working with SWI prolog to ask the user to insert two different values according to the following codes: ...
How to get two values from the user by using SWI prolog How to get two values from the user by using SWI prolog prolog the SWI How Please How to get two values from the user by using SWI prolog Im working with SWI prolog to ask the user to insert two different values according to the following codes: but after i do the...
[ 0.0150146484375, 0.000736236572265625, -0.0159912109375, 0.013916015625, -0.007354736328125, 0.021728515625, -0.004364013671875, 0.0025177001953125, -0.00060272216796875, -0.0291748046875, 0.015625, 0.017333984375, -0.0341796875, -0.0042724609375, 0.0172119140625, 0.0037078857421875, ...
[ 11249, 2046, 6626, 142424, 1295, 38937, 17368, 159, 38969, 502, 4867, 47, 30607, 26458, 183540, 12921, 18151, 7103, 75463, 5117, 13315, 44116, 73, 33657, 581, 14012, 7639, 163, 18499, 121742, 1528, 45767, 12301 ]
[ 0.0697021484375, 0.1412353515625, 0.218017578125, 0.2265625, 0.1209716796875, 0.1937255859375, 0.0526123046875, 0.0733642578125, 0.2354736328125, 0.1646728515625, 0.2032470703125, 0.00250244140625, 0.169189453125, 0.06475830078125, 0.190673828125, 0.151123046875, 0.068603515625, 0....
embed
11703041_c0
11703041
prolog
0
Title: How to add polynoms in Prolog? Problem title: How to add polynoms in Prolog? Tags: clpfd, prolog Problem: How to add polynoms in Prolog? I have the following task: Write a method that will add two polynoms. I.e 0+2*x^3 and 0+1*x^3+2*x^4 will give 0+3*x^3+2*x^4. I also wrote the following code: add_poly(+A1*x^B1+...
How to add polynoms in Prolog? How to add polynoms in Prolog? clpfd prolog How Prolog add_poly How to add polynoms in Prolog? I have the following task: I also wrote the following code: My problem is that I don't know how to stop. I would like to stop when one the arguments is null and than to append the second argumen...
[ -0.01446533203125, 0.0130615234375, 0.0033416748046875, 0.021240234375, -0.013916015625, 0.030517578125, 0.0048828125, -0.0091552734375, 0.025146484375, -0.041015625, 0.03759765625, -0.031005859375, 0.0000762939453125, 0.011962890625, 0.0179443359375, -0.01953125, 0.0157470703125, ...
[ 11249, 47, 15190, 35874, 1687, 7, 23, 1250, 4867, 71, 502, 135545, 66211, 18151, 2967, 7279, 10750, 56574, 114689, 50960, 12765 ]
[ 0.056976318359375, 0.01263427734375, 0.13037109375, 0.18896484375, 0.2117919921875, 0.0963134765625, 0.048492431640625, 0.157470703125, 0.2393798828125, 0.036834716796875, 0.0869140625, 0.2314453125, 0.06915283203125, 0.050140380859375, 0.000091552734375, 0.12744140625, 0.15625, 0....
embed
35965085_c0
35965085
prolog
0
Title: Use '->' in prolog Problem title: Use '->' in prolog Tags: if-statement, prolog Problem: Use '->' in prolog I want to generate a list that is made up by sublists which contains 2 intergers and their sum and product. The expected result is A = [[2,3,5,6],[2,4,6,8],[2,5,7,10],[2,6,8,12], ...
Use '->' in prolog Use '->' in prolog if-statement prolog Use _G419 _G422 _G425 _G530 _G533 _G536 List Use '->' in prolog I want to generate a list that is made up by sublists which contains 2 intergers and their sum and product. The expected result is But I kept have some sublists that does n...
[ 0.01416015625, 0.0147705078125, 0.01055908203125, 0.0030670166015625, -0.0135498046875, -0.00592041015625, -0.0087890625, 0.0228271484375, 0.016845703125, -0.026123046875, 0.0068359375, 0.005889892578125, -0.0194091796875, -0.01300048828125, 0.00341796875, -0.00543212890625, 0.022460...
[ 36836, 3768, 74, 9, 1230, 5386, 23, 502, 4867, 2174, 61340, 674, 617, 2947, 4015, 2588, 758, 1197, 14226, 363, 185580, 32036, 103607, 25, 3444, 139392, 5303, 1614, 6562, 116, 1940, 26255, 10554, 12996, 84751, 16750, 93544, 959, 765, 136, ...
[ 0.119140625, 0.159423828125, 0.03204345703125, 0.07379150390625, 0.007049560546875, 0.1295166015625, 0.0665283203125, 0.172119140625, 0.260009765625, 0.1304931640625, 0.1649169921875, 0.00799560546875, 0.06884765625, 0.156982421875, 0.0955810546875, 0.1175537109375, 0.00567626953125,...
embed
8741282_c0
8741282
prolog
0
Title: Prolog spots in table Problem title: Prolog spots in table Tags: prolog, dcg Problem: Prolog spots in table I have a given list that represent a two dimensional list x. This table contains two "spots" of 1 as you can see in the example below: xxxxxxxxxxxxxxxx xx1111xxxx111xxx xxx1111xxxx11xxx x1111xxxxxx111xx I ...
Prolog spots in table Prolog spots in table prolog dcg Prolog xx1111xxxx111xxx xxx1111xxxx11xxx x1111xxxxxx111xx xx1111xxxx222xxx xxx1111xxxx22xxx x1111xxxxxx222xx Prolog spots in table I have a given list that represent a two dimensional list x. This table contains two "spots" of 1 as you can see in the example below:...
[ -0.0010528564453125, 0.006072998046875, -0.00592041015625, 0.0027923583984375, -0.01190185546875, 0.0198974609375, -0.00439453125, 0.013916015625, 0.01953125, 0.005523681640625, 0.01116943359375, 0.01422119140625, 0.00933837890625, 0.0198974609375, 0.01055908203125, 0.017333984375, 0...
[ 1250, 4867, 13162, 7, 23, 23180, 502, 177, 159019, 97024, 43883, 52219, 132537, 34475, 5303, 33636, 6626, 157955, 1022, 70541, 53370, 111, 106, 1957, 27781, 35064, 3871, 15549, 29197, 19917, 17932, 1295, 47, 116, 1653, 2063, 67, 84797, 866,...
[ 0.187255859375, 0.25732421875, 0.241943359375, 0.056549072265625, 0.0947265625, 0.231689453125, 0.149169921875, 0.021881103515625, 0.0721435546875, 0.039886474609375, 0.0219879150390625, 0.007293701171875, 0.044403076171875, 0.03082275390625, 0.1397705078125, 0.082275390625, 0.09375,...
embed
23390379_c0
23390379
prolog
0
Title: Prolog predicate Problem title: Prolog predicate Tags: prolog, predicate Problem: Prolog predicate Hello I am a newbie to Prolog with basic question. I would like to know why these Prolog predicates daughter_of/2 and son_of/2 do not work as I want them to. For example, if I ask 16 ?- daughter_of(alice, X). true....
Prolog predicate Prolog predicate prolog predicate Prolog daughter_of son_of sister_of brother_of Prolog predicate Hello I am a newbie to Prolog with basic question. I would like to know why these Prolog predicates daughter_of/2 and son_of/2 do not work as I want them to. For example, if I ask (Why true? What predicate...
[ 0.022216796875, 0.00860595703125, -0.00262451171875, 0.00787353515625, -0.010009765625, 0.018798828125, -0.0037841796875, -0.00189208984375, 0.010009765625, -0.0390625, -0.0034332275390625, 0.001068115234375, -0.01171875, 0.0147705078125, 0.016845703125, -0.00665283203125, 0.00885009...
[ 1250, 4867, 1653, 2063, 67, 502, 76849, 4390, 775, 114015, 82953, 35378, 9014, 62822, 9655, 3714, 15400, 6097, 1636, 12477, 136, 54, 959, 4488, 237, 3444, 26458, 168754, 29568, 2806, 3871, 2046, 31485, 24748 ]
[ 0.177734375, 0.2464599609375, 0.1737060546875, 0.202392578125, 0.09783935546875, 0.130615234375, 0.2152099609375, 0.196533203125, 0.1639404296875, 0.148193359375, 0.12890625, 0.0189666748046875, 0.043487548828125, 0.03314208984375, 0.013275146484375, 0.0157470703125, 0.080810546875, ...
embed
10210544_c0
10210544
prolog
0
Title: Is there any way to create an indexed data collection in Prolog? Problem title: Is there any way to create an indexed data collection in Prolog? Tags: database, arrays, indexing, prolog Problem: Is there any way to create an indexed data collection in Prolog? Thinking of creating a database in Prolog, using a li...
Is there any way to create an indexed data collection in Prolog? Is there any way to create an indexed data collection in Prolog? database arrays indexing prolog Prolog Is there any way to create an indexed data collection in Prolog? Thinking of creating a database in Prolog, using a list seems obviously ineffective. S...
[ 0.032470703125, 0.0181884765625, 0.01348876953125, -0.004852294921875, -0.0089111328125, 0.0037078857421875, -0.0137939453125, -0.023681640625, 0.0106201171875, -0.026123046875, 0.0029754638671875, 0.01483154296875, -0.0216064453125, -0.0145263671875, 0.0045166015625, -0.01708984375, ...
[ 2499, 3917, 28282, 142, 63262, 297, 2053, 42486, 23, 1250, 4867, 63399, 10298, 4778, 214, 502, 2685, 47, 105233, 17368, 5303, 171259, 171760, 3714, 7722, 2046, 17203, 80854, 21334, 7228, 193844, 29479, 8781, 66211, 116, 92714, 150643, 335, ...
[ 0.05279541015625, 0.10174560546875, 0.180419921875, 0.050262451171875, 0.2130126953125, 0.1334228515625, 0.1500244140625, 0.2152099609375, 0.076416015625, 0.1678466796875, 0.265625, 0.21630859375, 0.1024169921875, 0.096435546875, 0.0186004638671875, 0.1168212890625, 0.00201416015625,...
embed
38180159_c0
38180159
prolog
0
Title: Is debugger feature only supported by Amzi! prolog Commercial version? Problem title: Is debugger feature only supported by Amzi! prolog Commercial version? Tags: version, prolog, amzi-prolog, eclipse, debugging Problem: Is debugger feature only supported by Amzi! prolog Commercial version? I installed Eclipse N...
Is debugger feature only supported by Amzi! prolog Commercial version? Is debugger feature only supported by Amzi! prolog Commercial version? version prolog amzi-prolog eclipse debugging Amzi Commercial Is debugger feature only supported by Amzi! prolog Commercial version? I installed Eclipse Neon + Amzi! Prolog (win64...
[ 0.0036468505859375, 0.0213623046875, 0.00347900390625, 0.01556396484375, 0.003082275390625, 0.01361083984375, -0.0126953125, 0.02685546875, 0.010009765625, 0.00127410888671875, -0.0034942626953125, 0.0076904296875, 0.0086669921875, 0.00170135498046875, 0.0174560546875, -0.0020446777343...
[ 2071, 8, 978, 21407, 60213, 4734, 8060, 390, 2022, 708, 38, 502, 4867, 30964, 42, 26136, 11389, 444, 3454, 106371, 184, 36659, 20600, 234962, 799, 191, 997, 1250, 9494, 13307, 99929, 29557, 1927, 85779, 1528, 36497, 13625, 73243, 959, 198...
[ 0.06890869140625, 0.18505859375, 0.2490234375, 0.2376708984375, 0.2371826171875, 0.116943359375, 0.2073974609375, 0.0296173095703125, 0.1640625, 0.221435546875, 0.10528564453125, 0.1640625, 0.2210693359375, 0.1737060546875, 0.17724609375, 0.10595703125, 0.1708984375, 0.096984863281...
embed
19467321_c0
19467321
prolog
0
Title: Prolog assert/retract not working (?) Problem title: Prolog assert/retract not working (?) Tags: prolog-assert, prolog, dynamic Problem: Prolog assert/retract not working (?) I try to create a simple program in prolog, but i have a problem: :- dynamic at/2, i_am_holding/1, i_am_at/1. /* some lines of code */ i_a...
Prolog assert/retract not working (?) Prolog assert/retract not working (?) prolog-assert prolog dynamic Prolog i_am_holding i_am_at room1 You Place Prolog assert/retract not working (?) I try to create a simple program in prolog, but i have a problem: I want the user to pick up the revolver,and then (the revolver)to b...
[ -0.00057220458984375, 0.01416015625, 0.014892578125, 0.00836181640625, -0.00445556640625, 0.00628662109375, -0.00555419921875, 0.03076171875, 0.01361083984375, -0.0306396484375, 0.0037384033203125, 0.026611328125, -0.010009765625, -0.01068115234375, 0.0213623046875, 0.004150390625, 0...
[ 1250, 4867, 237, 33657, 107, 39989, 18, 959, 20697, 70361, 502, 162, 84079, 17, 302, 16200, 214, 257, 17155, 418, 41076, 28282, 8781, 1528, 2967, 3444, 38937, 39580, 1257, 52831, 814, 41499, 89829, 1295, 3687, 23, 19048, 13438, 11675, 181...
[ 0.1800537109375, 0.2452392578125, 0.06610107421875, 0.251953125, 0.0804443359375, 0.203125, 0.130126953125, 0.0775146484375, 0.16552734375, 0.0285491943359375, 0.1456298828125, 0.0712890625, 0.1507568359375, 0.035003662109375, 0.0750732421875, 0.1361083984375, 0.009033203125, 0.089...
embed
56088950_c0
56088950
prolog
0
Title: Compare two lists with Prolog and collect the different elements in a different list Problem title: Compare two lists with Prolog and collect the different elements in a different list Tags: prolog Problem: Compare two lists with Prolog and collect the different elements in a different list I'm new in Prolog pro...
Compare two lists with Prolog and collect the different elements in a different list Compare two lists with Prolog and collect the different elements in a different list prolog Compare Prolog Head Tail List2 Compare two lists with Prolog and collect the different elements in a different list I'm new in Prolog programmi...
[ 0.0218505859375, 0.0211181640625, 0.01312255859375, 0.0091552734375, -0.0216064453125, 0.006011962890625, -0.0032196044921875, 0.0218505859375, 0.0108642578125, 0.0302734375, 0.01025390625, 0.0113525390625, 0.015380859375, 0.0093994140625, 0.0189208984375, -0.002899169921875, 0.02624...
[ 113307, 13, 6626, 5303, 7, 678, 1250, 4867, 43799, 12921, 80854, 23, 502, 44816, 1218, 379, 32036, 304, 56037, 46876, 45646, 3444, 69101, 62, 47, 335, 7413, 959, 33022, 313, 89536, 58836, 14858, 71, 420, 177, 21320, 9774, 237, 8710, 184...
[ 0.1832275390625, 0.03326416015625, 0.09716796875, 0.2008056640625, 0.008056640625, 0.057952880859375, 0.1502685546875, 0.2174072265625, 0.178466796875, 0.1290283203125, 0.1563720703125, 0.0247039794921875, 0.0994873046875, 0.0909423828125, 0.0714111328125, 0.046112060546875, 0.141845...
embed
34684781_c0
34684781
prolog
0
Title: Printing a list of graph leaves in PROLOG Problem title: Printing a list of graph leaves in PROLOG Tags: prolog, nodes, list, graph-theory Problem: Printing a list of graph leaves in PROLOG I need to print a list of leaves in directed graph in Prolog. I'm a Prolog beginner, this is one of my school tasks... i.e....
Printing a list of graph leaves in PROLOG Printing a list of graph leaves in PROLOG prolog nodes list graph-theory Printing PROLOG Node List Printing a list of graph leaves in PROLOG I need to print a list of leaves in directed graph in Prolog. I'm a Prolog beginner, this is one of my school tasks... i.e. my graph is: ...
[ 0.01513671875, 0.01104736328125, 0.00787353515625, 0.0224609375, 0.00885009765625, 0.0177001953125, -0.01953125, -0.01434326171875, 0.0101318359375, -0.0064697265625, -0.0106201171875, -0.03759765625, 0.0001506805419921875, -0.004791259765625, 0.00927734375, 0.01202392578125, 0.03295...
[ 39754, 214, 5303, 41382, 31358, 7, 23, 10514, 47510, 502, 4867, 110, 988, 2347, 438, 112, 32036, 3871, 28412, 8951, 297, 1250, 1679, 10696, 66211, 5351, 79986, 90791, 118620, 35782, 3564, 3714, 7639, 192728, 3444, 33022, 130250, 705, 9, 2...
[ 0.185791015625, 0.009674072265625, 0.18115234375, 0.2091064453125, 0.232666015625, 0.1036376953125, 0.048614501953125, 0.15234375, 0.2305908203125, 0.1080322265625, 0.240234375, 0.1025390625, 0.1104736328125, 0.017852783203125, 0.1060791015625, 0.10675048828125, 0.156005859375, 0.0...
embed
59557006_c1
59557006
prolog
1
(truth(false),'<ERROR::>', []) ]. user:query_result(yes(true, [])) --> % prompt_alternatives_on: groundness !, [ ansi(truth(true),'<PASSED::>' , []) ]. test(my_add):- my_add(1,2,Result), Result =:= 3. test(my_add) :- my_add(1,2,Result), Result \= 4. :- end_tests(my_add). I understand that the more straightforward solut...
(truth(false),'<ERROR::>', []) ]. user:query_result(yes(true, [])) --> % prompt_alternatives_on: groundness !, [ ansi(truth(true),'<PASSED::>' , []) ]. test(my_add):- my_add(1,2,Result), Result =:= 3. test(my_add) :- my_add(1,2,Result), Result \= 4. :- end_tests(my_add). I understand that the more straightforward solut...
[ -0.005828857421875, 0.0191650390625, 0.006195068359375, 0.00012683868408203125, -0.01708984375, 0.00201416015625, 0.00323486328125, -0.000812530517578125, 0.01397705078125, -0.0084228515625, 0.001373291015625, 0.024658203125, -0.0242919921875, 0.0194091796875, 0.021728515625, 0.0024261...
[ 18, 75481, 8710, 184, 12501, 14255, 1052, 12, 38937, 944, 1294, 2109, 7136, 63736, 9774, 13, 1745, 105876, 119927, 90, 191, 61585, 7432, 711, 142, 172, 98185, 119089, 5, 3034, 1176, 11, 4028, 759, 133063, 7, 126684, 1031, 1398, 3564, 69...
[ 0.0687255859375, 0.2047119140625, 0.14404296875, 0.0616455078125, 0.0859375, 0.0982666015625, 0.033447265625, 0.0233612060546875, 0.16259765625, 0.10595703125, 0.0986328125, 0.109375, 0.167724609375, 0.14599609375, 0.1351318359375, 0.011138916015625, 0.085205078125, 0.2333984375, ...
embed
30535290_c0
30535290
prolog
0
Title: How to calculate factorial using prolog Problem title: How to calculate factorial using prolog Tags: prolog, factorial Problem: How to calculate factorial using prolog I have a code for calculating factorial as below : fact(1,1). fact(X,R):- X1 is X-1, fact(X1,R1), R is R1*X. In my mind this code shouldn't work ...
How to calculate factorial using prolog How to calculate factorial using prolog prolog factorial prolog How X-1 How to calculate factorial using prolog I have a code for calculating factorial as below : In my mind this code shouldn't work right but it does! What is my reason? I think when we call fact(3,R), first it ca...
[ 0.024658203125, 0.0093994140625, -0.0023040771484375, 0.01556396484375, 0.00921630859375, -0.00897216796875, 0.019775390625, -0.0052490234375, 0.0021209716796875, -0.027099609375, 0.0076904296875, -0.0166015625, -0.0233154296875, -0.0174560546875, 0.01055908203125, -0.005828857421875, ...
[ 11249, 47, 74481, 67, 31461, 15403, 17368, 502, 4867, 1193, 5759, 18151, 1916, 35064, 7086, 5608, 4488, 7108, 1284, 31635, 5351, 11782, 15824, 86827, 1052, 5117, 418, 83, 68940, 11737, 79986, 1542, 17727, 69236, 2831, 13438, 71924, 30646, 2...
[ 0.07928466796875, 0.0198516845703125, 0.21337890625, 0.0789794921875, 0.2291259765625, 0.2474365234375, 0.1002197265625, 0.191162109375, 0.26025390625, 0.12060546875, 0.1583251953125, 0.15478515625, 0.049285888671875, 0.0386962890625, 0.03497314453125, 0.022674560546875, 0.0599365234...
embed
32826955_c0
32826955
prolog
0
Title: What is the second parameter in this Prolog predicate doing? Why is it empty? Problem title: What is the second parameter in this Prolog predicate doing? Why is it empty? Tags: prolog, dcg Problem: What is the second parameter in this Prolog predicate doing? Why is it empty? In this page detailing DCGs in Prolog...
What is the second parameter in this Prolog predicate doing? Why is it empty? What is the second parameter in this Prolog predicate doing? Why is it empty? prolog dcg What Prolog Why What is the second parameter in this Prolog predicate doing? Why is it empty? In this page detailing DCGs in Prolog, it offers the follow...
[ 0.0185546875, 0.004547119140625, 0.0072021484375, 0.023681640625, -0.00799560546875, 0.027587890625, -0.0079345703125, 0.000385284423828125, 0.010498046875, -0.00098419189453125, 0.0203857421875, -0.01519775390625, -0.034423828125, -0.002349853515625, 0.002899169921875, 0.005859375, ...
[ 17932, 171859, 1250, 4867, 1653, 2063, 67, 20594, 44084, 201505, 903, 502, 104, 238, 177, 4865, 83, 442, 391, 56367, 7, 27781, 122092, 11814, 5351, 11782, 91, 11, 3613, 669, 105727, 4488, 73342, 452, 5303, 163846, 14602 ]
[ 0.1728515625, 0.2388916015625, 0.15673828125, 0.2247314453125, 0.1151123046875, 0.1395263671875, 0.030303955078125, 0.0853271484375, 0.089111328125, 0.1964111328125, 0.02850341796875, 0.115234375, 0.03790283203125, 0.03912353515625, 0.10205078125, 0.038299560546875, 0.03729248046875,...
embed
34776121_c0
34776121
prolog
0
Title: Prolog: connect4 check diagonal end Problem title: Prolog: connect4 check diagonal end Tags: prolog, list Problem: Prolog: connect4 check diagonal end The grid is a list of 7 lists, each list is a column that can contains 6 elements maximum. For victory check, I implemented vertical victory and horizontal victor...
Prolog: connect4 check diagonal end Prolog: connect4 check diagonal end prolog list Prolog connect4 Vertical Grid Column N-1 Horizontal Line Prolog: connect4 check diagonal end The grid is a list of 7 lists, each list is a column that can contains 6 elements maximum. For victory check, I implemented vertical victory an...
[ 0.00482177734375, 0.008056640625, 0.017578125, 0.020751953125, -0.0301513671875, -0.006378173828125, -0.00958251953125, 0.0228271484375, 0.0037078857421875, -0.004974365234375, 0.0250244140625, 0.0166015625, -0.00836181640625, -0.0120849609375, -0.01513671875, 0.00020503997802734375, ...
[ 1250, 4867, 37067, 617, 12765, 207997, 3564, 502, 5303, 1446, 70760, 31945, 233987, 541, 5759, 112639, 16777, 120067, 111, 361, 12638, 3365, 316, 831, 70541, 305, 80854, 38132, 91375, 53, 29479, 79259, 124001, 35064, 4966, 765, 44402, 678, ...
[ 0.1300048828125, 0.2171630859375, 0.18310546875, 0.209228515625, 0.248046875, 0.234619140625, 0.1473388671875, 0.0762939453125, 0.1988525390625, 0.0797119140625, 0.05535888671875, 0.16064453125, 0.1788330078125, 0.0126953125, 0.08477783203125, 0.08087158203125, 0.1168212890625, 0.2...
embed
36582088_c1
36582088
prolog
1
1,1,1,1,1,1,0], [2,3,4,5,4,2,1,0], [3,1,3,4,6,7,8,1], [1,2,3,6,1,1,2,1]]. In my code I have these two lines which just reorder arguments so that I can pass these rules into a maplist. my_nth0(List,Elem,I):- nth0(I,List,Elem). indexs_flist_sets(I,F,S):-flist_sets_indexs(F,S,I). Is there a better way to do this? How can ...
1,1,1,1,1,1,0], [2,3,4,5,4,2,1,0], [3,1,3,4,6,7,8,1], [1,2,3,6,1,1,2,1]]. In my code I have these two lines which just reorder arguments so that I can pass these rules into a maplist. my_nth0(List,Elem,I):- nth0(I,List,Elem). indexs_flist_sets(I,F,S):-flist_sets_indexs(F,S,I). Is there a better way to do this? How can ...
[ -0.009765625, -0.01348876953125, 0.0035552978515625, -0.0022430419921875, -0.022705078125, 0.000904083251953125, 0.039794921875, -0.00897216796875, 0.0014495849609375, 0.007537841796875, -0.003509521484375, -0.006805419921875, -0.000957489013671875, 0.0157470703125, -0.0086669921875, -...
[ 69276, 4, 418, 206808, 268, 155761, 80389, 617, 304, 122101, 82449, 136555, 206029, 910, 133063, 76172, 18151, 6097, 6626, 124519, 1660, 456, 80596, 10750, 831, 27875, 91736, 3934, 10, 22288, 6562, 759, 927, 2389, 154663, 7623, 195, 568, 63...
[ 0.1964111328125, 0.027099609375, 0.0875244140625, 0.1571044921875, 0.01226806640625, 0.1217041015625, 0.1485595703125, 0.0968017578125, 0.012359619140625, 0.03167724609375, 0.1201171875, 0.1046142578125, 0.1859130859375, 0.07562255859375, 0.127197265625, 0.03778076171875, 0.197021484...
embed
48390458_c0
48390458
prolog
0
Title: Concatenate two atoms in prolog without using atom_concat Problem title: Concatenate two atoms in prolog without using atom_concat Tags: prolog Problem: Concatenate two atoms in prolog without using atom_concat I want to write prolog that can essentially do what this is doing atom_concat('3',' =',Answer). Answer...
Concatenate two atoms in prolog without using atom_concat Concatenate two atoms in prolog without using atom_concat prolog atom_concat Concatenate Answer Concatenate two atoms in prolog without using atom_concat I want to write prolog that can essentially do what this is doing But I do not want to use the atom_concat f...
[ 0.0238037109375, 0.0263671875, 0.0093994140625, 0.0220947265625, 0.004241943359375, 0.017333984375, -0.00933837890625, 0.0184326171875, 0.0040283203125, -0.040283203125, 0.005126953125, 0.002197265625, 0.00396728515625, -0.006927490234375, 0.0174560546875, -0.01287841796875, -0.00080...
[ 1657, 33478, 76, 67, 6626, 34627, 7, 23, 502, 4867, 15490, 17368, 2271, 4460, 130373, 3444, 33022, 85590, 20594, 959, 4527, 32354, 88303, 1653, 2063, 35166, 110, 81732, 16188, 29479, 55300, 160404, 114689, 71, 42564, 40041, 2424, 11435, 983...
[ 0.08367919921875, 0.159912109375, 0.151123046875, 0.0726318359375, 0.154541015625, 0.2047119140625, 0.058013916015625, 0.0291748046875, 0.132080078125, 0.2017822265625, 0.0927734375, 0.0352783203125, 0.07568359375, 0.196044921875, 0.07061767578125, 0.02838134765625, 0.048919677734375...
embed
65035774_c0
65035774
prolog
0
Title: How to exam every 3 consecutive items of a list in prolog Problem title: How to exam every 3 consecutive items of a list in prolog Tags: prolog Problem: How to exam every 3 consecutive items of a list in prolog I have a list in prolog like this: [a,b,c,d,e]. Then the idea is to exam every 3 items like [a,b,c]; d...
How to exam every 3 consecutive items of a list in prolog How to exam every 3 consecutive items of a list in prolog prolog How How to exam every 3 consecutive items of a list in prolog I have a list in prolog like this: [a,b,c,d,e]. Then the idea is to exam every 3 items like [a,b,c]; do something with a and c, then st...
[ -0.00115203857421875, -0.0002918243408203125, 0.00799560546875, -0.004241943359375, 0.007568359375, 0.01251220703125, -0.0032806396484375, 0.01470947265625, 0.0255126953125, -0.01263427734375, 0.0189208984375, 0.01446533203125, 0.006927490234375, -0.01055908203125, 0.00799560546875, 0....
[ 11249, 47, 42276, 11907, 138, 148390, 13, 55769, 5303, 23, 502, 4867, 111, 275, 71, 6528, 238, 4343, 876, 11675, 1810, 162515, 1031, 195625, 1830, 4488, 35064, 26366, 46002, 82230, 479, 86687 ]
[ 0.0469970703125, 0.009063720703125, 0.25830078125, 0.123291015625, 0.2117919921875, 0.1903076171875, 0.039031982421875, 0.2113037109375, 0.2061767578125, 0.0223846435546875, 0.1778564453125, 0.2315673828125, 0.02947998046875, 0.007537841796875, 0.038238525390625, 0.034820556640625, 0...
embed
6876042_c0
6876042
prolog
0
Title: Prolog List of Constants to String Problem title: Prolog List of Constants to String Tags: prolog, list, string Problem: Prolog List of Constants to String i have a list in input: [asd,qweqwe,fsdf,lkasd] As un can see from the code i want connect each constant of the list to output a single variable list. i m us...
Prolog List of Constants to String Prolog List of Constants to String prolog list string Prolog List Constants asd2 asd3 asd4 Out atomic_concat Out1 Out2 Prolog List of Constants to String i have a list in input: [asd,qweqwe,fsdf,lkasd] As un can see from the code i want connect each constant of the list to output a si...
[ 0.026123046875, -0.00136566162109375, -0.00604248046875, 0.023681640625, -0.00714111328125, 0.029541015625, -0.02490234375, 0.00927734375, -0.00994873046875, -0.01385498046875, -0.006591796875, -0.0107421875, 0.0111083984375, 0.0174560546875, -0.007232666015625, 0.00958251953125, 0.0...
[ 1250, 4867, 32036, 148416, 7, 47, 23351, 214, 502, 5303, 79315, 237, 71, 304, 363, 617, 13538, 34627, 1771, 2271, 4460, 107730, 162, 1177, 420, 17637, 18151, 3444, 37067, 12638, 53697, 140992, 11001, 77336, 15850, 75463, 33022, 11675, 32354...
[ 0.1552734375, 0.2427978515625, 0.1744384765625, 0.213134765625, 0.07763671875, 0.1259765625, 0.1978759765625, 0.0780029296875, 0.12841796875, 0.2001953125, 0.148193359375, 0.046844482421875, 0.1363525390625, 0.0931396484375, 0.1207275390625, 0.16845703125, 0.119873046875, 0.1197509...
embed
29290616_c0
29290616
prolog
0
Title: Prolog-function that saves output into a list Problem title: Prolog-function that saves output into a list Tags: prolog Problem: Prolog-function that saves output into a list I am trying to write a function that saves all the output of another function into a list. For example, I have a function that outputs the...
Prolog-function that saves output into a list Prolog-function that saves output into a list prolog Prolog-function List Accum Prolog-function that saves output into a list I am trying to write a function that saves all the output of another function into a list. For example, I have a function that outputs the following...
[ 0.0098876953125, 0.0159912109375, 0.017578125, 0.0186767578125, -0.01422119140625, 0.0296630859375, -0.025146484375, 0.00909423828125, 0.01123046875, -0.0299072265625, 0.0137939453125, -0.0013427734375, 0.0267333984375, -0.0018310546875, 0.019287109375, 0.0130615234375, 0.00701904296...
[ 1250, 4867, 137175, 450, 30098, 7, 140992, 3934, 5303, 10, 502, 32036, 29899, 316, 31577, 33022, 32354, 756, 15700, 25632, 3444, 70, 27781, 81887, 105233, 50339, 54241, 40956, 8781, 28219 ]
[ 0.16455078125, 0.24853515625, 0.2261962890625, 0.03436279296875, 0.1636962890625, 0.036102294921875, 0.2333984375, 0.155517578125, 0.2052001953125, 0.0222320556640625, 0.1357421875, 0.1522216796875, 0.1112060546875, 0.193359375, 0.06524658203125, 0.09130859375, 0.2149658203125, 0.0...
embed
34981565_c0
34981565
prolog
0
Title: Prolog Higher-order reduce predicate Problem title: Prolog Higher-order reduce predicate Tags: higher-order-functions, meta-predicate, prolog Problem: Prolog Higher-order reduce predicate We can define a higher-order map predicate as: map([], [], F). map([A|As], [B|Bs], F) :- call(F, A, B), map(As, Bs, F). Simil...
Prolog Higher-order reduce predicate Prolog Higher-order reduce predicate higher-order-functions meta-predicate prolog Prolog Higher-order Acc Acc1 Acc2 Ident Prolog Higher-order reduce predicate We can define a higher-order map predicate as: Similarly, we can define fold (left) as: What is the correct definition for r...
[ -0.00102996826171875, -0.0133056640625, -0.000957489013671875, 0.004852294921875, -0.02099609375, 0.00787353515625, -0.017578125, 0.0108642578125, 0.00555419921875, -0.0245361328125, 0.0145263671875, -0.004547119140625, -0.003143310546875, -0.01904296875, 0.0086669921875, -0.0096435546...
[ 1250, 4867, 19694, 56, 80596, 34390, 1653, 2063, 67, 77546, 137175, 23550, 19714, 502, 29899, 418, 304, 71257, 831, 61924, 22288, 237, 42822, 133, 2480, 26785, 80934, 28960, 12620, 54969 ]
[ 0.147216796875, 0.223388671875, 0.0858154296875, 0.00592041015625, 0.217529296875, 0.2783203125, 0.181396484375, 0.223876953125, 0.1103515625, 0.1661376953125, 0.13330078125, 0.1243896484375, 0.14697265625, 0.07586669921875, 0.06109619140625, 0.029083251953125, 0.04559326171875, 0....
embed
32966383_c0
32966383
prolog
0
Title: YAP PROLOG timeout issue Problem title: YAP PROLOG timeout issue Tags: prolog, yap Problem: YAP PROLOG timeout issue Can anyone explain why the following YAP code does not result in the variable Result being unified with time_out ? ?- time_out(sleep(3),1,Result). Result = success. ?- time_out(sleep(3),2,Result)....
YAP PROLOG timeout issue YAP PROLOG timeout issue prolog yap YAP PROLOG Result time_out Goal Timeout YAP PROLOG timeout issue Can anyone explain why the following YAP code does not result in the variable Result being unified with time_out ? According to the documentation , the predicate should work as follows:
[ 0.0380859375, 0.01043701171875, 0.023681640625, -0.00836181640625, -0.0086669921875, -0.015869140625, -0.00604248046875, 0.00830078125, -0.010009765625, -0.0230712890625, 0.01904296875, 0.0048828125, -0.049072265625, -0.01251220703125, 0.00787353515625, 0.004119873046875, 0.018310546...
[ 128706, 10514, 47510, 1733, 6056, 31089, 502, 4867, 15850, 126684, 2016, 289, 19055, 73342, 15400, 25632, 18151, 14602, 959, 16750, 77336, 8035, 51, 47314, 678, 209806, 1653, 2063, 5608, 4488, 28960 ]
[ 0.23779296875, 0.1378173828125, 0.172119140625, 0.16748046875, 0.146728515625, 0.11297607421875, 0.091796875, 0.1505126953125, 0.173583984375, 0.18310546875, 0.08978271484375, 0.0218505859375, 0.16064453125, 0.08984375, 0.055511474609375, 0.0360107421875, 0.153564453125, 0.03890991...
embed
8317753_c0
8317753
prolog
0
Title: Mathematical operations with atoms in prolog Problem title: Mathematical operations with atoms in prolog Tags: prolog Problem: Mathematical operations with atoms in prolog If I have three atoms X, Y and Z where X = 1 Y = 2 Z = + How do I put them together so that X Z Y = 3? Edit: Using ThanosQR's univ solution, ...
Mathematical operations with atoms in prolog Mathematical operations with atoms in prolog prolog Mathematical Parse parse_list Number_1 Number_2 Operation Line Result Mathematical operations with atoms in prolog If I have three atoms X, Y and Z where How do I put them together so that X Z Y = 3? Edit: Using ThanosQR's ...
[ -0.004150390625, 0.00141143798828125, -0.004241943359375, 0.0245361328125, 0.00070953369140625, 0.01239013671875, 0.0164794921875, 0.0026397705078125, 0.004241943359375, -0.01385498046875, 0.00003933906555175781, 0.0023651123046875, 0.003265380859375, -0.0272216796875, 0.0024566650390625...
[ 123426, 88875, 141, 41018, 678, 34627, 7, 23, 502, 4867, 2392, 184, 366, 6562, 103332, 115187, 304, 102203, 16777, 126684, 765, 17262, 1193, 990, 136, 567, 7440, 11249, 54, 87, 3884, 2856, 25842, 221, 450, 2203, 138, 5971, 2245, 2737, 1...
[ 0.0765380859375, 0.0792236328125, 0.0361328125, 0.1697998046875, 0.0712890625, 0.2386474609375, 0.072509765625, 0.0274505615234375, 0.142578125, 0.224609375, 0.0758056640625, 0.0496826171875, 0.08721923828125, 0.1312255859375, 0.0413818359375, 0.031158447265625, 0.040191650390625, ...
embed
33385977_c0
33385977
prolog
0
Title: Replacing leaf atoms by the 0 in a tree and lists in Prolog Problem title: Replacing leaf atoms by the 0 in a tree and lists in Prolog Tags: prolog Problem: Replacing leaf atoms by the 0 in a tree and lists in Prolog I am stuck with the following Prolog code: islist([]). islist([A|B]) :- islist(B). memb([X|_]). ...
Replacing leaf atoms by the 0 in a tree and lists in Prolog Replacing leaf atoms by the 0 in a tree and lists in Prolog prolog Replacing Prolog Replacing leaf atoms by the 0 in a tree and lists in Prolog I am stuck with the following Prolog code: It is giving me fail when I am trying to run it. I am not able to do this...
[ 0.0185546875, 0.01397705078125, 0.0091552734375, 0.017578125, 0.006591796875, 0.00909423828125, -0.006378173828125, -0.006256103515625, -0.00103759765625, 0.00142669677734375, 0.00372314453125, -0.01220703125, -0.0019683837890625, -0.00171661376953125, 0.0267333984375, 0.010498046875, ...
[ 853, 133266, 214, 95, 2407, 34627, 390, 757, 53201, 136, 5303, 1250, 4867, 7, 23, 502, 179933, 25632, 18151, 68772, 163, 35782, 3229, 31577, 11675, 442, 87, 444, 959, 19048, 54, 903, 4358, 100094, 44691 ]
[ 0.0731201171875, 0.140869140625, 0.01025390625, 0.05816650390625, 0.188720703125, 0.2174072265625, 0.048858642578125, 0.1468505859375, 0.187255859375, 0.019500732421875, 0.1673583984375, 0.1539306640625, 0.2239990234375, 0.0135498046875, 0.016876220703125, 0.1082763671875, 0.11279296...
embed
55984995_c0
55984995
prolog
0
Title: Eclipse CLP: maximum number of constraints/variables Problem title: Eclipse CLP: maximum number of constraints/variables Tags: clp, prolog, eclipse-clp, constraints Problem: Eclipse CLP: maximum number of constraints/variables In the Eclipse CLP, how many constraints or variables can I define? I am currently rem...
Eclipse CLP: maximum number of constraints/variables Eclipse CLP: maximum number of constraints/variables clp prolog eclipse-clp constraints Eclipse CLP Eclipse CLP: maximum number of constraints/variables In the Eclipse CLP, how many constraints or variables can I define? I am currently remodeling my scheduling proble...
[ 0.011962890625, 0.0096435546875, -0.0089111328125, 0.02783203125, -0.000035762786865234375, 0.006256103515625, -0.021484375, -0.01007080078125, -0.0007171630859375, -0.04052734375, -0.0245361328125, -0.01025390625, 0.007232666015625, 0.02197265625, 0.029541015625, -0.003662109375, -0...
[ 234962, 313, 37352, 38132, 14012, 158, 2816, 4288, 64, 21690, 19736, 33139, 254, 502, 4867, 28, 106371, 184, 238, 26775, 3642, 5941, 707, 77336, 831, 61924, 82424, 177580, 214, 15246, 2069, 2967, 3871, 91995, 11001, 756, 238778, 678, 99, ...
[ 0.285400390625, 0.1021728515625, 0.25048828125, 0.21044921875, 0.1380615234375, 0.152587890625, 0.2481689453125, 0.193359375, 0.0224151611328125, 0.1712646484375, 0.142578125, 0.0772705078125, 0.154052734375, 0.130615234375, 0.1484375, 0.058807373046875, 0.2088623046875, 0.10681152...
embed
9935450_c0
9935450
prolog
0
Title: How can I read and run Prolog code in Java with a simple engine? Problem title: How can I read and run Prolog code in Java with a simple engine? Tags: java, prolog Problem: How can I read and run Prolog code in Java with a simple engine? I want to run Prolog code using Java. I found some engines, but the only on...
How can I read and run Prolog code in Java with a simple engine? How can I read and run Prolog code in Java with a simple engine? java prolog How Prolog Java How can I read and run Prolog code in Java with a simple engine? I want to run Prolog code using Java. I found some engines, but the only one that seemed easly to...
[ 0.0234375, -0.0020904541015625, 0.0011444091796875, 0.0228271484375, -0.008056640625, 0.0205078125, 0.00167083740234375, -0.00165557861328125, -0.0047607421875, -0.058837890625, 0.006378173828125, 0.0177001953125, -0.0281982421875, -0.001678466796875, 0.016357421875, -0.01025390625, ...
[ 11249, 831, 12301, 136, 11675, 1250, 4867, 18151, 23, 41925, 678, 8781, 87907, 79, 330, 502, 3444, 17368, 4734, 162, 4527, 148, 3454, 764, 22027, 18, 8060, 32036, 84079, 16865, 24124, 370, 115058, 99162, 3871, 89011, 756, 86531, 6276, 694...
[ 0.06591796875, 0.056121826171875, 0.175537109375, 0.0743408203125, 0.1409912109375, 0.1871337890625, 0.251220703125, 0.1993408203125, 0.068359375, 0.24658203125, 0.0587158203125, 0.14990234375, 0.1630859375, 0.10357666015625, 0.1295166015625, 0.1646728515625, 0.050994873046875, 0.0...
embed
10539326_c0
10539326
prolog
0
Title: Understand lists and recursion in Prolog Problem title: Understand lists and recursion in Prolog Tags: prolog Problem: Understand lists and recursion in Prolog I'm having a difficult time thinking in Prolog. What is incorrect about this statement: numberList([], 0). numberList([H|T], Limit) :- H is Limit, number...
Understand lists and recursion in Prolog Understand lists and recursion in Prolog prolog Understand Prolog Limit Limit-1 Understand lists and recursion in Prolog I'm having a difficult time thinking in Prolog. What is incorrect about this statement: I would like to determine [Limit, Limit-1 ... 1] as the only solution ...
[ -0.00421142578125, 0.005828857421875, -0.005462646484375, -0.003997802734375, 0.0033111572265625, 0.017333984375, -0.0111083984375, 0.0034027099609375, 0.01324462890625, -0.003173828125, 0.00701904296875, -0.02294921875, -0.006072998046875, 0.01513671875, 0.03369140625, -0.008605957031...
[ 9626, 5165, 5303, 136, 195625, 1830, 23, 1250, 4867, 7, 502, 125177, 5759, 34844, 1733, 47644, 214552, 63805, 1884, 83324, 866, 6836, 153, 106, 237, 4734, 29806, 34475, 34292, 2806, 11180, 19388, 1193, 2203, 3559, 10078, 16193, 57767, 28875...
[ 0.1123046875, 0.093017578125, 0.198486328125, 0.04388427734375, 0.2122802734375, 0.0802001953125, 0.047515869140625, 0.171630859375, 0.2432861328125, 0.00091552734375, 0.111572265625, 0.22998046875, 0.15673828125, 0.048004150390625, 0.017303466796875, 0.066162109375, 0.163818359375, ...
embed
50831024_c0
50831024
prolog
0
Title: Prolog: Split a list of size N into two lists of known size K and N-K Problem title: Prolog: Split a list of size N into two lists of known size K and N-K Tags: prolog, list, split Problem: Prolog: Split a list of size N into two lists of known size K and N-K I have a list of integers, Keys, and want to split it...
Prolog: Split a list of size N into two lists of known size K and N-K Prolog: Split a list of size N into two lists of known size K and N-K prolog list split Prolog Split N-K Keys ReqK ListOfReqKeys ListOfRewKeys atom_codes atom_number Prolog: Split a list of size N into two lists of known size K and N-K I have a list ...
[ -0.0069580078125, 0.00023555755615234375, 0.01214599609375, -0.014892578125, -0.02001953125, 0.013427734375, 0.004608154296875, 0.000019669532775878906, 0.01806640625, 0.006011962890625, 0.0208740234375, -0.003631591796875, -0.0174560546875, 0.0166015625, 0.016357421875, -0.01721191406...
[ 1250, 4867, 46474, 5303, 13267, 541, 3934, 6626, 51529, 341, 9, 605, 502, 65450, 26824, 853, 864, 32036, 132887, 4332, 162429, 434, 34627, 40899, 2606, 765, 892, 26255, 3444, 136, 151552, 44759, 140909, 107013, 88303, 23, 1653, 2063, 4271, ...
[ 0.1624755859375, 0.2393798828125, 0.21728515625, 0.2152099609375, 0.1182861328125, 0.1292724609375, 0.138916015625, 0.154296875, 0.1522216796875, 0.12744140625, 0.052154541015625, 0.173828125, 0.100341796875, 0.2100830078125, 0.18896484375, 0.10418701171875, 0.1317138671875, 0.1535...
embed
47577057_c0
47577057
prolog
0
Title: Recursive predicate to output difference of lists (without duplicated elements) Problem title: Recursive predicate to output difference of lists (without duplicated elements) Tags: prolog Problem: Recursive predicate to output difference of lists (without duplicated elements) I have the below recursive predicate...
Recursive predicate to output difference of lists (without duplicated elements) Recursive predicate to output difference of lists (without duplicated elements) prolog Recursive Recursive predicate to output difference of lists (without duplicated elements) I have the below recursive predicate to check the set differenc...
[ 0.00933837890625, 0.0233154296875, 0.004364013671875, 0.0004596710205078125, 0.003753662109375, 0.01129150390625, 0.007049560546875, 0.0196533203125, 0.01348876953125, 0.0036773681640625, 0.0042724609375, 0.004425048828125, 0.01129150390625, -0.003662109375, 0.006561279296875, 0.019897...
[ 853, 48650, 5844, 1653, 2063, 67, 47, 140992, 60212, 111, 5303, 7, 6056, 171763, 3674, 80854, 76228, 502, 4867, 35064, 195625, 12765, 5423, 23, 20697, 2843, 142424, 14192, 3642, 30022, 15490, 60075, 13, 8561 ]
[ 0.049896240234375, 0.1953125, 0.148193359375, 0.1788330078125, 0.192138671875, 0.1007080078125, 0.0254058837890625, 0.195556640625, 0.25341796875, 0.05401611328125, 0.192138671875, 0.0640869140625, 0.09234619140625, 0.2130126953125, 0.10260009765625, 0.116943359375, 0.015426635742187...
embed
53769020_c0
53769020
prolog
0
Title: Generate all pairs that sum to given number Problem title: Generate all pairs that sum to given number Tags: prolog Problem: Generate all pairs that sum to given number I'm trying to generate all pairs X, Y that sum to given number Z using the following predicates: genN(0). genN(X) :- genN(Xprev), X is Xprev + 1...
Generate all pairs that sum to given number Generate all pairs that sum to given number prolog Generate Xprev sum2 allSum2 Generate all pairs that sum to given number I'm trying to generate all pairs X, Y that sum to given number Z using the following predicates: I'm using genN to generate all natural numbers sum2 chec...
[ -0.01611328125, -0.000400543212890625, -0.0026092529296875, 0.0179443359375, -0.00537109375, 0.02197265625, -0.0113525390625, -0.0089111328125, 0.01904296875, -0.031005859375, 0.00946044921875, 0.01251220703125, -0.0025177001953125, -0.01611328125, 0.01458740234375, 0.03173828125, 0....
[ 155370, 67, 756, 80836, 7, 450, 10554, 47, 34475, 14012, 502, 4867, 1193, 4692, 334, 304, 294, 316, 31577, 139392, 990, 567, 1653, 2063, 17368, 9226, 839, 6083, 101935, 12765, 138, 997, 2203, 70, 62775, 111, 136, 164917, 1257, 185397, 1...
[ 0.1519775390625, 0.0418701171875, 0.1431884765625, 0.228759765625, 0.0675048828125, 0.0238037109375, 0.2042236328125, 0.1146240234375, 0.0799560546875, 0.1383056640625, 0.09295654296875, 0.1221923828125, 0.09619140625, 0.0765380859375, 0.125732421875, 0.2099609375, 0.1102294921875, ...
embed
49388564_c0
49388564
prolog
0
Title: Prolog- Pattern matching strings connected by operators Problem title: Prolog- Pattern matching strings connected by operators Tags: prolog, pattern-matching, operators, matching Problem: Prolog- Pattern matching strings connected by operators Still kind of new to prolog and have run into an issue. I understand ...
Prolog- Pattern matching strings connected by operators Prolog- Pattern matching strings connected by operators prolog pattern-matching operators matching Prolog Pattern Prolog- Pattern matching strings connected by operators Still kind of new to prolog and have run into an issue. I understand in prolog you can reprsen...
[ 0.007232666015625, 0.015625, 0.01068115234375, 0.03857421875, -0.01373291015625, 0.00970458984375, -0.01171875, 0.004547119140625, 0.01458740234375, 0.0103759765625, -0.0033111572265625, -0.0245361328125, 0.02099609375, 0.0002288818359375, -0.0113525390625, -0.0108642578125, -0.00970...
[ 1250, 4867, 9876, 22766, 14858, 214, 79315, 162711, 390, 39933, 502, 103510, 98753, 3525, 31089, 28219, 831, 10958, 42, 12832, 2053, 1884, 221, 9351, 1328, 17489, 6032, 1902, 5303, 36716, 2822, 903, 3642, 4527, 678, 36663, 1653, 2063, 70890...
[ 0.1650390625, 0.2489013671875, 0.1619873046875, 0.1593017578125, 0.24853515625, 0.11083984375, 0.1962890625, 0.129150390625, 0.01568603515625, 0.21630859375, 0.1519775390625, 0.27734375, 0.2021484375, 0.024932861328125, 0.045684814453125, 0.04345703125, 0.01873779296875, 0.07196044...
embed
36197849_c0
36197849
prolog
0
Title: Returning results in recursion Problem title: Returning results in recursion Tags: binary-tree, prolog Problem: Returning results in recursion I am trying to solve a problem where I need to evaluate the value of a binary expression tree. tree_calc(Tree, Eval) where Eval should hold the final result and Tree must...
Returning results in recursion Returning results in recursion binary-tree prolog Returning tree_calc Tree Eval LeftNode Operator RightNode Returning results in recursion I am trying to solve a problem where I need to evaluate the value of a binary expression tree. where Eval should hold the final result and Tree must b...
[ 0.0250244140625, 0.0027923583984375, 0.01055908203125, -0.005523681640625, 0.01068115234375, -0.0015106201171875, 0.0017852783203125, -0.0269775390625, 0.0128173828125, -0.02783203125, -0.0245361328125, -0.0208740234375, -0.004058837890625, 0.01068115234375, 0.0234375, 0.00872802734375...
[ 173340, 214, 50339, 23, 195625, 1830, 2394, 6635, 62600, 502, 4867, 53201, 6827, 238, 101344, 241, 1405, 2480, 5021, 112, 150922, 90911, 86869, 2967, 151575, 34292, 125195, 16401, 2704, 16750, 3173, 28282, 32354, 27875, 74481, 4420, 1257, 201...
[ 0.21142578125, 0.0172271728515625, 0.190185546875, 0.041290283203125, 0.20947265625, 0.1126708984375, 0.0994873046875, 0.04327392578125, 0.1873779296875, 0.0986328125, 0.1717529296875, 0.22265625, 0.091552734375, 0.02215576171875, 0.2381591796875, 0.0148162841796875, 0.199951171875, ...
embed
13957146_c0
13957146
prolog
0
Title: prolog,very simple dcg syntax Problem title: prolog,very simple dcg syntax Tags: syntax, prolog, dcg Problem: prolog,very simple dcg syntax I am trying to understand the basic syntax of prolog and dcg but it's really hard to get ahold of proper information on the really basic stuff. Take a look at the code below...
prolog,very simple dcg syntax prolog,very simple dcg syntax syntax prolog dcg Output test2 _G6369 prolog,very simple dcg syntax I am trying to understand the basic syntax of prolog and dcg but it's really hard to get ahold of proper information on the really basic stuff. Take a look at the code below, I basically just ...
[ 0.00970458984375, -0.0021820068359375, -0.0089111328125, -0.002838134765625, 0.004852294921875, 0.0247802734375, -0.007293701171875, -0.0108642578125, 0.002227783203125, -0.0240478515625, -0.01190185546875, -0.01434326171875, -0.015625, 0.0113525390625, 0.0198974609375, 0.02392578125, ...
[ 502, 4867, 104643, 8781, 104, 238, 177, 6002, 86531, 13538, 7077, 3034, 304, 724, 125832, 28219, 62822, 136, 18151, 3444, 69307, 15190, 2565, 271, 3564, 20903, 145755, 104272, 6138, 134629, 100033, 11001, 1507, 1542, 42856, 70541, 1884, 120, ...
[ 0.1494140625, 0.2470703125, 0.110107421875, 0.1827392578125, 0.05413818359375, 0.05908203125, 0.15283203125, 0.1275634765625, 0.1744384765625, 0.1202392578125, 0.10418701171875, 0.131591796875, 0.0457763671875, 0.00714111328125, 0.139892578125, 0.032470703125, 0.08050537109375, 0.0...
embed
55248466_c1
55248466
prolog
1
,0,L). it should produce the result: T = t(73, t(31, t(5, nil, nil), nil), t(101, t(83, nil, t(97, nil, nil)), nil)), L = t(73, t(31, t(5, nil, nil), t(0, nil, nil)), t(101, t(83, t(0, nil, nil), t(97, nil, nil)), t(0, nil, nil))) however mine produces: T = t(73, t(31, t(5, nil, nil), nil), t(101, t(83, nil, t(97, nil,...
,0,L). it should produce the result: T = t(73, t(31, t(5, nil, nil), nil), t(101, t(83, nil, t(97, nil, nil)), nil)), L = t(73, t(31, t(5, nil, nil), t(0, nil, nil)), t(101, t(83, t(0, nil, nil), t(97, nil, nil)), t(0, nil, nil))) however mine produces: T = t(73, t(31, t(5, nil, nil), nil), t(101, t(83, nil, t(97, nil,...
[ 0.00102996826171875, 0.01031494140625, 0.0029144287109375, 0.0157470703125, 0.004730224609375, 0.016357421875, -0.02490234375, -0.0113525390625, 0.006591796875, -0.0211181640625, 0.014404296875, -0.0030059814453125, 0.0067138671875, 0.0224609375, 0.018798828125, -0.0002803802490234375,...
[ 2389, 866, 194, 442, 5608, 27489, 16750, 384, 2203, 808, 13574, 5016, 104116, 17324, 35046, 17168, 14773, 339, 6, 32149, 49903, 5665, 5, 2967, 110, 112, 19251, 1556, 1632, 29041, 1284, 6863, 959, 154107, 70, 45234, 144851, 156672, 116, 84...
[ 0.1328125, 0.1546630859375, 0.02423095703125, 0.03375244140625, 0.09033203125, 0.2000732421875, 0.1409912109375, 0.158935546875, 0.033203125, 0.115966796875, 0.26123046875, 0.2122802734375, 0.052520751953125, 0.1285400390625, 0.1785888671875, 0.2379150390625, 0.17578125, 0.13488769...
embed
64177657_c0
64177657
prolog
0
Title: Does WAM Prolog have a Symbol Table? Problem title: Does WAM Prolog have a Symbol Table? Tags: warren-abstract-machine, prolog, symbol-table Problem: Does WAM Prolog have a Symbol Table? I am trying to program a WAM implementation of Prolog in C. I have noticed that the Prolog datatypes are described in only fou...
Does WAM Prolog have a Symbol Table? Does WAM Prolog have a Symbol Table? warren-abstract-machine prolog symbol-table Does WAM Prolog Symbol Table Does WAM Prolog have a Symbol Table? I am trying to program a WAM implementation of Prolog in C. I have noticed that the Prolog datatypes are described in only four token ty...
[ 0.033935546875, 0.0020904541015625, -0.00299072265625, 0.0194091796875, -0.0272216796875, 0.01251220703125, -0.00531005859375, 0.0093994140625, -0.003387451171875, 0.00555419921875, -0.00124359130859375, -0.00250244140625, -0.008056640625, 0.007080078125, -0.006744384765625, 0.02526855...
[ 101790, 4336, 594, 1250, 4867, 765, 10, 131899, 112997, 1631, 982, 2816, 103149, 502, 26582, 22819, 1528, 208124, 23, 313, 2053, 50986, 151552, 4734, 22759, 47, 1098, 52895, 9069, 919, 46549, 14452, 67616, 98423, 38750, 71924, 764, 2631, 70...
[ 0.0249176025390625, 0.153564453125, 0.16845703125, 0.16650390625, 0.235107421875, 0.04229736328125, 0.048858642578125, 0.2481689453125, 0.264892578125, 0.0207366943359375, 0.08782958984375, 0.09912109375, 0.09564208984375, 0.1197509765625, 0.2265625, 0.216552734375, 0.07122802734375,...
embed
1425009_c1
1425009
prolog
1
(Z,Y), male(X). aunt(X,Y):- sibling(X,Z), parent(Z,Y), female(X). male(i). male(f). male(s1). male(s2). female(w). female(d). child(i,f). child(s1,w). child(s1,i). child(s2,d). child(s2,f). child(d,w). son(i,f). son(s1,w). son(s1,i). son(s2,d). son(s2,f). daughter(d,w). married(i,w). married(w,i). married(f,d). married...
(Z,Y), male(X). aunt(X,Y):- sibling(X,Z), parent(Z,Y), female(X). male(i). male(f). male(s1). male(s2). female(w). female(d). child(i,f). child(s1,w). child(s1,i). child(s2,d). child(s2,f). child(d,w). son(i,f). son(s1,w). son(s1,i). son(s2,d). son(s2,f). daughter(d,w). married(i,w). married(w,i). married(f,d). married...
[ 0.000507354736328125, -0.012939453125, 0.00390625, 0.01434326171875, -0.0205078125, 0.01275634765625, -0.00872802734375, 0.01171875, 0, -0.032958984375, -0.000244140625, -0.036376953125, -0.0029754638671875, 0.011474609375, 0.01336669921875, -0.00015163421630859375, 0.03173828125, ...
[ 1511, 1723, 11280, 1542, 194, 10, 9109, 2077, 9, 78, 79298, 247, 49129, 117776, 420, 7, 17727, 10461, 29041, 418, 775, 304, 76849, 139505, 19729, 67373, 42732, 29954, 432, 9319, 82953, 51, 11030, 46526, 71, 14, 4552, 3525, 502, 4867, 31...
[ 0.1038818359375, 0.109619140625, 0.1370849609375, 0.0709228515625, 0.00555419921875, 0.033355712890625, 0.18505859375, 0.020965576171875, 0.00518798828125, 0.089111328125, 0.173095703125, 0.0222625732421875, 0.1966552734375, 0.119384765625, 0.09210205078125, 0.02716064453125, 0.08581...
embed
34070842_c0
34070842
prolog
0
Title: How to group list elements in prolog Problem title: How to group list elements in prolog Tags: list, prolog Problem: How to group list elements in prolog I am trying to group a List of elements.In this case I have some grammar notations and I want to grouped elements in same group.if there are some fruits in the...
How to group list elements in prolog How to group list elements in prolog list prolog How Animals Birds Fruits Rest How to group list elements in prolog I am trying to group a List of elements.In this case I have some grammar notations and I want to grouped elements in same group.if there are some fruits in the list th...
[ 0.0079345703125, -0.00183868408203125, 0.000919342041015625, 0.01123046875, -0.011962890625, 0.0169677734375, -0.014892578125, 0.0208740234375, 0.0186767578125, 0.0115966796875, 0.007354736328125, 0.00433349609375, -0.004974365234375, -0.00013446807861328125, 0.00439453125, -0.00040054...
[ 11249, 47, 21115, 5303, 80854, 502, 4867, 82821, 7, 72607, 151958, 49756, 23, 31577, 32036, 122092, 147, 959, 3444, 37769, 5701, 93151, 42564, 1632, 263, 201505, 114689, 71, 18113, 14858, 4488, 48078, 1727, 91736, 581, 69236, 1221, 1380 ]
[ 0.078125, 0.0195770263671875, 0.2435302734375, 0.2509765625, 0.22314453125, 0.150390625, 0.2313232421875, 0.1861572265625, 0.0204925537109375, 0.1436767578125, 0.1905517578125, 0.1995849609375, 0.001861572265625, 0.026336669921875, 0.1192626953125, 0.045196533203125, 0.0308837890625,...
embed
60309176_c0
60309176
prolog
0
Title: Result given for and operator predicate (Prolog) Problem title: Result given for and operator predicate (Prolog) Tags: prolog, predicate Problem: Result given for and operator predicate (Prolog) Someone is occupied and it is defined by if someone works two jobs. Given the following descriptions employe(tom,shopi...
Result given for and operator predicate (Prolog) Result given for and operator predicate (Prolog) prolog predicate Result Prolog Result given for and operator predicate (Prolog) Someone is occupied and it is defined by if someone works two jobs. Given the following descriptions I want to modify the following predicate ...
[ 0.026611328125, 0.00022792816162109375, 0.00087738037109375, 0.01312255859375, 0.01312255859375, 0.036865234375, -0.0201416015625, 0.006500244140625, 0.01202392578125, -0.02392578125, 0.000827789306640625, -0.0115966796875, -0.00191497802734375, 0.02490234375, -0.00970458984375, -0.000...
[ 126684, 34475, 100, 136, 39933, 1653, 2063, 67, 10752, 4867, 16, 502, 1250, 31384, 3630, 83, 95699, 34, 138518, 442, 61924, 390, 2174, 22008, 43240, 6626, 74464, 76811, 3444, 2811, 40383, 25632, 47, 30646, 3395, 2750, 4488, 18, 28219, 154...
[ 0.251953125, 0.1395263671875, 0.13623046875, 0.1689453125, 0.33642578125, 0.180908203125, 0.2099609375, 0.109375, 0.141845703125, 0.2149658203125, 0.0030517578125, 0.1363525390625, 0.1376953125, 0.030364990234375, 0.09112548828125, 0.0450439453125, 0.186279296875, 0.1771240234375, ...
embed
27979320_c0
27979320
prolog
0
Title: Invalid Result in Prolog Program Problem title: Invalid Result in Prolog Program Tags: recursion, prolog Problem: Invalid Result in Prolog Program My program is intended to get rid of repeating elements in a list. I think its correct. I tried to make it work by putting cuts, but it didn't give correct results. m...
Invalid Result in Prolog Program Invalid Result in Prolog Program recursion prolog Invalid Result Prolog Program Head Recursively remove_duplicates REM _G2608 _G2611 _G2614 _G2615 Invalid Result in Prolog Program My program is intended to get rid of repeating elements in a list. I think its correct. I tried to make it ...
[ 0.00390625, 0.0281982421875, 0.0177001953125, 0.0133056640625, -0.0242919921875, 0.017822265625, -0.007293701171875, 0.00439453125, 0.002349853515625, -0.023193359375, 0.01177978515625, 0.006988525390625, -0.0037994384765625, 0.00628662109375, 0.0062255859375, -0.0037384033203125, 0....
[ 360, 7013, 71, 126684, 23, 1250, 4867, 7663, 195625, 502, 44816, 48650, 5844, 87388, 693, 52721, 1636, 83852, 4046, 8318, 1662, 2592, 1837, 1528, 179140, 2046, 31351, 111, 119140, 214, 80854, 5303, 5351, 6863, 26785, 37842, 4488, 314, 933, ...
[ 0.029754638671875, 0.178466796875, 0.05413818359375, 0.213134765625, 0.050872802734375, 0.1614990234375, 0.2159423828125, 0.142822265625, 0.186767578125, 0.1168212890625, 0.16162109375, 0.1292724609375, 0.039031982421875, 0.161376953125, 0.0919189453125, 0.1961669921875, 0.1127929687...
embed
42176478_c0
42176478
prolog
0
Title: no permission to modify static procedure (\= )/2 prolog error Problem title: no permission to modify static procedure (\= )/2 prolog error Tags: compiler-errors, prolog Problem: no permission to modify static procedure (\= )/2 prolog error I was trying to write a rule to tell when is it possible for "A" to be th...
no permission to modify static procedure (\= )/2 prolog error no permission to modify static procedure (\= )/2 prolog error compiler-errors prolog Singleton no permission to modify static procedure (\= )/2 prolog error I was trying to write a rule to tell when is it possible for "A" to be the brother of "B" but I got o...
[ 0.0020904541015625, 0.006805419921875, 0.0247802734375, 0.002777099609375, -0.0294189453125, 0.01409912109375, -0.015869140625, -0.0034332275390625, 0.01495361328125, -0.023193359375, -0.023193359375, -0.0009765625, 0.0177001953125, 0.0177001953125, 0.0172119140625, -0.005706787109375,...
[ 110, 168081, 2811, 40383, 201939, 50491, 1369, 12477, 502, 4867, 18499, 9969, 34759, 188800, 43609, 1507, 31577, 33022, 79986, 14192, 3229, 7722, 284, 47, 186, 82953, 111, 571, 1631, 5117, 77336, 11001, 26950, 11814, 4734, 24145, 30022, 18151...
[ 0.075439453125, 0.2415771484375, 0.1485595703125, 0.10491943359375, 0.2060546875, 0.1890869140625, 0.07177734375, 0.2286376953125, 0.155517578125, 0.2254638671875, 0.180419921875, 0.064453125, 0.0809326171875, 0.1329345703125, 0.212158203125, 0.23388671875, 0.0040283203125, 0.02857...
embed
34251471_c0
34251471
prolog
0
Title: Tail-recursive predicate to generate a list of integers within a specified range Problem title: Tail-recursive predicate to generate a list of integers within a specified range Tags: prolog, tail-recursion Problem: Tail-recursive predicate to generate a list of integers within a specified range The problem is, I...
Tail-recursive predicate to generate a list of integers within a specified range Tail-recursive predicate to generate a list of integers within a specified range prolog tail-recursion Tail-recursive Tail-recursive predicate to generate a list of integers within a specified range The problem is, I'm not sure how to impl...
[ 0.001617431640625, 0.0093994140625, -0.002410888671875, 0.00836181640625, -0.0019989013671875, 0.042236328125, -0.01287841796875, -0.00003504753112792969, 0, 0.003662109375, 0.0093994140625, 0.0026092529296875, -0.007110595703125, 0.004180908203125, 0.03515625, 0.001007080078125, 0.0...
[ 1218, 379, 107, 48650, 5844, 1653, 2063, 67, 47, 139392, 5303, 892, 26255, 28032, 58735, 37457, 502, 4867, 46741, 1830, 2967, 9077, 29479, 154107, 171859, 32354, 69101, 6626, 17932, 167785, 237, 5117, 606, 8, 7612, 335, 83, 5759, 12936, 1...
[ 0.197509765625, 0.163330078125, 0.0887451171875, 0.2025146484375, 0.1591796875, 0.1751708984375, 0.21044921875, 0.08642578125, 0.025299072265625, 0.2041015625, 0.1629638671875, 0.172119140625, 0.140869140625, 0.12109375, 0.1737060546875, 0.1904296875, 0.1326904296875, 0.2314453125,...
embed
66083610_c0
66083610
prolog
0
Title: Prolog setOf with Multiple Predicates Problem title: Prolog setOf with Multiple Predicates Tags: prolog, prolog-setof Problem: Prolog setOf with Multiple Predicates In my prolog database, I have below facts: played('Sharon rose', piano). played('Robert Kay', piano). played('Kelvin Cage', drums). singer('Robert K...
Prolog setOf with Multiple Predicates Prolog setOf with Multiple Predicates prolog prolog-setof Prolog Multiple Predicates Sharon Robert Kay Kelvin Cage band_leader Output Prolog setOf with Multiple Predicates In my prolog database, I have below facts: I want to print out all the names uniquely as a single list. Below ...
[ 0.0205078125, -0.00592041015625, 0.03125, 0.0267333984375, -0.00921630859375, 0.00872802734375, -0.01123046875, -0.0006256103515625, 0.0084228515625, -0.048828125, 0.00830078125, 0.001678466796875, 0.025390625, -0.01519775390625, -0.02392578125, 0.016845703125, -0.00164031982421875, ...
[ 1250, 4867, 5423, 132887, 678, 19335, 8705, 7145, 2063, 1636, 502, 3509, 4390, 180831, 12452, 26125, 23203, 2082, 2041, 429, 8753, 133, 38970, 13538, 63399, 35064, 15824, 3444, 28412, 1810, 756, 123055, 36998, 237, 11001, 5303, 41, 1294, 14...
[ 0.1690673828125, 0.2333984375, 0.19775390625, 0.292236328125, 0.06427001953125, 0.12841796875, 0.11962890625, 0.2064208984375, 0.201171875, 0.006500244140625, 0.14599609375, 0.1873779296875, 0.274169921875, 0.1444091796875, 0.10089111328125, 0.13623046875, 0.0244903564453125, 0.177...
embed
35952275_c1
35952275
prolog
1
ada,rice, tortilla, beans, salsa, guacamole, cheese]). ingredients(adobado_plate, [adobado, guacamole, rice, tortilla, beans, cheese]). Here is my code: helpt([],0). helpt([H|T],V):-helpt(T,VT),cost(H,Y),V is VT+Y. total_cost(X,K) :- ingredients(X,Y),helpt(Y,B),K==B. This works correctly when I do these 2 things: ?- to...
ada,rice, tortilla, beans, salsa, guacamole, cheese]). ingredients(adobado_plate, [adobado, guacamole, rice, tortilla, beans, cheese]). Here is my code: helpt([],0). helpt([H|T],V):-helpt(T,VT),cost(H,Y),V is VT+Y. total_cost(X,K) :- ingredients(X,Y),helpt(Y,B),K==B. This works correctly when I do these 2 things: ?- to...
[ -0.0011138916015625, 0.0145263671875, -0.00131988525390625, 0.01116943359375, -0.0157470703125, 0.0076904296875, -0.0108642578125, 0.01708984375, 0.0034027099609375, -0.03466796875, 0.0033111572265625, 0.00048828125, -0.01483154296875, -0.00101470947265625, 0.0186767578125, -0.00689697...
[ 1243, 32512, 43807, 2298, 186, 10133, 102012, 42348, 9779, 16836, 96967, 145170, 1138, 402, 246, 92558, 64827, 11853, 759, 18151, 4358, 18, 77495, 841, 58745, 618, 856, 9, 73866, 86920, 587, 271, 1723, 83, 1328, 3622, 132, 1542, 605, 571,...
[ 0.1859130859375, 0.10748291015625, 0.083984375, 0.1405029296875, 0.06378173828125, 0.070556640625, 0.125244140625, 0.058837890625, 0.06280517578125, 0.1710205078125, 0.119384765625, 0.2205810546875, 0.149169921875, 0.1343994140625, 0.1375732421875, 0.1807861328125, 0.1405029296875, ...
embed
2074350_c0
2074350
prolog
0
Title: Defining is_a predicate in prolog? Problem title: Defining is_a predicate in prolog? Tags: inheritance, prolog, predicate Problem: Defining is_a predicate in prolog? I'm trying to define the inheritance-check predicate is_a/2 in Prolog, but so far all my trials failed. The is_a(X, Y) predicate should return true...
Defining is_a predicate in prolog? Defining is_a predicate in prolog? inheritance prolog predicate Defining is_a Defining is_a predicate in prolog? I'm trying to define the inheritance-check predicate is_a/2 in Prolog, but so far all my trials failed. The is_a(X, Y) predicate should return true whenever Y is a supercla...
[ -0.000518798828125, -0.01116943359375, 0.00970458984375, 0.03564453125, -0.01068115234375, 0.00010395050048828125, -0.0069580078125, 0.00860595703125, 0.0047607421875, -0.0216064453125, 0.0174560546875, -0.0091552734375, -0.00897216796875, 0.006134033203125, 0.008056640625, 0.002120971...
[ 88606, 449, 83, 454, 11, 1653, 2063, 67, 23, 502, 4867, 3334, 217, 7154, 61924, 78292, 12477, 1250, 110324, 165523, 1542, 4, 990, 5608, 30646, 29568, 217684, 1601, 67413, 111, 1193, 80934, 41, 1294, 442, 162520, 179933, 54241, 40956, 1576...
[ 0.208740234375, 0.09356689453125, 0.2181396484375, 0.11328125, 0.174560546875, 0.2039794921875, 0.246337890625, 0.1717529296875, 0.08837890625, 0.149169921875, 0.2095947265625, 0.162353515625, 0.1119384765625, 0.07000732421875, 0.1728515625, 0.1705322265625, 0.177001953125, 0.14343...
embed
59178001_c0
59178001
prolog
0
Title: Prolog translation Problem title: Prolog translation Tags: prolog Problem: Prolog translation I am trying to create simple prolog program which have simple rules, means(you,i):-!. means(are,'am not'):-!. means(is,'is not'):-!. means(english,german):-!. means('i am','why, are, you'):-!. means(do,no):-!. means(X,X...
Prolog translation Prolog translation prolog Prolog Prolog translation I am trying to create simple prolog program which have simple rules, example But when i run translate([you,are,a,child],A). it returns as A = [i, a]. Cannot find the mistake.
[ 0.0108642578125, 0.003204345703125, 0.000293731689453125, -0.00738525390625, 0.002777099609375, 0.01043701171875, -0.03173828125, 0.0027313232421875, 0.003326416015625, -0.015869140625, 0.00092315673828125, -0.02197265625, -0.02197265625, -0.0191650390625, 0.004486083984375, 0.00091934...
[ 1250, 4867, 153648, 502, 31577, 28282, 8781, 1528, 91736, 27781, 4966, 3229, 11675, 3900, 19309, 132, 53927, 4, 1046, 11, 206, 38472, 284, 442, 30646, 237, 62, 2203, 14, 10, 7413, 121742, 5 ]
[ 0.1685791015625, 0.26953125, 0.2344970703125, 0.1385498046875, 0.062469482421875, 0.0867919921875, 0.09832763671875, 0.16015625, 0.166015625, 0.09393310546875, 0.047515869140625, 0.01540374755859375, 0.1624755859375, 0.192138671875, 0.24169921875, 0.0136260986328125, 0.1873779296875,...
embed
50657460_c2
50657460
prolog
2
next, W, H), Val < 0, check_count_grid(Xnext, Ynext, Grid, W, H). check_count_grid(X, Y, Grid, W, H) :- get_value(X, Y, Grid, Val), next_square(X, Y, Xnext, Ynext, W, H), Val > 0, check_count_island(X, Y, Grid, W, H), check_count_grid(Xnext, Ynext, Grid, W, H). /* check if cells are of the same kind */ /* either both a...
next, W, H), Val < 0, check_count_grid(Xnext, Ynext, Grid, W, H). check_count_grid(X, Y, Grid, W, H) :- get_value(X, Y, Grid, Val), next_square(X, Y, Xnext, Ynext, W, H), Val > 0, check_count_island(X, Y, Grid, W, H), check_count_grid(Xnext, Ynext, Grid, W, H). /* check if cells are of the same kind */ /* either both a...
[ -0.01214599609375, 0.003936767578125, 0.0004062652587890625, 0.0203857421875, 0.0017852783203125, -0.007049560546875, -0.003631591796875, -0.0308837890625, 0.0233154296875, 0.0006561279296875, -0.00311279296875, 0.018798828125, 0.01116943359375, -0.00872802734375, -0.01953125, -0.00640...
[ 11737, 601, 572, 4769, 4426, 757, 12765, 71013, 120067, 1542, 86, 29062, 8669, 3355, 18, 31945, 71, 990, 15772, 2046, 27494, 108047, 1193, 977, 164, 1760, 2174, 38750, 5701, 8562, 15044, 621, 23706, 959, 7, 28864, 26073, 104192, 19273, 18...
[ 0.183837890625, 0.134033203125, 0.109130859375, 0.1651611328125, 0.0914306640625, 0.122802734375, 0.1959228515625, 0.177001953125, 0.210693359375, 0.057464599609375, 0.08123779296875, 0.168701171875, 0.069580078125, 0.09539794921875, 0.0865478515625, 0.130615234375, 0.06494140625, ...
embed
47847613_c0
47847613
prolog
0
Title: Get extract value from fact Problem title: Get extract value from fact Tags: prolog, visual-prolog Problem: Get extract value from fact Im pretty new to prolog, and got stuck. I need to store a variable with some string during calculations, I decided to do this by adding a "single fact" to the class I'm working ...
Get extract value from fact Get extract value from fact prolog visual-prolog fact Get dataBL::dataBL Get extract value from fact Im pretty new to prolog, and got stuck. I need to store a variable with some string during calculations, I decided to do this by adding a "single fact" to the class I'm working with. Everythi...
[ 0.041748046875, 0.001800537109375, 0.01275634765625, 0.01171875, -0.0098876953125, -0.002471923828125, 0.0157470703125, 0.007110595703125, 0.01434326171875, -0.0072021484375, 0.002685546875, -0.0186767578125, -0.00531005859375, -0.00860595703125, -0.013427734375, 0.00396728515625, -0...
[ 20779, 125663, 34292, 1295, 15824, 502, 4867, 21176, 3454, 2053, 38274, 10135, 28875, 3525, 179933, 3871, 4343, 77336, 678, 79315, 20271, 74481, 154107, 6953, 133, 18507, 20697, 171581, 43240, 5299, 9790, 15190, 18151, 17203, 14432, 9969, 34759...
[ 0.1256103515625, 0.27734375, 0.2210693359375, 0.13525390625, 0.261474609375, 0.1268310546875, 0.235595703125, 0.2015380859375, 0.1104736328125, 0.09619140625, 0.2237548828125, 0.09423828125, 0.007415771484375, 0.00335693359375, 0.07568359375, 0.001617431640625, 0.1861572265625, 0.2...
embed
58897360_c0
58897360
prolog
0
Title: advanced prolog tricks for 2019? Problem title: advanced prolog tricks for 2019? Tags: prolog Problem: advanced prolog tricks for 2019? Recently I spend sometime with someone who'd been programming in Prolog, exclusively, for 2 decades. We spoke of new Prolog tricks that he used in 2019 that were not widely know...
advanced prolog tricks for 2019? advanced prolog tricks for 2019? prolog advanced prolog tricks for 2019? Recently I spend sometime with someone who'd been programming in Prolog, exclusively, for 2 decades. We spoke of new Prolog tricks that he used in 2019 that were not widely known in 2000. e.g. He's been working on ...
[ 0.00927734375, -0.01434326171875, -0.002685546875, -0.000431060791015625, -0.0096435546875, 0.0274658203125, -0.0145263671875, -0.0086669921875, 0.0174560546875, -0.02783203125, 0.0101318359375, 0.004302978515625, -0.004852294921875, -0.004302978515625, 0.0118408203125, 0.0040283203125...
[ 175961, 502, 4867, 88308, 7, 100, 3640, 32, 47445, 6032, 678, 22008, 2809, 56037, 1250, 97629, 116, 8, 23662, 113091, 3525, 11814, 23, 959, 38134, 51529, 52489, 20697, 122092, 147, 77007, 63220, 35401, 3034, 58093, 102678, 1884, 6083, 38415...
[ 0.216552734375, 0.1832275390625, 0.2646484375, 0.255615234375, 0.1168212890625, 0.12255859375, 0.273681640625, 0.00555419921875, 0.019378662109375, 0.012908935546875, 0.058837890625, 0.006988525390625, 0.013519287109375, 0.153076171875, 0.1922607421875, 0.0814208984375, 0.03668212890...
embed
67627686_c0
67627686
prolog
0
Title: prolog comparing floating point numbers in a list Problem title: prolog comparing floating point numbers in a list Tags: prolog Problem: prolog comparing floating point numbers in a list I have a List of Lists, let's call it List1 like: [[0.001, 0.005], [0.004, 0.010], [0.123, 0.501]] I also have another list, l...
prolog comparing floating point numbers in a list prolog comparing floating point numbers in a list prolog prolog comparing floating point numbers in a list I have a List of Lists, let's call it List1 like: [[0.001, 0.005], [0.004, 0.010], [0.123, 0.501]] I also have another list, let's call it List2 like: [0.002, 0.00...
[ 0.0028228759765625, -0.0196533203125, -0.0052490234375, -0.000545501708984375, 0.00836181640625, 0.031982421875, 0.005523681640625, 0.0023956298828125, 0.0174560546875, 0.03271484375, 0.01446533203125, 0.015869140625, -0.0027008056640625, -0.006439208984375, 0.0030517578125, -0.0016479...
[ 502, 4867, 37397, 21917, 26518, 6275, 101935, 23, 5303, 214, 32036, 111, 11782, 418, 37509, 89678, 8194, 617, 963, 102014, 3742, 81730, 6746, 304, 8318, 757, 161689, 12765, 2174, 653, 927, 14012, 17721, 136, 54, 9844, 37076, 959, 5117, 80...
[ 0.1751708984375, 0.251953125, 0.2159423828125, 0.1864013671875, 0.1168212890625, 0.168212890625, 0.2060546875, 0.03521728515625, 0.2283935546875, 0.032379150390625, 0.2127685546875, 0.001373291015625, 0.0156097412109375, 0.06878662109375, 0.1514892578125, 0.1473388671875, 0.208374023...
embed
27235148_c1
27235148
prolog
1
Fail: ', Goal, Depth), fail. redo_clause(Depth, Goal, Body) :- findall(Goal-Body, clause(Goal, Body), [First|Rest]), ( Goal-Body = First ; length(Rest, RL), length(RestC, RL), member(Goal-Body,RestC), display('Redo: ', Goal, Depth), Rest = RestC ). display(Message, Goal, Depth):- tab(Depth), write(Depth), write(': '), ...
Fail: ', Goal, Depth), fail. redo_clause(Depth, Goal, Body) :- findall(Goal-Body, clause(Goal, Body), [First|Rest]), ( Goal-Body = First ; length(Rest, RL), length(RestC, RL), member(Goal-Body,RestC), display('Redo: ', Goal, Depth), Rest = RestC ). display(Message, Goal, Depth):- tab(Depth), write(Depth), write(': '), ...
[ 0.0146484375, 0.024169921875, 0.0208740234375, 0.01953125, -0.005340576171875, -0.006866455078125, 0.003631591796875, -0.01123046875, 0.0177001953125, -0.0084228515625, 0.01092529296875, -0.00640869140625, -0.01123046875, -0.004241943359375, 0.0167236328125, 0.01239013671875, 0.00952...
[ 190355, 242, 2016, 289, 4, 262, 254, 927, 35782, 41313, 18347, 4032, 4657, 43960, 15772, 7413, 5584, 17903, 12647, 1459, 70731, 13, 207263, 58745, 1052, 525, 23972, 140909, 30121, 32786, 441, 44116, 4332, 246, 12, 49756, 6011, 20928, 33022,...
[ 0.23876953125, 0.04083251953125, 0.1904296875, 0.1795654296875, 0.0237884521484375, 0.1383056640625, 0.1888427734375, 0.1494140625, 0.218994140625, 0.247314453125, 0.100830078125, 0.1246337890625, 0.168701171875, 0.228759765625, 0.05120849609375, 0.1212158203125, 0.1922607421875, 0...
embed