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
47705374_c0
47705374
prolog
0
Title: Prolog - Finding alternative words (synonyms) Problem title: Prolog - Finding alternative words (synonyms) Tags: list, dictionary, predicate, prolog, synonym Problem: Prolog - Finding alternative words (synonyms) I'm trying to figure out how I would go about creating a synonym finder in Prolog. I have some words...
Prolog - Finding alternative words (synonyms) Prolog - Finding alternative words (synonyms) list dictionary predicate prolog synonym Prolog Finding Prolog - Finding alternative words (synonyms) I'm trying to figure out how I would go about creating a synonym finder in Prolog. I have some words here... If the input was ...
[ -0.003173828125, 0.006866455078125, -0.004730224609375, -0.005645751953125, 0.002105712890625, 0.0220947265625, 0.01385498046875, 0.0089111328125, 0.007293701171875, -0.041259765625, -0.00121307373046875, 0.00836181640625, -0.00323486328125, -0.007415771484375, 0.00145721435546875, 0.0...
[ 1250, 4867, 26040, 214, 30700, 34153, 12654, 45757, 7, 5303, 10763, 1653, 2063, 67, 502, 164661, 31577, 26366, 105233, 10, 32843, 23, 3688, 4263, 107730, 509, 1884, 2806, 3444, 140992, 25003, 100, 18276, 29552, 678, 64457, 154107, 2565, 959...
[ 0.16748046875, 0.25244140625, 0.06488037109375, 0.0307769775390625, 0.14404296875, 0.11767578125, 0.05853271484375, 0.1412353515625, 0.1143798828125, 0.07745361328125, 0.047698974609375, 0.1085205078125, 0.118896484375, 0.013031005859375, 0.12841796875, 0.2215576171875, 0.01448059082...
embed
41127461_c0
41127461
prolog
0
Title: How do I assert a DCG rule in Prolog? Problem title: How do I assert a DCG rule in Prolog? Tags: dcg, prolog Problem: How do I assert a DCG rule in Prolog? The following Prolog prints done for goals test1 and test2 , but not test3 . My understanding is that match_test2 and match_test3 in this code should be equi...
How do I assert a DCG rule in Prolog? How do I assert a DCG rule in Prolog? dcg prolog How DCG Prolog test1 test2 test3 match_test2 match_test3 match_test1 bug.pl How do I assert a DCG rule in Prolog? The following Prolog prints done for goals test1 and test2 , but not test3 . My understanding is that match_test2 and m...
[ 0.0216064453125, -0.003875732421875, -0.004547119140625, 0.0120849609375, -0.0017242431640625, 0.00299072265625, -0.0277099609375, 0.0001735687255859375, 0.01483154296875, -0.0146484375, 0.00055694580078125, 0.0084228515625, 0.0030059814453125, -0.01068115234375, 0.039306640625, 0.0198...
[ 11249, 237, 33657, 391, 56367, 79986, 1250, 4867, 104, 238, 177, 502, 3034, 418, 304, 363, 14858, 6954, 54608, 2424, 10, 23, 25632, 28412, 16940, 109458, 959, 100094, 18151, 183234, 28282, 1829, 16865, 38969, 10752, 120883, 15276, 13307, 94...
[ 0.006866455078125, 0.07427978515625, 0.201904296875, 0.1158447265625, 0.2470703125, 0.194580078125, 0.1754150390625, 0.242431640625, 0.0491943359375, 0.04254150390625, 0.1185302734375, 0.1180419921875, 0.1837158203125, 0.0399169921875, 0.1104736328125, 0.17333984375, 0.176025390625, ...
embed
13612188_c0
13612188
prolog
0
Title: Prolog list location Problem title: Prolog list location Tags: list, location, prolog Problem: Prolog list location I have been working on this code to look for the location and tell me if the location exists. The code is: location(C, L). location(C, [C,L]|_]). location(C, [_|T]):- location(C,T,L). and i want it...
Prolog list location Prolog list location list location prolog Prolog Prolog list location I have been working on this code to look for the location and tell me if the location exists. The code is: and i want it to be true if C appears as a chest in the location L. I type in the following code which is: The answer shou...
[ 0.00738525390625, 0.0255126953125, 0.02734375, -0.0054931640625, -0.0024871826171875, 0.0172119140625, 0.0033111572265625, 0.0057373046875, -0.003204345703125, -0.0103759765625, 0.004638671875, -0.00933837890625, -0.02197265625, -0.0244140625, 0.008544921875, -0.01214599609375, 0.008...
[ 1250, 4867, 5303, 31913, 502, 20697, 18151, 6713, 100, 14192, 2174, 32316, 7, 3444, 29568, 313, 135179, 237, 290, 271, 23, 70, 339, 10644, 25632, 35166, 5608, 34475, 72272, 6863, 14037, 83, 1284, 15549, 47, 7464, 2046, 3229, 11341, 110, ...
[ 0.1566162109375, 0.26318359375, 0.1890869140625, 0.2357177734375, 0.1209716796875, 0.04425048828125, 0.1708984375, 0.069580078125, 0.047027587890625, 0.0634765625, 0.059783935546875, 0.142822265625, 0.01312255859375, 0.0765380859375, 0.12060546875, 0.119873046875, 0.12353515625, 0....
embed
65129805_c1
65129805
prolog
1
: ERROR: [13] [2,3]=<1 ERROR: [12] max([[2|...],4],1,_7284) at c:/users/ace_m/documents/prolog/bp.pl:47 ERROR: [11] maximum([1,...|...],_7328) at c:/users/ace_m/documents/prolog/bp.pl:46 ERROR: [10] maximum_in_multilayered_list([1,...|...],_7366) at c:/users/ace_m/documents/prolog/bp.pl:75 ERROR: [9] <user> Exception: ...
: ERROR: [13] [2,3]=<1 ERROR: [12] max([[2|...],4],1,_7284) at c:/users/ace_m/documents/prolog/bp.pl:47 ERROR: [11] maximum([1,...|...],_7328) at c:/users/ace_m/documents/prolog/bp.pl:46 ERROR: [10] maximum_in_multilayered_list([1,...|...],_7366) at c:/users/ace_m/documents/prolog/bp.pl:75 ERROR: [9] <user> Exception: ...
[ -0.002838134765625, 0.01611328125, 0.01318359375, 0.01025390625, -0.0036163330078125, 0.0301513671875, 0.000762939453125, -0.008544921875, 0.0096435546875, -0.0089111328125, 0.0108642578125, 0.00099945068359375, 0.01806640625, -0.00897216796875, 0.00469970703125, -0.01324462890625, 0...
[ 152, 151206, 24638, 85090, 155761, 16093, 418, 77284, 18389, 304, 617, 12825, 13903, 223, 1314, 8509, 39, 117432, 3454, 4867, 2424, 33573, 73068, 38132, 13574, 77671, 32909, 63709, 73, 144227, 5259, 6562, 84308, 6873, 55737, 65918, 5443, 6392...
[ 0.012115478515625, 0.1781005859375, 0.1512451171875, 0.1611328125, 0.1829833984375, 0.047760009765625, 0.07061767578125, 0.08935546875, 0.2362060546875, 0.0889892578125, 0.1455078125, 0.0828857421875, 0.2208251953125, 0.066650390625, 0.053955078125, 0.06744384765625, 0.106201171875, ...
embed
69886689_c0
69886689
prolog
0
Title: How to print all females in prolog if my facts only contains male property Problem title: How to print all females in prolog if my facts only contains male property Tags: prolog Problem: How to print all females in prolog if my facts only contains male property Lets suppose my db.pl file consists of only male(Ol...
How to print all females in prolog if my facts only contains male property How to print all females in prolog if my facts only contains male property prolog How Oliver How to print all females in prolog if my facts only contains male property Lets suppose my db.pl file consists of only Now if I query, Then this will su...
[ 0.0247802734375, 0.003875732421875, 0.0242919921875, 0.01220703125, -0.00103759765625, 0.0284423828125, 0.00616455078125, -0.0103759765625, -0.00421142578125, -0.0306396484375, -0.01092529296875, -0.0123291015625, -0.0025482177734375, 0.0019989013671875, -0.0087890625, 0.00016689300537...
[ 11249, 47, 28412, 756, 117776, 7, 23, 502, 4867, 2174, 15824, 4734, 70541, 11280, 57266, 759, 70189, 40041, 5, 2424, 11435, 41, 65771, 30646, 1294, 959, 9351, 1653, 2063, 26785, 140992, 72272, 64, 157, 132283, 2046, 5303, 111, 10869 ]
[ 0.0545654296875, 0.003753662109375, 0.1904296875, 0.1614990234375, 0.271484375, 0.0931396484375, 0.051971435546875, 0.1541748046875, 0.21337890625, 0.0526123046875, 0.1591796875, 0.08203125, 0.0765380859375, 0.1748046875, 0.1680908203125, 0.0064697265625, 0.1683349609375, 0.1113281...
embed
44338626_c0
44338626
prolog
0
Title: Removing unique elements from list in prolog Problem title: Removing unique elements from list in prolog Tags: prolog Problem: Removing unique elements from list in prolog I am attempting to remove unique elements from a list in Prolog. Output should look something like: ?- rem_Uniq([3,3,1,7,a,c,c],D). D = [3, c...
Removing unique elements from list in prolog Removing unique elements from list in prolog prolog list Removing rem_Uniq RL1 Removing unique elements from list in prolog I am attempting to remove unique elements from a list in Prolog. Output should look something like: Here is my current code. Currently it just returns ...
[ -0.004180908203125, 0.022705078125, 0.0162353515625, -0.0174560546875, -0.0191650390625, -0.005279541015625, -0.00946044921875, -0.003265380859375, 0.01513671875, -0.0162353515625, -0.00848388671875, 0.0113525390625, 0.018310546875, -0.018310546875, -0.0009613037109375, 0.0301513671875...
[ 853, 432, 36998, 80854, 1295, 5303, 502, 4867, 6496, 14194, 85600, 864, 30121, 418, 81887, 87388, 1250, 13538, 5608, 6713, 1884, 43581, 18151, 114063, 30646, 29568, 26866, 54, 30957, 70541, 77336, 25647, 157666, 20594, 44691 ]
[ 0.00994873046875, 0.12890625, 0.24462890625, 0.2139892578125, 0.0740966796875, 0.1781005859375, 0.125732421875, 0.225341796875, 0.03192138671875, 0.161376953125, 0.157470703125, 0.1280517578125, 0.1378173828125, 0.05950927734375, 0.061492919921875, 0.134521484375, 0.1241455078125, ...
embed
16162996_c1
16162996
prolog
1
2,6] ; L - [2,4]. As once it passes the cut on the third clause it can no longer back trace. Instead it returns: L = [2, 6] ; L = [2, 4] ; L = [3, 6] ; L = [3, 4] Why is this happening? It literally jumps back over the cut and begins executing clause 4, why? Why does it execute clause 4, when if i move the cut up to cl...
2,6] ; L - [2,4]. As once it passes the cut on the third clause it can no longer back trace. Instead it returns: L = [2, 6] ; L = [2, 4] ; L = [3, 6] ; L = [3, 4] Why is this happening? It literally jumps back over the cut and begins executing clause 4, why? Why does it execute clause 4, when if i move the cut up to cl...
[ 0.022216796875, 0.031982421875, 0.0087890625, 0.0103759765625, -0.01251220703125, 0.0169677734375, -0.004638671875, -0.0150146484375, 0.0240478515625, 0.021484375, -0.00177001953125, -0.0093994140625, -0.003936767578125, -0.01544189453125, 0.0186767578125, 0.00946044921875, 0.0095214...
[ 115261, 268, 339, 20, 304, 617, 1301, 24145, 442, 10922, 59226, 50960, 70731, 13, 831, 110, 51713, 4420, 144851, 175399, 30646, 2203, 4, 305, 201, 122101, 44084, 903, 123087, 1650, 218500, 88203, 645, 9842, 71924, 15400, 14602, 17, 25813, ...
[ 0.270751953125, 0.03790283203125, 0.143310546875, 0.0347900390625, 0.103271484375, 0.15478515625, 0.0302734375, 0.03167724609375, 0.05023193359375, 0.1114501953125, 0.2288818359375, 0.16064453125, 0.1717529296875, 0.042388916015625, 0.042236328125, 0.0228271484375, 0.03466796875, 0...
embed
61553009_c0
61553009
prolog
0
Title: Prolog-SWI Can&#x27;t figure out how to recursively multiply Polynomials Problem title: Prolog-SWI Can&#x27;t figure out how to recursively multiply Polynomials Tags: prolog Problem: Prolog-SWI Can't figure out how to recursively multiply Polynomials Here's what I was trying to do %polynomials eval_term([C|E], X...
Prolog-SWI Can&#x27;t figure out how to recursively multiply Polynomials Prolog-SWI Can&#x27;t figure out how to recursively multiply Polynomials prolog Prolog-SWI Can Polynomials eval_term eval_poly Rest Prolog-SWI Can't figure out how to recursively multiply Polynomials Here's what I was trying to do Here's a sample ...
[ -0.021728515625, 0.02734375, 0.0245361328125, 0.01422119140625, -0.0108642578125, 0.0101318359375, 0.015625, -0.004364013671875, 0.0142822265625, -0.03759765625, 0.020751953125, -0.006927490234375, 0.0037384033203125, -0.004150390625, -0.0054931640625, -0.00823974609375, 0.0137939453...
[ 1250, 4867, 294, 38969, 3768, 26366, 1810, 3642, 195625, 5844, 6024, 62479, 63306, 1687, 15403, 538, 502, 4171, 1405, 32166, 135545, 49756, 18, 31577, 121413, 107730, 140992, 534 ]
[ 0.123046875, 0.229736328125, 0.0477294921875, 0.201904296875, 0.0394287109375, 0.0986328125, 0.036834716796875, 0.047454833984375, 0.183837890625, 0.12646484375, 0.121826171875, 0.1878662109375, 0.1463623046875, 0.1087646484375, 0.137939453125, 0.000823974609375, 0.0948486328125, 0...
embed
75661402_c0
75661402
prolog
0
Title: Clearing a line from the Prolog terminal in VS Code Problem title: Clearing a line from the Prolog terminal in VS Code Tags: keyboard-shortcuts, prolog, terminal, visual-studio-code Problem: Clearing a line from the Prolog terminal in VS Code So I have Prolog in a terminal within VS Code, but sometimes it crashe...
Clearing a line from the Prolog terminal in VS Code Clearing a line from the Prolog terminal in VS Code keyboard-shortcuts prolog terminal visual-studio-code the Clearing Prolog Clearing a line from the Prolog terminal in VS Code So I have Prolog in a terminal within VS Code, but sometimes it crashes and I restart it. ...
[ 0.005950927734375, 0.0179443359375, 0.00732421875, 0.02880859375, 0.010009765625, -0.018798828125, 0.01312255859375, 0.009033203125, -0.0036468505859375, -0.008544921875, -0.0191650390625, 0.01513671875, -0.00799560546875, 0.0152587890625, 0.017333984375, 0.005767822265625, 0.0177001...
[ 86120, 13315, 1295, 1250, 4867, 33949, 44160, 28864, 23, 149186, 186500, 19774, 502, 21176, 52629, 40899, 214, 28032, 68018, 150631, 17137, 62122, 69405, 24234, 7381, 4568, 41, 1294, 32692, 959, 2685, 176683, 4734, 45831, 4552, 4989, 5, 2424,...
[ 0.196533203125, 0.1641845703125, 0.113037109375, 0.1993408203125, 0.267333984375, 0.279052734375, 0.191650390625, 0.2064208984375, 0.01336669921875, 0.1173095703125, 0.04425048828125, 0.09326171875, 0.1160888671875, 0.1141357421875, 0.0770263671875, 0.1390380859375, 0.0863037109375, ...
embed
65333916_c0
65333916
prolog
0
Title: Prolog - How can I modify this clause to be able to print it in-depth first search DFS? Problem title: Prolog - How can I modify this clause to be able to print it in-depth first search DFS? Tags: prolog Problem: Prolog - How can I modify this clause to be able to print it in-depth first search DFS? I was wonder...
Prolog - How can I modify this clause to be able to print it in-depth first search DFS? Prolog - How can I modify this clause to be able to print it in-depth first search DFS? prolog Prolog How DFS Prolog - How can I modify this clause to be able to print it in-depth first search DFS? I was wondering how to modify the ...
[ 0.007232666015625, 0.0166015625, 0.000720977783203125, 0.04736328125, -0.0029144287109375, 0.010009765625, -0.0224609375, -0.0033416748046875, 0.0146484375, 0.0005645751953125, 0.00946044921875, -0.009521484375, -0.002899169921875, 0.0145263671875, 0.0234375, 0.0089111328125, 0.01165...
[ 1250, 4867, 11249, 831, 87, 2811, 40383, 903, 70731, 13, 19048, 28412, 23, 168867, 5117, 33938, 391, 36381, 502, 47, 442, 149016, 3642, 157193, 12477, 2060, 107730 ]
[ 0.146484375, 0.237060546875, 0.04437255859375, 0.049835205078125, 0.041900634765625, 0.1622314453125, 0.18017578125, 0.07501220703125, 0.190185546875, 0.0992431640625, 0.0653076171875, 0.1944580078125, 0.05810546875, 0.200439453125, 0.108154296875, 0.19384765625, 0.049591064453125, ...
embed
42047972_c0
42047972
prolog
0
Title: base case to returning false on a condition prolog Problem title: base case to returning false on a condition prolog Tags: prolog Problem: base case to returning false on a condition prolog I am working on a basic project in Prolog. I want to write a function that returns a number based on the input list. I also...
base case to returning false on a condition prolog base case to returning false on a condition prolog prolog base case to returning false on a condition prolog I am working on a basic project in Prolog. I want to write a function that returns a number based on the input list. I also want to make sure that when the inpu...
[ -0.0047607421875, -0.00121307373046875, -0.00433349609375, -0.00019073486328125, -0.004364013671875, 0.0247802734375, -0.010009765625, -0.0020294189453125, 0.0037689208984375, 0.0068359375, 0.00138092041015625, -0.020263671875, -0.0142822265625, 0.0159912109375, -0.005950927734375, 0.0...
[ 3647, 7225, 30646, 98320, 98, 35431, 502, 4867, 47, 214, 20697, 62822, 13452, 1250, 3444, 33022, 32354, 14012, 35509, 107730, 5303, 3249, 9077, 3229, 201505, 16750, 83, 1884, 366, 184, 154663, 541, 3917, 22225, 9790, 7440, 2499, 959, 4488, ...
[ 0.233642578125, 0.2017822265625, 0.1795654296875, 0.25439453125, 0.04095458984375, 0.1903076171875, 0.124755859375, 0.1878662109375, 0.01702880859375, 0.0139923095703125, 0.027618408203125, 0.024505615234375, 0.0001220703125, 0.07342529296875, 0.0170745849609375, 0.03973388671875, 0....
embed
64983826_c0
64983826
prolog
0
Title: How to move first N elements to the end of the list for each list in the list of lists Problem title: How to move first N elements to the end of the list for each list in the list of lists Tags: prolog, list Problem: How to move first N elements to the end of the list for each list in the list of lists Is there ...
How to move first N elements to the end of the list for each list in the list of lists How to move first N elements to the end of the list for each list in the list of lists prolog list How How to move first N elements to the end of the list for each list in the list of lists Is there any way in Prolog how can I move f...
[ 0.005340576171875, 0.00830078125, 0.01104736328125, 0.00160980224609375, -0.019287109375, 0.018310546875, 0.0062255859375, 0.0218505859375, 0.00823974609375, -0.01434326171875, -0.00194549560546875, 0.02490234375, -0.00165557861328125, 0.004547119140625, -0.00140380859375, -0.003540039...
[ 11249, 47, 25813, 5117, 541, 80854, 3564, 111, 5303, 100, 12638, 502, 4867, 23, 3917, 1250, 3642, 831, 1295, 3884, 2856, 6165, 54, 360, 7077, 86827, 418, 116, 138, 201, 190, 305, 361, 382, 483, 155761, 209, 534, 427, 627, 126684, 110,...
[ 0.09576416015625, 0.122802734375, 0.1961669921875, 0.195556640625, 0.2164306640625, 0.2359619140625, 0.2294921875, 0.078125, 0.1927490234375, 0.029388427734375, 0.0841064453125, 0.135498046875, 0.237060546875, 0.0185089111328125, 0.0634765625, 0.1680908203125, 0.055267333984375, 0....
embed
78260308_c0
78260308
prolog
0
Title: double negation in prolog Problem title: double negation in prolog Tags: prolog Problem: double negation in prolog Why in the below example the loves1 works ( false as kate likes paul) while the loves does not work ( true )? We assume that love is true if it is mutual and exclusive. likes(kate, tom). likes(tom, ...
double negation in prolog double negation in prolog prolog loves1 not_friendship There double negation in prolog Why in the below example the loves1 works ( false as kate likes paul) while the loves does not work ( true )? We assume that love is true if it is mutual and exclusive.
[ 0.006134033203125, 0.006072998046875, 0.003143310546875, 0.0223388671875, -0.008056640625, -0.0089111328125, 0.0126953125, -0.009521484375, -0.0179443359375, 0.001068115234375, -0.0291748046875, -0.006011962890625, -0.00311279296875, -0.003265380859375, 0.026123046875, 0.0341796875, ...
[ 41929, 108, 125682, 502, 4867, 23, 5161, 7, 418, 959, 84240, 16070, 8622, 44084, 35064, 27781, 43240, 98320, 53159, 1884, 249, 202, 12960, 4488, 29568, 41591, 83, 2174, 199849, 97629 ]
[ 0.21875, 0.185546875, 0.197265625, 0.15625, 0.2288818359375, 0.05267333984375, 0.18896484375, 0.1351318359375, 0.12005615234375, 0.0892333984375, 0.11083984375, 0.1107177734375, 0.0313720703125, 0.041656494140625, 0.03802490234375, 0.109375, 0.1165771484375, 0.1861572265625, 0.16...
embed
42332206_c0
42332206
prolog
0
Title: inverse permutation in prolog Problem title: inverse permutation in prolog Tags: prolog, permutation Problem: inverse permutation in prolog I don't understand why my code doesn't work. An inverse permutation is a permutation in which each number and the number of the place which it occupies are exchanged. For ex...
inverse permutation in prolog inverse permutation in prolog prolog permutation inv_perm3 nth0 Index List Elem inv_perm inverse permutation in prolog I don't understand why my code doesn't work. An inverse permutation is a permutation in which each number and the number of the place which it occupies are exchanged. For ...
[ -0.01519775390625, 0.027587890625, 0.0233154296875, 0.003173828125, -0.012451171875, 0.00396728515625, -0.01470947265625, 0.005279541015625, 0.0093994140625, -0.0184326171875, 0.0013275146484375, 0.0101318359375, 0.0166015625, 0.044189453125, -0.0169677734375, 0.00457763671875, 0.023...
[ 23, 37676, 117, 561, 22062, 502, 4867, 334, 1264, 39, 363, 927, 2389, 31471, 32036, 540, 195, 28219, 15400, 759, 18151, 22027, 18, 4488, 893, 83, 12638, 14012, 136, 3687, 3129, 36, 143414, 3387, 121122, 122101, 151003, 963, 1126, 128191, ...
[ 0.1871337890625, 0.32080078125, 0.1527099609375, 0.216552734375, 0.1375732421875, 0.159912109375, 0.2259521484375, 0.2327880859375, 0.2440185546875, 0.1710205078125, 0.1097412109375, 0.072509765625, 0.07684326171875, 0.142822265625, 0.1280517578125, 0.0167694091796875, 0.002807617187...
embed
16599063_c0
16599063
prolog
0
Title: Prolog notBetween function Problem title: Prolog notBetween function Tags: prolog Problem: Prolog notBetween function I need some help here with Prolog. So I have this function between that evaluates if an element is between other two. What I need now is a function that evaluates if a member is not between other...
Prolog notBetween function Prolog notBetween function prolog Prolog List Prolog notBetween function I need some help here with Prolog. So I have this function between that evaluates if an element is between other two. What I need now is a function that evaluates if a member is not between other two, even if it is the s...
[ 0.00933837890625, 0.01458740234375, 0.022705078125, 0.00092315673828125, -0.00994873046875, 0.01611328125, 0.0054931640625, 0.0002384185791015625, 0.001373291015625, 0.01043701171875, -0.003326416015625, 0.00469970703125, 0.0147705078125, 0.00439453125, 0.01019287109375, 0.002182006835...
[ 1250, 4867, 959, 95211, 1177, 33, 32354, 502, 32036, 3871, 4358, 17721, 151575, 2174, 12830, 83, 3789, 6626, 5036, 90, 32786, 5701, 237, 37842, 20903, 4488, 77947 ]
[ 0.1490478515625, 0.23974609375, 0.182373046875, 0.1322021484375, 0.1929931640625, 0.17822265625, 0.1890869140625, 0.104248046875, 0.121826171875, 0.0958251953125, 0.0772705078125, 0.27587890625, 0.13037109375, 0.0496826171875, 0.164306640625, 0.041015625, 0.0645751953125, 0.0811767...
embed
12717609_c0
12717609
prolog
0
Title: Second End View puzzle, Prolog Problem title: Second End View puzzle, Prolog Tags: prolog, clpfd, constraints, swi-prolog, logic Problem: Second End View puzzle, Prolog I write code in swi-prolog to solve Second End View Pazzles 7*7 (example http://www.funwithpuzzles.com/2009/10/abcd-second-end-view-ev4.html lik...
Second End View puzzle, Prolog Second End View puzzle, Prolog prolog clpfd constraints swi-prolog logic Second End View Prolog gen_row abc_view all_distinct Second End View puzzle, Prolog I write code in swi-prolog to solve Second End View Pazzles 7*7 (example http://www.funwithpuzzles.com/2009/10/abcd-second-end-view-...
[ -0.006927490234375, -0.000919342041015625, 0.00799560546875, 0.0135498046875, -0.007415771484375, -0.007110595703125, -0.0283203125, 0.01202392578125, 0.01153564453125, -0.04638671875, 0.00592041015625, -0.0157470703125, 0.018310546875, -0.01165771484375, 0.0002956390380859375, -0.0086...
[ 77648, 18878, 29805, 104192, 1250, 4867, 502, 39557, 71, 2816, 4288, 91, 2452, 3454, 62775, 9226, 15555, 1563, 22751, 756, 38893, 87, 33022, 18151, 86869, 51045, 169, 1577, 361, 1639, 966, 11, 16498, 76228, 1766, 13894, 2055, 71574, 191633,...
[ 0.193115234375, 0.1475830078125, 0.252685546875, 0.16845703125, 0.12548828125, 0.1795654296875, 0.07562255859375, 0.007415771484375, 0.0419921875, 0.0849609375, 0.00384521484375, 0.0093994140625, 0.1661376953125, 0.1143798828125, 0.1470947265625, 0.08160400390625, 0.1300048828125, ...
embed
32840192_c0
32840192
prolog
0
Title: Predicate doesn&#x27;t work &quot;the other way&quot; Problem title: Predicate doesn&#x27;t work &quot;the other way&quot; Tags: prolog, dcg Problem: Predicate doesn't work "the other way" This function takes a string and makes it to pirate language. But it doesn't work when I want it to take pirate language and...
Predicate doesn&#x27;t work &quot;the other way&quot; Predicate doesn&#x27;t work &quot;the other way&quot; prolog dcg above Predicate Text Text2 Head Tail Predicate doesn't work "the other way" This function takes a string and makes it to pirate language. But it doesn't work when I want it to take pirate language and ...
[ 0.01556396484375, -0.00274658203125, 0.017822265625, 0.0238037109375, -0.0233154296875, 0.02197265625, -0.003021240234375, 0.00982666015625, 0.01397705078125, -0.029541015625, 0.0126953125, -0.000823974609375, -0.0021209716796875, 0.00445556640625, 0.0096435546875, 0.0020599365234375, ...
[ 7145, 2063, 67, 22027, 3768, 18, 4488, 3789, 3917, 41502, 502, 4867, 177, 36917, 24129, 304, 44816, 1218, 379, 2347, 3293, 32354, 51776, 79315, 442, 47, 78312, 13, 46876, 3444, 5646, 30646, 3638, 43240, 159029, 1937, 6562, 764, 425, 18151...
[ 0.20068359375, 0.22900390625, 0.1304931640625, 0.039825439453125, 0.06884765625, 0.04412841796875, 0.1280517578125, 0.091552734375, 0.11474609375, 0.01251220703125, 0.0853271484375, 0.1441650390625, 0.002838134765625, 0.038909912109375, 0.09649658203125, 0.0928955078125, 0.1077880859...
embed
29877034_c0
29877034
prolog
0
Title: Prolog SLD-Tree generator Problem title: Prolog SLD-Tree generator Tags: sld-resolution, prolog Problem: Prolog SLD-Tree generator I was given the task to write a tool that visualizes the SLD-Tree for a given Prolog-program and query. So since I'd rather not implement a whole Prolog-parser and interpreter myself...
Prolog SLD-Tree generator Prolog SLD-Tree generator sld-resolution prolog Prolog SLD-Tree Prolog SLD-Tree generator I was given the task to write a tool that visualizes the SLD-Tree for a given Prolog-program and query. So since I'd rather not implement a whole Prolog-parser and interpreter myself, I am looking for a l...
[ 0.0279541015625, 0.0194091796875, -0.0185546875, -0.0001068115234375, -0.00592041015625, 0.0010986328125, -0.0277099609375, -0.01239013671875, -0.0211181640625, -0.0556640625, -0.0001068115234375, 0.017578125, -0.03271484375, -0.0113525390625, 0.0223388671875, -0.006622314453125, 0.0...
[ 1250, 4867, 159, 30693, 62731, 13, 145823, 91, 7344, 107, 166589, 502, 34475, 66211, 33022, 55516, 21176, 20650, 18749, 41, 43257, 29479, 2500, 29481, 35978, 16487, 35773, 1528, 139392, 450, 53201, 163, 4734, 47691, 2831, 2965, 7225, 2806, ...
[ 0.1502685546875, 0.2313232421875, 0.1029052734375, 0.2322998046875, 0.231201171875, 0.1148681640625, 0.244140625, 0.038177490234375, 0.1533203125, 0.0860595703125, 0.1727294921875, 0.1104736328125, 0.0211181640625, 0.08062744140625, 0.0572509765625, 0.13916015625, 0.16015625, 0.088...
embed
8045367_c0
8045367
prolog
0
Title: Getting the minimum value of a list Problem title: Getting the minimum value of a list Tags: list, iso-prolog, syntax-error, minimum, prolog Problem: Getting the minimum value of a list I am trying to find the minimum value of a list (as a learning experience, so without min ). My approach is the following: mini...
Getting the minimum value of a list Getting the minimum value of a list list iso-prolog syntax-error minimum prolog Getting Tail Getting the minimum value of a list I am trying to find the minimum value of a list (as a learning experience, so without min ). My approach is the following: This gives me the following erro...
[ 0.00787353515625, 0.0079345703125, 0.0289306640625, 0.0189208984375, -0.0179443359375, 0.004791259765625, 0.016845703125, -0.006134033203125, 0.0048828125, -0.00909423828125, 0.0186767578125, -0.0113525390625, 0.00131988525390625, -0.018310546875, 0.00640869140625, 0.00830078125, 0.0...
[ 210732, 70, 15440, 34292, 111, 5303, 13882, 3454, 4867, 6002, 86531, 188800, 502, 1218, 379, 31577, 7413, 52080, 16981, 15490, 881, 51515, 25632, 18499, 216806, 9790, 35978, 188347, 26785, 4420 ]
[ 0.1229248046875, 0.0679931640625, 0.244140625, 0.18603515625, 0.040771484375, 0.1910400390625, 0.134033203125, 0.09088134765625, 0.17333984375, 0.10595703125, 0.1865234375, 0.1776123046875, 0.090087890625, 0.133056640625, 0.143310546875, 0.03167724609375, 0.07196044921875, 0.045379...
embed
53161635_c0
53161635
prolog
0
Title: Prolog returning only the max value from all iterations Problem title: Prolog returning only the max value from all iterations Tags: prolog Problem: Prolog returning only the max value from all iterations I have a method that returns me a number on all iterations , but now I need to returns only the max value fr...
Prolog returning only the max value from all iterations Prolog returning only the max value from all iterations prolog all Prolog find_max find_number SWI-Prolog Prolog returning only the max value from all iterations I have a method that returns me a number on all iterations , but now I need to returns only the max va...
[ 0.0089111328125, -0.00958251953125, 0.0137939453125, 0.0123291015625, -0.0133056640625, 0.023193359375, -0.005706787109375, 0.0033721923828125, 0.005889892578125, -0.04150390625, 0.00104522705078125, -0.0228271484375, -0.006561279296875, -0.01165771484375, 0.041748046875, 0.00750732421...
[ 1250, 4867, 30646, 4734, 18389, 34292, 1295, 756, 17, 720, 21094, 502, 7413, 24084, 2606, 38969, 10752, 214, 55300, 163, 14012, 98, 3871, 111, 16940, 1297, 132, 106, 7986, 8752, 27781, 13028, 140992, 1193, 2203, 305, 990, 764, 17368, 159 ...
[ 0.172607421875, 0.2437744140625, 0.2003173828125, 0.104248046875, 0.188232421875, 0.1644287109375, 0.0697021484375, 0.08984375, 0.041107177734375, 0.1983642578125, 0.09588623046875, 0.11767578125, 0.1763916015625, 0.1671142578125, 0.171142578125, 0.1732177734375, 0.14404296875, 0.0...
embed
11417238_c0
11417238
prolog
0
Title: Prolog - IndexofElement Problem title: Prolog - IndexofElement Tags: list, element, indexing, prolog Problem: Prolog - IndexofElement I have to find all Indexes of a given Element in a List and return it as a list. So for example: ?- indexList(a,[a,b,c,a,b],Rs). Rs = [0,3] My Idea is: positions( E, L, P ) :- pos...
Prolog - IndexofElement Prolog - IndexofElement list element indexing prolog Prolog IndexofElement Prolog - IndexofElement I have to find all Indexes of a given Element in a List and return it as a list. So for example: My Idea is: When I trace this I get a List in which every Position is in (in the step before the las...
[ 0.006439208984375, 0.01220703125, 0.010986328125, -0.0023345947265625, -0.022705078125, 0.0054931640625, -0.006500244140625, 0.009765625, -0.000385284423828125, -0.041015625, 0.0024566650390625, -0.008056640625, -0.00958251953125, 0.0181884765625, 0.003875732421875, 0.0032806396484375,...
[ 1250, 4867, 31471, 4390, 647, 19929, 5303, 12830, 63262, 214, 502, 765, 7413, 756, 90, 34475, 48325, 23, 32036, 30646, 237, 100, 27781, 77298, 144851, 903, 2046, 11907, 99428, 83, 29954, 8108, 4568, 98441, 764, 209303, 65572, 7, 29568 ]
[ 0.1177978515625, 0.2103271484375, 0.21044921875, 0.175537109375, 0.0391845703125, 0.1629638671875, 0.14404296875, 0.152099609375, 0.180419921875, 0.07989501953125, 0.08349609375, 0.0347900390625, 0.1082763671875, 0.1005859375, 0.1041259765625, 0.03265380859375, 0.193603515625, 0.09...
embed
56761210_c0
56761210
prolog
0
Title: How to sum predicates values without using list? Problem title: How to sum predicates values without using list? Tags: swi-prolog, prolog Problem: How to sum predicates values without using list? Im trying to sum up values from predicates without using list. Suming values and finally get the total of suming thos...
How to sum predicates values without using list? How to sum predicates values without using list? swi-prolog prolog list How TicketNumber Client Month Product Price How to sum predicates values without using list? Im trying to sum up values from predicates without using list. Suming values and finally get the total of ...
[ 0.01483154296875, 0.0142822265625, -0.00238037109375, 0.0025482177734375, -0.002593994140625, 0.004730224609375, 0.0062255859375, 0.00921630859375, 0.01422119140625, -0.03466796875, 0.00201416015625, 0.0145263671875, -0.0203857421875, 0.0086669921875, 0.029296875, 0.002166748046875, ...
[ 11249, 47, 10554, 1653, 2063, 1636, 142424, 15490, 17368, 5303, 91, 2452, 3454, 4867, 502, 80304, 26278, 91732, 12982, 73111, 48025, 31577, 1257, 1295, 36335, 2046, 3622, 214, 441, 5510, 78959, 30646, 11034, 19927, 10, 1495, 427, 5684 ]
[ 0.0704345703125, 0.0731201171875, 0.2388916015625, 0.1947021484375, 0.2117919921875, 0.1083984375, 0.2113037109375, 0.1234130859375, 0.0703125, 0.18798828125, 0.0163421630859375, 0.1473388671875, 0.0811767578125, 0.158447265625, 0.0762939453125, 0.162109375, 0.01812744140625, 0.135...
embed
53204294_c0
53204294
prolog
0
Title: PROLOG - Flatten a list of segments Problem title: PROLOG - Flatten a list of segments Tags: prolog, list Problem: PROLOG - Flatten a list of segments I want to flatten a list like this: [[a,b],[b,c],[c,d],.. ] -> [a,b,c..] In short, I want to take the head of each segment [a,b] and place in a flattened list. I ...
PROLOG - Flatten a list of segments PROLOG - Flatten a list of segments prolog list segments PROLOG Flatten e.g _1046 PROLOG - Flatten a list of segments I want to flatten a list like this: [[a,b],[b,c],[c,d],.. ] -> [a,b,c..] In short, I want to take the head of each segment [a,b] and place in a flattened list. I have...
[ 0.00750732421875, 0.04052734375, 0.00115203857421875, 0.00113677978515625, -0.0133056640625, 0.0024871826171875, -0.00113677978515625, 0.00653076171875, -0.006591796875, -0.00110626220703125, 0.0211181640625, 0.00677490234375, 0.000946044921875, 0.02294921875, 0.0084228515625, -0.00111...
[ 10514, 47510, 106516, 510, 5303, 33180, 10, 111, 502, 4867, 101, 963, 9271, 7, 3444, 49878, 1884, 903, 275, 238, 71, 33079, 16610, 5646, 10336, 12638, 11, 3687, 23, 297, 43581, 18151, 4966, 76199, 25632, 140992, 11249, 98, 49146, 6496, ...
[ 0.1676025390625, 0.212890625, 0.236328125, 0.228271484375, 0.197021484375, 0.260986328125, 0.009002685546875, 0.04302978515625, 0.1234130859375, 0.173583984375, 0.0125732421875, 0.10272216796875, 0.20703125, 0.0523681640625, 0.0982666015625, 0.240966796875, 0.04608154296875, 0.0434...
embed
34831827_c0
34831827
prolog
0
Title: Getting connected components of graph in Prolog Problem title: Getting connected components of graph in Prolog Tags: graph-theory, connected-components, prolog Problem: Getting connected components of graph in Prolog I'm struggling with logic programming. I have a this problem and I hope some of you can help me ...
Getting connected components of graph in Prolog Getting connected components of graph in Prolog graph-theory connected-components prolog Getting Prolog Getting connected components of graph in Prolog I'm struggling with logic programming. I have a this problem and I hope some of you can help me with it. Discontinous gr...
[ -0.0201416015625, 0.0006103515625, 0.01031494140625, 0.006256103515625, -0.0201416015625, 0.02001953125, -0.00921630859375, -0.007598876953125, -0.00543212890625, -0.0478515625, -0.0206298828125, -0.02294921875, -0.0263671875, 0.0140380859375, -0.00567626953125, 0.01092529296875, -0....
[ 210732, 162711, 82761, 7, 41382, 23, 1250, 4867, 54137, 502, 237875, 62775, 56037, 2967, 53092, 31, 78244, 223, 33636, 390, 15824, 6626, 84797, 1884, 756, 140992, 5303, 17262, 27781, 84751, 133063, 80389 ]
[ 0.09954833984375, 0.208251953125, 0.233642578125, 0.047393798828125, 0.226806640625, 0.0447998046875, 0.1427001953125, 0.2359619140625, 0.1297607421875, 0.069091796875, 0.03857421875, 0.0716552734375, 0.03521728515625, 0.0241851806640625, 0.0616455078125, 0.0706787109375, 0.113037109...
embed
64636468_c0
64636468
prolog
0
Title: Prolog | add several values Problem title: Prolog | add several values Tags: prolog Problem: Prolog | add several values I have some values from a knowledge base with 3 fields: code, date and amount. I want to add all amount selected by date and code. I have this code %code, date, amount values('AAA', date(02, 0...
Prolog | add several values Prolog | add several values prolog Prolog AAA BBB CCC add_amount Month Result Amount Prolog | add several values I have some values from a knowledge base with 3 fields: code, date and amount. I want to add all amount selected by date and code. I have this code but i don't know how select sev...
[ 0.00098419189453125, -0.0228271484375, -0.001678466796875, 0.01300048828125, -0.03271484375, -0.00341796875, -0.017333984375, 0.02490234375, 0.004150390625, -0.002410888671875, 0.01953125, 0.00592041015625, -0.0146484375, 0.000885009765625, 0.004730224609375, -0.023681640625, 0.00695...
[ 1250, 4867, 15190, 40368, 142424, 502, 155616, 22312, 134982, 121147, 12982, 127, 126684, 58745, 1295, 51359, 3647, 138, 44457, 18151, 5622, 41170, 3444, 47, 756, 133291, 390, 136, 18, 3714, 3642, 36849, 67660 ]
[ 0.1807861328125, 0.259521484375, 0.1904296875, 0.20654296875, 0.257568359375, 0.1224365234375, 0.173583984375, 0.113525390625, 0.1221923828125, 0.1595458984375, 0.1104736328125, 0.014251708984375, 0.1650390625, 0.0010986328125, 0.008453369140625, 0.14892578125, 0.16943359375, 0.102...
embed
73958806_c1
73958806
prolog
1
and two cards for the house. This predicate returns the new deck % without just dealt cards and the table i.e. list of lists containing cards of % both players. % % @param Table List of cards held by both players (list of lists). % @param NewDeck Deck(s) of card with removed cards that were used for initial % deal. % ...
and two cards for the house. This predicate returns the new deck % without just dealt cards and the table i.e. list of lists containing cards of % both players. % % @param Table List of cards held by both players (list of lists). % @param NewDeck Deck(s) of card with removed cards that were used for initial % deal. % ...
[ 0.0024871826171875, -0.0057373046875, 0.01495361328125, 0.00726318359375, -0.00555419921875, 0.0272216796875, 0.022216796875, -0.01068115234375, 0.0208740234375, -0.00144195556640625, 0.03173828125, 0.04248046875, -0.013671875, 0.01141357421875, -0.01263427734375, 0.01104736328125, 0...
[ 136, 6626, 126381, 100, 70, 18276, 1653, 2063, 67, 30646, 3525, 8, 2594, 1745, 15490, 7010, 23180, 5303, 70541, 15044, 92865, 112997, 32036, 34658, 6562, 2356, 120152, 92, 162163, 111, 20596, 184750, 11814, 61475, 35142, 43581, 110324, 903, ...
[ 0.06610107421875, 0.15087890625, 0.2357177734375, 0.06793212890625, 0.004913330078125, 0.1368408203125, 0.14404296875, 0.152587890625, 0.011871337890625, 0.1387939453125, 0.1279296875, 0.1741943359375, 0.13330078125, 0.070556640625, 0.042388916015625, 0.1387939453125, 0.1522216796875...
embed
16045121_c0
16045121
prolog
0
Title: Definition of Grandparent in Prolog, would any prolog programmers care to help clear this up? Problem title: Definition of Grandparent in Prolog, would any prolog programmers care to help clear this up? Tags: recursion, family-tree, prolog Problem: Definition of Grandparent in Prolog, would any prolog programmer...
Definition of Grandparent in Prolog, would any prolog programmers care to help clear this up? Definition of Grandparent in Prolog, would any prolog programmers care to help clear this up? recursion family-tree prolog Definition Grandparent Prolog Definition of Grandparent in Prolog, would any prolog programmers care to...
[ 0.0118408203125, 0.025634765625, 0.0289306640625, 0.0030517578125, -0.004669189453125, 0.016357421875, -0.0028228759765625, -0.004119873046875, -0.002655029296875, -0.0196533203125, 0.01513671875, -0.0196533203125, -0.01483154296875, 0.00182342529296875, 0.0167236328125, 0.007873535156...
[ 155455, 111, 12801, 99547, 23, 1250, 4867, 2806, 502, 77848, 517, 4358, 34735, 903, 1257, 195625, 1830, 14449, 62600, 1542, 4, 1723, 9, 170918, 132, 594, 126340, 28723, 9963, 61924, 237, 1511, 33342, 1286, 6083, 70, 990, 1193, 36917, 7334...
[ 0.1851806640625, 0.1370849609375, 0.2100830078125, 0.29296875, 0.045318603515625, 0.1522216796875, 0.2086181640625, 0.035675048828125, 0.1007080078125, 0.1549072265625, 0.09564208984375, 0.061614990234375, 0.08514404296875, 0.0107421875, 0.0338134765625, 0.1368408203125, 0.0146942138...
embed
43844938_c1
43844938
prolog
1
have changed the loop code to the following: void loop() { // read the value of A0, divide by 4 and // send it as a byte over the serial connection Serial.print(analogRead(A0) / 4); Serial.print('.'); delay(100); } If I look at the serial monitor I now get output like this: 205.205.205.205. etc Which I think I should ...
have changed the loop code to the following: void loop() { // read the value of A0, divide by 4 and // send it as a byte over the serial connection Serial.print(analogRead(A0) / 4); Serial.print('.'); delay(100); } If I look at the serial monitor I now get output like this: 205.205.205.205. etc Which I think I should ...
[ 0.0281982421875, -0.01312255859375, -0.0023956298828125, 0.0155029296875, -0.0005645751953125, 0.000331878662109375, 0.004486083984375, 0.000766754150390625, 0.00970458984375, -0.0291748046875, 0.032470703125, -0.01165771484375, -0.0216064453125, -0.01318359375, 0.01385498046875, -0.02...
[ 765, 98816, 40956, 18151, 47, 25632, 2292, 71, 132, 12301, 34292, 62, 2389, 101637, 390, 201, 25379, 645, 35686, 94878, 135188, 35662, 1500, 4867, 31345, 284, 77495, 5, 3142, 8, 5259, 3559, 6713, 12983, 5036, 2046, 140992, 1884, 73930, 14...
[ 0.04876708984375, 0.1785888671875, 0.2042236328125, 0.1915283203125, 0.015228271484375, 0.051513671875, 0.165771484375, 0.045166015625, 0.045166015625, 0.2025146484375, 0.1314697265625, 0.1131591796875, 0.135498046875, 0.13427734375, 0.04876708984375, 0.110595703125, 0.05746459960937...
embed
13310272_c2
13310272
prolog
2
0*1, plane). edge(b,e,200,200/120 * 60, 200*3/4,train). edge(b,e,200,200/80 * 60, 200*3/5,bus). edge(b,e,200,200/100 * 60, 200*2/5,car). edge(b,e,200,200/5 * 60, 200*0,walk). edge(c,d,2000,2000/500 * 60, 2000 * 1,plane). edge(c,d,2000,2000/120 * 60, 2000 * 3/4,train). edge(c,d,2000,2000/80 * 60, 2000 * 3/5,bus). edge(c...
0*1, plane). edge(b,e,200,200/120 * 60, 200*3/4,train). edge(b,e,200,200/80 * 60, 200*3/5,bus). edge(b,e,200,200/100 * 60, 200*2/5,car). edge(b,e,200,200/5 * 60, 200*0,walk). edge(c,d,2000,2000/500 * 60, 2000 * 1,plane). edge(c,d,2000,2000/120 * 60, 2000 * 3/4,train). edge(c,d,2000,2000/80 * 60, 2000 * 3/5,bus). edge(c...
[ 0.0033111572265625, -0.0054931640625, -0.0191650390625, -0.018310546875, 0.02294921875, -0.00180816650390625, -0.0303955078125, -0.00616455078125, 0.01129150390625, -0.004150390625, -0.01251220703125, -0.02880859375, 0.002777099609375, -0.0169677734375, 0.00250244140625, -0.00692749023...
[ 757, 1639, 418, 4, 47880, 194, 121303, 132, 275, 13, 5955, 64, 20840, 661, 1496, 1781, 363, 17357, 1517, 73, 4836, 12147, 4223, 83123, 3284, 2389, 94449, 238, 71, 13821, 4283, 3576, 106, 5868, 83849, 138, 177, 1530, 427, 6, 40061 ]
[ 0.224365234375, 0.1866455078125, 0.149169921875, 0.0638427734375, 0.265869140625, 0.1396484375, 0.29833984375, 0.051910400390625, 0.140380859375, 0.1170654296875, 0.2344970703125, 0.0916748046875, 0.2015380859375, 0.141845703125, 0.1981201171875, 0.1978759765625, 0.1156005859375, 0...
embed
49709501_c0
49709501
prolog
0
Title: Prolog write list function exit condition Problem title: Prolog write list function exit condition Tags: list, recursion, prolog Problem: Prolog write list function exit condition I'm new to Prolog and am trying to define a simple function that writes a list. So far I have; printList([Head|Tail]) :- write(Head),...
Prolog write list function exit condition Prolog write list function exit condition list recursion prolog Prolog Head Tail Prolog write list function exit condition I'm new to Prolog and am trying to define a simple function that writes a list. So far I have; When I call this function like printList([[1,2],[3,4],[5,6]]...
[ 0.004608154296875, 0.01361083984375, -0.004119873046875, 0.0079345703125, -0.024658203125, 0.0242919921875, -0.01251220703125, -0.0189208984375, -0.004241943359375, 0.0208740234375, 0.01129150390625, -0.02099609375, 0.00323486328125, 0.021728515625, -0.000827789306640625, 0.00582885742...
[ 1250, 4867, 33022, 5303, 32354, 82230, 35431, 195625, 502, 44816, 1218, 379, 3525, 31577, 61924, 8781, 2060, 11782, 28412, 154663, 133063, 82449, 104629, 140992, 36917, 26785, 40494, 98320, 45831, 103136, 41591, 6226, 3229, 201505, 54 ]
[ 0.1624755859375, 0.244140625, 0.16552734375, 0.2103271484375, 0.1754150390625, 0.231689453125, 0.2322998046875, 0.1458740234375, 0.1126708984375, 0.0888671875, 0.0921630859375, 0.0712890625, 0.0269927978515625, 0.015838623046875, 0.08642578125, 0.0826416015625, 0.004608154296875, 0...
embed
60904440_c1
60904440
prolog
1
1). % apply(+State,+AddList,+DeleteList,-NewState): NewState is the result of updating State with AddList and DeleteList apply(S,A,D,S1) :- subtract(S,D,S2), union(A,S2,S1). pop(move_to_table(X), [block(X),block(Y),on(X,Y),clear(X)], [on(X,table),clear(Y)], [on(X,Y)]). I know i have to change the fp/4 predicate accordi...
1). % apply(+State,+AddList,+DeleteList,-NewState): NewState is the result of updating State with AddList and DeleteList apply(S,A,D,S1) :- subtract(S,D,S2), union(A,S2,S1). pop(move_to_table(X), [block(X),block(Y),on(X,Y),clear(X)], [on(X,table),clear(Y)], [on(X,Y)]). I know i have to change the fp/4 predicate accordi...
[ -0.0019378662109375, 0.01263427734375, 0.01287841796875, -0.0018157958984375, -0.023681640625, 0.0150146484375, 0.00109100341796875, 0.01287841796875, 0.02392578125, -0.01361083984375, 0.031005859375, 0.0118408203125, -0.01422119140625, 0.01220703125, -0.0201416015625, -0.034423828125,...
[ 4879, 1745, 59911, 132, 1328, 135206, 13, 4, 284, 4028, 154663, 4657, 46485, 46568, 2077, 2356, 83, 70, 16750, 111, 1257, 56464, 22836, 678, 29117, 136, 262, 294, 397, 17727, 1614, 39989, 18, 10461, 69941, 304, 7426, 432, 272, 188, 2281...
[ 0.0848388671875, 0.1790771484375, 0.2066650390625, 0.004241943359375, 0.1182861328125, 0.27001953125, 0.1812744140625, 0.003173828125, 0.0665283203125, 0.14013671875, 0.22216796875, 0.1243896484375, 0.1954345703125, 0.1572265625, 0.006317138671875, 0.2259521484375, 0.0635986328125, ...
embed
40664783_c0
40664783
prolog
0
Title: Use a Rule with a list Problem title: Use a Rule with a list Tags: prolog, list Problem: Use a Rule with a list In Prolog, I'm consulting a list.pl file with a list list([5,2,1,6,3]). I can query list(X) properly with the output as: 1 ?- list(X). X = [5, 2, 1, 6, 3] but I'm trying to combine the query of the lis...
Use a Rule with a list Use a Rule with a list prolog list Use Rule What Use a Rule with a list In Prolog, I'm consulting a list.pl file with a list I can query list(X) properly with the output as: but I'm trying to combine the query of the list with a rule. Is this possible? I checked the logic of the rule, and it's wo...
[ -0.0027008056640625, 0.0260009765625, 0.00750732421875, 0.0186767578125, -0.01080322265625, 0.0390625, 0.006988525390625, 0.0294189453125, 0.0185546875, -0.039794921875, -0.00738525390625, -0.01220703125, -0.004669189453125, 0.00811767578125, -0.0027313232421875, 0.0002918243408203125,...
[ 36836, 10, 139118, 678, 5303, 502, 4867, 4865, 1250, 75463, 5, 2424, 11435, 831, 41, 1294, 1542, 155965, 140992, 237, 31577, 70163, 79986, 2071, 903, 7722, 62775, 20697, 159978, 28032, 71, 6183, 1884, 11782, 4331, 27686, 39531, 46622, 1257,...
[ 0.1912841796875, 0.1112060546875, 0.28076171875, 0.20751953125, 0.257568359375, 0.1328125, 0.2108154296875, 0.06060791015625, 0.140869140625, 0.12109375, 0.0250396728515625, 0.15771484375, 0.135009765625, 0.02685546875, 0.11083984375, 0.09991455078125, 0.037384033203125, 0.04486083...
embed
53831808_c0
53831808
prolog
0
Title: Prolog predicate that compares values in facts Problem title: Prolog predicate that compares values in facts Tags: prolog Problem: Prolog predicate that compares values in facts This is my first time using Prolog I have employees employee(eID,firstname,lastname,month,year) example : employee(1,liz,white,4,2000)....
Prolog predicate that compares values in facts Prolog predicate that compares values in facts prolog Prolog X.year Y.year Prolog predicate that compares values in facts This is my first time using Prolog I have employees example : I want to make a predicate senior(X,Y) that will return true if the first employee is old...
[ 0.007476806640625, -0.01220703125, 0.0030517578125, 0.0140380859375, -0.021240234375, 0.0159912109375, 0.0001964569091796875, 0.01385498046875, -0.00131988525390625, -0.000186920166015625, -0.007537841796875, 0.025634765625, 0.00122833251953125, -0.010009765625, 0.0164794921875, -0.016...
[ 1250, 4867, 1653, 2063, 67, 450, 69101, 7, 142424, 23, 15824, 502, 1193, 5, 46799, 990, 765, 93215, 27781, 3444, 3249, 22962, 1542, 4, 1723, 30646, 29568, 2174, 5117, 188183, 83, 114210, 14380, 11343, 98320, 831, 28219, 31635, 4488 ]
[ 0.1741943359375, 0.2420654296875, 0.1851806640625, 0.207275390625, 0.132080078125, 0.020233154296875, 0.2032470703125, 0.03326416015625, 0.17724609375, 0.0863037109375, 0.16845703125, 0.127197265625, 0.1083984375, 0.028594970703125, 0.2291259765625, 0.1522216796875, 0.00164794921875,...
embed
5500705_c0
5500705
prolog
0
Title: Take elements from one list and append to other Problem title: Take elements from one list and append to other Tags: prolog Problem: Take elements from one list and append to other I want a function that will take two lists A and B and return lists Aout and Bout, such that elements from the beginning of A up to ...
Take elements from one list and append to other Take elements from one list and append to other prolog one Take take_while Aout Bout Take elements from one list and append to other I want a function that will take two lists A and B and return lists Aout and Bout, such that elements from the beginning of A up to a given...
[ 0.03271484375, 0.01092529296875, 0.0091552734375, 0.017578125, 0.0007781982421875, 0.0211181640625, -0.014892578125, 0.0186767578125, 0.0250244140625, 0.00421142578125, 0.0081787109375, 0.01226806640625, -0.0238037109375, 0.017822265625, -0.000476837158203125, -0.0179443359375, 0.023...
[ 46673, 80854, 1295, 1632, 5303, 114689, 71, 47, 3789, 502, 4867, 5646, 204610, 62, 6056, 31649, 18, 3444, 32354, 6626, 136, 335, 30646, 86595, 1257, 12830, 34627, 11, 765, 2809, 184750, 48141, 3564, 45, 39719, 6238, 62816, 81887, 35064, 4...
[ 0.156494140625, 0.2125244140625, 0.07330322265625, 0.0380859375, 0.20849609375, 0.130859375, 0.0799560546875, 0.087158203125, 0.081787109375, 0.1380615234375, 0.1834716796875, 0.1556396484375, 0.2064208984375, 0.064697265625, 0.2076416015625, 0.1434326171875, 0.1083984375, 0.101745...
embed
68362346_c0
68362346
prolog
0
Title: Recursion on Prolog Problem title: Recursion on Prolog Tags: recursion, successor-arithmetics, prolog Problem: Recursion on Prolog I'm trying to write a Prolog recursion that will return the following representation for numbers: 1 --> s(0) 2 --> s(s(0)) 3 --> s(s(s(0))) ... I used the following code: retnum(s(0)...
Recursion on Prolog Recursion on Prolog recursion successor-arithmetics prolog Recursion Prolog Stop Condition Recursion on Prolog I'm trying to write a Prolog recursion that will return the following representation for numbers: 1 --> s(0) 2 --> s(s(0)) 3 --> s(s(s(0))) ... I used the following code: but when I try to ...
[ -0.0152587890625, 0.0147705078125, 0.000946044921875, 0.01806640625, 0.009521484375, 0.004180908203125, -0.0076904296875, 0.006439208984375, 0.01116943359375, -0.031982421875, 0.020751953125, -0.02001953125, -0.0302734375, -0.00127410888671875, 0.059814453125, 0.012451171875, 0.02990...
[ 165428, 42, 6889, 98, 1250, 4867, 195625, 1830, 39457, 8962, 502, 42284, 46347, 31577, 33022, 30646, 25632, 18811, 101935, 106, 129908, 91, 177609, 116, 138, 11814, 18151, 9790, 11675, 92054, 2046, 16750, 62, 145407, 2174, 21342, 18499, 17993...
[ 0.15673828125, 0.1591796875, 0.1353759765625, 0.0660400390625, 0.142822265625, 0.2418212890625, 0.2022705078125, 0.1295166015625, 0.1436767578125, 0.06390380859375, 0.08734130859375, 0.15283203125, 0.178466796875, 0.034759521484375, 0.0625, 0.092041015625, 0.05426025390625, 0.16284...
embed
36871166_c0
36871166
prolog
0
Title: PROLOG Logic Programm - Addition of 2x2 matrix Problem title: PROLOG Logic Programm - Addition of 2x2 matrix Tags: addition, prolog, matrix, logic Problem: PROLOG Logic Programm - Addition of 2x2 matrix I am new to PROLOG and am trying some simple exercises to familiarize myself with it. However I am stuck in ma...
PROLOG Logic Programm - Addition of 2x2 matrix PROLOG Logic Programm - Addition of 2x2 matrix addition prolog matrix logic PROLOG Logic Programm Addition Sum1 Sum2 PROLOG Logic Programm - Addition of 2x2 matrix I am new to PROLOG and am trying some simple exercises to familiarize myself with it. However I am stuck in m...
[ -0.00433349609375, 0.0159912109375, 0.01446533203125, 0.0010223388671875, -0.01434326171875, 0.0135498046875, -0.018310546875, 0.01470947265625, 0.007537841796875, -0.00078582763671875, 0.029052734375, -0.015869140625, -0.023193359375, -0.01068115234375, 0.00830078125, -0.0036163330078...
[ 10514, 47510, 50592, 238, 27958, 29117, 14, 116, 425, 304, 50944, 66044, 502, 4867, 62775, 36335, 418, 3525, 179933, 20662, 192, 87427, 678, 15700, 5303, 28032, 18151, 140992, 17368, 159, 38969, 10752, 22225, 184, 6528, 15400, 4358 ]
[ 0.157958984375, 0.2454833984375, 0.1650390625, 0.00732421875, 0.162841796875, 0.0975341796875, 0.0743408203125, 0.1190185546875, 0.116455078125, 0.173095703125, 0.1463623046875, 0.1630859375, 0.1129150390625, 0.2066650390625, 0.121337890625, 0.11865234375, 0.028839111328125, 0.0215...
embed
9345709_c0
9345709
prolog
0
Title: appendAll - Append a list to all lists within a list Problem title: appendAll - Append a list to all lists within a list Tags: iso-prolog, recursion, prolog, mapping, list Problem: appendAll - Append a list to all lists within a list I'm trying to find a way to append a list to all lists within a list. Something...
appendAll - Append a list to all lists within a list appendAll - Append a list to all lists within a list iso-prolog recursion prolog mapping list Append appendAll - Append a list to all lists within a list I'm trying to find a way to append a list to all lists within a list. Something like: I'm still new to prolog and...
[ -0.004150390625, 0.01312255859375, 0.001922607421875, 0.008056640625, 0.007476806640625, 0.022216796875, 0.002227783203125, 0.00335693359375, 0.01806640625, 0.0047607421875, 0.0279541015625, -0.0164794921875, 0.00116729736328125, 0.0263671875, 0.00830078125, -0.0238037109375, 0.00769...
[ 114689, 71, 43512, 5659, 3611, 5303, 47, 756, 7, 28032, 20, 13882, 3454, 4867, 195625, 502, 291, 26783, 31577, 7413, 3917, 3525, 8512, 104250, 214, 5773, 32233, 4785, 6057, 99, 21974, 4358 ]
[ 0.1885986328125, 0.116455078125, 0.261962890625, 0.1312255859375, 0.1317138671875, 0.215576171875, 0.1317138671875, 0.1497802734375, 0.0633544921875, 0.164306640625, 0.006927490234375, 0.09619140625, 0.095458984375, 0.167724609375, 0.1209716796875, 0.1121826171875, 0.06829833984375, ...
embed
46750282_c0
46750282
prolog
0
Title: How to write the result of a calculation to a file in Prolog? Problem title: How to write the result of a calculation to a file in Prolog? Tags: evaluation, file, prolog, text Problem: How to write the result of a calculation to a file in Prolog? I wish to export the result of a calculation to a file of text in ...
How to write the result of a calculation to a file in Prolog? How to write the result of a calculation to a file in Prolog? evaluation file prolog text How Prolog write_to_file File Text Stream test.txt _306 How to write the result of a calculation to a file in Prolog? I wish to export the result of a calculation to a ...
[ 0.0255126953125, -0.013427734375, -0.004730224609375, -0.005035400390625, 0.00811767578125, -0.0004253387451171875, 0.00433349609375, -0.015869140625, 0.00860595703125, 0.0050048828125, -0.0064697265625, 0.0206298828125, -0.03369140625, -0.00701904296875, 0.030517578125, -0.01397705078...
[ 11249, 47, 33022, 70, 16750, 111, 74481, 1363, 11435, 23, 1250, 4867, 10, 219836, 502, 7986, 188, 29822, 42724, 24129, 115061, 3034, 124326, 910, 32599, 31255, 81887, 9969, 1340, 1528, 2424, 990, 83, 25442, 191281, 6954, 1723, 10941, 1197, ...
[ 0.07135009765625, 0.1343994140625, 0.1962890625, 0.042083740234375, 0.1734619140625, 0.0584716796875, 0.2264404296875, 0.0888671875, 0.181884765625, 0.07489013671875, 0.1728515625, 0.2413330078125, 0.01336669921875, 0.1474609375, 0.1275634765625, 0.09552001953125, 0.126220703125, 0...
embed
58861244_c0
58861244
prolog
0
Title: Local negation in prolog Problem title: Local negation in prolog Tags: prolog Problem: Local negation in prolog I'm trying to write some rules that will tell about the number of blocks in a stack (not the data structure, just a location). The rule stack return true for every block in a stack. Specifically, is ze...
Local negation in prolog Local negation in prolog prolog Local num_blocks Local negation in prolog I'm trying to write some rules that will tell about the number of blocks in a stack (not the data structure, just a location). The rule stack return true for every block in a stack. Specifically, is zero/one/two the numbe...
[ -0.01141357421875, 0.0189208984375, 0.00185394287109375, 0.0142822265625, 0.0026397705078125, 0.0106201171875, 0.0133056640625, -0.01507568359375, 0.037841796875, -0.038818359375, -0.00909423828125, 0.0054931640625, 0.0250244140625, 0.007354736328125, 0.015625, 0.019287109375, 0.0108...
[ 24172, 108, 125682, 502, 4867, 13269, 81409, 33022, 91736, 14192, 14012, 46389, 177261, 45646, 31913, 79986, 30646, 29568, 11907, 45234, 64, 3630, 55547, 23, 1193, 1542, 80510, 43240, 179140, 18, 17569, 9433, 7413, 1632, 284, 53418, 17932, 36...
[ 0.1741943359375, 0.169677734375, 0.1724853515625, 0.1280517578125, 0.2137451171875, 0.1563720703125, 0.17626953125, 0.0228118896484375, 0.11181640625, 0.048248291015625, 0.0833740234375, 0.201171875, 0.1514892578125, 0.0216827392578125, 0.057525634765625, 0.126220703125, 0.0939331054...
embed
8525578_c0
8525578
prolog
0
Title: swiprolog map false to zero and true to one Problem title: swiprolog map false to zero and true to one Tags: prolog, logic Problem: swiprolog map false to zero and true to one How can i map in swi-prolog true and false to 1's and 0's respectively? i need to evaluate ones and zeroes like true and falses (like in ...
swiprolog map false to zero and true to one swiprolog map false to zero and true to one prolog logic my_and_operation swiprolog map false to zero and true to one How can i map in swi-prolog true and false to 1's and 0's respectively? i need to evaluate ones and zeroes like true and falses (like in truth tables). i am h...
[ 0.0101318359375, 0.0155029296875, 0.0028228759765625, -0.007537841796875, -0.0184326171875, 0.000644683837890625, 0.03515625, 0.028564453125, 0.017333984375, -0.026611328125, -0.01275634765625, 0.0037078857421875, 0.00146484375, 0.022705078125, 0.00811767578125, -0.0201416015625, 0.0...
[ 91, 2452, 3454, 4867, 22288, 98320, 47, 45234, 136, 29568, 1632, 502, 62775, 759, 2940, 21473, 11249, 831, 17, 23, 106, 25, 757, 107013, 3871, 151575, 64333, 1884, 5062, 85027, 23180, 34844, 9790, 4527, 237, 289, 34292, 54, 12832, 5646, ...
[ 0.06707763671875, 0.207763671875, 0.1552734375, 0.2432861328125, 0.2271728515625, 0.2705078125, 0.1279296875, 0.200439453125, 0.157470703125, 0.2298583984375, 0.1357421875, 0.135986328125, 0.15869140625, 0.094482421875, 0.156005859375, 0.1568603515625, 0.011199951171875, 0.06823730...
embed
71825857_c0
71825857
prolog
0
Title: Get a distribution of a list in prolog Problem title: Get a distribution of a list in prolog Tags: prolog Problem: Get a distribution of a list in prolog I would like to calcul the distribution of a card hand in prolog. It means get this result: ?- distribution([sq,s9,s8,ha,hk,h5,da,dk,dj,d4,ca,c7,c6],D). D=[[sp...
Get a distribution of a list in prolog Get a distribution of a list in prolog prolog Get atom_chars nth0 Get a distribution of a list in prolog I would like to calcul the distribution of a card hand in prolog. It means get this result: But I don't know how to procede. I am able to get each color one by one, using this ...
[ 0.0030975341796875, 0.005706787109375, 0.0172119140625, 0.01446533203125, -0.00946044921875, -0.01226806640625, -0.008544921875, 0.01531982421875, -0.003021240234375, -0.035888671875, 0.0142822265625, 0.0218505859375, -0.01177978515625, -0.0084228515625, -0.0185546875, 0.01416015625, ...
[ 20779, 10, 113068, 111, 5303, 23, 502, 4867, 34627, 9254, 7, 927, 2389, 1884, 44805, 70, 20596, 3535, 26950, 2046, 16750, 3714, 52575, 19048, 12638, 10576, 390, 1632, 26499, 4358 ]
[ 0.07244873046875, 0.030517578125, 0.2454833984375, 0.06207275390625, 0.1710205078125, 0.042724609375, 0.142578125, 0.21728515625, 0.2001953125, 0.154296875, 0.055419921875, 0.063720703125, 0.095703125, 0.0462646484375, 0.1533203125, 0.0040283203125, 0.1756591796875, 0.16259765625, ...
embed
61923200_c0
61923200
prolog
0
Title: I want to write a sublist rule but SWI-Prolog doesn&#x27;t make it past rule declaration line Problem title: I want to write a sublist rule but SWI-Prolog doesn&#x27;t make it past rule declaration line Tags: prolog Problem: I want to write a sublist rule but SWI-Prolog doesn't make it past rule declaration line...
I want to write a sublist rule but SWI-Prolog doesn&#x27;t make it past rule declaration line I want to write a sublist rule but SWI-Prolog doesn&#x27;t make it past rule declaration line prolog SWI-Prolog Phead Membro Lhead Ltail I want to write a sublist rule but SWI-Prolog doesn't make it past rule declaration line ...
[ 0.0205078125, 0.00604248046875, 0.0103759765625, 0.01495361328125, -0.016845703125, 0.0238037109375, -0.017578125, 0.0115966796875, 0.0191650390625, 0.0050048828125, 0.015869140625, -0.0157470703125, -0.001739501953125, -0.0155029296875, 0.005615234375, 0.0189208984375, 0.02587890625...
[ 3444, 33022, 1614, 6562, 79986, 1284, 159, 38969, 10752, 4867, 3768, 18, 3249, 442, 11015, 21635, 13315, 502, 436, 31251, 1215, 27726, 46741, 22027, 3525, 1250, 36663, 28282, 51776, 5303, 9384, 1542, 1723, 1511, 9874, 379, 4734, 678, 990, ...
[ 0.014373779296875, 0.1116943359375, 0.21240234375, 0.2095947265625, 0.1763916015625, 0.0389404296875, 0.046051025390625, 0.20556640625, 0.14501953125, 0.1778564453125, 0.0270843505859375, 0.07177734375, 0.0716552734375, 0.0106201171875, 0.1207275390625, 0.145263671875, 0.099426269531...
embed
30802587_c0
30802587
prolog
0
Title: Prolog- singleton variable in branch warning Problem title: Prolog- singleton variable in branch warning Tags: singleton, variables, prolog Problem: Prolog- singleton variable in branch warning Hello here is my code in Prolog: arc(a,h). arc(b,c). related_to(X, Ys) :- setof(Y, arc(X, Y), Ys). cut([H|T],Y) :- chec...
Prolog- singleton variable in branch warning Prolog- singleton variable in branch warning singleton variables prolog Prolog related_to There Singleton Prolog- singleton variable in branch warning Hello here is my code in Prolog: When I am trying to run check(a,b) it doesn't run. I get the message When I am not using cu...
[ 0.004150390625, 0.01202392578125, 0.00421142578125, 0.0216064453125, 0.000446319580078125, 0.01470947265625, -0.006744384765625, -0.01190185546875, 0.0159912109375, -0.0458984375, -0.0157470703125, 0.00058746337890625, -0.0003662109375, -0.0145263671875, 0.0150146484375, 0.012023925781...
[ 1250, 4867, 11001, 1507, 77336, 32845, 206, 1631, 592, 23, 502, 62548, 8622, 43609, 18151, 31577, 11675, 12765, 11, 4, 275, 22027, 18, 26008, 959, 17368, 59226, 9655, 18499, 225876, 121742, 121461 ]
[ 0.1473388671875, 0.2490234375, 0.1405029296875, 0.171630859375, 0.229248046875, 0.1162109375, 0.06707763671875, 0.123046875, 0.0625, 0.01092529296875, 0.1038818359375, 0.03662109375, 0.050079345703125, 0.1302490234375, 0.112060546875, 0.101806640625, 0.147705078125, 0.1976318359375...
embed
37168184_c0
37168184
prolog
0
Title: How would I modify my predicate to jumble my output result? Problem title: How would I modify my predicate to jumble my output result? Tags: prolog Problem: How would I modify my predicate to jumble my output result? So I'm experimenting with some stuff. I have the following simple predicate: insert([],Y,[Y]). i...
How would I modify my predicate to jumble my output result? How would I modify my predicate to jumble my output result? prolog How How would I modify my predicate to jumble my output result? So I'm experimenting with some stuff. I have the following simple predicate: So this'll insert my element Y into my list. However...
[ -0.00823974609375, -0.002410888671875, 0.01318359375, -0.005889892578125, -0.013671875, 0.02685546875, -0.01513671875, -0.0189208984375, -0.0033416748046875, -0.035888671875, 0.01300048828125, 0.01611328125, -0.00823974609375, -0.015869140625, -0.01611328125, 0.0264892578125, -0.0090...
[ 11249, 2806, 2811, 40383, 1653, 2063, 67, 47, 1129, 40099, 140992, 16750, 87, 759, 502, 4867, 28007, 25632, 8781, 903, 1181, 183540, 12830, 990, 3934, 5303, 33306, 11343, 3884, 5701, 3687, 86991, 36663, 186, 1286, 1884 ]
[ 0.09979248046875, 0.0714111328125, 0.1473388671875, 0.14404296875, 0.190673828125, 0.21630859375, 0.124755859375, 0.057098388671875, 0.196533203125, 0.235107421875, 0.2008056640625, 0.1492919921875, 0.0565185546875, 0.044952392578125, 0.07171630859375, 0.143798828125, 0.0941772460937...
embed
37265050_c0
37265050
prolog
0
Title: How to Use append in recursion Problem title: How to Use append in recursion Tags: recursion, prolog Problem: How to Use append in recursion I am building a program and I need advice on this piece of code: skyff([H1|Ta],L1,L2,):- skyff(Ta,L1,L22), append(H1,L2,L22). To be more specific - what I want to accomplis...
How to Use append in recursion How to Use append in recursion recursion prolog How Use L22 How to Use append in recursion I am building a program and I need advice on this piece of code: To be more specific - what I want to accomplish is to append H1 to the List L2 and make a recursive call (skyff(Ta,L1,L22) ) where L2...
[ -0.01422119140625, 0.01287841796875, 0.0194091796875, 0.005401611328125, -0.003021240234375, 0.007049560546875, -0.0111083984375, 0.01141357421875, 0.0289306640625, -0.01611328125, 0.031494140625, -0.0380859375, -0.028564453125, 0.00994873046875, 0.0269775390625, 0.002410888671875, 0...
[ 11249, 47, 36836, 114689, 71, 23, 195625, 1830, 502, 4867, 339, 4015, 33976, 1528, 3871, 67660, 18151, 29458, 3444, 163846, 572, 418, 32036, 304, 11782, 4922, 4902, 9874, 866, 89647, 16750, 1747, 96819, 5442, 51646, 20594, 7108, 71099, 4669...
[ 0.08544921875, 0.076416015625, 0.1671142578125, 0.2132568359375, 0.222900390625, 0.0870361328125, 0.21875, 0.153564453125, 0.12451171875, 0.19970703125, 0.0885009765625, 0.2181396484375, 0.07879638671875, 0.075439453125, 0.0220947265625, 0.0927734375, 0.09930419921875, 0.0312194824...
embed
27975408_c0
27975408
prolog
0
Title: Prolog return value comparation Problem title: Prolog return value comparation Tags: return, prolog, list Problem: Prolog return value comparation I'm traying to learn the basics of logic programming. I solved some exercises, and now I'm having trouble on creating a function that take two arguments, a list of no...
Prolog return value comparation Prolog return value comparation return prolog list Prolog Head Prolog return value comparation I'm traying to learn the basics of logic programming. I solved some exercises, and now I'm having trouble on creating a function that take two arguments, a list of non empty lists whose element...
[ 0.0177001953125, -0.00146484375, -0.0012359619140625, 0.005645751953125, -0.0004100799560546875, 0.006744384765625, -0.0186767578125, 0.0206298828125, 0.016845703125, -0.031494140625, 0.0169677734375, 0.01544189453125, 0.00830078125, -0.0047607421875, -0.00555419921875, -0.003158569335...
[ 1250, 4867, 30646, 34292, 31898, 1363, 502, 5303, 44816, 62775, 56037, 63134, 105233, 32354, 5646, 6626, 10750, 201505, 80854, 4460, 33, 25842, 17932, 75935, 158, 69101, 678 ]
[ 0.134521484375, 0.2037353515625, 0.200927734375, 0.1778564453125, 0.177490234375, 0.0175628662109375, 0.10546875, 0.125244140625, 0.106689453125, 0.08367919921875, 0.0261383056640625, 0.0325927734375, 0.05047607421875, 0.146240234375, 0.04229736328125, 0.058929443359375, 0.19921875, ...
embed
41448957_c0
41448957
prolog
0
Title: Prolog : toplevel: Undefined procedure (simple tree) Problem title: Prolog : toplevel: Undefined procedure (simple tree) Tags: prolog Problem: Prolog : toplevel: Undefined procedure (simple tree) Hello , i have a simple Homework in Prolog and i am getting this error : ERROR: toplevel: Undefined procedure: root/1...
Prolog : toplevel: Undefined procedure (simple tree) Prolog : toplevel: Undefined procedure (simple tree) prolog Prolog Undefined internal_node Prolog : toplevel: Undefined procedure (simple tree) Hello , i have a simple Homework in Prolog and i am getting this error : ERROR: toplevel: Undefined procedure: root/1 (DWIM...
[ 0.0194091796875, 0.01141357421875, 0.00592041015625, 0.0147705078125, -0.0194091796875, 0.0264892578125, -0.0103759765625, -0.01361083984375, 0.0079345703125, -0.0390625, -0.00775146484375, -0.0299072265625, 0.020263671875, 0.0174560546875, 0.03369140625, -0.0186767578125, 0.02368164...
[ 1250, 4867, 2663, 67919, 79912, 5983, 297, 50491, 191560, 53201, 502, 70796, 157, 112, 8781, 2005, 18244, 18499, 151206, 24638, 74855, 11583, 397, 38969, 594, 5809, 959, 26785, 69236, 101344, 22710, 18151, 23, 11435, 20949, 3229, 69829, 95, ...
[ 0.1712646484375, 0.26953125, 0.13525390625, 0.22119140625, 0.1324462890625, 0.219970703125, 0.04388427734375, 0.2191162109375, 0.08123779296875, 0.1942138671875, 0.1094970703125, 0.1827392578125, 0.145751953125, 0.1102294921875, 0.09246826171875, 0.0908203125, 0.1793212890625, 0.20...
embed
30260408_c0
30260408
prolog
0
Title: Cant get to second read [Prolog] Problem title: Cant get to second read [Prolog] Tags: output, input, prolog Problem: Cant get to second read [Prolog] Im having trouble with these reads, I can read the first value, then it doesn't print the second write and goes back to the menu: adicionar_viagens :- write('Nova...
Cant get to second read [Prolog] Cant get to second read [Prolog] output input prolog Cant Prolog adicionar_viagens Nova Partida nova_partida Novo Destino novo_destino Hora nova_hora_partida Chegada novo_hora_chegada Preco novo_preco Cant get to second read [Prolog] Im having trouble with these reads, I can read the fi...
[ -0.0103759765625, -0.0052490234375, -0.0130615234375, 0.029541015625, 0.00543212890625, 0.01202392578125, -0.024658203125, -0.01507568359375, -0.0035247802734375, -0.0308837890625, 0.010986328125, -0.0174560546875, -0.020263671875, -0.009033203125, 0.0260009765625, -0.020751953125, 0...
[ 4171, 18, 2046, 47, 17932, 12301, 10752, 4867, 140992, 107730, 502, 1250, 171080, 686, 79857, 10070, 9148, 85, 4678, 15866, 22695, 5581, 23968, 5474, 988, 86425, 27102, 5024, 16531, 1430, 1914, 587, 4692, 63134, 6097, 831, 5117, 34292, 2841...
[ 0.0968017578125, 0.0792236328125, 0.1435546875, 0.1436767578125, 0.2041015625, 0.2349853515625, 0.130126953125, 0.2296142578125, 0.141845703125, 0.1241455078125, 0.123046875, 0.155029296875, 0.1236572265625, 0.1187744140625, 0.121337890625, 0.1209716796875, 0.090576171875, 0.030517...
embed
23766536_c0
23766536
prolog
0
Title: Repeated elements in a list in Prolog Problem title: Repeated elements in a list in Prolog Tags: prolog, list Problem: Repeated elements in a list in Prolog I would like to find a method to find the most repeated element in a list if two elements repeat the same number of times. I want the predicate to be a list...
Repeated elements in a list in Prolog Repeated elements in a list in Prolog prolog list Repeated Prolog Repeated elements in a list in Prolog I would like to find a method to find the most repeated element in a list if two elements repeat the same number of times. I want the predicate to be a list that contains both el...
[ -0.0084228515625, 0.00555419921875, -0.00390625, 0.019287109375, -0.00665283203125, 0.019287109375, -0.004791259765625, -0.01275634765625, -0.000530242919921875, -0.04052734375, -0.0078125, -0.00408935546875, -0.0172119140625, -0.00860595703125, 0.0123291015625, 0.0159912109375, -0.0...
[ 33742, 13, 27686, 80854, 5303, 23, 1250, 4867, 502, 1884, 7413, 55300, 47, 2684, 119140, 297, 12830, 2174, 6626, 5701, 14012, 20028, 3444, 1653, 2063, 67, 70541, 15044, 54, 33209, 41, 84751, 2967, 40715 ]
[ 0.2098388671875, 0.218017578125, 0.1212158203125, 0.2181396484375, 0.175537109375, 0.0501708984375, 0.1549072265625, 0.2261962890625, 0.1143798828125, 0.00927734375, 0.1173095703125, 0.08209228515625, 0.003631591796875, 0.195068359375, 0.288330078125, 0.13720703125, 0.193359375, 0....
embed
28161108_c0
28161108
prolog
0
Title: No termination of predicate Problem title: No termination of predicate Tags: failure-slice, prolog, transitive-closure Problem: No termination of predicate I have some program about a graph with black and white vertices: black(root). black(v1). black(v3). black(v4). edge(root,root). edge(v1,root). edge(v2,v1). e...
No termination of predicate No termination of predicate failure-slice prolog transitive-closure No termination of predicate I have some program about a graph with black and white vertices: when I run the goal foo(X) I get a problem: If I remove the fact edge(root,root) the program find some solutions (6 different solut...
[ 0.0201416015625, 0.015625, 0.01007080078125, 0.00653076171875, -0.010009765625, -0.006103515625, 0.0033416748046875, 0.0272216796875, -0.0038299560546875, -0.0400390625, 0.007354736328125, 0.017333984375, -0.01251220703125, 0.01263427734375, 0.0267333984375, 0.01165771484375, 0.03662...
[ 438, 29527, 1363, 111, 1653, 2063, 137578, 13348, 502, 4867, 62621, 5844, 170224, 67, 1528, 1672, 41382, 678, 22556, 136, 35011, 95378, 5170, 11675, 69236, 5775, 31, 1542, 2046, 2967, 4263, 87388, 70, 15824, 121303, 148920, 7413, 3060, 5134...
[ 0.138916015625, 0.2176513671875, 0.007080078125, 0.057220458984375, 0.1558837890625, 0.194580078125, 0.2147216796875, 0.12451171875, 0.095947265625, 0.162841796875, 0.119873046875, 0.041839599609375, 0.16943359375, 0.0322265625, 0.17626953125, 0.01068115234375, 0.196533203125, 0.00...
embed
32544693_c0
32544693
prolog
0
Title: Even sum &amp; Odd product of a list, Swi-Prolog Problem title: Even sum &amp; Odd product of a list, Swi-Prolog Tags: prolog Problem: Even sum & Odd product of a list, Swi-Prolog I have a list of numbers and I have to calculate the sum of the Even numbers and the product of the Odd numbers of the same list. I'm...
Even sum &amp; Odd product of a list, Swi-Prolog Even sum &amp; Odd product of a list, Swi-Prolog prolog Even Odd Swi-Prolog l_odd_even Etail Sum Otail Prod Even sum & Odd product of a list, Swi-Prolog I have a list of numbers and I have to calculate the sum of the Even numbers and the product of the Odd numbers of the...
[ -0.0054931640625, 0.03271484375, -0.00020122528076171875, -0.0035400390625, -0.039306640625, 0.0162353515625, -0.0125732421875, 0.014404296875, 0.0118408203125, -0.015625, 0.016357421875, -0.010498046875, 0.00159454345703125, 0.005096435546875, 0.00775146484375, 0.014892578125, 0.020...
[ 31267, 10554, 619, 25133, 67948, 12996, 5303, 105432, 10752, 4867, 111, 502, 96, 13606, 26301, 25623, 379, 36335, 180, 46741, 1250, 765, 101935, 74481, 136, 5701, 3525, 903, 18151, 2060, 4358, 3688, 27781, 3034, 43240 ]
[ 0.24072265625, 0.2445068359375, 0.057342529296875, 0.06005859375, 0.259521484375, 0.2437744140625, 0.1881103515625, 0.1964111328125, 0.106201171875, 0.1910400390625, 0.0163726806640625, 0.1195068359375, 0.0155487060546875, 0.224365234375, 0.1719970703125, 0.09765625, 0.11328125, 0....
embed
34144117_c0
34144117
prolog
0
Title: Transposing a Matrix in prolog Problem title: Transposing a Matrix in prolog Tags: prolog Problem: Transposing a Matrix in prolog I have written the following code below to transpose a Matrix in prolog listFirst([],[]). listFirst([H1|T1],[H2|Z]):- H1 = [H2|_], listFirst(T1,Z). listFollowers([],[]). listFollowers...
Transposing a Matrix in prolog Transposing a Matrix in prolog prolog Transposing Matrix Transposing a Matrix in prolog I have written the following code below to transpose a Matrix in prolog Test Case I am having problems with the transpose predicate no sure how to implement this. Other predicates seem to work okay.
[ 0.005340576171875, 0.0155029296875, 0.0087890625, 0.013671875, -0.00811767578125, -0.0155029296875, -0.0286865234375, 0.01043701171875, -0.0052490234375, -0.014404296875, 0.001983642578125, 0.0255126953125, -0.00799560546875, -0.003021240234375, -0.0206298828125, 0.0181884765625, 0.0...
[ 11062, 7522, 214, 194234, 23, 502, 4867, 10, 59121, 25632, 18151, 35064, 3900, 78381, 8647, 43731, 44402, 1653, 2063, 67, 29479, 4488, 68403 ]
[ 0.1729736328125, 0.186767578125, 0.033172607421875, 0.2322998046875, 0.04962158203125, 0.13916015625, 0.2130126953125, 0.003314971923828125, 0.04437255859375, 0.0183868408203125, 0.1033935546875, 0.054046630859375, 0.1776123046875, 0.16259765625, 0.11968994140625, 0.0994873046875, 0....
embed
53791018_c0
53791018
prolog
0
Title: Negation on the following sentences Problem title: Negation on the following sentences Tags: prolog, first-order-logic, logic Problem: Negation on the following sentences I am new to the logic. I wrote negation on following sentences. (i) If you can run fast on sports meet then you can run fast on Olympic. (ii) ...
Negation on the following sentences Negation on the following sentences prolog first-order-logic logic Negation Olympic Negation on the following sentences I am new to the logic. I wrote negation on following sentences. Can some one check following modifications are correct or wrong? Any help much appreciated.
[ 0.007080078125, 0.0054931640625, 0.00007534027099609375, 0.01043701171875, 0.00384521484375, 0.000957489013671875, 0.01263427734375, 0.000244140625, -0.0120849609375, 0.0242919921875, -0.0289306640625, 0.003753662109375, -0.00616455078125, 0.0033721923828125, 0.00921630859375, 0.000953...
[ 799, 125682, 98, 70, 25632, 149357, 502, 4867, 80596, 137043, 62775, 152150, 3525, 54397, 108, 12765, 129344, 621, 26785, 707, 44691, 4358 ]
[ 0.17578125, 0.1873779296875, 0.135009765625, 0.0061187744140625, 0.143310546875, 0.1875, 0.08941650390625, 0.152587890625, 0.08880615234375, 0.11383056640625, 0.147216796875, 0.2005615234375, 0.056488037109375, 0.07135009765625, 0.16650390625, 0.1405029296875, 0.1563720703125, 0.00...
embed
20081802_c0
20081802
prolog
0
Title: Prolog showing false on a rule Problem title: Prolog showing false on a rule Tags: prolog Problem: Prolog showing false on a rule student(ram, cse). /* ram is student of CSE branch */ student(kirat, com). student(ajay, cse). student(amit, cmt). studies (cmt, uc). /* CMT branch studies the module UC */ studies(cm...
Prolog showing false on a rule Prolog showing false on a rule prolog Prolog CSE CMT Prolog showing false on a rule These are the rules and facts I have been given. I am completely new to Prolog. When I write classmate(X,com) it always shows false and on putting classmate(X,cse) or classmate(X,cmt) it's giving the solut...
[ 0.0152587890625, 0.025146484375, 0.005584716796875, 0.0296630859375, -0.003997802734375, 0.0140380859375, 0.00152587890625, -0.00701904296875, 0, -0.0142822265625, -0.01025390625, -0.0216064453125, 0.0081787109375, 0.0115966796875, -0.01220703125, -0.006072998046875, 0.007568359375, ...
[ 1250, 4867, 141377, 98320, 98, 79986, 502, 313, 9127, 37290, 91736, 15824, 7, 34475, 3525, 33022, 18507, 15829, 1542, 277, 16, 11343, 45831, 118620, 67130, 3931, 18, 68772, 29806 ]
[ 0.1558837890625, 0.268798828125, 0.07391357421875, 0.236572265625, 0.1112060546875, 0.1580810546875, 0.0968017578125, 0.0106201171875, 0.1695556640625, 0.18896484375, 0.069091796875, 0.02227783203125, 0.007904052734375, 0.005523681640625, 0.004852294921875, 0.09356689453125, 0.138916...
embed
56229407_c0
56229407
prolog
0
Title: How to make assumptions in Prolog Problem title: How to make assumptions in Prolog Tags: prolog Problem: How to make assumptions in Prolog If I have a database of facts and rules, lets say person(mary). employee(bob). not_a_robot(X) :- person(X). Is there a way to assume rules for the (thread local) context of a...
How to make assumptions in Prolog How to make assumptions in Prolog prolog How Prolog not_a_robot How to make assumptions in Prolog If I have a database of facts and rules, lets say Is there a way to assume rules for the (thread local) context of a query? something like: Such that only the call that made the assumption...
[ 0.0101318359375, 0.023193359375, 0.025634765625, 0.0252685546875, -0.0223388671875, 0.0019073486328125, -0.01483154296875, 0.018310546875, 0.0096435546875, -0.057373046875, -0.018798828125, 0.0166015625, 0.00115203857421875, 0.002349853515625, 0.029541015625, 0.0023956298828125, 0.00...
[ 11249, 3249, 237259, 7, 23, 1250, 4867, 47, 502, 959, 112662, 63399, 15824, 136, 91736, 10, 3917, 41591, 100, 39116, 4000, 43701, 41, 1294, 4734, 11782, 7228, 1957, 150011, 21455, 16865, 41499, 1295, 21543, 237, 33657, 1653, 2063, 56065, ...
[ 0.04791259765625, 0.1217041015625, 0.266845703125, 0.1383056640625, 0.014312744140625, 0.1697998046875, 0.269775390625, 0.0278778076171875, 0.1322021484375, 0.06951904296875, 0.2027587890625, 0.178466796875, 0.0894775390625, 0.004119873046875, 0.19482421875, 0.001129150390625, 0.0655...
embed
59261599_c0
59261599
prolog
0
Title: PROLOG return size of the smallest generated list Problem title: PROLOG return size of the smallest generated list Tags: predicate, min, list, prolog, size Problem: PROLOG return size of the smallest generated list I have a predicate that generates multiple lists in a single query. Out of all the generated lists...
PROLOG return size of the smallest generated list PROLOG return size of the smallest generated list predicate min list prolog size PROLOG List PROLOG return size of the smallest generated list I have a predicate that generates multiple lists in a single query. Out of all the generated lists, is it possible to find the ...
[ 0.0115966796875, 0.003082275390625, 0.0020294189453125, 0.00115203857421875, -0.0184326171875, 0.01263427734375, 0.0269775390625, -0.00848388671875, 0.0189208984375, -0.0230712890625, -0.00135040283203125, 0.012939453125, -0.0038299560546875, -0.005218505859375, 0.01165771484375, 0.011...
[ 10514, 47510, 30646, 13267, 19336, 525, 139392, 5303, 1653, 2063, 881, 502, 4867, 32036, 111, 67, 48716, 11001, 41, 7722, 7413, 678, 4343, 65395, 34292, 1549, 3117, 116, 41143, 1884, 4358, 129745 ]
[ 0.171630859375, 0.2386474609375, 0.17529296875, 0.1773681640625, 0.1761474609375, 0.1649169921875, 0.1484375, 0.1907958984375, 0.1358642578125, 0.1649169921875, 0.1812744140625, 0.1485595703125, 0.2286376953125, 0.15576171875, 0.00335693359375, 0.0858154296875, 0.0694580078125, 0.0...
embed
42513237_c0
42513237
prolog
0
Title: Crazy Prolog Syntax Problem title: Crazy Prolog Syntax Tags: syntax, prolog Problem: Crazy Prolog Syntax Being a curious guy, I found out that the following statements which abuse special characters are syntactically correct: X=(a,a). X=(a;a). X=(a|a). X=a:a. X=a?a. (As you see, the last two don't even need pare...
Crazy Prolog Syntax Crazy Prolog Syntax syntax prolog Crazy Prolog Syntax a:a a_a Crazy Prolog Syntax Being a curious guy, I found out that the following statements which abuse special characters are syntactically correct: (As you see, the last two don't even need parentheses. Bonus weirdo points for ? being left- and ...
[ 0.0250244140625, 0.00168609619140625, 0.01214599609375, -0.0072021484375, -0.007568359375, 0.015380859375, -0.004608154296875, 0.0018310546875, 0.016845703125, -0.01171875, -0.0006103515625, 0.008544921875, -0.0145263671875, -0.0240478515625, 0.005340576171875, -0.00885009765625, -0....
[ 170500, 1250, 4867, 19010, 86531, 6002, 502, 10, 12, 11, 454, 193844, 48948, 25632, 63805, 7, 3129, 128431, 5361, 124850, 621, 18, 47013, 26785, 1957, 4568, 6626, 3871, 49129, 35412, 38663, 179459, 31, 26847, 100, 705, 8035, 25737, 152, 5...
[ 0.2305908203125, 0.149658203125, 0.2186279296875, 0.142578125, 0.131103515625, 0.09765625, 0.117431640625, 0.0994873046875, 0.068603515625, 0.1217041015625, 0.09039306640625, 0.03717041015625, 0.007171630859375, 0.047119140625, 0.1864013671875, 0.039031982421875, 0.004547119140625, ...
embed
45043033_c0
45043033
prolog
0
Title: Prolog bagof, setof, findall predicates Problem title: Prolog bagof, setof, findall predicates Tags: prolog-setof, prolog Problem: Prolog bagof, setof, findall predicates How do I query database facts with 3 or more attributes in Prolog using bagof , setof . An example I have a defined a database students(name, ...
Prolog bagof, setof, findall predicates Prolog bagof, setof, findall predicates prolog-setof prolog Prolog sport_list Prolog bagof, setof, findall predicates How do I query database facts with 3 or more attributes in Prolog using bagof , setof . An example I have a defined a database students(name, grade,sport,gender) ...
[ -0.00130462646484375, -0.00131988525390625, 0.000507354736328125, 0.00848388671875, -0.002044677734375, -0.0031890869140625, -0.026611328125, -0.001922607421875, 0.00714111328125, -0.0419921875, -0.01324462890625, 0.0057373046875, -0.00836181640625, -0.00909423828125, -0.01409912109375, ...
[ 1250, 4867, 41780, 420, 5423, 4390, 7413, 5584, 1653, 2063, 502, 3509, 2896, 6562, 87, 41, 1294, 63399, 15824, 678, 138, 707, 1286, 150380, 23, 17368, 27781, 61924, 25921, 11627, 44000, 10033, 23200, 3444, 5303, 11301, 17311, 13625, 27853, ...
[ 0.201416015625, 0.27880859375, 0.171142578125, 0.2303466796875, 0.1903076171875, 0.299560546875, 0.1488037109375, 0.1527099609375, 0.143798828125, 0.182373046875, 0.1453857421875, 0.1590576171875, 0.164306640625, 0.1732177734375, 0.003875732421875, 0.143310546875, 0.1600341796875, ...
embed
72862828_c0
72862828
prolog
0
Title: Are nested structures allowed in Prolog? Problem title: Are nested structures allowed in Prolog? Tags: prolog Problem: Are nested structures allowed in Prolog? I'm working on defining the logical operators in Prolog as an exercise. The first few were pretty straight forward: and(A, B) :- A, B. or(true). or(A, _)...
Are nested structures allowed in Prolog? Are nested structures allowed in Prolog? prolog Prolog Are nested structures allowed in Prolog? I'm working on defining the logical operators in Prolog as an exercise. The first few were pretty straight forward: But now I want to define nand and nor , and it would be nice to def...
[ 0.01171875, 0.010009765625, 0.01043701171875, 0.01214599609375, 0.01116943359375, 0.03759765625, 0.023681640625, -0.01416015625, -0.0024566650390625, -0.0206298828125, -0.00080108642578125, -0.0101318359375, -0.0034332275390625, -0.000820159912109375, 0.01275634765625, 0.00674438476562...
[ 15901, 8512, 71, 45646, 7, 107003, 23, 1250, 4867, 502, 13204, 62775, 289, 39933, 81979, 61924, 24, 2208, 136, 12488, 1653, 2063, 35064, 75414, 125195, 22027, 18, 151575, 57767, 29481, 237, 34627, 37772, 67 ]
[ 0.0439453125, 0.268310546875, 0.1717529296875, 0.2291259765625, 0.086181640625, 0.171142578125, 0.094482421875, 0.1715087890625, 0.250732421875, 0.111083984375, 0.04791259765625, 0.1129150390625, 0.0389404296875, 0.1656494140625, 0.002288818359375, 0.1103515625, 0.089111328125, 0.1...
embed
77384430_c0
77384430
prolog
0
Title: Homework, want to solve with Prolog Problem title: Homework, want to solve with Prolog Tags: prolog Problem: Homework, want to solve with Prolog Can I solve the homework for my logic class with Prolog? 5 people are interrogated. The statements from A and B are lost. C says: If A is truthful then B is truthful. D...
Homework, want to solve with Prolog Homework, want to solve with Prolog prolog A Homework Prolog Homework, want to solve with Prolog Can I solve the homework for my logic class with Prolog? My latest attempt was This compiles, but when I query Prolog with I get the error "Arguments are not sufficiently instantiated".
[ 0.01904296875, 0.0108642578125, 0.006500244140625, 0.02490234375, -0.022216796875, 0.01239013671875, -0.00141143798828125, 0.0079345703125, 0.0007781982421875, -0.0291748046875, -0.00072479248046875, -0.006256103515625, -0.001068115234375, 0.0208740234375, 0.0140380859375, -0.007934570...
[ 2005, 18244, 3444, 86869, 678, 1250, 4867, 47, 502, 62, 4171, 87, 5368, 100, 759, 62775, 18507, 42850, 81887, 509, 3293, 9969, 1340, 1284, 41, 1294, 18499, 7614, 1234, 959, 129980, 34648 ]
[ 0.16455078125, 0.19482421875, 0.096435546875, 0.1673583984375, 0.1533203125, 0.218994140625, 0.282958984375, 0.002887725830078125, 0.1661376953125, 0.0139007568359375, 0.06744384765625, 0.017608642578125, 0.1473388671875, 0.033935546875, 0.004390716552734375, 0.181396484375, 0.111083...
embed
74416459_c0
74416459
prolog
0
Title: Prolog tail recursion for Fibonacci sequence Problem title: Prolog tail recursion for Fibonacci sequence Tags: fibonacci, tail-recursion, prolog Problem: Prolog tail recursion for Fibonacci sequence I have been trying to make a Prolog tail recursion for Fibonacci sequence, but I have a lot of trouble making the ...
Prolog tail recursion for Fibonacci sequence Prolog tail recursion for Fibonacci sequence fibonacci tail-recursion prolog Prolog Fibonacci X-1 X-2 Prolog tail recursion for Fibonacci sequence I have been trying to make a Prolog tail recursion for Fibonacci sequence, but I have a lot of trouble making the code, this is ...
[ 0.02734375, 0.0157470703125, -0.01007080078125, -0.01141357421875, 0.0024566650390625, 0.0079345703125, 0.000789642333984375, -0.01220703125, 0.01190185546875, -0.0162353515625, 0.0184326171875, -0.0159912109375, -0.0205078125, 0.00604248046875, 0.024169921875, 0.0072021484375, 0.015...
[ 1250, 4867, 46741, 195625, 1830, 100, 3698, 20990, 52544, 40, 944, 3956, 809, 48650, 502, 1193, 5759, 5428, 31577, 5915, 63134, 20662, 18151, 8562, 9077, 7730, 7108, 60875, 151134, 4785, 19048, 1528, 3638, 959, 23 ]
[ 0.1549072265625, 0.230224609375, 0.2496337890625, 0.19140625, 0.0870361328125, 0.0760498046875, 0.11181640625, 0.135009765625, 0.15283203125, 0.038177490234375, 0.1177978515625, 0.0195159912109375, 0.0601806640625, 0.1453857421875, 0.0997314453125, 0.07366943359375, 0.105712890625, ...
embed
4568257_c0
4568257
prolog
0
Title: Can i convert from a list of chars to a string or term in Prolog Problem title: Can i convert from a list of chars to a string or term in Prolog Tags: dcg, string, prolog, io Problem: Can i convert from a list of chars to a string or term in Prolog i use read_line_to_codes(Stream,Line) to read a line from a file...
Can i convert from a list of chars to a string or term in Prolog Can i convert from a list of chars to a string or term in Prolog dcg string prolog io a Can Prolog read_line_to_codes Stream Line Can i convert from a list of chars to a string or term in Prolog i use to read a line from a file .. first is there any way t...
[ 0.00186920166015625, 0.0024261474609375, 0.005218505859375, 0.030029296875, -0.007110595703125, 0.010498046875, 0.01177978515625, 0.0068359375, -0.01275634765625, -0.0252685546875, -0.003662109375, -0.0196533203125, -0.01361083984375, 0.01165771484375, -0.00933837890625, -0.00823974609...
[ 4171, 17, 96760, 1295, 5303, 21441, 7, 47, 79315, 707, 13579, 23, 1250, 4867, 10, 177, 502, 22995, 12301, 2256, 188, 40899, 115061, 16777, 4527, 13315, 11435, 95486, 70541, 32628, 6494, 99156, 53418, 34627, 2967, 4358 ]
[ 0.07843017578125, 0.03680419921875, 0.205322265625, 0.07708740234375, 0.160888671875, 0.210693359375, 0.03985595703125, 0.07672119140625, 0.20166015625, 0.040313720703125, 0.2242431640625, 0.049285888671875, 0.166259765625, 0.23193359375, 0.0143585205078125, 0.066650390625, 0.1241455...
embed
34578616_c0
34578616
prolog
0
Title: Converting input stream to ASCII: explanation of Prolog code Problem title: Converting input stream to ASCII: explanation of Prolog code Tags: swi-prolog, ascii, string, prolog, string-conversion Problem: Converting input stream to ASCII: explanation of Prolog code I'm trying to read and convert string to ASCII ...
Converting input stream to ASCII: explanation of Prolog code Converting input stream to ASCII: explanation of Prolog code swi-prolog ascii string prolog string-conversion Converting ASCII Prolog read_command get0 Converting input stream to ASCII: explanation of Prolog code I'm trying to read and convert string to ASCII...
[ -0.00170135498046875, -0.00634765625, 0.0194091796875, 0.015380859375, 0.01025390625, 0.00011873245239257812, 0.00109100341796875, -0.00113677978515625, -0.006072998046875, 0.00909423828125, 0.032958984375, -0.0142822265625, -0.0123291015625, 0.01055908203125, -0.0181884765625, -0.0217...
[ 1657, 814, 107730, 75973, 47, 125429, 10001, 187136, 1250, 4867, 18151, 1916, 2452, 3454, 237, 26506, 79315, 502, 2271, 46354, 12301, 277, 12018, 2046, 2389, 111, 31577, 136, 96760, 34292, 1653, 2063, 67, 11583, 581, 25632, 43240, 191147, 7...
[ 0.0107421875, 0.09326171875, 0.151611328125, 0.180908203125, 0.0924072265625, 0.1123046875, 0.2216796875, 0.1634521484375, 0.15283203125, 0.23388671875, 0.1737060546875, 0.0160675048828125, 0.123779296875, 0.10321044921875, 0.004241943359375, 0.140380859375, 0.1871337890625, 0.1030...
embed
18753354_c0
18753354
prolog
0
Title: How can I reuse a Prolog data structure? Problem title: How can I reuse a Prolog data structure? Tags: prolog Problem: How can I reuse a Prolog data structure? I am writing a small program using Prolog. There is a data structure that I want to reuse, so I tried assigning it to a variable: CitizenProfile = voter_...
How can I reuse a Prolog data structure? How can I reuse a Prolog data structure? prolog How Prolog CitizenProfile voter_profile not_in_prison static_procedure How can I reuse a Prolog data structure? I am writing a small program using Prolog. There is a data structure that I want to reuse, so I tried assigning it to a...
[ 0.01324462890625, 0.01025390625, 0.0233154296875, -0.005126953125, 0.0015716552734375, -0.00860595703125, -0.0106201171875, 0.005126953125, 0.0079345703125, -0.0673828125, 0.00052642822265625, -0.0022430419921875, 0.0027618408203125, 0.006683349609375, 0.018310546875, -0.00019264221191...
[ 11249, 831, 156883, 1250, 4867, 2053, 45646, 502, 193223, 147161, 1340, 169454, 58395, 959, 73, 22876, 191, 201939, 232578, 32562, 19336, 1528, 95486, 77336, 11814, 190647, 18499, 9969, 11435, 1295, 130250, 37842, 8, 18347, 105950, 24092, 84079...
[ 0.048980712890625, 0.05340576171875, 0.2384033203125, 0.1627197265625, 0.2626953125, 0.1302490234375, 0.234130859375, 0.0975341796875, 0.1373291015625, 0.131591796875, 0.1278076171875, 0.1710205078125, 0.1494140625, 0.0712890625, 0.027435302734375, 0.114501953125, 0.0831298828125, ...
embed
20180335_c0
20180335
prolog
0
Title: Make Prolog return one solution and stop showing the query option Problem title: Make Prolog return one solution and stop showing the query option Tags: prolog, prolog-toplevel, prolog-cut, format Problem: Make Prolog return one solution and stop showing the query option I'm new to prolog, and am experimenting w...
Make Prolog return one solution and stop showing the query option Make Prolog return one solution and stop showing the query option prolog prolog-toplevel prolog-cut format Make Prolog member1 Make Prolog return one solution and stop showing the query option I'm new to prolog, and am experimenting with how to get it to...
[ 0.0135498046875, 0.0184326171875, 0.0294189453125, -0.00262451171875, -0.01507568359375, -0.00119781494140625, 0.011962890625, 0.00408935546875, -0.004486083984375, -0.040283203125, 0.006072998046875, 0.006195068359375, -0.01544189453125, 0.006591796875, 0.037353515625, 0.0008621215820...
[ 26176, 1250, 4867, 30646, 1632, 29806, 7279, 141377, 41, 1294, 35829, 502, 13784, 67919, 19774, 9384, 32786, 28007, 2046, 47, 214, 7103, 7413, 35166, 18151, 16750, 72856, 2448, 1916, 9774, 1660, 28412, 63736, 64457, 2174, 64, 5557, 64549, 3...
[ 0.07122802734375, 0.2022705078125, 0.277099609375, 0.1754150390625, 0.1715087890625, 0.2034912109375, 0.17822265625, 0.1182861328125, 0.1488037109375, 0.128173828125, 0.19970703125, 0.145751953125, 0.053497314453125, 0.1204833984375, 0.088134765625, 0.1920166015625, 0.181396484375, ...
embed
78023344_c0
78023344
prolog
0
Title: Prolog evaluation of unknown variables Problem title: Prolog evaluation of unknown variables Tags: programming-languages, prolog Problem: Prolog evaluation of unknown variables Consider this: list_length([], 0). list_length([H|T], N) :- list_length(T, N - 1). It doesn't give a compilation error, but it doesn't w...
Prolog evaluation of unknown variables Prolog evaluation of unknown variables programming-languages prolog Prolog list_length existence_error top_level Prolog evaluation of unknown variables Consider this: It doesn't give a compilation error, but it doesn't work. my thinking is: suppose i call list_length([1], N) we qu...
[ 0.004791259765625, 0.03466796875, 0.00555419921875, 0.0101318359375, -0.0028533935546875, 0.015380859375, 0.00714111328125, 0.008056640625, -0.002838134765625, -0.0361328125, 0.005950927734375, -0.0130615234375, 0.0166015625, 0.004150390625, 0.01904296875, -0.02294921875, 0.024169921...
[ 1250, 4867, 219836, 51, 69723, 77336, 56037, 196651, 502, 5303, 23986, 116311, 188800, 2663, 67919, 137399, 8337, 98352, 18499, 1284, 442, 22027, 18, 4488, 47644, 139124, 11782, 927, 25256, 541, 41, 1294, 20, 4879, 106, 2203, 757, 7413, 83,...
[ 0.1827392578125, 0.22998046875, 0.1572265625, 0.06463623046875, 0.1478271484375, 0.1705322265625, 0.03021240234375, 0.05596923828125, 0.137939453125, 0.1651611328125, 0.0963134765625, 0.1566162109375, 0.18798828125, 0.03729248046875, 0.0638427734375, 0.020751953125, 0.00341796875, ...
embed
43939738_c0
43939738
prolog
0
Title: Recursive program C to Prolog Problem title: Recursive program C to Prolog Tags: recursion, prolog, for-loop Problem: Recursive program C to Prolog I'm trying to implement a recursive program in prolog. I have an idea on how I would implement it in a procedural language like C, but can't figure out how to do it ...
Recursive program C to Prolog Recursive program C to Prolog recursion prolog for-loop Recursive Prolog function_1 check_solution function_2 Recursive program C to Prolog I'm trying to implement a recursive program in prolog. I have an idea on how I would implement it in a procedural language like C, but can't figure ou...
[ 0.0198974609375, 0.0059814453125, -0.011962890625, 0.02978515625, -0.01513671875, 0.0255126953125, -0.004119873046875, 0.0016021728515625, 0.005706787109375, -0.036376953125, 0.003082275390625, -0.005279541015625, -0.0203857421875, 0.00040435791015625, 0.0164794921875, -0.0022277832031...
[ 853, 48650, 5844, 1528, 313, 47, 1250, 4867, 195625, 1830, 502, 100, 28354, 32354, 115187, 12765, 166589, 304, 31577, 29479, 23, 6528, 2806, 442, 59158, 46876, 1884, 26366, 3642, 54, 11249, 71, 136, 454, 15044, 351, 107, 7941, 3917, 3115,...
[ 0.083984375, 0.2218017578125, 0.1783447265625, 0.1873779296875, 0.173828125, 0.1744384765625, 0.1865234375, 0.258056640625, 0.236083984375, 0.0145111083984375, 0.163330078125, 0.047119140625, 0.1610107421875, 0.1678466796875, 0.077880859375, 0.2177734375, 0.2347412109375, 0.1759033...
embed
10245405_c0
10245405
prolog
0
Title: Prolog: Finding all 3x3 magic squares without using clp(FD) Problem title: Prolog: Finding all 3x3 magic squares without using clp(FD) Tags: prolog, magic-square Problem: Prolog: Finding all 3x3 magic squares without using clp(FD) I want to find all possible 3x3 magic squares. Quoting from English wikipedia : A ...
Prolog: Finding all 3x3 magic squares without using clp(FD) Prolog: Finding all 3x3 magic squares without using clp(FD) prolog magic-square clp Prolog Finding Prolog: Finding all 3x3 magic squares without using clp(FD) I want to find all possible 3x3 magic squares. Quoting from English wikipedia : Here's one sample sol...
[ -0.0111083984375, 0.021240234375, 0.0101318359375, -0.01806640625, 0.0029449462890625, -0.00738525390625, -0.0220947265625, 0.004150390625, 0.0142822265625, -0.0169677734375, 0.005462646484375, -0.00848388671875, 0.01434326171875, -0.001220703125, -0.005218505859375, -0.0052490234375, ...
[ 1250, 4867, 26040, 214, 756, 138, 425, 363, 49846, 108047, 7, 15490, 17368, 33139, 254, 98553, 502, 3444, 7413, 7722, 121413, 29806, 33022, 1528, 51347, 35773, 34937, 39557, 71 ]
[ 0.1396484375, 0.2437744140625, 0.091064453125, 0.021636962890625, 0.0997314453125, 0.1673583984375, 0.1514892578125, 0.2237548828125, 0.168701171875, 0.2001953125, 0.03662109375, 0.0667724609375, 0.03045654296875, 0.0819091796875, 0.1304931640625, 0.137451171875, 0.09228515625, 0.0...
embed
4753496_c0
4753496
prolog
0
Title: Matching elements on 2 lists Problem title: Matching elements on 2 lists Tags: list, prolog Problem: Matching elements on 2 lists I'm new to Prolog and I'm attempting to check if any element of the first list has a match on the second list. I think this will work recursively and I know that I have to use somethi...
Matching elements on 2 lists Matching elements on 2 lists list prolog Matching Matching elements on 2 lists I'm new to Prolog and I'm attempting to check if any element of the first list has a match on the second list. I think this will work recursively and I know that I have to use something like [X|Rest] to compare, ...
[ 0.00244140625, 0.01513671875, -0.006317138671875, -0.005340576171875, -0.007537841796875, 0.0225830078125, 0.006134033203125, 0.025390625, 0.0142822265625, -0.0296630859375, 0.018310546875, -0.006683349609375, -0.003570556640625, 0.006927490234375, 0.0048828125, 0.0015411376953125, 0...
[ 67407, 214, 80854, 98, 116, 5303, 7, 502, 4867, 3525, 1250, 81887, 47, 12765, 2174, 2499, 12830, 5117, 1556, 10, 14858, 17932, 4488, 195625, 5844, 4527, 1884, 1542, 58745, 1052, 525, 69101, 10588, 159029, 32354, 13438, 6002, 86531, 179933, ...
[ 0.265380859375, 0.154296875, 0.2139892578125, 0.092041015625, 0.18896484375, 0.232177734375, 0.04168701171875, 0.11181640625, 0.22509765625, 0.040771484375, 0.153076171875, 0.0374755859375, 0.039520263671875, 0.19873046875, 0.07501220703125, 0.006866455078125, 0.1614990234375, 0.08...
embed
55107547_c0
55107547
prolog
0
Title: Why won&#x27;t &quot;repeat&quot; in GNU prolog work as expected? Problem title: Why won&#x27;t &quot;repeat&quot; in GNU prolog work as expected? Tags: prolog Problem: Why won't "repeat" in GNU prolog work as expected? I try to run the following code in my GNU 1.4.5 . The file name is other.pl I run it by : [ot...
Why won&#x27;t &quot;repeat&quot; in GNU prolog work as expected? Why won&#x27;t &quot;repeat&quot; in GNU prolog work as expected? prolog Why GNU Please number1 Why won't "repeat" in GNU prolog work as expected? I try to run the following code in my GNU 1.4.5 . The file name is other.pl I run it by : [other]. I run fu...
[ -0.009033203125, 0.0093994140625, 0.0111083984375, -0.0027923583984375, 0.0009307861328125, 0.0103759765625, 0.014404296875, 0.017822265625, 0.007781982421875, -0.030029296875, 0.00016117095947265625, 0.0225830078125, -0.04150390625, 0.000431060791015625, 0.039794921875, 0.012512207031...
[ 44084, 23742, 3768, 18, 107, 1081, 257, 41502, 165132, 502, 4867, 4488, 237, 84751, 23, 30607, 14012, 418, 9790, 11675, 25632, 18151, 615, 104867, 11435, 3789, 2424, 390, 126340, 32354, 3034, 30957, 24234, 98, 11737, 13438, 15490, 32562, 23...
[ 0.11376953125, 0.14111328125, 0.032989501953125, 0.1016845703125, 0.1328125, 0.2479248046875, 0.2052001953125, 0.0225372314453125, 0.2122802734375, 0.18994140625, 0.2327880859375, 0.1243896484375, 0.0867919921875, 0.0772705078125, 0.0296783447265625, 0.2135009765625, 0.1328125, 0.0...
embed
42865128_c0
42865128
prolog
0
Title: How to use an effective debugger/trace for Prolog Problem title: How to use an effective debugger/trace for Prolog Tags: trace, debugging, prolog Problem: How to use an effective debugger/trace for Prolog I'm very new to Prolog (started to learn for two weekish) and our assignment that involves hamiltonian path ...
How to use an effective debugger/trace for Prolog How to use an effective debugger/trace for Prolog trace debugging prolog How Prolog How to use an effective debugger/trace for Prolog I'm very new to Prolog (started to learn for two weekish) and our assignment that involves hamiltonian path is going to drive me insane ...
[ 0.0296630859375, 0.0118408203125, -0.0028839111328125, 0.005767822265625, -0.0093994140625, 0.0164794921875, 0.000331878662109375, 0.0078125, -0.009765625, -0.048828125, 0.00732421875, -0.016357421875, -0.012939453125, -0.007781982421875, 0.0142822265625, 0.0078125, -0.0108642578125,...
[ 11249, 4527, 60266, 8, 978, 21407, 39989, 13, 100, 1250, 4867, 144851, 502, 64, 4552, 3525, 30698, 5895, 95486, 56224, 27706, 66, 60875, 22648, 8371, 2967, 360, 1556, 142508, 85779, 75, 831, 11907, 6032, 32354, 127877, 16195, 933, 1810, 8...
[ 0.06829833984375, 0.120849609375, 0.1463623046875, 0.14794921875, 0.1944580078125, 0.163330078125, 0.1885986328125, 0.112060546875, 0.0711669921875, 0.1756591796875, 0.2423095703125, 0.2318115234375, 0.109130859375, 0.00543212890625, 0.010162353515625, 0.0345458984375, 0.010772705078...
embed
13871106_c0
13871106
prolog
0
Title: Unexpected Undefined procedure Problem title: Unexpected Undefined procedure Tags: prolog Problem: Unexpected Undefined procedure I want to assert some facts only once- if they haven't been asserted yet, so I make a check: :- dynamic item/6. init(Id, LastId, Depth) :- ruut(X,Y,Color), (item(X,Y,Color,Depth,Id,La...
Unexpected Undefined procedure Unexpected Undefined procedure prolog Unexpected Undefined LastId Depth Color ERROR my_pgm:initsialiseeri_seisund my_pgm:item Unexpected Undefined procedure I want to assert some facts only once- if they haven't been asserted yet, so I make a check: The point is to assert it only if it is...
[ 0.0147705078125, 0.0206298828125, 0.0024566650390625, 0.004638671875, -0.01068115234375, 0.000408172607421875, -0.004730224609375, -0.0047607421875, 0.006256103515625, -0.0137939453125, 0.00848388671875, 0.01385498046875, 0.00022602081298828125, 0.0025482177734375, 0.0244140625, 0.0173...
[ 992, 83613, 13, 89829, 79912, 5983, 297, 50491, 502, 4867, 21672, 568, 71, 262, 254, 927, 51193, 151206, 24638, 759, 177, 39, 73, 30241, 289, 79635, 14, 176671, 2208, 217, 195, 3444, 47, 237, 33657, 3060, 15824, 4734, 24145, 2174, 38246...
[ 0.06805419921875, 0.1121826171875, 0.109619140625, 0.08734130859375, 0.1160888671875, 0.2110595703125, 0.02490234375, 0.228271484375, 0.17138671875, 0.2432861328125, 0.143310546875, 0.012603759765625, 0.072998046875, 0.0504150390625, 0.1124267578125, 0.044525146484375, 0.177734375, ...
embed
21518566_c0
21518566
prolog
0
Title: Find powers of 2 in a list Prolog Problem title: Find powers of 2 in a list Prolog Tags: clpfd, prolog, list, clpz Problem: Find powers of 2 in a list Prolog I'm trying to create a list in Prolog (SWI Prolog) and check which numbers are powers of 2 and second find how many times a specific number is in the list ...
Find powers of 2 in a list Prolog Find powers of 2 in a list Prolog clpfd prolog list clpz Find Prolog MULT2 THREE Find powers of 2 in a list Prolog I'm trying to create a list in Prolog (SWI Prolog) and check which numbers are powers of 2 and second find how many times a specific number is in the list (in this example...
[ -0.0004749298095703125, 0.007568359375, 0.008544921875, 0.015380859375, 0.005126953125, 0.0225830078125, -0.00628662109375, 0.00738525390625, 0.0185546875, -0.02001953125, 0.005126953125, -0.01495361328125, 0.006622314453125, 0.02587890625, 0.000926971435546875, 0.033203125, 0.024169...
[ 26040, 14537, 7, 111, 116, 23, 5303, 1250, 4867, 10, 71, 502, 169, 82643, 304, 148776, 28282, 38969, 12765, 101935, 17932, 7413, 3642, 5941, 20028, 29458, 14012, 27781, 138, 83, 1957, 29806, 33938, 10336, 2811, 757, 756, 44691, 8710, 184,...
[ 0.106201171875, 0.201904296875, 0.120849609375, 0.17138671875, 0.199462890625, 0.07177734375, 0.213623046875, 0.13134765625, 0.169677734375, 0.0050048828125, 0.015594482421875, 0.0487060546875, 0.003387451171875, 0.1024169921875, 0.1546630859375, 0.1715087890625, 0.04205322265625, ...
embed
8296384_c0
8296384
prolog
0
Title: Implementing a stack in Prolog Problem title: Implementing a stack in Prolog Tags: prolog Problem: Implementing a stack in Prolog I need a way of doing the following in Prolog. I want to have a list of variables defined. For example [x,z,k,s,r,v,w] And then I want one of my functions to be able to pop the first ...
Implementing a stack in Prolog Implementing a stack in Prolog prolog Implementing Prolog Implementing a stack in Prolog I need a way of doing the following in Prolog. I want to have a list of variables defined. For example [x,z,k,s,r,v,w] And then I want one of my functions to be able to pop the first element from the ...
[ 0.0264892578125, 0.01519775390625, -0.0137939453125, 0.0245361328125, -0.0216064453125, 0.00836181640625, -0.0205078125, 0.01019287109375, 0.00005412101745605469, -0.02880859375, 0.01129150390625, 0.01116943359375, -0.01904296875, 0.0003643035888671875, 0.0194091796875, 0.009521484375,...
[ 153941, 177261, 23, 1250, 4867, 502, 3871, 3917, 20594, 25632, 3444, 765, 5303, 77336, 61924, 169, 92, 334, 434, 32354, 19048, 7426, 5117, 12830, 4527, 27117, 11737, 122799, 47, 168398, 7311, 11341, 5351, 452, 10750, 6183, 8781, 30563, 5603...
[ 0.2281494140625, 0.26953125, 0.0631103515625, 0.1845703125, 0.277587890625, 0.122314453125, 0.08203125, 0.06378173828125, 0.05328369140625, 0.104248046875, 0.0833740234375, 0.040679931640625, 0.1748046875, 0.25244140625, 0.194091796875, 0.029541015625, 0.017913818359375, 0.09179687...
embed
30026151_c1
30026151
prolog
1
2.323, 19.78 , 3.089 , 3.084 , 3.081 By adding :- table posInt_CollatzSteps/2. the queries got 2x faster. Still, I'm puzzled: The 2nd run is more than 5x slower than the 1st. Apparently most time is spend in GC. From the 3rd run onwards, the tabling variant is fast again. Warm runs (3rd, 4th,...) are noticeably slower...
2.323, 19.78 , 3.089 , 3.084 , 3.081 By adding :- table posInt_CollatzSteps/2. the queries got 2x faster. Still, I'm puzzled: The 2nd run is more than 5x slower than the 1st. Apparently most time is spend in GC. From the 3rd run onwards, the tabling variant is fast again. Warm runs (3rd, 4th,...) are noticeably slower...
[ 0.00201416015625, -0.0034027099609375, 0.00482177734375, -0.006561279296875, -0.022705078125, 0.01220703125, 0.01220703125, -0.01214599609375, 0.006805419921875, -0.030029296875, 0.0174560546875, -0.004547119140625, 0.0010223388671875, 0.0172119140625, 0.0145263671875, 0.00747680664062...
[ 59811, 3742, 19051, 17596, 18949, 13903, 13556, 154107, 15772, 23180, 3864, 4153, 18, 78457, 2335, 169, 191644, 12477, 70, 41, 10484, 4163, 116, 425, 4271, 56, 104192, 2208, 11675, 83, 1286, 190, 72803, 271, 2684, 1733, 47445, 69657, 138, ...
[ 0.0650634765625, 0.10552978515625, 0.0726318359375, 0.0667724609375, 0.0941162109375, 0.073974609375, 0.1080322265625, 0.1087646484375, 0.00836181640625, 0.220703125, 0.1146240234375, 0.045623779296875, 0.0640869140625, 0.02276611328125, 0.047332763671875, 0.0986328125, 0.18713378906...
embed
4340022_c0
4340022
prolog
0
Title: Putting all results of a query in a list in Prolog Problem title: Putting all results of a query in a list in Prolog Tags: prolog Problem: Putting all results of a query in a list in Prolog I'd like to know how to make a predicate that puts all results obtained from some query (so I get a result and press semico...
Putting all results of a query in a list in Prolog Putting all results of a query in a list in Prolog prolog Putting Prolog another_foo Putting all results of a query in a list in Prolog I'd like to know how to make a predicate that puts all results obtained from some query (so I get a result and press semicolon until ...
[ 0.03125, 0.005615234375, -0.0052490234375, -0.00179290771484375, -0.019287109375, 0.01214599609375, -0.01318359375, 0.01171875, 0.02392578125, -0.0615234375, 0.00017070770263671875, -0.010498046875, -0.01434326171875, 0.01422119140625, -0.011474609375, -0.0035400390625, -0.0028839111...
[ 19577, 1916, 756, 50339, 41, 1294, 23, 5303, 1250, 4867, 502, 15700, 3584, 31, 1884, 3642, 3249, 1653, 2063, 67, 3884, 113054, 2046, 16750, 24234, 40, 46029, 4759, 24189, 22225, 184, 33022, 5775, 1542, 133063, 44632, 56, 28282, 1295 ]
[ 0.0941162109375, 0.000274658203125, 0.135498046875, 0.223388671875, 0.125732421875, 0.0943603515625, 0.07269287109375, 0.193115234375, 0.1514892578125, 0.239990234375, 0.081787109375, 0.1151123046875, 0.144775390625, 0.14697265625, 0.03643798828125, 0.00115966796875, 0.044921875, 0...
embed
22981805_c0
22981805
prolog
0
Title: Prolog dynamic arithmetic expression Problem title: Prolog dynamic arithmetic expression Tags: prolog, arithmetic-expressions Problem: Prolog dynamic arithmetic expression I'm new to Prolog and would like to define a simple predicate which calculates the result depending on which function I choose to use in the ...
Prolog dynamic arithmetic expression Prolog dynamic arithmetic expression prolog arithmetic-expressions Prolog Result Prolog dynamic arithmetic expression I'm new to Prolog and would like to define a simple predicate which calculates the result depending on which function I choose to use in the arithmetic expression. S...
[ 0.014892578125, -0.01263427734375, 0.0186767578125, 0.00139617919921875, 0.004119873046875, 0.01153564453125, 0.0028839111328125, 0.01025390625, 0.002655029296875, -0.0216064453125, -0.0098876953125, -0.0213623046875, -0.02197265625, -0.025634765625, 0.01129150390625, 0.000343322753906...
[ 1250, 4867, 84079, 187, 8962, 282, 125195, 502, 204629, 126684, 3525, 1884, 61924, 8781, 1653, 2063, 74481, 16750, 96819, 32354, 55076, 4527, 6528, 509, 41206, 31895, 57767, 53418, 135812, 2331, 237, 142, 9523, 41018, 7722, 1820, 14373, 62822...
[ 0.1993408203125, 0.270263671875, 0.2032470703125, 0.055328369140625, 0.167724609375, 0.1256103515625, 0.2138671875, 0.12353515625, 0.2008056640625, 0.1976318359375, 0.02593994140625, 0.0260009765625, 0.09686279296875, 0.075439453125, 0.129638671875, 0.1605224609375, 0.14599609375, ...
embed
23639219_c0
23639219
prolog
0
Title: Seek string within strings Problem title: Seek string within strings Tags: prolog Problem: Seek string within strings I have an arbitrarily entered sequence of symbols, for example progressive and must determine whether it contains an entered sequence of symbols, for example progress . My idea is to break the st...
Seek string within strings Seek string within strings prolog Seek Str Yes Seek string within strings I have an arbitrarily entered sequence of symbols, for example progressive and must determine whether it contains an entered sequence of symbols, for example progress . My idea is to break the strings into lists of lett...
[ -0.0031280517578125, 0.01470947265625, -0.00823974609375, 0.038818359375, -0.0089111328125, 0.020263671875, 0.017822265625, 0.0179443359375, 0.013671875, -0.003753662109375, 0.00897216796875, 0.03466796875, -0.015380859375, 0.03076171875, 0.02001953125, -0.0146484375, 0.0081176757812...
[ 503, 343, 79315, 28032, 502, 4867, 23351, 32635, 61799, 30957, 40, 944, 3956, 26582, 161838, 8110, 83324, 36766, 70541, 42658, 6528, 36356, 3934, 5303, 120820, 69101, 3642, 15044, 34153, 89536, 20697, 1528 ]
[ 0.147216796875, 0.1156005859375, 0.276611328125, 0.245361328125, 0.1602783203125, 0.2060546875, 0.1715087890625, 0.1173095703125, 0.05615234375, 0.10186767578125, 0.011962890625, 0.0626220703125, 0.0020751953125, 0.186767578125, 0.2003173828125, 0.007720947265625, 0.1356201171875, ...
embed
17036471_c0
17036471
prolog
0
Title: Prolog sort list using permutation Problem title: Prolog sort list using permutation Tags: permutation, prolog, sorting Problem: Prolog sort list using permutation Writing sort function, sort(A,B) in Prolog using the built in permutation Prolog function. The sort function holds if B is a sorted version of A. % s...
Prolog sort list using permutation Prolog sort list using permutation permutation prolog sorting permutation Prolog Prolog sort list using permutation Writing sort function, sort(A,B) in Prolog using the built in permutation Prolog function. The sort function holds if B is a sorted version of A. The problem is: when th...
[ -0.0037384033203125, 0.02197265625, 0.03173828125, -0.0191650390625, -0.024658203125, 0.000762939453125, -0.0257568359375, -0.00921630859375, -0.0025482177734375, -0.011474609375, 0.003326416015625, 0.025146484375, 0.0162353515625, -0.004913330078125, -0.00927734375, 0.0155029296875, ...
[ 1250, 4867, 12096, 5303, 17368, 117, 561, 22062, 502, 213185, 32354, 284, 571, 88303, 23, 16401, 2174, 335, 17497, 11389, 62, 2967, 171763, 67, 142424, 339, 627, 959, 26698, 1636, 13538, 7077, 15549, 18, 36069 ]
[ 0.16650390625, 0.2230224609375, 0.2186279296875, 0.164306640625, 0.03826904296875, 0.1204833984375, 0.175048828125, 0.11181640625, 0.1318359375, 0.13232421875, 0.1546630859375, 0.0258941650390625, 0.080322265625, 0.0771484375, 0.0229644775390625, 0.112548828125, 0.01361083984375, 0...
embed
29206520_c0
29206520
prolog
0
Title: Converting a Prolog program to a Haskell program Problem title: Converting a Prolog program to a Haskell program Tags: haskell, prolog Problem: Converting a Prolog program to a Haskell program I've got this review question for one of my exams, and I need some guidance. Using the following Prolog program as an ex...
Converting a Prolog program to a Haskell program Converting a Prolog program to a Haskell program haskell prolog Converting Prolog Haskell X:Xs Converting a Prolog program to a Haskell program I've got this review question for one of my exams, and I need some guidance. This is what I have so far for the Haskell code: I...
[ 0.008056640625, 0.01202392578125, 0.0216064453125, -0.00185394287109375, -0.007293701171875, 0.032958984375, -0.0279541015625, 0.0025177001953125, 0.0220947265625, 0.0054931640625, 0.0302734375, 0.00015354156494140625, 0.019287109375, -0.00445556640625, -0.01611328125, 0.00150299072265...
[ 1657, 814, 1916, 1250, 4867, 1528, 47, 20625, 142508, 10, 1556, 502, 1193, 1542, 8347, 9655, 42276, 3871, 196219, 2060, 18151, 2071, 186, 183234, 36917, 20594, 44691 ]
[ 0.047393798828125, 0.113037109375, 0.02239990234375, 0.1490478515625, 0.23486328125, 0.2003173828125, 0.0780029296875, 0.1429443359375, 0.2413330078125, 0.012664794921875, 0.114501953125, 0.0943603515625, 0.0814208984375, 0.0982666015625, 0.13232421875, 0.0103759765625, 0.06170654296...
embed
34044737_c1
34044737
prolog
1
([Head], Temp, Merged), findNeighbours(Cell, Tail, Merged, Neighbours), !. findNeighbours(Cell, [Head|Tail],Temp, Neighbours):- getXY(Cell, Cx, Cy), getXY(Head, Hx, Hy), not(isNeighbour(Cx, Cy, Hx, Hy)), findNeighbours(Cell, Tail, Temp, Neighbours), !. isNeighbour(Cx, Cy, Hx, Hy) :- Cx = Hx, Cy is Hy + 1 ; Cx = Hx, Cy ...
([Head], Temp, Merged), findNeighbours(Cell, Tail, Merged, Neighbours), !. findNeighbours(Cell, [Head|Tail],Temp, Neighbours):- getXY(Cell, Cx, Cy), getXY(Head, Hx, Hy), not(isNeighbour(Cx, Cy, Hx, Hy)), findNeighbours(Cell, Tail, Temp, Neighbours), !. isNeighbour(Cx, Cy, Hx, Hy) :- Cx = Hx, Cy is Hy + 1 ; Cx = Hx, Cy ...
[ 0.00665283203125, 0.03076171875, 0.0244140625, -0.00147247314453125, 0.0079345703125, 0.00128936767578125, -0.00128173828125, -0.00860595703125, 0.0177001953125, -0.0162353515625, -0.005889892578125, 0.0166015625, -0.0147705078125, -0.005218505859375, -0.00457763671875, -0.009948730468...
[ 13025, 712, 37446, 6035, 17704, 7413, 6433, 6958, 38648, 7, 441, 6796, 1218, 379, 799, 711, 9874, 159065, 2046, 143907, 425, 27939, 572, 3905, 959, 164, 83, 313, 2203, 997, 106, 831, 4734, 25813, 38750, 25737, 64, 54969, 34695, 98423, 2...
[ 0.1253662109375, 0.1356201171875, 0.210693359375, 0.1724853515625, 0.130126953125, 0.1746826171875, 0.12890625, 0.200927734375, 0.24755859375, 0.0311126708984375, 0.05084228515625, 0.1649169921875, 0.150634765625, 0.108154296875, 0.0748291015625, 0.034576416015625, 0.10888671875, 0...
embed
23973397_c0
23973397
prolog
0
Title: Prolog Use of Cuts Problem title: Prolog Use of Cuts Tags: prolog-cut, prolog Problem: Prolog Use of Cuts I am re-writing the following function in Prolog: V1: f(X,Y):- X < 2, Y is X+1. f(X,3):- 2 =< X, X < 5. f(X,Y):- 5 =< X, Y is 8-X. As V2: f(X,Y) :- X < 2, Y is X + 1. f(X,Y) :- X >= 2, X < 5, Y is 3. f(X,Y) ...
Prolog Use of Cuts Prolog Use of Cuts prolog-cut prolog Prolog Use Cuts Prolog Use of Cuts I am re-writing the following function in Prolog: V1: As V2: I then wanted to experiment with cuts. For green cuts (V3): For red cuts (V4): However, I don't understand their advantage, as deleting the cuts would allow the same be...
[ 0.0179443359375, -0.00006437301635742188, 0.01495361328125, 0.0076904296875, -0.00390625, 0.00927734375, -0.005615234375, -0.000797271728515625, 0.0048828125, 0.004364013671875, 0.0096435546875, -0.00897216796875, -0.017578125, -0.00872802734375, 0.0279541015625, 0.005859375, -0.0010...
[ 1250, 4867, 36836, 111, 3003, 933, 502, 19774, 456, 199332, 25632, 32354, 310, 82825, 1301, 304, 36663, 28007, 678, 314, 50997, 856, 21320, 4842, 29557, 2301, 18, 28219, 2363, 92940, 24674, 1916, 2806, 63769, 5701, 224833, 18151, 4358 ]
[ 0.1685791015625, 0.22705078125, 0.1131591796875, 0.1033935546875, 0.219482421875, 0.1461181640625, 0.12060546875, 0.202880859375, 0.07452392578125, 0.122314453125, 0.0157470703125, 0.1563720703125, 0.1007080078125, 0.033294677734375, 0.012451171875, 0.0921630859375, 0.048370361328125...
embed
28785391_c0
28785391
prolog
0
Title: How to count all even numbers in a list Problem title: How to count all even numbers in a list Tags: count, prolog Problem: How to count all even numbers in a list Please help me with how to count even numbers in a list in Prolog. I am a beginner, just started learning Prolog yesterday. I know to count the eleme...
How to count all even numbers in a list How to count all even numbers in a list count prolog How How to count all even numbers in a list Please help me with how to count even numbers in a list in Prolog. I am a beginner, just started learning Prolog yesterday. I know to count the elements in the list is And I think def...
[ -0.006622314453125, 0.003021240234375, 0.00174713134765625, -0.004241943359375, 0.01068115234375, 0.019775390625, -0.0026702880859375, 0.0091552734375, 0.00982666015625, -0.05712890625, 0.0029449462890625, -0.0286865234375, 0.0169677734375, 0.01483154296875, 0.0084228515625, 0.00399780...
[ 11249, 47, 54529, 756, 3853, 101935, 23, 10, 5303, 502, 4867, 4358, 3642, 1250, 1679, 52080, 3714, 80854, 83, 13204, 14012, 98893, 18151, 6626, 63920, 25842, 15190, 105416 ]
[ 0.06622314453125, 0.06048583984375, 0.2032470703125, 0.137451171875, 0.22509765625, 0.2152099609375, 0.076416015625, 0.0208282470703125, 0.204345703125, 0.1202392578125, 0.202392578125, 0.047027587890625, 0.03607177734375, 0.134521484375, 0.009521484375, 0.0225830078125, 0.0209655761...
embed
21686925_c0
21686925
prolog
0
Title: prolog rule that takes as input a list of integers and returns “yes” if the list’s elements are all equal, otherwise returns “no” Problem title: prolog rule that takes as input a list of integers and returns “yes” if the list’s elements are all equal, otherwise returns “no” Tags: prolog Problem: prolog rule that...
prolog rule that takes as input a list of integers and returns “yes” if the list’s elements are all equal, otherwise returns “no” prolog rule that takes as input a list of integers and returns “yes” if the list’s elements are all equal, otherwise returns “no” prolog prolog rule that takes as input a list of integers an...
[ 0.0021514892578125, 0.0048828125, 0.0002803802490234375, 0.005340576171875, -0.00885009765625, 0.005096435546875, -0.00689697265625, 0.0101318359375, 0.006805419921875, -0.005523681640625, 0.01318359375, -0.004791259765625, 0.00946044921875, 0.0245361328125, 0.017578125, -0.00153350830...
[ 502, 4867, 79986, 51776, 237, 107730, 5303, 892, 26255, 30646, 63736, 2174, 80854, 756, 105950, 120262, 157, 5154, 765, 10, 106, 3871, 3917, 47, 12765, 55449, 11907, 12830, 28032, 903, 621, 72272, 110, 15490, 17368, 88303, 73, 1653, 2063, ...
[ 0.18017578125, 0.23681640625, 0.1900634765625, 0.06524658203125, 0.075439453125, 0.1744384765625, 0.19970703125, 0.139404296875, 0.081298828125, 0.1580810546875, 0.180419921875, 0.07220458984375, 0.1663818359375, 0.1575927734375, 0.236572265625, 0.0927734375, 0.16943359375, 0.01232...
embed
39188301_c0
39188301
prolog
0
Title: Generate all solutions in prolog Problem title: Generate all solutions in prolog Tags: prolog Problem: Generate all solutions in prolog I'm learning prolog in a course. I've been given a question similar to this one , and I also got the same problem (in which it doesnt produce all solutions), any idea why, will ...
Generate all solutions in prolog Generate all solutions in prolog prolog Generate Generate all solutions in prolog I'm learning prolog in a course. I've been given a question similar to this one , and I also got the same problem (in which it doesnt produce all solutions), any idea why, will using cuts help? thanks in a...
[ 0.0238037109375, -0.00110626220703125, -0.0035552978515625, 0.01220703125, -0.0198974609375, 0.0189208984375, -0.01251220703125, -0.005340576171875, 0.0169677734375, -0.0595703125, -0.01177978515625, 0.004669189453125, 0.00799560546875, 0.00830078125, 0.0269775390625, 0.001197814941406...
[ 155370, 67, 756, 51347, 23, 502, 4867, 52080, 15411, 9655, 2967, 22027, 18, 27489, 6528, 15400, 17368, 314, 933, 4358, 81979, 34475, 139392, 7722, 18389, 41371, 5423, 1295, 2394, 6635, 53201, 892, 2046, 1239, 38132, 154107, 101935, 125157, ...
[ 0.181396484375, 0.1126708984375, 0.19677734375, 0.2437744140625, 0.1007080078125, 0.1546630859375, 0.2314453125, 0.03192138671875, 0.039764404296875, 0.0030517578125, 0.06524658203125, 0.0909423828125, 0.09381103515625, 0.173583984375, 0.00067138671875, 0.041229248046875, 0.004638671...
embed
30575085_c0
30575085
prolog
0
Title: Prolog: Obtain 1st element in &quot;list of lists&quot; Problem title: Prolog: Obtain 1st element in &quot;list of lists&quot; Tags: prolog Problem: Prolog: Obtain 1st element in "list of lists" I have a "list of lists" e.g. [[A,B,C],[A,B],[D,F]]. I now wish to print to the screen the first element of the list, ...
Prolog: Obtain 1st element in &quot;list of lists&quot; Prolog: Obtain 1st element in &quot;list of lists&quot; prolog Prolog Obtain List Top Rest Prolog: Obtain 1st element in "list of lists" I have a "list of lists" e.g. [[A,B,C],[A,B],[D,F]]. I now wish to print to the screen the first element of the list, (i.e. [A,...
[ 0.0098876953125, -0.002166748046875, 0.0123291015625, -0.00025177001953125, -0.023681640625, 0.00457763671875, 0.00946044921875, -0.00531005859375, 0.0050048828125, -0.0301513671875, 0.021484375, -0.00445556640625, -0.0152587890625, -0.002349853515625, -0.00555419921875, -0.0078125, ...
[ 1250, 4867, 3545, 25500, 106, 271, 12830, 6562, 111, 5303, 7, 502, 32036, 4792, 49756, 23, 571, 441, 919, 32599, 47, 28412, 49119, 5117, 27781, 17569, 11675, 678, 3034, 137175, 397, 35782, 99, 77888, 1052, 525, 51, 41274, 29954, 78574, ...
[ 0.1217041015625, 0.2100830078125, 0.0928955078125, 0.10638427734375, 0.1126708984375, 0.149658203125, 0.1884765625, 0.164794921875, 0.080078125, 0.2076416015625, 0.0670166015625, 0.0860595703125, 0.156494140625, 0.1123046875, 0.1595458984375, 0.0264739990234375, 0.060272216796875, ...
embed
70057812_c0
70057812
prolog
0
Title: What is committed-choice logic programming language? Problem title: What is committed-choice logic programming language? Tags: terminology, prolog, programming-languages, logic-programming Problem: What is committed-choice logic programming language? In the logic programming community, I have heard many people t...
What is committed-choice logic programming language? What is committed-choice logic programming language? terminology prolog programming-languages logic-programming What What is committed-choice logic programming language? In the logic programming community, I have heard many people talk about "committed choice logic p...
[ -0.007568359375, 0.0033721923828125, 0.039794921875, 0.020751953125, -0.0150146484375, 0.004608154296875, -0.01031494140625, 0.01043701171875, 0.0091552734375, -0.01129150390625, -0.0086669921875, -0.0021209716796875, -0.00830078125, -0.005126953125, 0.000553131103515625, 0.00805664062...
[ 4865, 83, 174176, 9, 3089, 2980, 62775, 56037, 449, 46876, 18614, 25443, 502, 4867, 196651, 28966, 26908, 49782, 22120, 1672, 277, 4007, 3674, 44126, 34735, 6863, 80934, 23113, 35166, 62548, 133244, 29459, 4717, 1001, 21980, 3408, 39933, 711,...
[ 0.10186767578125, 0.09326171875, 0.240234375, 0.0631103515625, 0.2017822265625, 0.1405029296875, 0.2271728515625, 0.1907958984375, 0.1072998046875, 0.2423095703125, 0.0579833984375, 0.060150146484375, 0.07763671875, 0.193603515625, 0.1531982421875, 0.135986328125, 0.03668212890625, ...
embed
39345292_c0
39345292
prolog
0
Title: Change name of predicate/functor in prolog Problem title: Change name of predicate/functor in prolog Tags: prolog Problem: Change name of predicate/functor in prolog I am writing a module which uses term_expansion/2 to process a prolog source file. While doing so, I deconstruct predicates using =.. or project to...
Change name of predicate/functor in prolog Change name of predicate/functor in prolog prolog Change term_expansion pred_expanded _expanded Change name of predicate/functor in prolog I am writing a module which uses term_expansion/2 to process a prolog source file. While doing so, I deconstruct predicates using =.. or p...
[ 0.00897216796875, 0.0078125, 0.006866455078125, 0.03125, 0.011474609375, 0.00799560546875, 0.01080322265625, 0.00848388671875, 0.0101318359375, -0.019775390625, 0.024658203125, 0.0264892578125, -0.001312255859375, -0.00341796875, 0.000919342041015625, -0.006439208984375, 0.0087890625...
[ 87377, 9351, 111, 1653, 2063, 67, 64, 16498, 18770, 23, 502, 4867, 13579, 83613, 66, 4431, 32562, 88996, 6889, 12477, 9433, 31344, 11435, 8, 2271, 36716, 1636, 17368, 2203, 13452, 47, 7477, 18113, 3444, 15549, 13438, 3584, 31, 1909, 24209...
[ 0.1910400390625, 0.153564453125, 0.04803466796875, 0.2408447265625, 0.2310791015625, 0.0784912109375, 0.038848876953125, 0.1895751953125, 0.1783447265625, 0.019622802734375, 0.176025390625, 0.24365234375, 0.1595458984375, 0.097412109375, 0.1484375, 0.1331787109375, 0.0345458984375, ...
embed
33599450_c0
33599450
prolog
0
Title: Assignment that implements a list in compact form Problem title: Assignment that implements a list in compact form Tags: list, prolog Problem: Assignment that implements a list in compact form I have a question in a course assignment. Consider repetitive lists of the form [a,a,a,b,b,c,a,a,a,a] and their compact ...
Assignment that implements a list in compact form Assignment that implements a list in compact form list prolog Assignment Assignment that implements a list in compact form I have a question in a course assignment. So far, I have come up with the code below: I am not sure if I am doing it right. Could someone please po...
[ 0.006500244140625, 0.0240478515625, 0.01556396484375, 0.019775390625, 0.006622314453125, 0.021728515625, 0.001495361328125, 0.01611328125, 0.00958251953125, -0.006988525390625, 0.0034027099609375, 0.00057220458984375, -0.002685546875, 0.0220947265625, -0.0174560546875, 0.01904296875, ...
[ 1301, 31304, 674, 450, 29479, 5303, 23, 94928, 3173, 502, 4867, 9655, 15411, 95486, 2060, 1257, 678, 70, 18151, 35064, 959, 9077, 20594, 7108, 191147, 22936, 6275, 48225 ]
[ 0.06256103515625, 0.257080078125, 0.10784912109375, 0.03411865234375, 0.2010498046875, 0.221435546875, 0.056549072265625, 0.2415771484375, 0.186767578125, 0.10736083984375, 0.19580078125, 0.089599609375, 0.12249755859375, 0.1800537109375, 0.048126220703125, 0.0787353515625, 0.0508728...
embed
48857052_c0
48857052
prolog
0
Title: Sort a parameter value in ascending orders in Prolog Problem title: Sort a parameter value in ascending orders in Prolog Tags: distance, sorting, prolog Problem: Sort a parameter value in ascending orders in Prolog I have a list of facts that have those parameters: Name, Longitude, Latitude. I want to write a pr...
Sort a parameter value in ascending orders in Prolog Sort a parameter value in ascending orders in Prolog distance sorting prolog Sort Prolog Lat-Long Long Lat Sort a parameter value in ascending orders in Prolog I have a list of facts that have those parameters: Name, Longitude, Latitude. I want to write a predicate t...
[ 0.0118408203125, -0.005401611328125, -0.008056640625, -0.0203857421875, -0.02783203125, -0.0107421875, 0.01055908203125, -0.01214599609375, 0.01239013671875, 0.00091552734375, 0.01165771484375, -0.004974365234375, -0.002197265625, -0.01025390625, 0.006195068359375, -0.02099609375, -0...
[ 53666, 171859, 34292, 23, 82800, 214, 12989, 1250, 4867, 62488, 12096, 502, 75346, 4021, 14407, 5303, 15824, 15757, 21753, 239, 35810, 3444, 33022, 1653, 2063, 67, 4734, 2831, 7, 37842, 15935, 18, 138009, 25647, 36461 ]
[ 0.257080078125, 0.2349853515625, 0.1693115234375, 0.02447509765625, 0.1815185546875, 0.1002197265625, 0.186767578125, 0.1771240234375, 0.253662109375, 0.18603515625, 0.2314453125, 0.12158203125, 0.1744384765625, 0.05029296875, 0.0628662109375, 0.0877685546875, 0.1395263671875, 0.12...
embed
23930118_c0
23930118
prolog
0
Title: Return vowels from word Problem title: Return vowels from word Tags: prolog Problem: Return vowels from word I've got this work to do and my teacher gave me a prolog file with the following facts: vowel(a). vowel(e). vowel(i). vowel(o). vowel(u). consonant(b). consonant(c). consonant(d). consonant(f). consonant(...
Return vowels from word Return vowels from word prolog word Return vowels from word I've got this work to do and my teacher gave me a prolog file with the following facts: And I need to create a rule that is able to return the vowels. How can I do that? The output would be something like this: I can't use any prolog pr...
[ 0.0162353515625, -0.01904296875, 0.007110595703125, 0.0166015625, -0.00191497802734375, 0.0247802734375, -0.000823974609375, 0.005126953125, 0.00994873046875, -0.036376953125, 0.0130615234375, -0.022216796875, -0.00421142578125, -0.0038604736328125, -0.02978515625, 0.010009765625, 0....
[ 173340, 2244, 8420, 7, 1295, 2565, 502, 4867, 4163, 4488, 117914, 26038, 11435, 15824, 3871, 28282, 10, 79986, 19048, 47, 30646, 831, 54, 140992, 18, 4527, 1653, 2063 ]
[ 0.2626953125, 0.2059326171875, 0.2120361328125, 0.054534912109375, 0.1552734375, 0.19921875, 0.1787109375, 0.22705078125, 0.008514404296875, 0.0689697265625, 0.09503173828125, 0.00653076171875, 0.1131591796875, 0.06219482421875, 0.06158447265625, 0.0750732421875, 0.01226806640625, ...
embed
16085513_c0
16085513
prolog
0
Title: Handling all possible results in prolog Problem title: Handling all possible results in prolog Tags: prolog Problem: Handling all possible results in prolog I have a clause is_adjacent([X1,Y1], [X2,Y2]) which is true, when [X2,Y2] is a neighbor of [X1,Y1] . I get all possible results (four) if i ask is_adjacent(...
Handling all possible results in prolog Handling all possible results in prolog prolog Handling is_adjacent Handling all possible results in prolog I have a clause is_adjacent([X1,Y1], [X2,Y2]) which is true, when [X2,Y2] is a neighbor of [X1,Y1] . I get all possible results (four) if i ask is_adjacent([2,2], [X,Y]) , ...
[ 0.00165557861328125, -0.00848388671875, 0.0081787109375, 0.0196533203125, -0.037841796875, -0.0028228759765625, 0.006744384765625, 0.00148773193359375, 0.01220703125, -0.0108642578125, -0.01202392578125, -0.00799560546875, -0.015625, 0.01153564453125, -0.0026397705078125, 0.0078125, ...
[ 193237, 756, 7722, 50339, 502, 4867, 83, 712, 145, 16797, 70731, 13, 1542, 418, 1723, 76172, 304, 90173, 29568, 208244, 111, 2046, 160018, 26458, 4527, 123166, 15700, 4488, 191082, 678, 11907, 16750, 12765, 2174, 11001, 32786, 29458, 5303 ]
[ 0.194091796875, 0.167724609375, 0.2283935546875, 0.2242431640625, 0.1728515625, 0.2325439453125, 0.1265869140625, 0.103271484375, 0.1680908203125, 0.17431640625, 0.134765625, 0.06964111328125, 0.047576904296875, 0.032989501953125, 0.053863525390625, 0.02996826171875, 0.09515380859375...
embed
28257039_c0
28257039
prolog
0
Title: Adding two int variables from a KB [Prolog] Problem title: Adding two int variables from a KB [Prolog] Tags: predicate, prolog Problem: Adding two int variables from a KB [Prolog] am a Prolog newbie and am currently learning logic in computing simultaneously so please excuse my lack of coherence on this topic. I...
Adding two int variables from a KB [Prolog] Adding two int variables from a KB [Prolog] predicate prolog a Adding Prolog Adding two int variables from a KB [Prolog] am a Prolog newbie and am currently learning logic in computing simultaneously so please excuse my lack of coherence on this topic. I am trying to provide ...
[ 0.0081787109375, 0.01092529296875, 0.0052490234375, 0.015625, -0.01318359375, 0.0128173828125, -0.005340576171875, 0.01336669921875, 0.016845703125, -0.0242919921875, 0.0286865234375, -0.0003490447998046875, -0.01422119140625, 0.010498046875, 0.0145263671875, 0.006591796875, 0.015502...
[ 62, 59725, 6626, 23, 18, 77336, 1295, 30742, 10752, 4867, 1653, 2063, 67, 502, 1250, 9014, 52080, 62775, 242122, 134477, 3334, 31577, 22691, 35431, 289, 114864, 38937, 15190, 111, 106, 116, 136, 138, 7413, 10554, 3444, 41, 1294, 5646, 150...
[ 0.1002197265625, 0.1058349609375, 0.1781005859375, 0.0916748046875, 0.125244140625, 0.263427734375, 0.08966064453125, 0.2344970703125, 0.1138916015625, 0.20654296875, 0.135009765625, 0.1641845703125, 0.0076904296875, 0.0872802734375, 0.1278076171875, 0.06280517578125, 0.0048828125, ...
embed
33317590_c0
33317590
prolog
0
Title: SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] Problem title: SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] Tags: clpfd, prolog, list, permutation Problem: SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] I am new to Prolog and I'm trying out list permutation predicate...
SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] clpfd prolog list permutation SICStus Prolog How SICStus Prolog: How to permute the list [0,1,2,3,4,5,6,7,8,9] I am new to Prolog and I'm trying out list permutation predicates. Most of them take ...
[ 0.002655029296875, 0.0167236328125, 0.01385498046875, -0.00762939453125, -0.02490234375, 0.0018463134765625, -0.0286865234375, 0.0040283203125, -0.0062255859375, -0.03271484375, -0.000705718994140625, 0.0027923583984375, -0.00098419189453125, 0.00933837890625, -0.0220947265625, 0.00558...
[ 159, 102198, 2143, 1250, 4867, 11249, 47, 117, 561, 67, 5303, 2389, 133063, 363, 80389, 136555, 145180, 39557, 71, 502, 3525, 31577, 22062, 1653, 2063, 1636, 5646, 6626, 10750, 12477, 16487, 28282, 4734, 51776, 1632, 6562, 7413, 1810, 1556,...
[ 0.113525390625, 0.06158447265625, 0.1798095703125, 0.1707763671875, 0.209716796875, 0.080078125, 0.0157928466796875, 0.1610107421875, 0.21337890625, 0.1083984375, 0.220947265625, 0.07470703125, 0.1112060546875, 0.07843017578125, 0.1917724609375, 0.1485595703125, 0.1981201171875, 0....
embed
66006284_c0
66006284
prolog
0
Title: Dealing with unknown procedure error in SWI-Prolog Problem title: Dealing with unknown procedure error in SWI-Prolog Tags: prolog Problem: Dealing with unknown procedure error in SWI-Prolog I'm attempting to create a simple knowledge base using Swi-Prolog but I'm encountering an 'Unknown Procedure' error when I ...
Dealing with unknown procedure error in SWI-Prolog Dealing with unknown procedure error in SWI-Prolog prolog Dealing SWI-Prolog body_temperature cold_blooded lays_eggs dark_green Dealing with unknown procedure error in SWI-Prolog I'm attempting to create a simple knowledge base using Swi-Prolog but I'm encountering an ...
[ 0.021728515625, 0.011474609375, -0.00124359130859375, 0.00628662109375, -0.01177978515625, 0.01361083984375, 0.0032196044921875, 0.0035552978515625, -0.002655029296875, -0.037841796875, 0.005218505859375, -0.00531005859375, -0.0028533935546875, 0.01446533203125, 0.0341796875, 0.0055236...
[ 90943, 214, 678, 51, 69723, 19, 50491, 18499, 159, 38969, 9, 10752, 4867, 23, 502, 14361, 98334, 91097, 91841, 21, 4778, 2507, 9405, 43334, 99433, 81887, 28282, 8781, 51359, 3647, 105432, 190647, 14256, 170470, 11675, 41, 1294, 26249, 1542,...
[ 0.1278076171875, 0.007171630859375, 0.09259033203125, 0.0733642578125, 0.2305908203125, 0.013092041015625, 0.19384765625, 0.2001953125, 0.0819091796875, 0.231201171875, 0.044342041015625, 0.14404296875, 0.1922607421875, 0.004913330078125, 0.12109375, 0.11572265625, 0.1412353515625, ...
embed
41789942_c0
41789942
prolog
0
Title: How to sort output in Prolog? Problem title: How to sort output in Prolog? Tags: prolog, prolog-toplevel Problem: How to sort output in Prolog? I have the following predicate: soln(L,M,O,R,S,V) :- permutation([L,M,O,R,S,V],[1,2,3,4,5,6]), R=\=S+1, R=\=S-1, M=:=L+1, O>M, O<S. When I call it from the REPL, it prin...
How to sort output in Prolog? How to sort output in Prolog? prolog prolog-toplevel How Prolog S-1 How to sort output in Prolog? I have the following predicate: When I call it from the REPL, it prints out correct answers: However, more useful to me would be output where the variables are sorted according to their value;...
[ 0.002716064453125, -0.0054931640625, 0.0103759765625, -0.00164031982421875, -0.02685546875, -0.00323486328125, -0.007720947265625, -0.0184326171875, 0.01104736328125, -0.0169677734375, -0.00113677978515625, 0.03271484375, 0.00173187255859375, -0.0133056640625, -0.00201416015625, 0.0055...
[ 11249, 47, 12096, 140992, 23, 1250, 4867, 502, 13784, 67919, 159, 5759, 2063, 11782, 9069, 21130, 28412, 26785, 35166, 1286, 80234, 77336, 17497, 59499, 34292, 4527, 27781, 866, 670, 1052, 856, 294, 6397, 1884, 103723, 51684, 26499 ]
[ 0.0921630859375, 0.0487060546875, 0.2420654296875, 0.291259765625, 0.08929443359375, 0.1798095703125, 0.258544921875, 0.09356689453125, 0.0472412109375, 0.145751953125, 0.0211639404296875, 0.0804443359375, 0.02703857421875, 0.06475830078125, 0.03851318359375, 0.1658935546875, 0.09472...
embed
72587241_c0
72587241
prolog
0
Title: How does Prolog optimize multiple calls to the same fact with same arguments Problem title: How does Prolog optimize multiple calls to the same fact with same arguments Tags: prolog Problem: How does Prolog optimize multiple calls to the same fact with same arguments For example if I have this: expensive(X, Y) :...
How does Prolog optimize multiple calls to the same fact with same arguments How does Prolog optimize multiple calls to the same fact with same arguments prolog How Prolog cheap2 How does Prolog optimize multiple calls to the same fact with same arguments For example if I have this: and I call this: This is just hypoth...
[ 0.0244140625, 0.0029296875, 0.00701904296875, 0.0140380859375, -0.00157928466796875, 0.0079345703125, -0.0091552734375, 0.003814697265625, 0.02734375, -0.01409912109375, -0.00811767578125, 0.0191650390625, -0.0016326904296875, -0.021728515625, 0.007293701171875, -0.0035247802734375, ...
[ 11249, 1250, 4867, 15572, 20650, 48716, 11782, 47, 5701, 15824, 10750, 7, 678, 502, 64720, 304, 765, 903, 170933, 27781, 14602, 135587, 11522, 33022, 41, 1294, 186351, 82365, 16750 ]
[ 0.054412841796875, 0.1824951171875, 0.250244140625, 0.16796875, 0.048828125, 0.1805419921875, 0.1849365234375, 0.10693359375, 0.1124267578125, 0.152099609375, 0.1689453125, 0.046478271484375, 0.033599853515625, 0.1239013671875, 0.142333984375, 0.0577392578125, 0.007904052734375, 0....
embed
53602958_c1
53602958
prolog
1
1*((1+1)/2) ? creep Exit: (11) 1 is 1*((1+1)/2) ? creep Call: (11) _2094 is 1+ -1 ? creep Exit: (11) 0 is 1+ -1 ? creep Call: (11) t(0, 2, [1, 3.0|_1804]) ? creep Call: (12) 0>=1 ? creep Fail: (12) 0>=1 ? creep **Fail: (11) t(0, 2, [1, 3.0|_1804]) ? creep** Fail: (10) t(1, 2, [3.0|_1804]) ? creep Fail: (9) t(2, 2, _18...
1*((1+1)/2) ? creep Exit: (11) 1 is 1*((1+1)/2) ? creep Call: (11) _2094 is 1+ -1 ? creep Exit: (11) 0 is 1+ -1 ? creep Call: (11) t(0, 2, [1, 3.0|_1804]) ? creep Call: (12) 0>=1 ? creep Fail: (12) 0>=1 ? creep **Fail: (11) t(0, 2, [1, 3.0|_1804]) ? creep** Fail: (10) t(1, 2, [3.0|_1804]) ? creep Fail: (9) t(2, 2, _18...
[ 0.008544921875, 0.00860595703125, -0.00738525390625, -0.00002181529998779297, 0.0013580322265625, 0.005645751953125, 0.0021514892578125, -0.00286865234375, 0.02294921875, 0.0029144287109375, 0.009033203125, 0.00982666015625, -0.021728515625, -0.003082275390625, 0.0184326171875, 0.02490...
[ 106, 1639, 41600, 21748, 16, 12477, 705, 49512, 254, 5443, 217, 21282, 83, 26265, 1549, 14889, 1328, 68940, 757, 808, 2389, 116, 17596, 1819, 7709, 23676, 33000, 190355, 17647, 17857, 132265, 11438, 112072, 10021, 98320, 5, 140992, 5608, 18...
[ 0.1431884765625, 0.1798095703125, 0.05792236328125, 0.2188720703125, 0.0146331787109375, 0.224609375, 0.031097412109375, 0.2025146484375, 0.152099609375, 0.1356201171875, 0.1273193359375, 0.146484375, 0.0936279296875, 0.206787109375, 0.0687255859375, 0.247802734375, 0.151611328125, ...
embed
61738684_c0
61738684
prolog
0
Title: Load a Prolog database file (.pl) through gprolog (GNU Prolog) Problem title: Load a Prolog database file (.pl) through gprolog (GNU Prolog) Tags: load, prolog, database Problem: Load a Prolog database file (.pl) through gprolog (GNU Prolog) Within the GNU Prolog (Daniel Diaz, http://www.gprolog.org/manual/gprol...
Load a Prolog database file (.pl) through gprolog (GNU Prolog) Load a Prolog database file (.pl) through gprolog (GNU Prolog) load prolog database Load Prolog GNU Load a Prolog database file (.pl) through gprolog (GNU Prolog) Within the GNU Prolog (Daniel Diaz, http://www.gprolog.org/manual/gprolog.html ), how do we op...
[ 0.0189208984375, 0.006744384765625, 0.0035247802734375, 0.01708984375, -0.01300048828125, 0.01019287109375, 0.00848388671875, 0.0017242431640625, 0.01287841796875, -0.0634765625, 0.0022735595703125, 0.01190185546875, -0.01458740234375, -0.00762939453125, -0.01019287109375, -0.012512207...
[ 2091, 712, 1250, 4867, 63399, 11435, 5, 2424, 8305, 706, 3454, 33261, 72367, 502, 165132, 73, 217732, 4512, 169, 177, 7693, 3642, 642, 9803, 6456, 70541, 214, 2053, 15490, 141956, 501, 37281, 527, 10752, 6626, 97370, 9351, 111, 88303, 323...
[ 0.105712890625, 0.05181884765625, 0.20068359375, 0.2467041015625, 0.177490234375, 0.18115234375, 0.046356201171875, 0.2149658203125, 0.0242156982421875, 0.0806884765625, 0.216552734375, 0.154296875, 0.1453857421875, 0.14892578125, 0.1788330078125, 0.0067138671875, 0.03399658203125, ...
embed
15535529_c0
15535529
prolog
0
Title: Prolog Reciprocal Rule Problem title: Prolog Reciprocal Rule Tags: prolog Problem: Prolog Reciprocal Rule I'm sure this is rather basic, though I couldn't find it on here by searching. I'm learning prolog and found an example with rules: (representing adjacency) adj(1, 2). adj(2, 1). adj(1, 3). adj(3, 1). adj(3,...
Prolog Reciprocal Rule Prolog Reciprocal Rule prolog Prolog Reciprocal Rule Prolog Reciprocal Rule I'm sure this is rather basic, though I couldn't find it on here by searching. I'm learning prolog and found an example with rules: (representing adjacency) Now, this struck me as a little wasteful, since we know that adj...
[ 0.003753662109375, 0.0013427734375, 0.0089111328125, 0.0296630859375, 0.00165557861328125, 0.01385498046875, -0.0078125, 0.0172119140625, 0.0150146484375, -0.028076171875, 0.004730224609375, -0.01324462890625, -0.0115966796875, -0.0025634765625, 0.0252685546875, -0.01043701171875, 0....
[ 1250, 4867, 87389, 3454, 6827, 139118, 502, 43257, 62822, 52080, 27781, 91736, 55247, 214, 123594, 329, 27771, 173964, 10176, 509, 67, 7844, 3714, 159826, 76755, 20174, 61924, 4734, 1632, 12638, 80836, 28219, 112892, 28692, 81887, 18, 4488, 1...
[ 0.143798828125, 0.2353515625, 0.1148681640625, 0.161865234375, 0.06427001953125, 0.2193603515625, 0.09893798828125, 0.001068115234375, 0.1016845703125, 0.011871337890625, 0.1435546875, 0.1810302734375, 0.2080078125, 0.0194854736328125, 0.183349609375, 0.1329345703125, 0.100341796875,...
embed