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
66083673_c0
66083673
prolog
0
Title: How to get the not effect in Prolog Problem title: How to get the not effect in Prolog Tags: prolog, transitive-closure Problem: How to get the not effect in Prolog I am trying to create a rule that recursively calls itself, and finds all possible paths to traverse a directed graph. I am using a findall() to do ...
How to get the not effect in Prolog How to get the not effect in Prolog prolog transitive-closure member How Prolog Start End How to get the not effect in Prolog I am trying to create a rule that recursively calls itself, and finds all possible paths to traverse a directed graph. I am using a findall() to do so. The fu...
[ -0.01544189453125, 0.00445556640625, 0.008056640625, 0.0098876953125, -0.0174560546875, 0.000396728515625, 0.00130462646484375, 0.00909423828125, -0.0023956298828125, -0.031982421875, 0.010986328125, 0.01116943359375, 0.005340576171875, 0.006591796875, 0.0208740234375, 0.0089111328125,...
[ 11249, 2046, 70, 959, 21543, 23, 1250, 4867, 502, 62621, 5844, 170224, 32786, 13794, 18878, 28282, 79986, 195625, 11782, 68034, 7413, 7722, 60875, 37317, 8951, 41382, 5584, 32354, 13, 126597, 152378 ]
[ 0.03363037109375, 0.102783203125, 0.044189453125, 0.2393798828125, 0.24755859375, 0.0284423828125, 0.157958984375, 0.255859375, 0.1207275390625, 0.1270751953125, 0.0933837890625, 0.1710205078125, 0.179931640625, 0.1103515625, 0.1473388671875, 0.0225067138671875, 0.1380615234375, 0....
embed
5205346_c0
5205346
prolog
0
Title: Find combinations/sub-lists of Prolog list elements Problem title: Find combinations/sub-lists of Prolog list elements Tags: list, prolog Problem: Find combinations/sub-lists of Prolog list elements I'm trying to write a function that will produce the combinations of list elements formed by removing 1 or 2 eleme...
Find combinations/sub-lists of Prolog list elements Find combinations/sub-lists of Prolog list elements list prolog Find Prolog Find combinations/sub-lists of Prolog list elements I'm trying to write a function that will produce the combinations of list elements formed by removing 1 or 2 elements, including splitting t...
[ -0.01318359375, 0.03515625, 0.0089111328125, 0.0098876953125, -0.01263427734375, 0.03369140625, -0.0211181640625, 0.00167083740234375, 0.01318359375, -0.016845703125, -0.0126953125, 0.002227783203125, 0.0096435546875, 0.0216064453125, -0.00592041015625, 0.0230712890625, 0.02502441406...
[ 26040, 162515, 7, 64, 22144, 6562, 111, 1250, 4867, 5303, 80854, 502, 9, 31577, 33022, 32354, 27489, 100, 49146, 6496, 116, 65450, 1916, 89536, 5809, 24209, 831, 139392, 6626, 25632, 1653, 2063, 50960, 1286, 34844, 114689, 71, 3934, 63920, ...
[ 0.140869140625, 0.2646484375, 0.1136474609375, 0.06158447265625, 0.2171630859375, 0.2342529296875, 0.0323486328125, 0.1712646484375, 0.260986328125, 0.17578125, 0.1729736328125, 0.120849609375, 0.00604248046875, 0.0267486572265625, 0.037872314453125, 0.1055908203125, 0.05795288085937...
embed
39649683_c0
39649683
prolog
0
Title: Why can't my rule solve for X in a simple algebraic equation? Problem title: Why can't my rule solve for X in a simple algebraic equation? Tags: prolog, constraint-programming Problem: Why can't my rule solve for X in a simple algebraic equation? I'm new to Prolog, so please be gentle. This is my rule:...
Why can't my rule solve for X in a simple algebraic equation? Why can't my rule solve for X in a simple algebraic equation? prolog constraint-programming Why instantiation_error Why can't my rule solve for X in a simple algebraic equation? I'm new to Prolog, so please be gentle. This is my rule: Obviously, th...
[ 0.0157470703125, 0.0113525390625, 0.0072021484375, 0.02734375, 0.004638671875, 0.0177001953125, 0.000209808349609375, -0.0133056640625, 0.00421142578125, -0.015869140625, 0.01092529296875, -0.0098876953125, -0.0000782012939453125, 0.0257568359375, 0.0086669921875, -0.00078582763671875,...
[ 44084, 831, 3768, 18, 759, 79986, 86869, 100, 1193, 8781, 429, 2844, 5490, 502, 4867, 2816, 4288, 28966, 34648, 14, 2320, 188800, 23, 144, 1250, 22936, 21507, 26785, 35166, 3688, 83, 116126, 8337, 39563, 26458, 54, 5402, 939, 4488, 104250...
[ 0.1346435546875, 0.1590576171875, 0.049407958984375, 0.143310546875, 0.06646728515625, 0.224853515625, 0.2349853515625, 0.1558837890625, 0.1658935546875, 0.201171875, 0.054595947265625, 0.10986328125, 0.1844482421875, 0.10406494140625, 0.2186279296875, 0.1358642578125, 0.042175292968...
embed
50660348_c0
50660348
prolog
0
Title: How to return a single value for a Prolog "or" operation? Problem title: How to return a single value for a Prolog "or" operation? Tags: prolog Problem: How to return a single value for a Prolog "or" operation? I have the following rules in my code: in(rome, lacio). in(lacio, italy). in(salva...
How to return a single value for a Prolog "or" operation? How to return a single value for a Prolog "or" operation? prolog How Prolog is_in How to return a single value for a Prolog "or" operation? I have the following rules in my code: So if I ask is_in(rome, lacio). it will return true , which is ...
[ 0.0089111328125, -0.00092315673828125, 0.0157470703125, 0.01239013671875, -0.031982421875, 0.01129150390625, -0.0211181640625, -0.01025390625, 0.01416015625, -0.03564453125, 0.03271484375, -0.013427734375, -0.0081787109375, -0.0030364990234375, 0.003326416015625, 0.007049560546875, 0...
[ 11249, 47, 30646, 11001, 34292, 100, 1250, 4867, 41502, 748, 41018, 502, 83, 73, 10, 91736, 18151, 26458, 7761, 21, 3521, 29568, 84751, 75746, 53, 98320, 17932, 13579, 12477, 56282, 6626, 50339, 4734, 3638, 21208, 74, 517, 79786 ]
[ 0.076171875, 0.013641357421875, 0.244873046875, 0.2159423828125, 0.2109375, 0.028228759765625, 0.166259765625, 0.276611328125, 0.04302978515625, 0.252197265625, 0.20703125, 0.1124267578125, 0.1331787109375, 0.1956787109375, 0.005615234375, 0.1109619140625, 0.1256103515625, 0.142089...
embed
69474419_c0
69474419
prolog
0
Title: Pascal's triangle in prolog with recursion and without cuts Problem title: Pascal's triangle in prolog with recursion and without cuts Tags: pascals-triangle, prolog Problem: Pascal's triangle in prolog with recursion and without cuts I am trying to write a program in prolog that returns a list of Pasc...
Pascal's triangle in prolog with recursion and without cuts Pascal's triangle in prolog with recursion and without cuts pascals-triangle prolog Pascal Ant Pascal's triangle in prolog with recursion and without cuts I am trying to write a program in prolog that returns a list of Pascal's triangle. The list con...
[ -0.01226806640625, 0.025146484375, 0.020263671875, 0.003814697265625, 0.007476806640625, -0.00262451171875, -0.01068115234375, 0.0035858154296875, 0.007354736328125, -0.0299072265625, -0.0133056640625, -0.006866455078125, -0.0213623046875, 0.0011138916015625, 0.016845703125, 0.02624511...
[ 167599, 54764, 3768, 1927, 109217, 23, 502, 4867, 678, 195625, 1830, 15490, 314, 452, 6827, 7, 3996, 19897, 933, 31577, 33022, 1528, 30646, 10, 5303, 25, 70541, 756, 80854, 15555, 117414, 38937, 107730, 27781, 1193, 2203, 68252, 116, 106, ...
[ 0.2406005859375, 0.0195465087890625, 0.1209716796875, 0.2196044921875, 0.2464599609375, 0.06072998046875, 0.1627197265625, 0.2186279296875, 0.048187255859375, 0.1981201171875, 0.054840087890625, 0.124755859375, 0.136962890625, 0.0877685546875, 0.154541015625, 0.03533935546875, 0.1870...
embed
42893819_c0
42893819
prolog
0
Title: What is bounds propagation Problem title: What is bounds propagation Tags: prolog, clpfd Problem: What is bounds propagation I am trying to figure out what is bounds propagation in clpfd, but cannot seem to find a good explanation anywhere. I am revising for Prolog and clpfd and came across this question, but lo...
What is bounds propagation What is bounds propagation prolog clpfd What use_module What is bounds propagation I am trying to figure out what is bounds propagation in clpfd, but cannot seem to find a good explanation anywhere. I am revising for Prolog and clpfd and came across this question, but looking at the lecture n...
[ -0.0086669921875, -0.0042724609375, 0.0216064453125, 0.013427734375, -0.003692626953125, 0.020263671875, 0.01806640625, -0.00775146484375, 0.01458740234375, -0.025390625, -0.0108642578125, -0.047119140625, -0.015380859375, 0.01611328125, -0.00127410888671875, 0.017822265625, 0.007659...
[ 4865, 83, 99091, 7, 103807, 2320, 502, 4867, 33139, 39557, 71, 4527, 83279, 13, 2367, 23, 187136, 1250, 59619, 73048, 10422, 73342, 8561, 91084, 442, 11814, 100, 1528, 16442, 190659, 53498 ]
[ 0.0902099609375, 0.0823974609375, 0.2484130859375, 0.136962890625, 0.248046875, 0.06756591796875, 0.105224609375, 0.154052734375, 0.0239715576171875, 0.071533203125, 0.0994873046875, 0.116943359375, 0.148681640625, 0.040435791015625, 0.045379638671875, 0.03448486328125, 0.08508300781...
embed
29049868_c0
29049868
prolog
0
Title: How to make my prolog code to get the shortest path? Problem title: How to make my prolog code to get the shortest path? Tags: prolog, shortest-path Problem: How to make my prolog code to get the shortest path? I wrote several lines of code to calculate the shortest path: :- auto_table. link(a,b,2). link(c,b,1)....
How to make my prolog code to get the shortest path? How to make my prolog code to get the shortest path? prolog shortest-path How auto_table short_path How to make my prolog code to get the shortest path? I wrote several lines of code to calculate the shortest path: The output is like this: How could I only get the sh...
[ 0.02685546875, 0.0115966796875, 0.020263671875, 0.0130615234375, -0.0230712890625, 0.0028839111328125, 0.0218505859375, -0.0216064453125, 0.007720947265625, -0.038330078125, -0.005706787109375, -0.0235595703125, -0.035888671875, 0.00390625, 0, 0.02294921875, 0.0029296875, 0.0169677...
[ 11249, 3249, 502, 4867, 18151, 2046, 16610, 525, 60875, 47, 759, 128405, 1809, 22819, 74481, 140992, 15440, 313 ]
[ 0.044586181640625, 0.05810546875, 0.128662109375, 0.201416015625, 0.1578369140625, 0.041900634765625, 0.189208984375, 0.1455078125, 0.1876220703125, 0.00970458984375, 0.00604248046875, 0.18017578125, 0.152099609375, 0.1761474609375, 0.11572265625, 0.1220703125, 0.105712890625, 0.05...
embed
36561835_c0
36561835
prolog
0
Title: clpfd - generate the list of all integers between 5 and 10 Problem title: clpfd - generate the list of all integers between 5 and 10 Tags: prolog, clpfd Problem: clpfd - generate the list of all integers between 5 and 10 I'm working with SWI-Prolog to get clpfd generate the list of all distinct integers between ...
clpfd - generate the list of all integers between 5 and 10 clpfd - generate the list of all integers between 5 and 10 prolog clpfd Answer q1constraints clpfd - generate the list of all integers between 5 and 10 I'm working with SWI-Prolog to get clpfd generate the list of all distinct integers between 5 and 10: Kind of...
[ -0.003570556640625, 0.005035400390625, 0.00982666015625, 0.005828857421875, 0.002044677734375, 0.0166015625, 0.0045166015625, -0.0020904541015625, 0.0084228515625, -0.046875, 0.0015869140625, -0.011962890625, 0.0177001953125, 0.022705078125, 0.0057373046875, -0.01123046875, 0.0155029...
[ 33139, 39557, 71, 139392, 5303, 111, 756, 892, 26255, 17721, 190, 136, 209, 502, 4867, 130373, 8096, 418, 2271, 2816, 4288, 20, 70, 20697, 159, 38969, 9, 10752, 117781, 27435, 43240, 1284, 29806, 12638, 140909, 757, 106, 153, 305, 10756, ...
[ 0.1221923828125, 0.1849365234375, 0.227783203125, 0.20361328125, 0.1806640625, 0.07666015625, 0.1363525390625, 0.156005859375, 0.14404296875, 0.146484375, 0.1907958984375, 0.0845947265625, 0.2147216796875, 0.0947265625, 0.1829833984375, 0.09564208984375, 0.0848388671875, 0.04309082...
embed
69891895_c0
69891895
prolog
0
Title: I need to find pairs of shows that started in the same year in prolog Problem title: I need to find pairs of shows that started in the same year in prolog Tags: prolog Problem: I need to find pairs of shows that started in the same year in prolog I need to make a rule that finds pairs of these shows that started...
I need to find pairs of shows that started in the same year in prolog I need to find pairs of shows that started in the same year in prolog prolog twin_peaks the_xfiles same_year Year Show Rating I need to find pairs of shows that started in the same year in prolog I need to make a rule that finds pairs of these shows ...
[ -0.01043701171875, 0.01446533203125, 0.0125732421875, 0.01177978515625, -0.00653076171875, 0.0274658203125, -0.0189208984375, -0.007598876953125, -0.0079345703125, 0.0037689208984375, -0.019287109375, 0.000415802001953125, -0.004241943359375, -0.006011962890625, -0.0101318359375, -0.00...
[ 3871, 7413, 80836, 7, 45831, 26859, 23, 5701, 6602, 502, 4867, 138241, 1081, 24251, 70, 425, 29822, 46799, 42552, 17367, 66350, 111, 79986, 6097, 17262, 27781, 145870, 143834, 31089, 76199, 29568, 98320, 35509, 107730, 14858, 8337, 12319, 649...
[ 0.06414794921875, 0.1309814453125, 0.195556640625, 0.051666259765625, 0.19921875, 0.1143798828125, 0.037506103515625, 0.125244140625, 0.1708984375, 0.1483154296875, 0.2010498046875, 0.1640625, 0.1151123046875, 0.0865478515625, 0.02301025390625, 0.05694580078125, 0.2042236328125, 0....
embed
6236795_c0
6236795
prolog
0
Title: Prolog simple predicate , How? Problem title: Prolog simple predicate , How? Tags: prolog Problem: Prolog simple predicate , How? I have a predicate: neig(I, J, I1, J1):- I1 is I - 1, I1 >= 0, J1 is J. neig(I, J, I1, J1):- I1 is I + 1, not(I1 > 8), J1 is J. neig(I, J, I1, J1):- J1 is J - 1, J1 >= 0, I1 is I. nei...
Prolog simple predicate , How? Prolog simple predicate , How? prolog Prolog How all_neighs Prolog simple predicate , How? I have a predicate: How to write predicate all_neighs(I, J, L) where L is as list and it contains all different elements [I1, J1] , such that neigh(I, J, I1, J1) ?
[ 0.0047607421875, -0.0164794921875, -0.01251220703125, 0.01043701171875, -0.000225067138671875, 0.0341796875, 0.00457763671875, 0.013671875, 0.01708984375, -0.036376953125, 0.00439453125, -0.0032196044921875, -0.007110595703125, -0.004730224609375, 0.0017547607421875, 0.0037841796875, ...
[ 1250, 4867, 8781, 1653, 2063, 67, 11249, 502, 756, 454, 86, 6958, 7, 33022, 568, 821, 339, 5303, 70541, 12921, 80854, 418, 76172, 108, 87, 17727 ]
[ 0.1575927734375, 0.2265625, 0.153564453125, 0.1455078125, 0.177001953125, 0.062469482421875, 0.12109375, 0.11279296875, 0.1322021484375, 0.008392333984375, 0.102294921875, 0.1983642578125, 0.06854248046875, 0.11572265625, 0.081298828125, 0.1488037109375, 0.096923828125, 0.118652343...
embed
58832267_c0
58832267
prolog
0
Title: Check if triangle is equilateral in Prolog Problem title: Check if triangle is equilateral in Prolog Tags: geometric-arc, prolog Problem: Check if triangle is equilateral in Prolog I'm learning Prolog and trying to create a program to check if a triangle is equilateral. Here is my code equilateral(point2d(X1,Y1)...
Check if triangle is equilateral in Prolog Check if triangle is equilateral in Prolog geometric-arc prolog Check Prolog point2d X2-X1 Y2-Y1 X3-X2 Y3-Y2 X3-X1 Y3-Y1 Check if triangle is equilateral in Prolog I'm learning Prolog and trying to create a program to check if a triangle is equilateral. Here is my code When I ...
[ 0.01470947265625, -0.015625, 0.01123046875, 0.02294921875, -0.01007080078125, 0.01275634765625, 0.01373291015625, 0.0135498046875, 0.01055908203125, 0.01092529296875, 0.0059814453125, 0.0020751953125, -0.01177978515625, -0.0260009765625, 0.0037841796875, 0.018310546875, 0.0205078125,...
[ 38679, 2174, 1927, 109217, 83, 60715, 141636, 23, 1250, 4867, 84183, 147, 502, 6275, 304, 71, 1193, 18504, 418, 990, 27495, 1723, 52080, 1528, 12765, 18151, 11675, 38496, 155761, 139303, 105801, 363, 1328, 864, 134186, 16750, 98320, 3714, 1...
[ 0.153076171875, 0.087646484375, 0.2364501953125, 0.2548828125, 0.10491943359375, 0.1710205078125, 0.2861328125, 0.07330322265625, 0.190185546875, 0.258544921875, 0.064453125, 0.01904296875, 0.10101318359375, 0.08056640625, 0.041900634765625, 0.06475830078125, 0.0096435546875, 0.065...
embed
68311471_c0
68311471
prolog
0
Title: CLPFD "OR" condition in domain declaration Problem title: CLPFD "OR" condition in domain declaration Tags: clpfd, prolog Problem: CLPFD "OR" condition in domain declaration Is there a way to express OR condition in the following problem without introducing an extra predicate p (this is Projec...
CLPFD "OR" condition in domain declaration CLPFD "OR" condition in domain declaration clpfd prolog CLPFD use_module euler_001 aggregate_all CLPFD "OR" condition in domain declaration Is there a way to express OR condition in the following problem without introducing an extra predicate p (this is Pro...
[ 0.010009765625, 0.0111083984375, 0.010498046875, 0.0135498046875, -0.0179443359375, 0.0038604736328125, -0.01153564453125, 0.004730224609375, -0.005828857421875, -0.05126953125, 0.00677490234375, -0.002593994140625, -0.00140380859375, -0.004547119140625, 0.007110595703125, 0.0127563476...
[ 46323, 41265, 397, 24638, 35431, 77758, 21635, 39557, 71, 502, 4867, 4527, 83279, 1175, 603, 34479, 197564, 5584, 3917, 47, 36510, 33172, 25632, 2967, 15490, 39864, 4173, 1653, 2063, 915, 27331, 5177, 4879, 4263, 3687, 2819, 28032, 5701, 69...
[ 0.07562255859375, 0.103515625, 0.135498046875, 0.25341796875, 0.2286376953125, 0.153076171875, 0.1697998046875, 0.061370849609375, 0.0845947265625, 0.07061767578125, 0.1353759765625, 0.0300140380859375, 0.0936279296875, 0.057098388671875, 0.1680908203125, 0.08447265625, 0.13000488281...
embed
53512096_c0
53512096
prolog
0
Title: Mirror binary tree in Prolog Problem title: Mirror binary tree in Prolog Tags: binary-tree, prolog, recursion Problem: Mirror binary tree in Prolog What I have... tree(nil). tree(b(Left,_,Right)) :- tree(Left), tree(Right). mirror(b(Left,Head,Right), NewTree) :- mirror(Left,NewLeft), mirror(Right,NewRight), NewT...
Mirror binary tree in Prolog Mirror binary tree in Prolog binary-tree prolog recursion Mirror Prolog Left Right Head NewTree NewLeft NewRight Result Mirror binary tree in Prolog What I have... What I'm querying... Expected result The tree b(Left,Right,Head) is the first argument of mirror, NewTree is the goal. mirror(L...
[ 0.044189453125, -0.0076904296875, 0.0166015625, -0.002838134765625, 0.0032501220703125, 0.029296875, -0.0291748046875, -0.015869140625, -0.01220703125, -0.00958251953125, -0.0035552978515625, -0.006103515625, 0.005859375, 0.00872802734375, 0.032958984375, -0.0244140625, 0.01232910156...
[ 150481, 2394, 6635, 53201, 1250, 4867, 62600, 502, 195625, 1830, 2480, 90911, 44816, 2356, 62731, 5267, 1052, 22553, 126684, 23, 765, 1294, 60075, 13, 16750, 876, 13025, 712, 5117, 10750, 191551, 83, 69236, 46568, 90, 8305, 25737, 5609, 111...
[ 0.307373046875, 0.1964111328125, 0.0809326171875, 0.2216796875, 0.1749267578125, 0.2578125, 0.1800537109375, 0.130859375, 0.208984375, 0.006378173828125, 0.1358642578125, 0.1326904296875, 0.168212890625, 0.1199951171875, 0.235107421875, 0.0986328125, 0.04058837890625, 0.08172607421...
embed
59014014_c0
59014014
prolog
0
Title: prolog replacing elements in list Problem title: prolog replacing elements in list Tags: prolog Problem: prolog replacing elements in list I need help with understanding how to work with lists like that [a(b,c),a(x,d)] change(S,K,R) changes first list [a,c,b] with values given in second list [c(a,x),c(b,y)] ?- c...
prolog replacing elements in list prolog replacing elements in list prolog prolog replacing elements in list I need help with understanding how to work with lists like that [a(b,c),a(x,d)] change(S,K,R) changes first list [a,c,b] with values given in second list [c(a,x),c(b,y)] % my program but it works with second lis...
[ -0.00567626953125, 0.0026702880859375, 0.003387451171875, 0.00080108642578125, 0.003082275390625, 0.003143310546875, -0.0213623046875, 0.00970458984375, 0.0086669921875, 0.034423828125, 0.015380859375, 0.0206298828125, -0.0074462890625, -0.001434326171875, 0.022705078125, -0.0005645751...
[ 502, 4867, 456, 133266, 214, 80854, 23, 5303, 3871, 4358, 100094, 3642, 4488, 678, 1884, 11, 275, 238, 425, 71, 15549, 294, 605, 1052, 65572, 5117, 142424, 34475, 17932, 53, 1745, 1528, 43240, 111, 44691, 10644, 472, 8562, 70425, 30646, ...
[ 0.2049560546875, 0.26416015625, 0.1173095703125, 0.1861572265625, 0.06329345703125, 0.1981201171875, 0.0986328125, 0.2166748046875, 0.020294189453125, 0.058837890625, 0.0640869140625, 0.018829345703125, 0.129150390625, 0.1075439453125, 0.041778564453125, 0.06072998046875, 0.054870605...
embed
26503775_c0
26503775
prolog
0
Title: Setof returning list every time, prolog Problem title: Setof returning list every time, prolog Tags: prolog, prolog-setof Problem: Setof returning list every time, prolog I am using a predicate that looks like this: predicate(Country, X):- setof(Length, anotherPredicate(Country,Length), X). My problem here is th...
Setof returning list every time, prolog Setof returning list every time, prolog prolog prolog-setof Setof Country Length Setof returning list every time, prolog I am using a predicate that looks like this: My problem here is that my code returns the list X for every value. What I want is to return a big list containing...
[ 0.018798828125, -0.0037078857421875, 0.00933837890625, 0.00170135498046875, -0.00775146484375, 0.0155029296875, -0.00128173828125, 0.0034637451171875, 0.00994873046875, -0.02880859375, 0.01068115234375, 0.004547119140625, -0.0027008056640625, -0.017333984375, -0.00213623046875, 0.01007...
[ 19943, 4390, 30646, 214, 5303, 11907, 1733, 502, 4867, 3509, 74831, 77554, 927, 17368, 1653, 2063, 33342, 2967, 18151, 1193, 100, 34292, 3444, 6957, 70541, 756, 101935, 35166, 64457, 19336, 442, 98320, 34648 ]
[ 0.1824951171875, 0.263916015625, 0.1959228515625, 0.053985595703125, 0.2064208984375, 0.1448974609375, 0.1939697265625, 0.1173095703125, 0.19384765625, 0.138671875, 0.1595458984375, 0.076171875, 0.010406494140625, 0.0205078125, 0.0309295654296875, 0.0677490234375, 0.031036376953125, ...
embed
47359944_c0
47359944
prolog
0
Title: Extra Outputs when using _ Problem title: Extra Outputs when using _ Tags: prolog Problem: Extra Outputs when using _ I have the following code: pick_even([], []). pick_even([_, H | T], [H | R]) :- pick_even(T, R). pick_even([_, H , _ | T], [H | R]) :- pick_even(T, R). When running the query, ?- pick_even(L,[4,7...
Extra Outputs when using _ Extra Outputs when using _ prolog _ Extra Outputs pick_even _7650 _7662 _7674 _7668 _7680 Extra Outputs when using _ I have the following code: When running the query, ?- pick_even(L,[4,7]). , I want to receive the output: Instead I am receiving some extra outputs that I do not want: How can ...
[ -0.006103515625, 0.026611328125, -0.000579833984375, -0.0255126953125, -0.0240478515625, 0.01611328125, -0.0205078125, 0.0036773681640625, -0.0025482177734375, -0.004150390625, 0.0211181640625, -0.029052734375, 0.0191650390625, 0.024169921875, 0.002227783203125, 0.0032958984375, -0.0...
[ 31501, 13538, 7077, 7, 3229, 17368, 101, 502, 4867, 39580, 26301, 11835, 2525, 178683, 304, 161412, 617, 16028, 4836, 25632, 18151, 51042, 41, 1294, 705, 866, 108368, 3444, 53299, 140992, 175399, 217063, 3060, 4173, 450, 54, 959, 27169, 67,...
[ 0.21875, 0.1968994140625, 0.232421875, 0.07470703125, 0.034271240234375, 0.1341552734375, 0.059661865234375, 0.1402587890625, 0.2076416015625, 0.1953125, 0.182373046875, 0.06622314453125, 0.138671875, 0.104736328125, 0.072021484375, 0.07666015625, 0.07867431640625, 0.1328125, 0.1...
embed
60081594_c0
60081594
prolog
0
Title: Expanding Prolog clauses with forall/2 Problem title: Expanding Prolog clauses with forall/2 Tags: swi-prolog, prolog, metaprogramming Problem: Expanding Prolog clauses with forall/2 I'm using clause/2 to transform some Prolog clauses in a compiler. I need to replace the head of each clause with its body, but cl...
Expanding Prolog clauses with forall/2 Expanding Prolog clauses with forall/2 swi-prolog prolog metaprogramming Expanding Prolog use_module prolog_to_minizinc Clause Expanding Prolog clauses with forall/2 I'm using clause/2 to transform some Prolog clauses in a compiler. I need to replace the head of each clause with i...
[ 0.033203125, 0.028564453125, -0.0057373046875, 0.030517578125, -0.00164794921875, 0.0106201171875, 0.0247802734375, -0.0033111572265625, 0.0115966796875, -0.044921875, -0.00064849853515625, 0.00726318359375, -0.005706787109375, -0.01556396484375, 0.00689697265625, -0.01043701171875, ...
[ 60075, 11, 33770, 1250, 4867, 70731, 678, 100, 5584, 12477, 90, 2452, 3454, 502, 23550, 28966, 4527, 83279, 188, 135438, 238, 100700, 17368, 13, 27198, 9969, 34759, 91995, 10336, 14361, 68018, 71062, 59121, 53397, 571, 47, 1328, 85763, 284,...
[ 0.0673828125, 0.08050537109375, 0.032196044921875, 0.137451171875, 0.2080078125, 0.195068359375, 0.023101806640625, 0.088623046875, 0.18115234375, 0.1953125, 0.0836181640625, 0.1007080078125, 0.07135009765625, 0.096923828125, 0.04473876953125, 0.0762939453125, 0.00091552734375, 0.0...
embed
48859017_c1
48859017
prolog
1
is produced. [trace] ?- crossword(V1,V2,V3,H1,H2,H3). Call: (8) crossword(_5238, _5240, _5242, _5244, _5246, _5248) ? creep Call: (9) word(_5244, _5658, _5660, _5662, _5664, _5666, _5668, _5670) ? creep Exit: (9) word(abalone, a, b, a, l, o, n, e) ? creep Call: (9) word(_5246, _5658, _5660, _5662, _5664, _5666, _5668,...
is produced. [trace] ?- crossword(V1,V2,V3,H1,H2,H3). Call: (8) crossword(_5238, _5240, _5242, _5244, _5246, _5248) ? creep Call: (9) word(_5244, _5658, _5660, _5662, _5664, _5666, _5668, _5670) ? creep Exit: (9) word(abalone, a, b, a, l, o, n, e) ? creep Call: (9) word(_5246, _5658, _5660, _5662, _5664, _5666, _5668,...
[ 0.005279541015625, -0.009765625, 0.00144195556640625, 0.02587890625, -0.00506591796875, 0.0218505859375, -0.01373291015625, 0.0091552734375, -0.0014495849609375, 0.006805419921875, 0.009033203125, 0.016845703125, 0.00140380859375, 0.007171630859375, -0.009033203125, 0.0025482177734375,...
[ 83, 181653, 5, 39989, 13, 268, 705, 9, 41421, 47416, 132, 856, 418, 304, 363, 841, 21320, 26265, 12, 10021, 454, 12744, 10991, 2839, 13023, 12465, 4, 9271, 72208, 49512, 254, 11438, 2565, 13683, 10057, 758, 89709, 186225, 617, 77622, 18...
[ 0.186767578125, 0.29541015625, 0.03631591796875, 0.23779296875, 0.1580810546875, 0.020111083984375, 0.113037109375, 0.09063720703125, 0.21875, 0.267333984375, 0.03106689453125, 0.1617431640625, 0.0709228515625, 0.11328125, 0.1326904296875, 0.066162109375, 0.13916015625, 0.194335937...
embed
16240522_c0
16240522
prolog
0
Title: How to say if an element belongs to a specific b-Tree in Prolog? Problem title: How to say if an element belongs to a specific b-Tree in Prolog? Tags: data-structures, prolog Problem: How to say if an element belongs to a specific b-Tree in Prolog? I have the following program that represent a specific b-tree by...
How to say if an element belongs to a specific b-Tree in Prolog? How to say if an element belongs to a specific b-Tree in Prolog? data-structures prolog How Prolog How to say if an element belongs to a specific b-Tree in Prolog? I have the following program that represent a specific b-tree by the t predicate and provid...
[ 0.013916015625, 0.01708984375, 0.00384521484375, 0.01312255859375, 0.00537109375, 0.02490234375, -0.00885009765625, -0.011962890625, -0.018798828125, -0.032958984375, 0.00921630859375, -0.00225830078125, -0.00067901611328125, -0.00579833984375, -0.0020904541015625, 0.0162353515625, 0...
[ 11249, 47, 5154, 2174, 12830, 10617, 7, 29458, 876, 9, 62731, 13, 23, 1250, 4867, 2053, 137656, 502, 186, 1528, 33636, 62600, 808, 1653, 2063, 87344, 12477, 17378, 1193, 53201, 3714, 71924, 41, 128019, 6626, 26458, 104, 29568, 97, 98320 ]
[ 0.046356201171875, 0.08154296875, 0.161376953125, 0.1358642578125, 0.212890625, 0.163330078125, 0.024322509765625, 0.1759033203125, 0.18603515625, 0.008392333984375, 0.2188720703125, 0.08282470703125, 0.060302734375, 0.1634521484375, 0.228515625, 0.0175323486328125, 0.0572509765625, ...
embed
28520985_c0
28520985
prolog
0
Title: Call predicate again if a statement fails Problem title: Call predicate again if a statement fails Tags: predicate, prolog Problem: Call predicate again if a statement fails I am fairly a beginner new to Prolog. Is it possible for me to continue execution of the predicate if a statement evaluates to true inside?...
Call predicate again if a statement fails Call predicate again if a statement fails predicate prolog Call Ylist Node Some Newnode Call predicate again if a statement fails I am fairly a beginner new to Prolog. Is it possible for me to continue execution of the predicate if a statement evaluates to true inside? Here is ...
[ -0.00311279296875, -0.0093994140625, 0.031005859375, 0.014892578125, 0.0050048828125, 0.013427734375, 0.0272216796875, -0.00830078125, 0.0225830078125, 0.0177001953125, 0.005218505859375, 0.02392578125, -0.0113525390625, -0.021240234375, -0.007415771484375, -0.00433349609375, 0.00680...
[ 26265, 1653, 2063, 67, 13438, 2174, 10, 63805, 35782, 7, 502, 4867, 990, 6562, 438, 112, 2356, 157, 180663, 1679, 1250, 7722, 47, 21342, 71924, 1830, 151575, 90, 29568, 46132, 18151, 237875, 1884, 9319, 3444, 17, 8560, 645, 756, 142424, ...
[ 0.1748046875, 0.1807861328125, 0.194091796875, 0.1376953125, 0.22314453125, 0.1219482421875, 0.03070068359375, 0.2235107421875, 0.2200927734375, 0.110107421875, 0.1112060546875, 0.186767578125, 0.1209716796875, 0.2320556640625, 0.1094970703125, 0.05645751953125, 0.0732421875, 0.146...
embed
8719369_c0
8719369
prolog
0
Title: Prolog - Checking if a binary tree is ordered or not Problem title: Prolog - Checking if a binary tree is ordered or not Tags: visual-prolog, prolog, b-tree Problem: Prolog - Checking if a binary tree is ordered or not I want to write a program in Prolog that confirms if a b-tree of integers is ordered or not. T...
Prolog - Checking if a binary tree is ordered or not Prolog - Checking if a binary tree is ordered or not visual-prolog prolog b-tree Prolog Checking Domains Predicates Clauses Node Node2 Esq Dre Goal Prolog - Checking if a binary tree is ordered or not I want to write a program in Prolog that confirms if a b-tree of i...
[ 0.00970458984375, -0.0006561279296875, 0.004486083984375, -0.004791259765625, 0.0130615234375, 0.03515625, -0.018310546875, -0.0277099609375, -0.002593994140625, -0.006256103515625, 0.00323486328125, -0.01446533203125, -0.0107421875, -0.0228271484375, 0.0172119140625, -0.00128173828125...
[ 1250, 4867, 38679, 214, 2174, 2394, 6635, 53201, 83, 12989, 297, 707, 959, 21176, 3454, 502, 876, 62600, 93702, 7145, 2063, 100700, 438, 112, 304, 864, 64614, 2016, 289, 3444, 33022, 10, 1528, 39563, 9, 892, 26255, 60899, 1295, 164917, ...
[ 0.1552734375, 0.241455078125, 0.1864013671875, 0.06365966796875, 0.08587646484375, 0.1737060546875, 0.125, 0.2379150390625, 0.038543701171875, 0.2393798828125, 0.1162109375, 0.0501708984375, 0.1201171875, 0.168701171875, 0.0870361328125, 0.095703125, 0.1541748046875, 0.254150390625...
embed
67568087_c0
67568087
prolog
0
Title: Method that counts the number of occurs in one list in Prolog Problem title: Method that counts the number of occurs in one list in Prolog Tags: prolog Problem: Method that counts the number of occurs in one list in Prolog I have to write a method that can count the number of occurrences of one list from another...
Method that counts the number of occurs in one list in Prolog Method that counts the number of occurs in one list in Prolog prolog Method Prolog Method that counts the number of occurs in one list in Prolog I have to write a method that can count the number of occurrences of one list from another list given. For exampl...
[ 0.00494384765625, -0.000400543212890625, 0.00787353515625, 0.044921875, 0.01348876953125, 0.01373291015625, -0.01904296875, 0.0002918243408203125, 0.0047607421875, -0.03369140625, -0.011962890625, -0.006378173828125, 0.004730224609375, 0.023681640625, 0.0076904296875, -0.01202392578125...
[ 74644, 54529, 14012, 111, 74918, 7, 23, 1632, 5303, 1250, 4867, 502, 450, 33022, 55300, 831, 42, 69098, 1295, 15700, 34475, 18151, 5201, 2967, 69101, 5117, 1733, 17932, 277, 2500, 2320, 201505, 3917, 7964, 77336, 4343, 11782, 7103 ]
[ 0.203125, 0.184326171875, 0.13427734375, 0.0966796875, 0.22998046875, 0.10888671875, 0.09307861328125, 0.1207275390625, 0.20458984375, 0.156982421875, 0.23095703125, 0.1094970703125, 0.00836181640625, 0.0298004150390625, 0.1593017578125, 0.018035888671875, 0.1339111328125, 0.100280...
embed
13393856_c0
13393856
prolog
0
Title: Removing duplicate solutions Problem title: Removing duplicate solutions Tags: list, prolog-cut, prolog Problem: Removing duplicate solutions My code merges two lists of lists, item by item, in the following way: mergeL([[a,b],[c,d]], [[1,2],[3,4]], Result). Result = [[a,b,1,2],[c,d,3,4]] And this is the code i ...
Removing duplicate solutions Removing duplicate solutions list prolog-cut prolog Removing Result List Rest Rest2 Res2 Removing duplicate solutions My code merges two lists of lists, item by item, in the following way: And this is the code i use: This seems to work but if i call it with two lists of the same size i get ...
[ -0.0008697509765625, 0.0294189453125, 0.0223388671875, -0.01373291015625, 0.000039577484130859375, -0.01092529296875, -0.0206298828125, 0.0023193359375, 0.024169921875, -0.0211181640625, -0.0115966796875, 0.01953125, 0.01165771484375, 0.01556396484375, 0.01141357421875, 0.030029296875,...
[ 853, 432, 6496, 171763, 67, 51347, 5303, 502, 4867, 19774, 126684, 32036, 49756, 304, 9624, 18151, 42564, 6626, 111, 35735, 390, 4527, 37202, 4488, 1284, 11782, 678, 5701, 13267, 17262, 119140, 50339, 89536, 70541, 4734, 1632, 12830, 46622, ...
[ 0.0223541259765625, 0.1224365234375, 0.074462890625, 0.2362060546875, 0.16357421875, 0.222900390625, 0.1810302734375, 0.0721435546875, 0.1546630859375, 0.10107421875, 0.1319580078125, 0.1533203125, 0.0999755859375, 0.08245849609375, 0.06378173828125, 0.1112060546875, 0.18017578125, ...
embed
64992841_c0
64992841
prolog
0
Title: Prolog - list contains 2x element X Problem title: Prolog - list contains 2x element X Tags: prolog, list Problem: Prolog - list contains 2x element X Let's assume we have alphabet {x,y} and I want to create a function, which returns true or false, whether the input list contains 2x symbol x after each other. Fo...
Prolog - list contains 2x element X Prolog - list contains 2x element X prolog list Prolog Prolog - list contains 2x element X Let's assume we have alphabet {x,y} and I want to create a function, which returns true or false, whether the input list contains 2x symbol x after each other. For example two([x,x,y]). returns...
[ 0.01190185546875, 0.01287841796875, 0.0050048828125, 0.01214599609375, 0.006134033203125, 0.04345703125, -0.000457763671875, 0.01129150390625, 0.005767822265625, 0.004425048828125, 0.042236328125, -0.0030364990234375, -0.006591796875, 0.0017852783203125, 0.0076904296875, 0.025146484375...
[ 1250, 4867, 5303, 70541, 116, 425, 12830, 1193, 502, 41591, 229231, 53, 3444, 28282, 32354, 30646, 29568, 707, 98320, 36766, 107730, 26582, 1022, 7103, 12638, 3789, 6626, 2060, 171859, 159, 83324, 2685, 3542, 21771, 757, 18, 4488, 237, 1791...
[ 0.1622314453125, 0.2142333984375, 0.188720703125, 0.1417236328125, 0.1820068359375, 0.18017578125, 0.1907958984375, 0.152099609375, 0.146240234375, 0.0196685791015625, 0.184326171875, 0.057525634765625, 0.0296630859375, 0.1060791015625, 0.169921875, 0.1114501953125, 0.166015625, 0....
embed
30372045_c0
30372045
prolog
0
Title: Combinations with repetition in prolog that satisfy certain criteria Problem title: Combinations with repetition in prolog that satisfy certain criteria Tags: prolog, list, combinatorics, combinations Problem: Combinations with repetition in prolog that satisfy certain criteria I'm trying to make a prolog progra...
Combinations with repetition in prolog that satisfy certain criteria Combinations with repetition in prolog that satisfy certain criteria prolog list combinatorics combinations Combinations rep_combinations Sum Solutions Combinations with repetition in prolog that satisfy certain criteria I'm trying to make a prolog pr...
[ -0.035400390625, 0.00579833984375, 0.01171875, 0.0213623046875, -0.010009765625, 0.0235595703125, -0.0191650390625, 0.01470947265625, 0.022216796875, -0.0111083984375, -0.0189208984375, -0.002410888671875, 0.0184326171875, 0.0030670166015625, 0.01409912109375, 0.004913330078125, 0.03...
[ 106935, 19, 21094, 678, 57346, 1363, 502, 4867, 40407, 24233, 55738, 23, 5303, 22321, 3826, 162515, 10958, 277, 19155, 36335, 109339, 31577, 1528, 139392, 756, 653, 80854, 347, 10554, 17721, 6626, 14012, 62, 136, 335, 145755, 117, 14311, 65...
[ 0.2015380859375, 0.15283203125, 0.0682373046875, 0.06463623046875, 0.293701171875, 0.07843017578125, 0.1500244140625, 0.220703125, 0.1058349609375, 0.050445556640625, 0.105712890625, 0.0148773193359375, 0.1123046875, 0.1697998046875, 0.051971435546875, 0.2091064453125, 0.215698242187...
embed
16125652_c0
16125652
prolog
0
Title: Basic Prolog - Arbitrary amount of atoms (new to Prolog) Problem title: Basic Prolog - Arbitrary amount of atoms (new to Prolog) Tags: prolog Problem: Basic Prolog - Arbitrary amount of atoms (new to Prolog) palindrome_list_atomes(A,B):- atom_concat(A,B,C), atom_chars(C,X), palindrome_list(X). I want to make it ...
Basic Prolog - Arbitrary amount of atoms (new to Prolog) Basic Prolog - Arbitrary amount of atoms (new to Prolog) prolog Basic Prolog Arbitrary palindrome_list_atomes atom_concat atom_chars palindrome_list atom_charts Basic Prolog - Arbitrary amount of atoms (new to Prolog) I want to make it so palindrome_list_atomes(A...
[ 0.01123046875, -0.01177978515625, -0.01177978515625, 0.0250244140625, -0.01300048828125, 0.039306640625, 0.0032806396484375, 0.012451171875, 0.0025787353515625, -0.04150390625, 0.0167236328125, -0.033935546875, 0.021484375, 0.00159454345703125, 0.0078125, -0.010498046875, 0.009155273...
[ 91692, 1250, 4867, 242522, 1294, 41170, 34627, 7, 54936, 502, 17923, 19, 102851, 6562, 2832, 3716, 2271, 4460, 9254, 3444, 3249, 221, 571, 1221, 40494, 2499, 69728, 1660, 136, 335, 15190, 35845, 14012, 25842, 28282, 10, 313, 96760, 5303, ...
[ 0.137451171875, 0.1292724609375, 0.20703125, 0.1690673828125, 0.09130859375, 0.125, 0.210693359375, 0.015838623046875, 0.0419921875, 0.059417724609375, 0.0885009765625, 0.030059814453125, 0.1824951171875, 0.184814453125, 0.129638671875, 0.12548828125, 0.10009765625, 0.231201171875,...
embed
72492139_c0
72492139
prolog
0
Title: What is causing an infinite recursion? (Prolog) Problem title: What is causing an infinite recursion? (Prolog) Tags: recursion, prolog Problem: What is causing an infinite recursion? (Prolog) I'm trying to approach a problem in which given M and N integers, returns in res a list with the powers of M that are les...
What is causing an infinite recursion? (Prolog) What is causing an infinite recursion? (Prolog) recursion prolog What Prolog Yminus1 res1 What is causing an infinite recursion? (Prolog) I'm trying to approach a problem in which given M and N integers, returns in res a list with the powers of M that are less than or equ...
[ 0.006195068359375, -0.00848388671875, 0.01434326171875, 0.01409912109375, 0.00396728515625, -0.00133514404296875, -0.019775390625, -0.0029449462890625, 0.0133056640625, -0.042724609375, 0.024169921875, 0.00494384765625, -0.014404296875, 0.0025482177734375, 0.029296875, 0.0220947265625,...
[ 4865, 83, 216806, 142, 54241, 13, 195625, 1830, 10752, 4867, 502, 1250, 60103, 44297, 418, 3332, 31577, 51515, 2967, 34475, 276, 136, 541, 892, 26255, 30646, 23, 5303, 14537, 40715, 105950, 60887, 12989, 27781, 125157, 2109, 2203, 1126, 363...
[ 0.0919189453125, 0.076171875, 0.19775390625, 0.08197021484375, 0.16455078125, 0.10009765625, 0.238525390625, 0.1903076171875, 0.06689453125, 0.1944580078125, 0.101806640625, 0.141357421875, 0.121826171875, 0.2249755859375, 0.0794677734375, 0.1480712890625, 0.0240936279296875, 0.081...
embed
41496348_c0
41496348
prolog
0
Title: Equivalent of nvalue/2 from SICStus in SWIProlog Problem title: Equivalent of nvalue/2 from SICStus in SWIProlog Tags: sicstus-prolog, prolog, swi-prolog, clpfd Problem: Equivalent of nvalue/2 from SICStus in SWIProlog The SICStus manual for the CLP(FD) library says: nvalue(?N, +Variables) where Variables is a l...
Equivalent of nvalue/2 from SICStus in SWIProlog Equivalent of nvalue/2 from SICStus in SWIProlog sicstus-prolog prolog swi-prolog clpfd SICStus Equivalent SWIProlog Variables Equivalent of nvalue/2 from SICStus in SWIProlog The SICStus manual for the CLP(FD) library says: This is particularly useful when one wants to ...
[ -0.017333984375, -0.01507568359375, 0.016357421875, -0.000392913818359375, 0.0034637451171875, 0.0107421875, 0.00946044921875, -0.0027008056640625, 0.0130615234375, -0.0308837890625, -0.015869140625, 0.0028839111328125, 0.0196533203125, -0.00494384765625, 0.00122833251953125, 0.0057678...
[ 145666, 85540, 653, 27494, 12477, 1295, 159, 102198, 2143, 38969, 10752, 4867, 26536, 18253, 3454, 502, 2452, 39557, 111477, 13566, 23009, 37352, 98553, 35773, 80234, 86171, 881, 77651, 14012, 117781, 142424, 29806, 31577, 15917, 41884, 97920, ...
[ 0.09075927734375, 0.1866455078125, 0.047393798828125, 0.2227783203125, 0.2213134765625, 0.012542724609375, 0.100830078125, 0.1070556640625, 0.23388671875, 0.22412109375, 0.1552734375, 0.1895751953125, 0.0477294921875, 0.1650390625, 0.094482421875, 0.07061767578125, 0.155029296875, ...
embed
51849551_c0
51849551
prolog
0
Title: Prolog: insert data structures into list using DCG Problem title: Prolog: insert data structures into list using DCG Tags: prolog, dcg Problem: Prolog: insert data structures into list using DCG This question contains some examples from this webpage I created a data structures date(Year,Month,Day) in Prolog: mak...
Prolog: insert data structures into list using DCG Prolog: insert data structures into list using DCG prolog dcg DCG Prolog make_date get_year get_month get_day set_year set_month set_day Prolog: insert data structures into list using DCG This question contains some examples from this webpage I created a data structure...
[ 0.0267333984375, -0.0218505859375, 0.01141357421875, 0.0341796875, 0.005523681640625, 0.0279541015625, -0.0260009765625, -0.00482177734375, 0.00592041015625, -0.0283203125, -0.02197265625, -0.0157470703125, -0.000537872314453125, -0.029296875, -0.0024261474609375, 0.00701904296875, -...
[ 1250, 4867, 183540, 2053, 45646, 3934, 5303, 17368, 391, 56367, 502, 104, 238, 177, 3249, 17489, 2046, 46799, 15477, 5636, 5423, 27781, 75935, 5622, 69085, 147, 146794, 97141, 425, 17203, 82761, 3034, 139392, 11249, 831, 4527, 91736, 4343, ...
[ 0.1348876953125, 0.2213134765625, 0.1622314453125, 0.10400390625, 0.198974609375, 0.07257080078125, 0.1865234375, 0.0251922607421875, 0.1097412109375, 0.21044921875, 0.0926513671875, 0.01458740234375, 0.001556396484375, 0.02215576171875, 0.023834228515625, 0.1080322265625, 0.08789062...
embed
53182865_c0
53182865
prolog
0
Title: Determining last stop of underground line Problem title: Determining last stop of underground line Tags: prolog Problem: Determining last stop of underground line Modelling the stops of an underground tube line like so: stop(line1, 1, a). stop(line1, 2, b). stop(line1, 3, d). stop(line1, 4, e). I'm trying to def...
Determining last stop of underground line Determining last stop of underground line prolog Determining line1 Determining last stop of underground line Modelling the stops of an underground tube line like so: I'm trying to define last(L, S) that is true if the station S is the last station in the line L . So last(line1,...
[ -0.0106201171875, 0.010498046875, 0.01153564453125, 0.000286102294921875, -0.0311279296875, 0.00127410888671875, 0.0120849609375, -0.01177978515625, -0.00445556640625, -0.01361083984375, 0.0108642578125, 0.01031494140625, -0.0009002685546875, -0.0040283203125, 0.01904296875, 0.01660156...
[ 262, 30524, 4568, 7279, 111, 1379, 64330, 13315, 214, 502, 4867, 418, 49475, 7, 43333, 31577, 61924, 866, 159, 29568, 29398, 339, 2256, 28, 104, 56112, 18, 37842, 541, 1328, 19111, 21748, 30646, 11907, 1957, 15400, 83, 32316, 1556, 110, ...
[ 0.057373046875, 0.1380615234375, 0.209716796875, 0.21728515625, 0.0221099853515625, 0.1468505859375, 0.1390380859375, 0.1552734375, 0.0054931640625, 0.08489990234375, 0.160888671875, 0.0149688720703125, 0.1524658203125, 0.049102783203125, 0.1710205078125, 0.00640869140625, 0.12231445...
embed
33838288_c0
33838288
prolog
0
Title: Prolog Choose 3 From List Problem title: Prolog Choose 3 From List Tags: list, prolog Problem: Prolog Choose 3 From List I have create a prolog program which given a Number a List and Sublist will generate sublists containing N items in each. I am told this can be done with 1 fact and 2 rules. I am given the hin...
Prolog Choose 3 From List Prolog Choose 3 From List list prolog Prolog Choose List Less1 N-1 Prolog Choose 3 From List I have create a prolog program which given a Number a List and Sublist will generate sublists containing N items in each. I am told this can be done with 1 fact and 2 rules. I am given the hint that I ...
[ -0.0045166015625, -0.007354736328125, 0.000881195068359375, -0.0084228515625, -0.015625, 0.0040283203125, -0.0267333984375, 0.0242919921875, 0.0191650390625, 0.004241943359375, 0.00390625, -0.0269775390625, 0.00081634521484375, 0.0040283203125, 0.006134033203125, 0.01361083984375, 0....
[ 1250, 4867, 211525, 138, 28090, 32036, 5303, 502, 1734, 418, 541, 5759, 28282, 1528, 34475, 103332, 136, 8273, 6562, 139392, 1614, 70541, 55769, 12638, 30745, 831, 16940, 678, 106, 15824, 116, 91736, 5122, 19667, 5117, 35735, 707, 13319, 55...
[ 0.164306640625, 0.2333984375, 0.20849609375, 0.2376708984375, 0.1536865234375, 0.237548828125, 0.1806640625, 0.1416015625, 0.1512451171875, 0.05224609375, 0.1180419921875, 0.1273193359375, 0.06695556640625, 0.160888671875, 0.03948974609375, 0.1419677734375, 0.0175933837890625, 0.15...
embed
19186369_c0
19186369
prolog
0
Title: Prolog - writing successive numbers_ Problem title: Prolog - writing successive numbers_ Tags: math, prolog, towers-of-hanoi Problem: Prolog - writing successive numbers_ My task is this: Make this hanoi program write a successive number before it writes each sentence. The hanoi program is this: hanoi(N):-move(N...
Prolog - writing successive numbers_ Prolog - writing successive numbers_ math prolog towers-of-hanoi Prolog numbers_ N-1 MOVING DISK Prolog - writing successive numbers_ My task is this: Make this hanoi program write a successive number before it writes each sentence. The hanoi program is this: And I want the output t...
[ -0.0042724609375, 0.00823974609375, -0.0211181640625, 0.022216796875, 0.015869140625, 0.02294921875, -0.015625, 0.0301513671875, 0.0062255859375, -0.02880859375, 0.000804901123046875, 0.004547119140625, -0.0230712890625, 0.0018310546875, 0.01416015625, 0.00057220458984375, 0.00219726...
[ 1250, 4867, 20, 32562, 208479, 101935, 454, 48909, 502, 47, 42844, 4390, 1121, 5380, 541, 5759, 276, 31719, 23186, 62562, 605, 2646, 66211, 83, 903, 26176, 777, 1528, 33022, 10, 14012, 8108, 12638, 149357, 5, 3444, 70, 140992, 6713, 1884 ...
[ 0.189697265625, 0.272705078125, 0.03076171875, 0.1905517578125, 0.23876953125, 0.1878662109375, 0.005771636962890625, 0.120849609375, 0.142333984375, 0.09918212890625, 0.1348876953125, 0.11053466796875, 0.12200927734375, 0.184814453125, 0.09210205078125, 0.12481689453125, 0.066711425...
embed
22020694_c0
22020694
prolog
0
Title: strange arithmetic with swi-prolog Problem title: strange arithmetic with swi-prolog Tags: floating-accuracy, prolog, iso-prolog, floating-point Problem: strange arithmetic with swi-prolog I find the result very strange. Why not 0.3? Can somebody tell me why this result? Is it possible to fix this. ?- X is 5.3-5...
strange arithmetic with swi-prolog strange arithmetic with swi-prolog floating-accuracy prolog iso-prolog floating-point ERROR Type strange arithmetic with swi-prolog I find the result very strange. Why not 0.3? Can somebody tell me why this result? Is it possible to fix this. My second question is how would I transfor...
[ 0.0023193359375, -0.004913330078125, 0.00096893310546875, -0.01422119140625, -0.0115966796875, -0.00994873046875, -0.0035552978515625, 0.0142822265625, 0.01708984375, 0.005859375, -0.004150390625, 0.01385498046875, -0.004791259765625, 0.01495361328125, 0.00775146484375, -0.018432617187...
[ 114453, 187, 8962, 282, 9523, 678, 91, 2452, 9, 3454, 4867, 21917, 26518, 2263, 27315, 502, 13882, 38496, 151206, 24638, 60457, 7413, 16750, 4552, 44084, 959, 127089, 176256, 14192, 15400, 7722, 30022, 17932, 9655, 3642, 2806, 27198, 1295, ...
[ 0.2174072265625, 0.05181884765625, 0.17919921875, 0.1156005859375, 0.0728759765625, 0.12060546875, 0.0941162109375, 0.23583984375, 0.0269622802734375, 0.14208984375, 0.2265625, 0.12841796875, 0.0699462890625, 0.024658203125, 0.15380859375, 0.127685546875, 0.1278076171875, 0.1217041...
embed
61614020_c0
61614020
prolog
0
Title: Use a rule if a fact doesn't exist in prolog? Problem title: Use a rule if a fact doesn't exist in prolog? Tags: prolog Problem: Use a rule if a fact doesn't exist in prolog? I'm new to prolog. The idea of my project is to say "The room X is free if none is a guest of X, while X is taken if a family li...
Use a rule if a fact doesn't exist in prolog? Use a rule if a fact doesn't exist in prolog? prolog Use FamilySurname RoomTaken NOT EXIST Use a rule if a fact doesn't exist in prolog? I'm new to prolog. The idea of my project is to say "The room X is free if none is a guest of X, while X is taken if a family l...
[ 0.01385498046875, 0.0240478515625, 0.0101318359375, 0.00946044921875, -0.0142822265625, 0.0220947265625, 0.0037384033203125, 0.021240234375, 0.019775390625, -0.01708984375, -0.00115203857421875, -0.00811767578125, 0.002960205078125, -0.001922607421875, -0.006561279296875, 0.00314331054...
[ 36836, 10, 79986, 2174, 15824, 22027, 3768, 18, 32316, 502, 4867, 23, 59745, 84041, 11627, 38484, 51654, 33, 86725, 29426, 35602, 3525, 6528, 13452, 5154, 17155, 1193, 83, 4092, 351, 121399, 12960, 39958, 14449, 60742, 4527, 1653, 2063, 67,...
[ 0.120361328125, 0.04656982421875, 0.2200927734375, 0.131103515625, 0.2164306640625, 0.114013671875, 0.059112548828125, 0.1212158203125, 0.2340087890625, 0.1656494140625, 0.2373046875, 0.0233917236328125, 0.087158203125, 0.08331298828125, 0.127197265625, 0.1646728515625, 0.16186523437...
embed
71980378_c1
71980378
prolog
1
, 0], [0, 2, 1, 1], [1, 0, 0, 1]] ; Where the rule is that is returns every possible move left for a player provided (in this case 2) I was thinking of using select/4 to find every result possible for each list in the list of lists, then join it. But i'm failing to "condense" results and my second iteration of findall ...
, 0], [0, 2, 1, 1], [1, 0, 0, 1]] ; Where the rule is that is returns every possible move left for a player provided (in this case 2) I was thinking of using select/4 to find every result possible for each list in the list of lists, then join it. But i'm failing to "condense" results and my second iteration of findall ...
[ -0.0081787109375, 0.0115966796875, 0.01043701171875, 0.01708984375, -0.0184326171875, 0.0025634765625, -0.0107421875, 0.0159912109375, 0.0205078125, -0.0216064453125, -0.0220947265625, 0.002716064453125, 0.0108642578125, 0.00179290771484375, -0.0238037109375, -0.006805419921875, 0.01...
[ 757, 2389, 116, 106, 79986, 83, 30646, 11907, 7722, 25813, 25737, 58585, 62952, 4958, 47644, 17368, 36849, 17357, 7413, 16750, 12638, 5303, 33284, 35782, 118435, 50339, 17932, 720, 5584, 139392, 432, 272, 142581, 6159, 93232, 6236, 12647, 586...
[ 0.076416015625, 0.053466796875, 0.010528564453125, 0.019073486328125, 0.148681640625, 0.0419921875, 0.1634521484375, 0.1021728515625, 0.16943359375, 0.1900634765625, 0.1513671875, 0.145263671875, 0.10595703125, 0.0816650390625, 0.068115234375, 0.025421142578125, 0.127685546875, 0.1...
embed
60624995_c0
60624995
prolog
0
Title: Prolog check if a or b exists in facts Problem title: Prolog check if a or b exists in facts Tags: prolog Problem: Prolog check if a or b exists in facts I want to write a rule that allows me to check whether a movie or an actor exists in the given facts. Example facts starsin(ice_age,compton__doug). starsin(hul...
Prolog check if a or b exists in facts Prolog check if a or b exists in facts prolog Prolog ice_age compton__doug wryn__rhiannon_leigh turman__john mcnatt__adam turman_john Movie Actor Prolog check if a or b exists in facts I want to write a rule that allows me to check whether a movie or an actor exists in the given f...
[ 0.0133056640625, 0.006256103515625, 0.02197265625, 0.03662109375, -0.004180908203125, 0.0166015625, 0.006927490234375, 0.01251220703125, -0.00799560546875, -0.025634765625, 0.00958251953125, -0.00775146484375, 0.00372314453125, -0.004669189453125, -0.00421142578125, -0.003753662109375,...
[ 1250, 4867, 12765, 2174, 10, 707, 876, 32316, 7, 23, 15824, 502, 2980, 4588, 9969, 1507, 14005, 246, 9387, 148, 44413, 42, 979, 11071, 19, 178080, 2130, 669, 66159, 97844, 91701, 10348, 185617, 3444, 33022, 79986, 114864, 47, 36766, 14277...
[ 0.2039794921875, 0.283203125, 0.2430419921875, 0.16552734375, 0.130859375, 0.15380859375, 0.1917724609375, 0.238525390625, 0.1177978515625, 0.144287109375, 0.2244873046875, 0.1693115234375, 0.19873046875, 0.1900634765625, 0.1212158203125, 0.2080078125, 0.011260986328125, 0.07037353...
embed
74072459_c0
74072459
prolog
0
Title: Defining facts within prolog rules Problem title: Defining facts within prolog rules Tags: prolog Problem: Defining facts within prolog rules I am trying to translate the following statement into prolog: "For all X, if X has a child who has a sister then X has two children." I have defined the following rule: ha...
Defining facts within prolog rules Defining facts within prolog rules prolog Defining has_two_children Reachable Defining facts within prolog rules I am trying to translate the following statement into prolog: "For all X, if X has a child who has a sister then X has two children." I have defined the following rule: whe...
[ 0.030517578125, -0.0032196044921875, 0.0020751953125, 0.01324462890625, 0.0027618408203125, 0.00421142578125, 0.004058837890625, 0.005584716796875, 0.004730224609375, -0.044677734375, 0.00860595703125, 0.000797271728515625, -0.0294189453125, 0.0184326171875, 0.0120849609375, 0.02062988...
[ 88606, 449, 15824, 7, 28032, 502, 4867, 91736, 1556, 55547, 237052, 934, 2886, 3900, 19309, 63805, 3934, 18537, 756, 1193, 2174, 10, 29041, 114015, 6626, 20020, 61924, 79986, 49129, 41911, 84797, 959, 2069, 41206, 98320, 110, 60892, 23, 507...
[ 0.17626953125, 0.029296875, 0.1729736328125, 0.022308349609375, 0.13916015625, 0.1231689453125, 0.197021484375, 0.1689453125, 0.1341552734375, 0.2027587890625, 0.236572265625, 0.117919921875, 0.116455078125, 0.0716552734375, 0.109130859375, 0.057220458984375, 0.067138671875, 0.0061...
embed
23587514_c0
23587514
prolog
0
Title: Append difference zero to list in Prolog Problem title: Append difference zero to list in Prolog Tags: prolog Problem: Append difference zero to list in Prolog I need to take the difference of length of NUM1 and ANS and Num2 & ANS and append zero equal to the difference of length to both NUM1 and NUM2 . I have t...
Append difference zero to list in Prolog Append difference zero to list in Prolog prolog right Append Prolog NUM1 ANS Num2 Arguments Carry Digits NUM OUT Append difference zero to list in Prolog I need to take the difference of length of NUM1 and ANS and Num2 & ANS and append zero equal to the difference of length to b...
[ 0.0040283203125, -0.004608154296875, 0.0103759765625, 0.0201416015625, -0.007080078125, 0.0189208984375, 0.004150390625, 0.0194091796875, 0.0213623046875, 0.01214599609375, -0.0031280517578125, -0.010986328125, -0.01361083984375, 0.0203857421875, 0.004547119140625, -0.021240234375, 0...
[ 5659, 3611, 60212, 45234, 47, 5303, 23, 1250, 4867, 502, 7108, 109020, 418, 48789, 52782, 304, 112140, 3980, 1294, 51174, 52001, 3871, 5646, 70, 140909, 619, 114689, 71, 105950, 63134, 5 ]
[ 0.144287109375, 0.07794189453125, 0.2452392578125, 0.27490234375, 0.0833740234375, 0.2030029296875, 0.046600341796875, 0.166259765625, 0.25341796875, 0.1278076171875, 0.07269287109375, 0.176513671875, 0.072265625, 0.1600341796875, 0.1373291015625, 0.1444091796875, 0.2044677734375, ...
embed
35732881_c1
35732881
prolog
1
{ PlEngine.Initialize(param); PlQuery carrega = new PlQuery("carrega('OT.bd')"); carrega.NextSolution(); PlQuery listQuery= new PlQuery("list(X)"); foreach (PlQueryVariables v in listQuery.SolutionVariables) listBox1.Items.Add(v["X"].ToString()); } catch (System.Exception ex) { Console.WriteLine("Failure: " + ex.Messa...
{ PlEngine.Initialize(param); PlQuery carrega = new PlQuery("carrega('OT.bd')"); carrega.NextSolution(); PlQuery listQuery= new PlQuery("list(X)"); foreach (PlQueryVariables v in listQuery.SolutionVariables) listBox1.Items.Add(v["X"].ToString()); } catch (System.Exception ex) { Console.WriteLine("Failure: " + ex.Messa...
[ 0.00823974609375, 0.03173828125, 0.003326416015625, 0.0126953125, -0.00421142578125, 0.01214599609375, 0.01251220703125, -0.021728515625, 0.01177978515625, -0.041748046875, 0.0194091796875, -0.0255126953125, -0.004974365234375, -0.019287109375, -0.006195068359375, -0.0084228515625, 0...
[ 10666, 29016, 91384, 1212, 4153, 40705, 119066, 6276, 39, 3142, 41732, 1294, 93485, 2203, 3525, 70094, 208, 23973, 5, 34145, 81280, 102588, 34, 1363, 5303, 6562, 1542, 100, 41581, 141, 81827, 14, 19736, 81, 72295, 418, 2982, 4028, 334, 77...
[ 0.0164947509765625, 0.2127685546875, 0.24072265625, 0.2056884765625, 0.0804443359375, 0.1673583984375, 0.099853515625, 0.0894775390625, 0.058563232421875, 0.002899169921875, 0.212646484375, 0.078125, 0.2208251953125, 0.0140380859375, 0.041534423828125, 0.123046875, 0.146484375, 0.1...
embed
25981197_c0
25981197
prolog
0
Title: Element to search in binary tree in Prolog Problem title: Element to search in binary tree in Prolog Tags: prolog Problem: Element to search in binary tree in Prolog I'm very new to Prolog, and trying to find an element to search in binary tree, it finds it successfully but the problem is if it doesn't it still ...
Element to search in binary tree in Prolog Element to search in binary tree in Prolog prolog Element Prolog traverse3 Element to search in binary tree in Prolog I'm very new to Prolog, and trying to find an element to search in binary tree, it finds it successfully but the problem is if it doesn't it still gives yes, I...
[ -0.000583648681640625, 0.0172119140625, 0.00433349609375, 0.00122833251953125, -0.00933837890625, 0.0260009765625, -0.0015869140625, -0.005523681640625, -0.003692626953125, -0.0361328125, -0.01324462890625, -0.0189208984375, -0.0130615234375, 0.006744384765625, 0.020751953125, -0.01019...
[ 48325, 47, 33938, 23, 2394, 6635, 53201, 1250, 4867, 502, 37317, 13, 363, 31577, 7413, 12830, 65771, 2967, 2174, 22027, 18, 7464, 76199, 72272, 3444, 5154, 110, 707, 959, 14037, 18151 ]
[ 0.21435546875, 0.0467529296875, 0.203125, 0.068359375, 0.1566162109375, 0.124267578125, 0.223876953125, 0.1605224609375, 0.215087890625, 0.1068115234375, 0.1448974609375, 0.04962158203125, 0.1116943359375, 0.003204345703125, 0.07940673828125, 0.1826171875, 0.062744140625, 0.0291748...
embed
16329221_c0
16329221
prolog
0
Title: Accumulating atoms into a list without recursion Prolog Problem title: Accumulating atoms into a list without recursion Prolog Tags: prolog Problem: Accumulating atoms into a list without recursion Prolog I'm trying to write a Prolog program that takes user input and makes decisions based on the semantics of the...
Accumulating atoms into a list without recursion Prolog Accumulating atoms into a list without recursion Prolog prolog Accumulating Prolog Accumulating atoms into a list without recursion Prolog I'm trying to write a Prolog program that takes user input and makes decisions based on the semantics of the input (basically...
[ 0.00872802734375, 0.007568359375, -0.0078125, 0.0390625, -0.00872802734375, 0.0242919921875, -0.01275634765625, 0.0179443359375, -0.00958251953125, -0.042724609375, 0.0242919921875, -0.0155029296875, 0.001495361328125, -0.0017852783203125, 0.0152587890625, 0.021484375, 0.004272460937...
[ 29899, 34, 19908, 1916, 34627, 7, 3934, 5303, 15490, 195625, 1250, 4867, 502, 31577, 33022, 1528, 51776, 38937, 107730, 30482, 115299, 35509, 484, 109109, 3245, 9190, 7311, 17569, 62775, 77848, 12765, 26548, 48716, 5423, 34153, 101934, 14449, ...
[ 0.0643310546875, 0.1248779296875, 0.15576171875, 0.027587890625, 0.230712890625, 0.08758544921875, 0.1290283203125, 0.1893310546875, 0.1116943359375, 0.16796875, 0.1517333984375, 0.2366943359375, 0.08306884765625, 0.0280609130859375, 0.07232666015625, 0.098388671875, 0.02449035644531...
embed
4092962_c0
4092962
prolog
0
Title: Pattern matching equivalent variables in Haskell, like in Prolog Problem title: Pattern matching equivalent variables in Haskell, like in Prolog Tags: haskell, unification, syntax, pattern-matching, prolog Problem: Pattern matching equivalent variables in Haskell, like in Prolog In prolog, we can do something li...
Pattern matching equivalent variables in Haskell, like in Prolog Pattern matching equivalent variables in Haskell, like in Prolog haskell unification syntax pattern-matching prolog Pattern Haskell Prolog a:xs Pattern matching equivalent variables in Haskell, like in Prolog In prolog, we can do something like the follow...
[ 0.0067138671875, 0.022216796875, 0.003387451171875, -0.01611328125, -0.016357421875, -0.016845703125, -0.0057373046875, 0.0035552978515625, 0.03271484375, -0.026611328125, 0.02001953125, 0.00909423828125, 0.026123046875, -0.0113525390625, -0.00738525390625, -0.01513671875, 0.01306152...
[ 9876, 22766, 14858, 214, 183234, 77336, 20625, 142508, 1884, 1250, 4867, 23, 1556, 51, 41274, 6002, 103510, 98753, 502, 10, 425, 106, 271, 10750, 759, 97249, 10763, 5701, 5117, 35735, 5303, 116, 2208, 903, 32354, 1221, 151575, 47, 163846, ...
[ 0.1749267578125, 0.1461181640625, 0.2257080078125, 0.070556640625, 0.167724609375, 0.19287109375, 0.13330078125, 0.2322998046875, 0.047088623046875, 0.1300048828125, 0.21435546875, 0.0258636474609375, 0.10260009765625, 0.0853271484375, 0.07293701171875, 0.041717529296875, 0.187988281...
embed
27294900_c0
27294900
prolog
0
Title: DCG for file output Problem title: DCG for file output Tags: dcg, format, prolog Problem: DCG for file output If I have a program like this and I want the last item for a person not to have a comma following it, how do I do this? Is it best to use a DCG? How would that work? male(bob). male(dave). male(fred). ma...
DCG for file output DCG for file output dcg format prolog DCG Person Item DCG for file output If I have a program like this and I want the last item for a person not to have a comma following it, how do I do this? Is it best to use a DCG? How would that work? The out put is:
[ 0.01434326171875, -0.00830078125, 0.00494384765625, 0.0157470703125, -0.00909423828125, 0.0224609375, -0.0006561279296875, -0.006317138671875, 0.01165771484375, 0.00933837890625, 0.00003600120544433594, -0.0228271484375, 0.0020599365234375, 0.0126953125, 0.004486083984375, -0.005676269...
[ 391, 56367, 100, 11435, 140992, 104, 238, 177, 9384, 502, 4867, 15270, 78426, 1528, 1884, 903, 3444, 4568, 35735, 3445, 959, 47, 765, 10, 96117, 25632, 442, 3642, 54, 2965, 4527, 4488, 1810, 3884, 83 ]
[ 0.1329345703125, 0.261962890625, 0.0953369140625, 0.1827392578125, 0.2132568359375, 0.042205810546875, 0.050384521484375, 0.126708984375, 0.1446533203125, 0.0941162109375, 0.1602783203125, 0.1304931640625, 0.193359375, 0.1644287109375, 0.0445556640625, 0.0205535888671875, 0.140380859...
embed
75340655_c0
75340655
prolog
0
Title: Is there a way to execute piped shell command in GnuProlog? Problem title: Is there a way to execute piped shell command in GnuProlog? Tags: prolog, shell, pipe, gnu-prolog Problem: Is there a way to execute piped shell command in GnuProlog? Im trying to execute this piped command: powershell.exe Get-ChildItem |...
Is there a way to execute piped shell command in GnuProlog? Is there a way to execute piped shell command in GnuProlog? prolog shell pipe gnu-prolog GnuProlog powershell.exe Get-ChildItem Where-Object _.Name prolog.pl:1 Is there a way to execute piped shell command in GnuProlog? Im trying to execute this piped command:...
[ 0.0004405975341796875, 0.00531005859375, -0.0185546875, 0.0281982421875, -0.0145263671875, -0.000583648681640625, -0.0263671875, -0.0203857421875, -0.0091552734375, -0.031982421875, 0.005523681640625, 0.057861328125, -0.00121307373046875, -0.00194549560546875, 0.005126953125, 0.0183105...
[ 2071, 2685, 3917, 71924, 13, 137158, 71, 128019, 75101, 23, 527, 539, 10752, 4867, 10, 47, 502, 104155, 3454, 14537, 46480, 20779, 102656, 2982, 78662, 46471, 75161, 2424, 19721, 31577, 903, 1653, 2063, 959, 8060, 2147, 10366, 140992, 15700...
[ 0.012176513671875, 0.023773193359375, 0.09564208984375, 0.198486328125, 0.058380126953125, 0.260986328125, 0.1636962890625, 0.242919921875, 0.231201171875, 0.05023193359375, 0.0989990234375, 0.204345703125, 0.1624755859375, 0.2010498046875, 0.0194549560546875, 0.005157470703125, 0.13...
embed
65647331_c0
65647331
prolog
0
Title: Some problems with reading file Problem title: Some problems with reading file Tags: prolog Problem: Some problems with reading file I used some prolog codes for reading file numbers to list, reading is working, i cannot use list that contains readed numbers. my_representation(Codes, Result) :- atom_codes(Result...
Some problems with reading file Some problems with reading file prolog Some my_representation Codes Result atom_codes stream_representations Input read_line_to_codes Line end_of_file FinalLine FurtherLines Some problems with reading file I used some prolog codes for reading file numbers to list, reading is working, i c...
[ 0.0079345703125, -0.01190185546875, 0.01544189453125, -0.00408935546875, -0.0022125244140625, 0.0016021728515625, 0.01007080078125, -0.00042724609375, 0.0057373046875, -0.03369140625, 0.00299072265625, -0.0196533203125, -0.01275634765625, 0.017578125, 0.0159912109375, -0.01434326171875...
[ 31384, 44402, 678, 16454, 11435, 502, 4867, 759, 205913, 28864, 126684, 34627, 40899, 75973, 12301, 2256, 188, 16777, 3564, 4390, 29822, 27188, 93232, 11814, 3060, 18151, 101935, 47, 5303, 20697, 17, 53418, 4527, 70541, 297 ]
[ 0.03387451171875, 0.1446533203125, 0.033233642578125, 0.224365234375, 0.168212890625, 0.15625, 0.20263671875, 0.0997314453125, 0.1705322265625, 0.1387939453125, 0.0810546875, 0.1405029296875, 0.1549072265625, 0.09912109375, 0.15283203125, 0.0858154296875, 0.092529296875, 0.08166503...
embed
29329990_c1
29329990
prolog
1
an infinite loop and never ends since it's checking a lot of states with uninstantiated (but different) variables. How could I solve this? Or should I try another approximation? I thought about defining a preset of "positions" but I'm not sure how to check all the different positions when executing the rules. The rule...
an infinite loop and never ends since it's checking a lot of states with uninstantiated (but different) variables. How could I solve this? Or should I try another approximation? I thought about defining a preset of "positions" but I'm not sure how to check all the different positions when executing the rules. The rule...
[ -0.0019683837890625, -0.0020904541015625, -0.000820159912109375, 0.0263671875, 0.0034332275390625, 0.0106201171875, -0.0014190673828125, -0.0028533935546875, -0.000431060791015625, -0.027099609375, 0.021728515625, 0.0260009765625, 0.000743865966796875, -0.01043701171875, 0.00234985351562...
[ 54241, 13, 40956, 8306, 3564, 7, 175199, 5915, 117249, 143034, 14, 27686, 8789, 12921, 77336, 86869, 903, 53950, 17569, 13204, 26242, 18, 40322, 9077, 12765, 756, 19069, 71924, 91736, 1884, 148665, 525, 1138, 2389, 304, 62, 241, 181037, 42,...
[ 0.1556396484375, 0.078125, 0.2252197265625, 0.10638427734375, 0.1260986328125, 0.028350830078125, 0.1636962890625, 0.05133056640625, 0.1334228515625, 0.035980224609375, 0.0155792236328125, 0.004852294921875, 0.00177001953125, 0.125, 0.1572265625, 0.1337890625, 0.030792236328125, 0....
embed
59504482_c0
59504482
prolog
0
Title: Avoiding the same answer multiple times in prolog Problem title: Avoiding the same answer multiple times in prolog Tags: prolog Problem: Avoiding the same answer multiple times in prolog So I have this undirected graph to traverse, and I should find all the verticies those are connected to a given vertex. edge(a...
Avoiding the same answer multiple times in prolog Avoiding the same answer multiple times in prolog prolog Avoiding Avoiding the same answer multiple times in prolog So I have this undirected graph to traverse, and I should find all the verticies those are connected to a given vertex. And once I type connected(a, X). i...
[ -0.01055908203125, 0.01104736328125, 0.01123046875, 0.00077056884765625, -0.01251220703125, -0.016357421875, -0.01416015625, 0.0208740234375, 0.00750732421875, -0.06787109375, -0.0020751953125, -0.0128173828125, 0.00021648406982421875, 0.0159912109375, -0.007568359375, 0.03466796875, ...
[ 84361, 86675, 5701, 35166, 48716, 20028, 502, 4867, 765, 903, 51, 80581, 297, 41382, 47, 37317, 13, 5608, 7413, 756, 95378, 58732, 162711, 34475, 493, 24371, 24145, 10644, 11, 1193, 60899, 3934, 54241, 40956, 28219, 15400, 442, 6528, 71864,...
[ 0.1630859375, 0.0689697265625, 0.109375, 0.1568603515625, 0.171142578125, 0.1546630859375, 0.1495361328125, 0.2310791015625, 0.026641845703125, 0.005859375, 0.0369873046875, 0.1429443359375, 0.005462646484375, 0.1734619140625, 0.05145263671875, 0.116943359375, 0.0259857177734375, 0...
embed
22097093_c0
22097093
prolog
0
Title: Prolog depth-first search? Problem title: Prolog depth-first search? Tags: prolog Problem: Prolog depth-first search? I wrote the following Prolog code for depth first search: dfs(OPEN,CLOSE,END):- OPEN=[],!,fail ; OPEN=[X|_],X=END,!,true ; getChildren(X,[],ChL),CLOSE2=[X|CLOSE],add(ChL,OPEN,CLOSE2,OPENF), dfs(O...
Prolog depth-first search? Prolog depth-first search? prolog Prolog OPEN CLOSE END ChL CLOSE2 OPENF ChLF ChL2 OPEN2 Prolog depth-first search? I wrote the following Prolog code for depth first search: However, I get the following error:
[ 0.03515625, 0.0177001953125, 0.0079345703125, -0.0012969970703125, -0.0113525390625, -0.01025390625, -0.01483154296875, -0.0035247802734375, 0.016357421875, -0.033447265625, 0.01953125, -0.00823974609375, 0.0017852783203125, 0.00830078125, 0.0255126953125, -0.0172119140625, 0.0023651...
[ 1250, 4867, 168867, 13448, 271, 33938, 32, 502, 180, 65441, 92933, 39015, 3751, 866, 304, 919, 58545, 54397, 25632, 18151, 5117, 18499 ]
[ 0.180908203125, 0.272705078125, 0.25048828125, 0.158935546875, 0.1263427734375, 0.236572265625, 0.015106201171875, 0.1151123046875, 0.0323486328125, 0.1304931640625, 0.0902099609375, 0.08612060546875, 0.05645751953125, 0.091552734375, 0.1431884765625, 0.10638427734375, 0.164184570312...
embed
6075379_c0
6075379
prolog
0
Title: Max Occurrences in a List Problem title: Max Occurrences in a List Tags: prolog, prolog-setof Problem: Max Occurrences in a List I'm trying to write a Prolog function that given a list returns the element(s) that repeats most times in that list, like: ['a', 'a', 'b', 'c', 'b'] should return ['a', 'b'] ['c', 'a',...
Max Occurrences in a List Max Occurrences in a List prolog prolog-setof Max Occurrences List Out _Max Max Occurrences in a List I'm trying to write a Prolog function that given a list returns the element(s) that repeats most times in that list, like: ['a', 'a', 'b', 'c', 'b'] should return ['a', 'b'] ['c', 'a', 'a', 'c...
[ 0.0252685546875, -0.006011962890625, 0.0283203125, 0.01507568359375, 0.00701904296875, 0.0084228515625, -0.00946044921875, -0.000606536865234375, 0.01251220703125, -0.0277099609375, 0.00002682209014892578, -0.0006561279296875, 0.00933837890625, 0.00009822845458984375, 0.0177001953125, ...
[ 9920, 180, 238, 64240, 69098, 23, 10, 32036, 502, 4867, 3509, 4390, 13538, 71346, 31577, 33022, 1250, 32354, 34475, 5303, 30646, 12830, 450, 119140, 2684, 20028, 275, 5608, 15700, 54529, 14012, 9844, 32316, 71013, 6562, 959, 20949, 151107, ...
[ 0.236328125, 0.1767578125, 0.171630859375, 0.25732421875, 0.10589599609375, 0.10791015625, 0.042236328125, 0.2244873046875, 0.13525390625, 0.1956787109375, 0.09307861328125, 0.010406494140625, 0.11328125, 0.208984375, 0.07196044921875, 0.081298828125, 0.1466064453125, 0.19104003906...
embed
65762980_c0
65762980
prolog
0
Title: Precompute arbitrary Winning Strategy in Prolog Problem title: Precompute arbitrary Winning Strategy in Prolog Tags: search, game-engine, prolog Problem: Precompute arbitrary Winning Strategy in Prolog Lets say we have the Tic-Tac-Toe game at hand. And we want to precompute a winning strategy in the following wa...
Precompute arbitrary Winning Strategy in Prolog Precompute arbitrary Winning Strategy in Prolog search game-engine prolog Precompute Winning Strategy Prolog Precompute arbitrary Winning Strategy in Prolog Lets say we have the Tic-Tac-Toe game at hand. And we want to precompute a winning strategy in the following way as...
[ 0.01129150390625, 0.021240234375, 0.0181884765625, 0.020263671875, 0.0086669921875, 0.010498046875, 0.0032196044921875, -0.0017852783203125, 0.006011962890625, -0.048583984375, -0.006011962890625, 0.01904296875, 0.01287841796875, 0.017333984375, -0.0003032684326171875, -0.0009841918945...
[ 1914, 58875, 6743, 61799, 1294, 17686, 592, 7832, 67, 3432, 23, 1250, 4867, 33938, 6712, 128897, 502, 133552, 9, 618, 2263, 7763, 13, 3444, 118562, 65970, 69986, 113857, 25632, 3917, 237, 53201, 25813, 4734, 1632, 36849, 4343, 5941, 5078, ...
[ 0.150634765625, 0.2005615234375, 0.1209716796875, 0.1666259765625, 0.049774169921875, 0.1580810546875, 0.08428955078125, 0.1478271484375, 0.136962890625, 0.06048583984375, 0.050048828125, 0.1602783203125, 0.242919921875, 0.0936279296875, 0.0794677734375, 0.08465576171875, 0.074401855...
embed
70142122_c0
70142122
prolog
0
Title: How to write Predicate to find X in list and make second list =X+first list Problem title: How to write Predicate to find X in list and make second list =X+first list Tags: prolog Problem: How to write Predicate to find X in list and make second list =X+first list I need some clarification on this: insertion( X,...
How to write Predicate to find X in list and make second list =X+first list How to write Predicate to find X in list and make second list =X+first list prolog How Predicate Head Tail How to write Predicate to find X in list and make second list =X+first list I need some clarification on this: insertion( X, L1, L2 ) is ...
[ -0.0205078125, 0.00982666015625, 0.00640869140625, 0.017578125, -0.01434326171875, 0.02734375, -0.007232666015625, -0.0068359375, 0.004241943359375, -0.0001392364501953125, 0.024169921875, 0.01324462890625, -0.007232666015625, -0.0166015625, 0.007171630859375, 0.0169677734375, 0.0069...
[ 11249, 33022, 7145, 2063, 67, 47, 7413, 1193, 23, 5303, 3249, 17932, 1542, 1328, 13448, 136, 271, 502, 4867, 44816, 1218, 379, 2203, 17306, 41274, 241860, 339, 418, 304, 1653, 29568, 74918, 105950, 959, 129335, 50218, 7722, 201505, 4034, ...
[ 0.0439453125, 0.1707763671875, 0.203125, 0.241455078125, 0.12109375, 0.0256195068359375, 0.166015625, 0.19189453125, 0.090576171875, 0.1995849609375, 0.0689697265625, 0.1524658203125, 0.1363525390625, 0.149169921875, 0.0771484375, 0.012420654296875, 0.001678466796875, 0.09790039062...
embed
27984250_c0
27984250
prolog
0
Title: Prolog family relation how can i implement has child from one woman? Problem title: Prolog family relation how can i implement has child from one woman? Tags: prolog Problem: Prolog family relation how can i implement has child from one woman? In a data I have basic facts with gender(_name,_gender) and parent(_p...
Prolog family relation how can i implement has child from one woman? Prolog family relation how can i implement has child from one woman? prolog one Prolog _name _gender _parent _child has_child_from_one_woman _person _mom _other_mom _mother _father Prolog family relation how can i implement has child from one woman? I...
[ 0.01171875, 0.0086669921875, 0.0115966796875, -0.00091552734375, -0.0208740234375, 0.0009918212890625, 0.000659942626953125, 0.00089263916015625, 0.00274658203125, -0.04443359375, -0.01171875, -0.029296875, -0.01177978515625, 0.01239013671875, 0.00445556640625, -0.00933837890625, -0....
[ 1250, 4867, 14449, 41911, 3642, 831, 17, 29479, 1556, 29041, 1295, 1632, 46667, 502, 11627, 23200, 99547, 206, 38472, 161063, 3630, 3613, 669, 30816, 78986, 126340, 432, 1021, 2053, 62822, 15824, 127501, 49129, 91736, 79986, 9844, 1884, 903, ...
[ 0.17724609375, 0.2626953125, 0.171142578125, 0.19091796875, 0.068603515625, 0.09161376953125, 0.05908203125, 0.251220703125, 0.1884765625, 0.2548828125, 0.1837158203125, 0.1422119140625, 0.212158203125, 0.1400146484375, 0.0565185546875, 0.0810546875, 0.1917724609375, 0.105346679687...
embed
48723078_c0
48723078
prolog
0
Title: Prolog - confused about return results of recursive rule Problem title: Prolog - confused about return results of recursive rule Tags: prolog Problem: Prolog - confused about return results of recursive rule I'm playing around with recursion in Prolog, and I'm confused. I am trying to write rules that can determ...
Prolog - confused about return results of recursive rule Prolog - confused about return results of recursive rule prolog Prolog N-1 Prolog - confused about return results of recursive rule I'm playing around with recursion in Prolog, and I'm confused. I am trying to write rules that can determine if a number is even or...
[ 0.009521484375, 0.0185546875, -0.0015411376953125, 0.01092529296875, 0.002960205078125, 0.01708984375, 0.006622314453125, 0.00823974609375, 0.01019287109375, -0.0238037109375, 0.0022125244140625, -0.031982421875, -0.01251220703125, 0.01153564453125, 0.0322265625, 0.007293701171875, 0...
[ 1250, 4867, 55681, 5281, 30646, 50339, 195625, 5844, 79986, 502, 541, 5759, 111, 75169, 10932, 1830, 23, 31577, 33022, 91736, 83324, 2174, 14012, 3853, 707, 70270, 177261, 5465, 118664, 20697, 29806, 60892, 15400, 5665, 22027, 18, 4488, 41, ...
[ 0.1634521484375, 0.24755859375, 0.1123046875, 0.09429931640625, 0.2244873046875, 0.191162109375, 0.2357177734375, 0.1552734375, 0.1893310546875, 0.1165771484375, 0.034759521484375, 0.0916748046875, 0.01715087890625, 0.04339599609375, 0.013916015625, 0.09527587890625, 0.00421142578125...
embed
10013062_c0
10013062
prolog
0
Title: Getting Result from a Prolog Query in C# using SWI-Prolog C# Problem title: Getting Result from a Prolog Query in C# using SWI-Prolog C# Tags: prolog, c%23, swi-prolog Problem: Getting Result from a Prolog Query in C# using SWI-Prolog C# I am writing a GUI for a prolog file using C# using SWI-Prolog, however I d...
Getting Result from a Prolog Query in C# using SWI-Prolog C# Getting Result from a Prolog Query in C# using SWI-Prolog C# prolog c%23 swi-prolog a SWI-Prolog Getting Result Prolog Query PlQuery direct_evening_flight Getting Result from a Prolog Query in C# using SWI-Prolog C# I am writing a GUI for a prolog file using ...
[ 0.0235595703125, 0.016357421875, 0.01214599609375, 0.0252685546875, -0.00848388671875, 0.003814697265625, 0.0062255859375, -0.00537109375, 0.00628662109375, -0.043701171875, 0.0033111572265625, -0.00384521484375, -0.0294189453125, -0.0166015625, -0.007537841796875, 0.0147705078125, -...
[ 210732, 126684, 1295, 1250, 4867, 58836, 53, 23, 313, 4904, 17368, 159, 38969, 9, 10752, 502, 3742, 2452, 3454, 29016, 41732, 8951, 3134, 592, 420, 20016, 32562, 195490, 11435, 2046, 29806, 41, 3934, 79315, 1294, 4759, 4445, 297, 73, 1359...
[ 0.07354736328125, 0.2083740234375, 0.0869140625, 0.16552734375, 0.2347412109375, 0.181640625, 0.092041015625, 0.000030517578125, 0.0511474609375, 0.201904296875, 0.0148162841796875, 0.04962158203125, 0.2174072265625, 0.008270263671875, 0.1484375, 0.113037109375, 0.04144287109375, 0...
embed
27047169_c0
27047169
prolog
0
Title: Prolog: dividing a number Problem title: Prolog: dividing a number Tags: prolog, numbers, divider Problem: Prolog: dividing a number I wanted to make a predicate that returns a list of a number dividers. Example: 72 = 2*2*2*3*3. prdel(A,[],_):- A is 1. prdel(P,[D|L],D):- 0 is mod(P,D), P1 is P/D, prdel(P1,L,D). ...
Prolog: dividing a number Prolog: dividing a number prolog numbers divider Prolog Prolog: dividing a number I wanted to make a predicate that returns a list of a number dividers. Example: 72 = 2*2*2*3*3. This works and returns the right list. The problem is that it does not stop after that but returns the same list ove...
[ -0.006103515625, 0.01251220703125, 0.01092529296875, -0.0118408203125, 0.010986328125, 0.0252685546875, 0.0002651214599609375, -0.0167236328125, 0.01165771484375, -0.04248046875, 0.0164794921875, -0.01092529296875, -0.01422119140625, -0.00390625, 0.0052490234375, 0.0184326171875, 0.0...
[ 1250, 4867, 61998, 449, 14012, 502, 101935, 101637, 42, 36663, 3249, 1653, 2063, 67, 30646, 5303, 30510, 14202, 89536, 9464, 2203, 116, 1639, 304, 363, 43240, 7108, 2967, 442, 959, 7279, 7103, 5701, 645, 13438, 2174, 24234, 32628, 14941, ...
[ 0.1531982421875, 0.213134765625, 0.1986083984375, 0.06842041015625, 0.1558837890625, 0.1419677734375, 0.166259765625, 0.1845703125, 0.083251953125, 0.0635986328125, 0.047149658203125, 0.1588134765625, 0.17041015625, 0.106689453125, 0.144775390625, 0.1514892578125, 0.19873046875, 0....
embed
74262771_c0
74262771
prolog
0
Title: How to make the predicate spent(Passengers, Year, Sum) in prolog? Problem title: How to make the predicate spent(Passengers, Year, Sum) in prolog? Tags: prolog Problem: How to make the predicate spent(Passengers, Year, Sum) in prolog? I need to write a predicate "spent" that would find the total costs for ticket...
How to make the predicate spent(Passengers, Year, Sum) in prolog? How to make the predicate spent(Passengers, Year, Sum) in prolog? prolog How Passengers Year Sum Tokio Toronto Price California London Sara Passenger Date Jane sum_cash How to make the predicate spent(Passengers, Year, Sum) in prolog? I need to write a p...
[ -0.00014591217041015625, 0.006866455078125, 0.023193359375, 0.0115966796875, -0.0234375, 0.01031494140625, -0.003509521484375, 0.0167236328125, 0.0174560546875, -0.036376953125, -0.0031280517578125, 0.0263671875, -0.035888671875, -0.01055908203125, 0.0181884765625, 0.003631591796875, ...
[ 11249, 47, 3249, 1653, 2063, 67, 66933, 139117, 33, 26255, 42552, 36335, 23, 502, 4867, 70, 98757, 12060, 131579, 90915, 48025, 39897, 9020, 13156, 25512, 48511, 10554, 408, 1495, 3871, 33022, 7, 91319, 7413, 3622, 84458, 137384, 44828, 129...
[ 0.07464599609375, 0.0233917236328125, 0.1116943359375, 0.1451416015625, 0.173095703125, 0.12744140625, 0.23583984375, 0.1534423828125, 0.14990234375, 0.14453125, 0.19873046875, 0.1939697265625, 0.076171875, 0.14990234375, 0.177734375, 0.030517578125, 0.13623046875, 0.131103515625, ...
embed
28054166_c0
28054166
prolog
0
Title: Integrate Prolog in C program Problem title: Integrate Prolog in C program Tags: c%2B%2B, c, ffi, prolog, swi-prolog Problem: Integrate Prolog in C program I want to write a main program in C++ and the program will generate facts dynamically to build up a knowledge base, then the program can call rules defined i...
Integrate Prolog in C program Integrate Prolog in C program c%2B%2B c ffi prolog swi-prolog Integrate Prolog PL_call pred.pl goal_term Integrate Prolog in C program I want to write a main program in C++ and the program will generate facts dynamically to build up a knowledge base, then the program can call rules defined...
[ 0.034423828125, 0.011474609375, 0.006683349609375, 0.021484375, -0.0172119140625, 0.008056640625, 0.0146484375, 0.001708984375, 0.007232666015625, -0.0654296875, 0.003631591796875, 0.01092529296875, -0.03369140625, 0.003631591796875, 0.00836181640625, -0.0096435546875, 0.000984191894...
[ 91969, 67, 1250, 4867, 23, 313, 1528, 501, 24500, 502, 91, 2452, 3454, 33106, 85763, 1653, 2424, 69236, 32166, 3444, 33022, 5201, 37223, 139392, 15824, 84079, 45367, 51359, 3647, 831, 11782, 91736, 61924, 5, 102158, 2046, 50339, 238, 54, ...
[ 0.26171875, 0.1151123046875, 0.2144775390625, 0.28955078125, 0.1214599609375, 0.197021484375, 0.2205810546875, 0.061798095703125, 0.1258544921875, 0.147705078125, 0.046173095703125, 0.21435546875, 0.1705322265625, 0.1514892578125, 0.1583251953125, 0.2303466796875, 0.1766357421875, ...
embed
16570780_c0
16570780
prolog
0
Title: SWI-Prolog predicates are not called Problem title: SWI-Prolog predicates are not called Tags: prolog Problem: SWI-Prolog predicates are not called I am trying to make a game similar to minesweeper and i am trying to count the number of bombs near a point on a map but it only enters in one countneighbour and it ...
SWI-Prolog predicates are not called SWI-Prolog predicates are not called prolog SWI-Prolog nb_setval X-1 Y-1 nb_getval SWI-Prolog predicates are not called I am trying to make a game similar to minesweeper and i am trying to count the number of bombs near a point on a map but it only enters in one countneighbour and i...
[ 0.01141357421875, -0.00244140625, 0.00482177734375, 0.0142822265625, 0.006439208984375, 0.017822265625, -0.0068359375, -0.004852294921875, 0.0115966796875, -0.0245361328125, -0.018798828125, 0.0103759765625, -0.006317138671875, 0.01806640625, 0.01904296875, -0.000743865966796875, 0.0...
[ 159, 38969, 10752, 4867, 1653, 2063, 1636, 959, 35839, 502, 653, 275, 3509, 1405, 1193, 5759, 990, 3794, 31577, 3249, 6712, 21373, 5665, 1177, 13, 1264, 54529, 14012, 54330, 43573, 6275, 22288, 4734, 30957, 1632, 6958, 38648, 7279, 3789, ...
[ 0.046356201171875, 0.218017578125, 0.15087890625, 0.206787109375, 0.1689453125, 0.2120361328125, 0.047637939453125, 0.089599609375, 0.1051025390625, 0.1048583984375, 0.0179901123046875, 0.065185546875, 0.115478515625, 0.1829833984375, 0.08984375, 0.12060546875, 0.07586669921875, 0....
embed
59425760_c1
59425760
prolog
1
= [a, b] ; X = [a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; It seems to be wor...
= [a, b] ; X = [a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; X = [a, b, a, b, a, b] ; It seems to be wor...
[ 0.0020904541015625, 0.000652313232421875, 0.01544189453125, 0.0115966796875, -0.01251220703125, 0.028076171875, -0.00109100341796875, -0.0072021484375, 0.0027313232421875, 0.000720977783203125, 0.00010967254638671875, 0.01116943359375, 0.0010223388671875, 0.000225067138671875, -0.0133666...
[ 2203, 378, 11, 4, 876, 2819, 1193, 1650, 37202, 186, 20697, 5885, 1284, 450, 57346, 1363, 111, 5701, 35166, 15044, 1314, 163, 31895, 8781, 121742, 3917, 3249, 140992, 4589, 31182, 42551, 236209, 15400, 1250, 4867, 85689, 6626, 31943, 6827, ...
[ 0.234619140625, 0.00408935546875, 0.08355712890625, 0.046844482421875, 0.154052734375, 0.05426025390625, 0.1817626953125, 0.06414794921875, 0.10345458984375, 0.0179443359375, 0.1334228515625, 0.112060546875, 0.0313720703125, 0.027313232421875, 0.23828125, 0.06988525390625, 0.05731201...
embed
33555080_c1
33555080
prolog
1
(8) atom_chars(abba, [a, b, b, a]) ? creep Call: (8) abba==abba ? creep Exit: (8) abba==abba ? creep Call: (8) palindroom([], [abba|_G5269]) ? creep Fail: (8) palindroom([], [abba|_G5269]) ? creep Redo: (7) palindroom(["abba"], _G5269) ? creep what is happening here? and why? Call: (8) palindroom([], _G5269) ? creep E...
(8) atom_chars(abba, [a, b, b, a]) ? creep Call: (8) abba==abba ? creep Exit: (8) abba==abba ? creep Call: (8) palindroom([], [abba|_G5269]) ? creep Fail: (8) palindroom([], [abba|_G5269]) ? creep Redo: (7) palindroom(["abba"], _G5269) ? creep what is happening here? and why? Call: (8) palindroom([], _G5269) ? creep E...
[ 0.00183868408203125, -0.0074462890625, -0.01239013671875, 0.0123291015625, -0.006561279296875, 0.037841796875, 0.0166015625, -0.01123046875, 0.0111083984375, -0.004852294921875, 0.01361083984375, -0.005279541015625, -0.0140380859375, -0.003753662109375, -0.006866455078125, -0.002075195...
[ 10021, 34627, 454, 9254, 7, 10545, 11, 876, 10, 49512, 254, 26265, 62119, 69112, 5443, 217, 17923, 19, 75846, 12744, 14212, 190355, 6096, 31, 8696, 84772, 123087, 3688, 15400, 1193, 2203, 1528, 5701, 2967, 35672, 4358, 3647, 111, 195625, ...
[ 0.197021484375, 0.2188720703125, 0.00885009765625, 0.2000732421875, 0.04766845703125, 0.1275634765625, 0.10693359375, 0.0838623046875, 0.07183837890625, 0.17578125, 0.1234130859375, 0.1712646484375, 0.19580078125, 0.050506591796875, 0.1334228515625, 0.10162353515625, 0.1336669921875,...
embed
38229987_c0
38229987
prolog
0
Title: Prolog - height (depth) of subtree Problem title: Prolog - height (depth) of subtree Tags: prolog, recursion, tree Problem: Prolog - height (depth) of subtree I have the relation child(X,Y) , where X is the root/parent node and Y is the child node, hence a directed edge. I want to calculate the height H of each ...
Prolog - height (depth) of subtree Prolog - height (depth) of subtree prolog recursion tree Prolog Prolog - height (depth) of subtree I have the relation child(X,Y) , where X is the root/parent node and Y is the child node, hence a directed edge. I want to calculate the height H of each subtree from a specific root nod...
[ 0.023681640625, 0.007232666015625, -0.00408935546875, -0.013671875, 0.00185394287109375, 0.004974365234375, -0.0145263671875, 0.00457763671875, -0.0029754638671875, -0.0556640625, -0.013916015625, -0.02734375, -0.0174560546875, 0.00970458984375, 0.03564453125, -0.01025390625, 0.00860...
[ 1250, 4867, 155955, 168867, 1614, 62600, 502, 195625, 1830, 53201, 111, 41911, 29041, 1542, 1723, 1193, 74855, 99547, 110, 112, 990, 8951, 121303, 3444, 74481, 67, 70, 572, 12638, 1295, 29458, 627, 84079, 1052, 18151, 7413, 756, 60875, 1409...
[ 0.146728515625, 0.2393798828125, 0.245361328125, 0.2100830078125, 0.2125244140625, 0.2198486328125, 0.111328125, 0.187255859375, 0.034332275390625, 0.1910400390625, 0.014923095703125, 0.1602783203125, 0.1490478515625, 0.044647216796875, 0.0902099609375, 0.0546875, 0.1448974609375, ...
embed
40509137_c0
40509137
prolog
0
Title: Conditional clause in PROLOG doesn't work Problem title: Conditional clause in PROLOG doesn't work Tags: list, prolog Problem: Conditional clause in PROLOG doesn't work I created a clause for conditional sentences but when I will depure the program using the trace command appear the fail message: fail ...
Conditional clause in PROLOG doesn't work Conditional clause in PROLOG doesn't work list prolog Conditional PROLOG Conditional clause in PROLOG doesn't work I created a clause for conditional sentences but when I will depure the program using the trace command appear the fail message: fail message I wanna che...
[ 0.01611328125, 0.0087890625, 0.024658203125, 0.03076171875, -0.00921630859375, 0.0233154296875, -0.01019287109375, 0.0078125, 0.00116729736328125, -0.002288818359375, 0.00067138671875, 0.0079345703125, 0.000759124755859375, -0.00051116943359375, 0.0096435546875, 0.023193359375, 0.010...
[ 46347, 43315, 70731, 13, 23, 10514, 47510, 22027, 3768, 18, 4488, 5303, 502, 4867, 75935, 35431, 289, 149357, 8, 4717, 1528, 144851, 75101, 35782, 26008, 12765, 1614, 6562, 158661, 105416, 59231, 7612, 15190, 18151, 1250, 110833, 18499 ]
[ 0.2181396484375, 0.1641845703125, 0.2020263671875, 0.0972900390625, 0.013458251953125, 0.163330078125, 0.2261962890625, 0.05889892578125, 0.047698974609375, 0.055419921875, 0.1251220703125, 0.09625244140625, 0.0963134765625, 0.1990966796875, 0.03131103515625, 0.1912841796875, 0.09387...
embed
9968835_c0
9968835
prolog
0
Title: Predicate buildTree whose first argument is a list of nodes and whose second argument is a tree Problem title: Predicate buildTree whose first argument is a list of nodes and whose second argument is a tree Tags: prolog Problem: Predicate buildTree whose first argument is a list of nodes and whose second argumen...
Predicate buildTree whose first argument is a list of nodes and whose second argument is a tree Predicate buildTree whose first argument is a list of nodes and whose second argument is a tree prolog Predicate Predicate buildTree whose first argument is a list of nodes and whose second argument is a tree I want define a...
[ 0.016357421875, 0.0196533203125, -0.015869140625, -0.004150390625, 0.004150390625, 0.031982421875, -0.00604248046875, -0.0030364990234375, 0.006866455078125, -0.0206298828125, 0.0177001953125, -0.0179443359375, 0.00177001953125, 0.0002460479736328125, 0.00946044921875, 0.009765625, 0...
[ 7145, 2063, 67, 45367, 62731, 13, 124901, 5117, 10750, 5303, 110, 988, 17932, 53201, 502, 4867, 3444, 61924, 4720, 23935, 1653, 83, 11, 62600, 275, 17324, 238, 177149, 1284, 41, 618, 38246, 18, 27140, 13579, 44084 ]
[ 0.1324462890625, 0.2054443359375, 0.09228515625, 0.169677734375, 0.250244140625, 0.09423828125, 0.019927978515625, 0.113525390625, 0.234375, 0.1275634765625, 0.136474609375, 0.1314697265625, 0.1124267578125, 0.2327880859375, 0.1053466796875, 0.1490478515625, 0.014801025390625, 0.15...
embed
39968978_c0
39968978
prolog
0
Title: tower of hanoi prolog Problem title: tower of hanoi prolog Tags: prolog, towers-of-hanoi Problem: tower of hanoi prolog Hello i have a problem with my implementation of the tower of hanoi. I need to print a list of list with the necessary moves, but my algorithm just work when the numbers of discs is N=1. This i...
tower of hanoi prolog tower of hanoi prolog prolog towers-of-hanoi N-1 tower of hanoi prolog Hello i have a problem with my implementation of the tower of hanoi. I need to print a list of list with the necessary moves, but my algorithm just work when the numbers of discs is N=1. This is my code And this is the result w...
[ 0.00933837890625, 0.000025391578674316406, 0.0015716552734375, 0.023681640625, -0.007476806640625, 0.0211181640625, -0.034912109375, 0.0208740234375, 0.016845703125, -0.055908203125, 0.00051116943359375, -0.006866455078125, -0.01123046875, -0.004486083984375, -0.007171630859375, 0.0132...
[ 47, 6488, 111, 777, 5380, 502, 4867, 42844, 4390, 1121, 541, 5759, 35378, 765, 2967, 759, 208124, 70, 3871, 28412, 10, 5303, 678, 63559, 25813, 1284, 234873, 1660, 4488, 3229, 101935, 17116, 33000, 3293, 18151, 16750, 1369, 615, 1884, 903...
[ 0.146484375, 0.2069091796875, 0.1688232421875, 0.1781005859375, 0.22314453125, 0.133544921875, 0.2244873046875, 0.1734619140625, 0.141845703125, 0.1435546875, 0.1571044921875, 0.1358642578125, 0.071044921875, 0.037017822265625, 0.1263427734375, 0.0042724609375, 0.1561279296875, 0.0...
embed
61700133_c0
61700133
prolog
0
Title: Prolog as first programming language Problem title: Prolog as first programming language Tags: prolog Problem: Prolog as first programming language I'm a computer engineering student but i've never programmed in my life (i've only studied physics, chemistry, control systems etc). Since I know a lot more about ma...
Prolog as first programming language Prolog as first programming language prolog Prolog Prolog as first programming language I'm a computer engineering student but i've never programmed in my life (i've only studied physics, chemistry, control systems etc). Since I know a lot more about math than programming languages,...
[ 0.03369140625, 0.009033203125, 0.0191650390625, 0.014404296875, -0.01019287109375, 0.01531982421875, -0.0048828125, -0.0203857421875, 0.000949859619140625, -0.056640625, 0.000698089599609375, -0.0098876953125, -0.0107421875, 0.00311279296875, -0.001434326171875, 0.00762939453125, -0....
[ 1250, 4867, 237, 5117, 56037, 449, 46876, 502, 39, 10, 13909, 177907, 9836, 1284, 17, 272, 8306, 26693, 23, 759, 6897, 25, 4734, 22282, 71, 6, 34053, 27744, 7, 290, 1294, 6226, 76519, 3714, 5915, 1286, 1672, 48909, 3501, 4, 35187, 214...
[ 0.2186279296875, 0.31982421875, 0.08953857421875, 0.1558837890625, 0.2171630859375, 0.1202392578125, 0.245361328125, 0.1588134765625, 0.0204010009765625, 0.05841064453125, 0.05804443359375, 0.097900390625, 0.163330078125, 0.0157318115234375, 0.012176513671875, 0.106201171875, 0.13488...
embed
70087785_c0
70087785
prolog
0
Title: Prolog seemingly ending recursive call without going back up Problem title: Prolog seemingly ending recursive call without going back up Tags: prolog Problem: Prolog seemingly ending recursive call without going back up I've got the following two edges defined: edge(a,b). edge(b,c). add(X, L, [X | L]). Now I'm t...
Prolog seemingly ending recursive call without going back up Prolog seemingly ending recursive call without going back up prolog Prolog Prolog seemingly ending recursive call without going back up I've got the following two edges defined: Now I'm trying to recursively build the path from a to c (a,b,c) using this: It s...
[ 0.02587890625, 0.03515625, 0.0028228759765625, -0.002166748046875, -0.0089111328125, 0.0218505859375, -0.0145263671875, -0.01214599609375, -0.005645751953125, -0.0260009765625, 0.015869140625, -0.0135498046875, -0.0206298828125, 0.021240234375, 0.025634765625, -0.00074005126953125, -...
[ 1250, 4867, 48903, 86658, 195625, 5844, 11782, 15490, 7730, 4420, 1257, 502, 25632, 6626, 121303, 61924, 31577, 45367, 60875, 1295, 10, 47, 501, 11, 275, 238, 17368, 903, 37202, 4488, 5885, 3647, 7225, 1542, 140992, 1193, 4, 4734, 2203, 6...
[ 0.1680908203125, 0.2432861328125, 0.0797119140625, 0.182373046875, 0.2183837890625, 0.1187744140625, 0.180419921875, 0.0965576171875, 0.04595947265625, 0.1376953125, 0.154541015625, 0.1273193359375, 0.0207672119140625, 0.06915283203125, 0.17578125, 0.098876953125, 0.07940673828125, ...
embed
2260792_c0
2260792
prolog
0
Title: Remove duplicates in list (Prolog) Problem title: Remove duplicates in list (Prolog) Tags: list, prolog Problem: Remove duplicates in list (Prolog) I am completely new to Prolog and trying some exercises. One of them is: Write a predicate set(InList,OutList) which takes as input an arbitrary list, and returns a ...
Remove duplicates in list (Prolog) Remove duplicates in list (Prolog) list prolog Remove Prolog Out Remove duplicates in list (Prolog) I am completely new to Prolog and trying some exercises. One of them is: Here is my solution: I'm not allowed to use any of built-in predicates (It would be better even do not use not/1...
[ 0.00408935546875, 0.0245361328125, 0.03271484375, 0, -0.0152587890625, -0.00189208984375, -0.004638671875, 0.0179443359375, 0.005126953125, -0.0185546875, -0.0078125, 0.00518798828125, 0.007293701171875, 0.00689697265625, -0.0087890625, 0.02978515625, 0.028076171875, 0.009155273437...
[ 181139, 171763, 1636, 23, 5303, 10752, 4867, 502, 1250, 13538, 3525, 81979, 29806, 959, 107003, 4527, 111, 88303, 73, 1653, 2063, 11522, 11583, 2967, 5423, 12477, 76199, 48716, 5701, 51347, 1286, 57346, 107730, 16750, 44691 ]
[ 0.1549072265625, 0.23583984375, 0.1474609375, 0.0540771484375, 0.1795654296875, 0.1339111328125, 0.20703125, 0.103271484375, 0.15966796875, 0.1146240234375, 0.009674072265625, 0.060516357421875, 0.06683349609375, 0.1201171875, 0.1322021484375, 0.07659912109375, 0.00225830078125, 0....
embed
73494057_c0
73494057
prolog
0
Title: Why does prolog create choice points in the simple classic member/2 implementation? Problem title: Why does prolog create choice points in the simple classic member/2 implementation? Tags: prolog Problem: Why does prolog create choice points in the simple classic member/2 implementation? The following is a class...
Why does prolog create choice points in the simple classic member/2 implementation? Why does prolog create choice points in the simple classic member/2 implementation? prolog Why Why does prolog create choice points in the simple classic member/2 implementation? The following is a classic textbook example of the member...
[ 0.004302978515625, 0.0198974609375, 0.029296875, 0.01165771484375, -0.0322265625, -0.0034027099609375, 0.0033111572265625, 0.0225830078125, 0.0177001953125, -0.00677490234375, 0.012939453125, -0.02294921875, 0.003936767578125, -0.0087890625, 0.01226806640625, -0.01318359375, -0.00411...
[ 44084, 14602, 502, 4867, 28282, 44126, 26847, 8781, 54704, 32786, 12477, 208124, 14137, 27781, 32354, 134031, 1250, 14240, 25632, 41, 31089, 16750, 2396, 29568, 1284, 7068, 98320, 216806, 4420, 125728, 7103, 65771, 14858, 5117, 6431, 48650, 799...
[ 0.1490478515625, 0.0226287841796875, 0.1761474609375, 0.256103515625, 0.1695556640625, 0.204833984375, 0.233642578125, 0.142333984375, 0.1619873046875, 0.216796875, 0.20068359375, 0.1455078125, 0.08221435546875, 0.0855712890625, 0.144775390625, 0.053924560546875, 0.155029296875, 0....
embed
59124149_c0
59124149
prolog
0
Title: In prolog, how to write Quicksort is use second element as pivot? Problem title: In prolog, how to write Quicksort is use second element as pivot? Tags: prolog, quicksort Problem: In prolog, how to write Quicksort is use second element as pivot? In my example, I have done to use the first (left-most) element of ...
In prolog, how to write Quicksort is use second element as pivot? In prolog, how to write Quicksort is use second element as pivot? prolog quicksort Quicksort Pivot Tail Sorted Less Greater SortedLess SortedGreater In prolog, how to write Quicksort is use second element as pivot? In my example, I have done to use the f...
[ -0.0137939453125, 0.0069580078125, 0.01953125, -0.01385498046875, -0.0081787109375, 0.0238037109375, -0.013671875, -0.00830078125, 0.01513671875, 0.009765625, 0.0294189453125, 0.0220947265625, -0.0113525390625, -0.02099609375, 0.00128173828125, -0.0021514892578125, 0.0010299682617187...
[ 502, 4867, 3642, 33022, 89038, 62351, 83, 4527, 17932, 12830, 237, 80953, 18, 63773, 5777, 1218, 379, 53666, 1734, 68016, 91127, 46429, 47, 27781, 5117, 2480, 840, 5303, 133291 ]
[ 0.120849609375, 0.1993408203125, 0.0792236328125, 0.1636962890625, 0.176025390625, 0.278076171875, 0.033721923828125, 0.10650634765625, 0.1751708984375, 0.195068359375, 0.066162109375, 0.1973876953125, 0.1375732421875, 0.1136474609375, 0.14697265625, 0.05126953125, 0.0509033203125, ...
embed
10390018_c0
10390018
prolog
0
Title: Define new list and recursively add items in the list by appending in Prolog Problem title: Define new list and recursively add items in the list by appending in Prolog Tags: append, prolog, new-operator, list, addition Problem: Define new list and recursively add items in the list by appending in Prolog I am tr...
Define new list and recursively add items in the list by appending in Prolog Define new list and recursively add items in the list by appending in Prolog append prolog new-operator list addition Define Prolog Define new list and recursively add items in the list by appending in Prolog I am trying to do some operation o...
[ 0.00994873046875, 0.00970458984375, 0.006011962890625, 0.0167236328125, 0.00531005859375, 0.02001953125, -0.01544189453125, 0.020751953125, 0.007568359375, 0.00909423828125, 0.0189208984375, -0.04638671875, -0.016845703125, 0.0113525390625, 0.0184326171875, 0.00087738037109375, 0.026...
[ 262, 64552, 3525, 5303, 195625, 5844, 15190, 55769, 1747, 96819, 23, 1250, 4867, 114689, 502, 206469, 66044, 41018, 159978, 40407, 35431, 11782, 32354, 5117, 1733, 56574, 3444, 183540, 35735, 12830, 154107, 30482, 80854, 198387, 4358, 3642, 136...
[ 0.035552978515625, 0.1448974609375, 0.11865234375, 0.2269287109375, 0.199951171875, 0.138916015625, 0.1585693359375, 0.146240234375, 0.0931396484375, 0.1368408203125, 0.06414794921875, 0.1766357421875, 0.259033203125, 0.0841064453125, 0.1895751953125, 0.1558837890625, 0.1021728515625...
embed
62145671_c0
62145671
prolog
0
Title: Get set of elements from list (Prolog) Problem title: Get set of elements from list (Prolog) Tags: prolog Problem: Get set of elements from list (Prolog) I am trying to get a set of elements from a list in prolog, such that a query: get_elems([1, 2, 4, 10], [a, b, c, d, e], X). yields: X = [a, b, d] I would like...
Get set of elements from list (Prolog) Get set of elements from list (Prolog) prolog list Get Prolog get_elems minus_one X-1 Get set of elements from list (Prolog) I am trying to get a set of elements from a list in prolog, such that a query: get_elems([1, 2, 4, 10], [a, b, c, d, e], X). yields: X = [a, b, d] I would l...
[ -0.002838134765625, 0.0037841796875, 0.0174560546875, 0.0086669921875, -0.0152587890625, 0.0023345947265625, -0.0030059814453125, 0.0106201171875, 0.01470947265625, -0.017333984375, 0.0228271484375, 0.0228271484375, -0.0128173828125, -0.001708984375, -0.00653076171875, 0.0089111328125,...
[ 20779, 5423, 111, 80854, 1295, 5303, 10752, 4867, 502, 1250, 2046, 27889, 7, 26948, 3630, 1193, 5759, 31577, 41, 1294, 418, 116, 201, 209, 876, 104, 28, 11180, 19388, 2203, 1884, 29479, 15490, 88303, 23, 1653, 2063, 653, 927, 37842, 256...
[ 0.1163330078125, 0.20703125, 0.0887451171875, 0.2342529296875, 0.15478515625, 0.18115234375, 0.1612548828125, 0.234130859375, 0.158447265625, 0.1746826171875, 0.130615234375, 0.1978759765625, 0.052337646484375, 0.2119140625, 0.1331787109375, 0.1468505859375, 0.1553955078125, 0.0538...
embed
10369882_c0
10369882
prolog
0
Title: Applying constraints in swipl Problem title: Applying constraints in swipl Tags: prolog Problem: Applying constraints in swipl I am required to write my own version of all_different in SWI-Prolog. I've written a predicate that returns the same true/false on the inputs I'm giving as all_different does, but I'm ha...
Applying constraints in swipl Applying constraints in swipl prolog Applying Applying constraints in swipl I am required to write my own version of all_different in SWI-Prolog. I've written a predicate that returns the same true/false on the inputs I'm giving as all_different does, but I'm having trouble finding online ...
[ 0.0019989013671875, -0.006622314453125, 0.01336669921875, 0.01513671875, -0.0032196044921875, -0.003265380859375, -0.032470703125, 0.01556396484375, 0.00445556640625, -0.03466796875, 0.0037841796875, -0.00543212890625, -0.0019683837890625, 0.026123046875, -0.01190185546875, 0.009643554...
[ 5659, 538, 158, 2816, 4288, 23, 91, 2452, 2424, 502, 4867, 56065, 33022, 10002, 11389, 756, 238778, 159, 38969, 10752, 59121, 1653, 2063, 67, 30646, 5701, 29568, 64, 8710, 107730, 68772, 237, 14602, 63134, 1118, 3917, 59911, 3871, 442, 53...
[ 0.132568359375, 0.1334228515625, 0.1275634765625, 0.2039794921875, 0.1641845703125, 0.061248779296875, 0.043243408203125, 0.2017822265625, 0.230224609375, 0.1219482421875, 0.1802978515625, 0.05474853515625, 0.0789794921875, 0.0584716796875, 0.0711669921875, 0.10321044921875, 0.28125,...
embed
49556936_c0
49556936
prolog
0
Title: Prolog - Convert a 'cons' term to a list Problem title: Prolog - Convert a 'cons' term to a list Tags: list, prolog Problem: Prolog - Convert a 'cons' term to a list I'm looking to convert a Prolog term similar to this: cons(a, cons(b, cons(c, cons(d, nil )))) into a list: [a, b, c, d] I have...
Prolog - Convert a 'cons' term to a list Prolog - Convert a 'cons' term to a list list prolog Prolog Convert Prolog - Convert a 'cons' term to a list I'm looking to convert a Prolog term similar to this: into a list: I have a function to verify that cons(a, cons(b, cons(c, cons(d, nil )))) is a prop...
[ 0.01312255859375, 0.00750732421875, 0.000606536865234375, 0.00775146484375, -0.0035247802734375, 0.015869140625, -0.0289306640625, 0.011474609375, -0.00408935546875, -0.047607421875, 0.00274658203125, 0.005279541015625, -0.007781982421875, 0.0107421875, -0.0067138671875, 0.025756835937...
[ 1250, 4867, 1657, 11549, 3768, 25553, 13579, 47, 10, 5303, 20, 502, 16487, 96760, 21373, 3934, 32354, 493, 40383, 158, 7, 275, 71, 17324, 27798, 11180, 19388, 27875, 1884, 11, 238, 29568, 3444, 19048, 179933, 142477, 1295, 127557, 77947 ]
[ 0.174560546875, 0.24853515625, 0.068115234375, 0.1502685546875, 0.05181884765625, 0.2481689453125, 0.2095947265625, 0.0697021484375, 0.045745849609375, 0.22314453125, 0.00225830078125, 0.115478515625, 0.05322265625, 0.1722412109375, 0.06939697265625, 0.09832763671875, 0.1181640625, ...
embed
16504510_c0
16504510
prolog
0
Title: Merging two unordered lists to a ordered list in prolog Problem title: Merging two unordered lists to a ordered list in prolog Tags: prolog Problem: Merging two unordered lists to a ordered list in prolog I want to write a predicate which takes 2 unsorted lists, and produces a sorted list output. sort_lists(List...
Merging two unordered lists to a ordered list in prolog Merging two unordered lists to a ordered list in prolog prolog Merging sort_lists List1 List2 List3 Merging two unordered lists to a ordered list in prolog I want to write a predicate which takes 2 unsorted lists, and produces a sorted list output. For example: I ...
[ 0.01458740234375, 0.02294921875, 0.0023651123046875, -0.01458740234375, -0.00244140625, 0.00799560546875, -0.01422119140625, -0.00136566162109375, 0.0086669921875, -0.002777099609375, 0.01153564453125, -0.00189208984375, 0.002716064453125, -0.00897216796875, 0.000583648681640625, -0.00...
[ 6035, 9966, 6626, 51, 80596, 5303, 47, 12989, 297, 502, 4867, 12096, 6562, 32036, 304, 363, 3444, 33022, 1653, 2063, 67, 51776, 116, 62351, 27489, 17497, 140992, 32599, 42564, 6097, 3934, 60887, 214, 71, 52001, 8781, 3564, 16750, 6528, 22...
[ 0.1881103515625, 0.058074951171875, 0.1353759765625, 0.092529296875, 0.1962890625, 0.2169189453125, 0.06060791015625, 0.1953125, 0.1048583984375, 0.1558837890625, 0.2210693359375, 0.1658935546875, 0.185302734375, 0.1241455078125, 0.0221099853515625, 0.0836181640625, 0.052825927734375...
embed
40530172_c0
40530172
prolog
0
Title: Check if an element is member of a list Problem title: Check if an element is member of a list Tags: prolog Problem: Check if an element is member of a list Basically, I'm trying to create the standard member predicate, in order to avoid having to load modules into my project. This is my code so far, but unfortu...
Check if an element is member of a list Check if an element is member of a list prolog Check Checks List Elem Check if an element is member of a list Basically, I'm trying to create the standard member predicate, in order to avoid having to load modules into my project. This is my code so far, but unfortunately it isn'...
[ -0.000640869140625, -0.00531005859375, 0.0172119140625, 0.016845703125, -0.019287109375, 0.010986328125, 0.0089111328125, -0.00102996826171875, -0.00144195556640625, -0.038330078125, 0.0164794921875, -0.005645751953125, 0.01312255859375, -0.00162506103515625, 0.00031280517578125, -0.01...
[ 38679, 2174, 12830, 83, 32786, 111, 5303, 502, 4867, 32036, 540, 195, 31577, 28282, 5570, 1653, 2063, 67, 71864, 72367, 88996, 13452, 18151, 2060, 104272, 20697, 20594, 44691, 3884, 59226, 39933, 72896, 79786, 22027 ]
[ 0.2052001953125, 0.122314453125, 0.227294921875, 0.09857177734375, 0.277587890625, 0.14990234375, 0.2171630859375, 0.1053466796875, 0.1524658203125, 0.1953125, 0.09521484375, 0.102783203125, 0.03387451171875, 0.07080078125, 0.1612548828125, 0.1051025390625, 0.1397705078125, 0.05889...
embed
23286916_c0
23286916
prolog
0
Title: Prolog -- How to tell if two things belong to the same group? Problem title: Prolog -- How to tell if two things belong to the same group? Tags: prolog Problem: Prolog -- How to tell if two things belong to the same group? This is probably a very easy question -- I'm just learning and stuck on it though. Say I h...
Prolog -- How to tell if two things belong to the same group? Prolog -- How to tell if two things belong to the same group? prolog Prolog How blah1 blah2 blah3 blah4 blah5 is_same Blah_x Blah_y Prolog -- How to tell if two things belong to the same group? This is probably a very easy question -- I'm just learning and s...
[ 0.01708984375, 0.001678466796875, -0.006072998046875, 0.0029449462890625, -0.004730224609375, 0.0361328125, -0.0162353515625, 0.01171875, 0.0238037109375, -0.004608154296875, -0.0125732421875, 0.009033203125, 0.0004024505615234375, -0.00927734375, -0.024658203125, 0.00125885009765625, ...
[ 1250, 4867, 11249, 47, 14192, 2174, 6626, 8966, 186, 10617, 5701, 21115, 502, 9932, 127, 304, 363, 617, 758, 83, 40175, 335, 1566, 425, 53, 23468, 9655, 52080, 3444, 79986, 10644, 23, 275, 4420, 4842, 30957, 418, 1193, 30646, 2203, 1046...
[ 0.1373291015625, 0.184814453125, 0.05511474609375, 0.10479736328125, 0.1744384765625, 0.1278076171875, 0.1224365234375, 0.1400146484375, 0.0572509765625, 0.1683349609375, 0.1656494140625, 0.2230224609375, 0.080078125, 0.153564453125, 0.123291015625, 0.0341796875, 0.050048828125, 0....
embed
49460157_c0
49460157
prolog
0
Title: Prolog error after returning true? Problem title: Prolog error after returning true? Tags: prolog Problem: Prolog error after returning true? I am new to using Prolog so maybe im missing something obvious. I'm making a Tribonacci rule. Same as Fib, but Trib[N] = trib[n-1]+trib[n-2]+trib[n-3] , with 0, 1, 2 being...
Prolog error after returning true? Prolog error after returning true? prolog Prolog Trib n-1 n-2 n-3 Unknown Action Prolog error after returning true? I am new to using Prolog so maybe im missing something obvious. I'm making a Tribonacci rule. Same as Fib, but Trib[N] = trib[n-1]+trib[n-2]+trib[n-3] , with 0, 1, 2 bei...
[ 0.021240234375, 0.0052490234375, 0.005615234375, -0.0057373046875, -0.0079345703125, 0.01177978515625, 0.00799560546875, 0.005035400390625, 0.00701904296875, -0.035400390625, 0.017333984375, -0.00927734375, 0.000698089599609375, 0.015380859375, 0.029296875, 0.01055908203125, 0.022705...
[ 1250, 4867, 18499, 7103, 30646, 214, 29568, 502, 4699, 275, 5759, 5428, 8316, 992, 69723, 57945, 17368, 132283, 162520, 20662, 20990, 52544, 79986, 3698, 839, 109120, 76172, 1328, 11049, 90173, 96386, 757, 106, 116, 2060, 26785, 140992, 90980...
[ 0.189453125, 0.287109375, 0.223388671875, 0.144287109375, 0.1966552734375, 0.08709716796875, 0.232177734375, 0.122802734375, 0.1380615234375, 0.147216796875, 0.08868408203125, 0.0699462890625, 0.1387939453125, 0.006988525390625, 0.14501953125, 0.1328125, 0.013214111328125, 0.016845...
embed
23126204_c0
23126204
prolog
0
Title: How can I access an element in a list for prolog? Problem title: How can I access an element in a list for prolog? Tags: eclipse-clp, prolog Problem: How can I access an element in a list for prolog? So I'm having trouble trying to obtain a single element from a list using Prolog without using recursion, only re...
How can I access an element in a list for prolog? How can I access an element in a list for prolog? eclipse-clp prolog How Max List List2 List1 How can I access an element in a list for prolog? So I'm having trouble trying to obtain a single element from a list using Prolog without using recursion, only relying on loop...
[ 0.00897216796875, 0.0048828125, 0.00946044921875, 0.01336669921875, 0.0020751953125, 0.01318359375, 0.0130615234375, 0.0003414154052734375, 0.0264892578125, -0.052978515625, 0.033203125, 0.0162353515625, -0.006134033203125, -0.02197265625, 0.013427734375, -0.00787353515625, -0.000629...
[ 11249, 831, 17203, 12830, 23, 5303, 100, 502, 4867, 10, 106371, 184, 26775, 9920, 32036, 304, 418, 87, 142, 63134, 31577, 113054, 11001, 1295, 17368, 1250, 15490, 195625, 538, 40956, 41581, 27889, 1193, 7, 155761, 3444, 12638, 11651, 2965, ...
[ 0.0623779296875, 0.08343505859375, 0.2364501953125, 0.2279052734375, 0.0836181640625, 0.2337646484375, 0.07611083984375, 0.169189453125, 0.25830078125, 0.0311126708984375, 0.1552734375, 0.07568359375, 0.118896484375, 0.1954345703125, 0.1961669921875, 0.0771484375, 0.007110595703125, ...
embed
61240335_c0
61240335
prolog
0
Title: how to get great-great-grandmother in prolog Problem title: how to get great-great-grandmother in prolog Tags: prolog Problem: how to get great-great-grandmother in prolog I'm new to prolog I'm trying to write a family tree I got the code to get parent,mother,father,sister,brother,etc.. I am trying to write code...
how to get great-great-grandmother in prolog how to get great-great-grandmother in prolog prolog great_grandmother how to get great-great-grandmother in prolog I'm new to prolog I'm trying to write a family tree I got the code to get parent,mother,father,sister,brother,etc.. I am trying to write code to get great-great...
[ -0.000911712646484375, 0.00860595703125, -0.00823974609375, 0.007080078125, -0.005462646484375, 0.017333984375, 0.00445556640625, -0.0020599365234375, 0.007354736328125, -0.046142578125, 0.0031890869140625, -0.034423828125, -0.0064697265625, -0.004669189453125, 0.021240234375, 0.000362...
[ 3642, 47, 2046, 6782, 7134, 257, 79139, 432, 9319, 23, 502, 4867, 3525, 31577, 33022, 14449, 53201, 18151, 49129, 1021, 19656, 6369, 64, 7, 37842, 5941, 20028, 959, 20697, 1810, 2811, 40383, 11675, 114686, 2452, 756, 26785, 9963, 1528, 13...
[ 0.083740234375, 0.03533935546875, 0.1485595703125, 0.134765625, 0.0889892578125, 0.10687255859375, 0.1484375, 0.1715087890625, 0.1715087890625, 0.04345703125, 0.1378173828125, 0.1905517578125, 0.006866455078125, 0.033233642578125, 0.058319091796875, 0.033905029296875, 0.131103515625,...
embed
12974830_c0
12974830
prolog
0
Title: Counting from database Problem title: Counting from database Tags: prolog Problem: Counting from database My database consists out of predicates like these: road(1,2,geel). road(2,3,blauw). road(1,3,geel). where the first 2 numbers are points. I have to check wether every point has a even number of roads. I mana...
Counting from database Counting from database prolog database Counting Count Element List Occurences Counts Point list_to_set Counting from database My database consists out of predicates like these: road(1,2,geel). road(2,3,blauw). road(1,3,geel). where the first 2 numbers are points. I have to check wether every poin...
[ 0.0096435546875, 0.002716064453125, -0.0022430419921875, -0.01275634765625, -0.005462646484375, 0.006866455078125, -0.01220703125, -0.01318359375, 0.0220947265625, -0.07568359375, -0.002716064453125, -0.0242919921875, 0.007568359375, -0.0037994384765625, -0.0140380859375, -0.0002841949...
[ 1311, 128396, 1295, 63399, 502, 4867, 108210, 48325, 32036, 180, 238, 16820, 69098, 41097, 5303, 188, 3509, 58055, 1810, 1653, 2063, 1636, 1884, 6097, 33816, 133063, 429, 583, 155761, 7119, 18741, 363, 5117, 116, 101935, 26847, 12765, 642, ...
[ 0.1441650390625, 0.1890869140625, 0.170166015625, 0.2471923828125, 0.1273193359375, 0.181640625, 0.1771240234375, 0.1630859375, 0.134521484375, 0.02655029296875, 0.0216064453125, 0.1016845703125, 0.04730224609375, 0.1571044921875, 0.1671142578125, 0.0543212890625, 0.150634765625, 0...
embed
74643665_c0
74643665
prolog
0
Title: Prolog: retract fact by it's name Problem title: Prolog: retract fact by it's name Tags: fact, prolog Problem: Prolog: retract fact by it's name I want to retract fact, but I have not direct access to the name of fact. To get anything from this fact I'd use following code: facts.pl file: :- dynamic fac...
Prolog: retract fact by it's name Prolog: retract fact by it's name fact prolog Prolog StructureName StructName ERROR Defined init.pl:217 Prolog: retract fact by it's name I want to retract fact, but I have not direct access to the name of fact. To get anything from this fact I'd use following code: facts.pl ...
[ 0.024169921875, 0.005584716796875, 0.0213623046875, 0.02294921875, -0.016357421875, -0.0004100799560546875, 0.01385498046875, -0.00131988525390625, 0.006134033203125, -0.041748046875, 0.0098876953125, 0.01214599609375, -0.038818359375, -0.0185546875, 0.017822265625, -0.0216064453125, ...
[ 1250, 4867, 41499, 15390, 15824, 390, 442, 3768, 9351, 502, 63667, 238, 163612, 151206, 24638, 5983, 217, 2424, 966, 3444, 765, 959, 8951, 17203, 111, 2046, 23937, 1295, 25632, 18151, 11435, 29806, 3642, 5809, 450, 84079, 98323, 23, 37842, ...
[ 0.18994140625, 0.257080078125, 0.2158203125, 0.2076416015625, 0.232177734375, 0.1380615234375, 0.0848388671875, 0.0819091796875, 0.1424560546875, 0.118408203125, 0.1212158203125, 0.060333251953125, 0.0989990234375, 0.1009521484375, 0.03692626953125, 0.057373046875, 0.06488037109375, ...
embed
74942123_c0
74942123
prolog
0
Title: How to convert a list of list to a list of tuples in prolog? Problem title: How to convert a list of list to a list of tuples in prolog? Tags: prolog Problem: How to convert a list of list to a list of tuples in prolog? ex [[a,b],[b,c]] to [(a,b),(b,c)] . % Define a predicate that takes a list of lists and retur...
How to convert a list of list to a list of tuples in prolog? How to convert a list of list to a list of tuples in prolog? prolog How Define convert_list_to_tuple ListOfLists ListOfTuples Base Head Tail Tuple TailTuples How to convert a list of list to a list of tuples in prolog? ex [[a,b],[b,c]] to [(a,b),(b,c)] . How ...
[ 0.01214599609375, 0.01495361328125, -0.0037078857421875, 0.00701904296875, -0.02099609375, 0.007415771484375, -0.01361083984375, -0.0037078857421875, 0.00836181640625, -0.0059814453125, -0.0084228515625, -0.0107421875, -0.0036773681640625, 0.03271484375, -0.007415771484375, -0.00775146...
[ 11249, 96760, 5303, 111, 47, 370, 99726, 502, 4867, 10, 23, 64552, 6562, 188, 458, 8705, 32036, 132887, 154663, 15665, 44978, 44816, 1218, 379, 1371, 1119, 275, 238, 5443, 71 ]
[ 0.039398193359375, 0.1353759765625, 0.207763671875, 0.0653076171875, 0.075439453125, 0.1602783203125, 0.21484375, 0.1378173828125, 0.1802978515625, 0.004974365234375, 0.0290679931640625, 0.029266357421875, 0.1683349609375, 0.06695556640625, 0.1119384765625, 0.1390380859375, 0.1284179...
embed
29273677_c0
29273677
prolog
0
Title: extract a class definition from a file using dcg in prolog Problem title: extract a class definition from a file using dcg in prolog Tags: prolog, dcg Problem: extract a class definition from a file using dcg in prolog Can any one help me to generate a prolog grammar of a simple class definition. This is a sampl...
extract a class definition from a file using dcg in prolog extract a class definition from a file using dcg in prolog prolog dcg a dcg use_module Real extract a class definition from a file using dcg in prolog Can any one help me to generate a prolog grammar of a simple class definition. This is a sample dcg rule i hav...
[ 0.0235595703125, -0.00180816650390625, -0.0052490234375, 0.03271484375, 0.005615234375, 0.0299072265625, -0.018798828125, -0.003997802734375, 0.00433349609375, -0.020263671875, -0.0208740234375, -0.03125, -0.0228271484375, -0.000476837158203125, 0.0220947265625, 0.015380859375, -0.00...
[ 125663, 18507, 80934, 1295, 11435, 238, 177, 502, 4867, 104, 4527, 83279, 5120, 4358, 139392, 122092, 147, 8781, 121413, 79986, 107730 ]
[ 0.1651611328125, 0.2232666015625, 0.22119140625, 0.052490234375, 0.1505126953125, 0.0814208984375, 0.179931640625, 0.0953369140625, 0.1956787109375, 0.0310516357421875, 0.041595458984375, 0.06622314453125, 0.1514892578125, 0.0338134765625, 0.05938720703125, 0.0963134765625, 0.0919189...
embed
34170632_c0
34170632
prolog
0
Title: Transposing a matrix in Prolog using decompose Problem title: Transposing a matrix in Prolog using decompose Tags: prolog Problem: Transposing a matrix in Prolog using decompose My Test Case trans([[1,2],[3,4],[5,6]], R). R = [[1,3,5],[2,4,6]] ; No Code i have written below to transpose my matrix list_head_tail(...
Transposing a matrix in Prolog using decompose Transposing a matrix in Prolog using decompose prolog decompose Transposing Prolog list_head_tail Exit Call _G15907 Transposing a matrix in Prolog using decompose My Test Case Code i have written below to transpose my matrix I know that we can approach this problem several...
[ -0.00238037109375, 0.01806640625, 0.0167236328125, 0.0064697265625, -0.00182342529296875, 0.005523681640625, -0.02392578125, -0.0089111328125, 0.00103759765625, -0.01348876953125, 0.00946044921875, 0.019287109375, -0.00133514404296875, 0.0159912109375, -0.0135498046875, 0.0047302246093...
[ 11062, 7522, 50944, 425, 1250, 4867, 17368, 8, 277, 78381, 502, 5303, 31251, 46741, 5443, 217, 26265, 146086, 8368, 23, 2646, 8647, 43731, 28864, 35064, 3900, 51515, 2967, 30022, 18151, 116987, 36356, 3229, 53299, 34831 ]
[ 0.154541015625, 0.168212890625, 0.1683349609375, 0.08685302734375, 0.1358642578125, 0.209228515625, 0.02911376953125, 0.1612548828125, 0.1531982421875, 0.1583251953125, 0.09521484375, 0.1859130859375, 0.112060546875, 0.1944580078125, 0.095458984375, 0.0284881591796875, 0.069702148437...
embed
47634206_c1
47634206
prolog
1
), write(’."’), nl. ERROR: [...]/talk.P:91:12: Syntax error: Operator expected ---Note I am also encountering ten singleton variable warnings, but am not sure whether this will prove to be a problem or not, e.g.: ---Lines 59-60: reply(query, FreeVars, (answer(Answer):-Condition), Reply) :- Warning: [...]/talk.P:59: Sin...
), write(’."’), nl. ERROR: [...]/talk.P:91:12: Syntax error: Operator expected ---Note I am also encountering ten singleton variable warnings, but am not sure whether this will prove to be a problem or not, e.g.: ---Lines 59-60: reply(query, FreeVars, (answer(Answer):-Condition), Reply) :- Warning: [...]/talk.P:59: Sin...
[ 0.0247802734375, 0.01409912109375, -0.00390625, 0.01531982421875, -0.004608154296875, 0.0120849609375, 0.0029296875, -0.00701904296875, 0.0020599365234375, -0.04833984375, 0.00775146484375, -0.0020751953125, 0.000888824462890625, -0.005859375, 0.00531005859375, 0.004058837890625, -0....
[ 247, 33022, 132, 1242, 13169, 151206, 24638, 1449, 139109, 683, 12183, 20927, 19010, 86531, 18499, 150922, 84751, 190647, 1492, 11001, 1507, 77336, 1631, 6977, 23534, 2967, 93232, 11156, 60488, 75836, 944, 1294, 5153, 81827, 10133, 7251, 11935,...
[ 0.0311431884765625, 0.1309814453125, 0.0048828125, 0.047454833984375, 0.118896484375, 0.144287109375, 0.1064453125, 0.082275390625, 0.2261962890625, 0.0225067138671875, 0.2103271484375, 0.1851806640625, 0.1181640625, 0.2264404296875, 0.2032470703125, 0.293701171875, 0.26171875, 0.1...
embed
61814299_c0
61814299
prolog
0
Title: current_predicate in SICStus Prolog Problem title: current_predicate in SICStus Prolog Tags: iso-prolog, prolog, sicstus-prolog Problem: current_predicate in SICStus Prolog SICStus Prolog offers both current_predicate/1 and current_predicate/2. The manual page states: current_predicate(?PredSpec) Unifies PredSpe...
current_predicate in SICStus Prolog current_predicate in SICStus Prolog iso-prolog prolog sicstus-prolog current_predicate SICStus Prolog current_predicate in SICStus Prolog SICStus Prolog offers both current_predicate/1 and current_predicate/2. The manual page states: They appear to have the same features: both predic...
[ -0.006988525390625, 0.01953125, 0.004425048828125, 0.0184326171875, -0.01373291015625, 0.022705078125, 0.0228271484375, 0.00167083740234375, -0.01043701171875, -0.0615234375, 0.0081787109375, 0.0054931640625, -0.027099609375, -0.0194091796875, -0.0021209716796875, 0.01177978515625, 0...
[ 43581, 454, 19714, 2063, 67, 23, 159, 102198, 2143, 1250, 4867, 13882, 3454, 502, 26536, 18253, 64600, 15044, 11583, 136, 12477, 23009, 9191, 108975, 5701, 66139, 1653, 4488, 189085, 678, 88996, 24626, 151117, 87, 17669, 4527, 3525, 351, 32...
[ 0.263916015625, 0.033203125, 0.212158203125, 0.2333984375, 0.1033935546875, 0.03057861328125, 0.11572265625, 0.1162109375, 0.2005615234375, 0.160400390625, 0.2000732421875, 0.0633544921875, 0.1077880859375, 0.08013916015625, 0.0966796875, 0.167236328125, 0.058258056640625, 0.090820...
embed
36985169_c3
36985169
prolog
3
([A, B, C, D, E, F, G, H, 111, 45, 45|Tail]). % XXXXXXXXX-oo play( [A, B, C, D, E, F, G, H, I, 45, 111, 111]) :- play([A, B, C, D, E, F, G, H, I, 111, 45, 45]). Yeah, it's ugly. However, when I call findall( Value, play(Game, Value), Values) , where Game is just any sequence of 45 and 111 (for example [45, 111, 45, 45,...
([A, B, C, D, E, F, G, H, 111, 45, 45|Tail]). % XXXXXXXXX-oo play( [A, B, C, D, E, F, G, H, I, 45, 111, 111]) :- play([A, B, C, D, E, F, G, H, I, 111, 45, 45]). Yeah, it's ugly. However, when I call findall( Value, play(Game, Value), Values) , where Game is just any sequence of 45 and 111 (for example [45, 111, 45, 45,...
[ 0.0027923583984375, 0.00982666015625, 0.01318359375, 0.0130615234375, 0.0023651123046875, 0.01116943359375, -0.01129150390625, -0.008544921875, 0.036376953125, -0.004669189453125, 0.0087890625, 0.0084228515625, 0.010498046875, -0.0089111328125, -0.01116943359375, -0.007659912109375, ...
[ 284, 335, 313, 391, 241, 563, 527, 572, 36682, 2678, 9874, 379, 1745, 1193, 205378, 9, 16635, 11301, 132, 87, 4, 15772, 119057, 75, 110608, 33306, 11782, 7413, 5584, 190060, 107576, 13547, 83, 1660, 2499, 40, 944, 136, 4633, 7, 4734, ...
[ 0.0230865478515625, 0.06231689453125, 0.0222320556640625, 0.068115234375, 0.036041259765625, 0.0789794921875, 0.05865478515625, 0.0628662109375, 0.19873046875, 0.2386474609375, 0.0693359375, 0.12451171875, 0.0849609375, 0.0179290771484375, 0.1409912109375, 0.005096435546875, 0.178344...
embed
63225668_c0
63225668
prolog
0
Title: Quoridor AI - undirected graph Problem title: Quoridor AI - undirected graph Tags: prolog Problem: Quoridor AI - undirected graph As a homework, I need to create an AI for the game Quoridor. After some analysis on my side, I decided to represent the board of the game as an undirected graph (see below). The idea ...
Quoridor AI - undirected graph Quoridor AI - undirected graph prolog Quoridor Quoridor AI - undirected graph As a homework, I need to create an AI for the game Quoridor. After some analysis on my side, I decided to represent the board of the game as an undirected graph (see below). The idea is to find the shortest path...
[ 0.0029754638671875, 0.02197265625, 0.007415771484375, 0.024169921875, -0.021484375, 0.0030364990234375, 0.01025390625, 0.005401611328125, -0.0091552734375, -0.01312255859375, -0.01544189453125, -0.0205078125, 0.0021209716796875, 0.0166015625, 0.00701904296875, 0.004974365234375, 0.01...
[ 43851, 416, 1846, 38730, 20, 51, 80581, 297, 41382, 502, 4867, 5368, 18244, 3871, 28282, 6712, 114137, 68872, 33636, 45443, 111, 237, 35064, 6528, 7413, 16610, 525, 60875, 12638, 249, 7710, 1919, 151814, 99156, 18811, 2967, 18, 28219, 6044,...
[ 0.1156005859375, 0.167724609375, 0.20166015625, 0.2152099609375, 0.02911376953125, 0.1427001953125, 0.2254638671875, 0.08636474609375, 0.246337890625, 0.1456298828125, 0.20263671875, 0.036956787109375, 0.1116943359375, 0.051483154296875, 0.1160888671875, 0.07208251953125, 0.053039550...
embed
63387014_c0
63387014
prolog
0
Title: source_sink `library(matrix)' does not exist Problem title: source_sink `library(matrix)' does not exist Tags: prolog, swi-prolog Problem: source_sink `library(matrix)' does not exist I am attempting to use the matrix module in SWI-Prolog, however, upon trying to use the module I get the following erro...
source_sink `library(matrix)' does not exist source_sink `library(matrix)' does not exist prolog swi-prolog source_sink use_module pack_install ERROR source_sink `library(matrix)' does not exist I am attempting to use the matrix module in SWI-Prolog, however, upon trying to use the module I get the following ...
[ 0.00946044921875, 0.0203857421875, -0.0013580322265625, 0.0174560546875, -0.023193359375, 0.01263427734375, 0.001373291015625, 0.005615234375, -0.00872802734375, -0.04052734375, 0.00130462646484375, -0.0439453125, -0.00007677078247070312, 0.003814697265625, 0.01422119140625, 0.00418090...
[ 31344, 7, 14068, 150, 2844, 1294, 192, 87427, 3768, 959, 32316, 502, 4867, 2452, 3454, 4527, 83279, 43824, 80383, 151206, 81887, 50944, 425, 88996, 159, 38969, 10752, 31577, 25632, 18499, 13315, 24927, 2663, 2424, 11435, 9790, 7026, 30646, ...
[ 0.2337646484375, 0.1390380859375, 0.221435546875, 0.122314453125, 0.2161865234375, 0.133056640625, 0.10302734375, 0.195556640625, 0.07177734375, 0.06378173828125, 0.185791015625, 0.11328125, 0.1993408203125, 0.14697265625, 0.1134033203125, 0.08160400390625, 0.123046875, 0.178833007...
embed
7796942_c0
7796942
prolog
0
Title: Division in prolog Problem title: Division in prolog Tags: successor-arithmetics, math, prolog, recursion Problem: Division in prolog I'm trying to define the division in prolog using the remainder theorem and the well-ordering principle. I've got thus far: less(0, s(0)). less(0, s(B)) :- less(0, B). less(s(A), ...
Division in prolog Division in prolog successor-arithmetics math prolog recursion Division add2 Division in prolog I'm trying to define the division in prolog using the remainder theorem and the well-ordering principle. I've got thus far: But the definition of div is somehow wrong. Could someone please give me a hint? ...
[ -0.0003986358642578125, 0.03125, 0.002349853515625, -0.00104522705078125, 0.00112152099609375, -0.0162353515625, -0.01373291015625, -0.0101318359375, 0.01397705078125, -0.038818359375, 0.01806640625, 0.0128173828125, -0.017333984375, -0.003997802734375, 0.0140380859375, -0.003311157226...
[ 127152, 23, 502, 4867, 39457, 42, 8962, 48909, 195625, 15190, 304, 31577, 61924, 70, 91853, 47143, 820, 58391, 5299, 80596, 214, 24702, 2060, 80934, 111, 18221, 209303, 44691, 22936, 5122, 864, 83, 707, 2203, 4488 ]
[ 0.2705078125, 0.0675048828125, 0.1591796875, 0.2467041015625, 0.1268310546875, 0.030303955078125, 0.039215087890625, 0.06768798828125, 0.0986328125, 0.1082763671875, 0.1258544921875, 0.035186767578125, 0.1448974609375, 0.0219573974609375, 0.257568359375, 0.12548828125, 0.110473632812...
embed
15942502_c0
15942502
prolog
0
Title: Prolog gives error undefined procedure Problem title: Prolog gives error undefined procedure Tags: prolog Problem: Prolog gives error undefined procedure I am new in Prolog, but i can't run any procedure from file. I have mac os x mountain lion and swipl in /opt/local/bin. script name is 'prolog' and it's in sam...
Prolog gives error undefined procedure Prolog gives error undefined procedure prolog Prolog vzdaleny_potomek vzadelny_potomek Prolog gives error undefined procedure I am new in Prolog, but i can't run any procedure from file. I have mac os x mountain lion and swipl in /opt/local/bin. script name is 'prolog' and it's in...
[ 0.0123291015625, 0.013671875, -0.0012664794921875, 0.024658203125, -0.032958984375, 0.010986328125, -0.0181884765625, 0.0031280517578125, -0.000530242919921875, -0.05078125, 0.0081787109375, -0.00014591217041015625, 0.012939453125, 0.0027618408203125, 0.0159912109375, 0.00384521484375,...
[ 1250, 4867, 76199, 18499, 9232, 5983, 50491, 502, 10682, 41977, 53, 771, 188, 4581, 596, 1743, 299, 297, 3525, 831, 18, 11675, 1295, 11435, 19138, 362, 1022, 101120, 45486, 2452, 2424, 2146, 98908, 7568, 26499, 3454, 5701, 14364, 33949, 1...
[ 0.1973876953125, 0.26806640625, 0.03729248046875, 0.2015380859375, 0.140380859375, 0.2080078125, 0.246337890625, 0.145751953125, 0.12744140625, 0.1531982421875, 0.0709228515625, 0.03570556640625, 0.1298828125, 0.1619873046875, 0.051605224609375, 0.112060546875, 0.0261993408203125, ...
embed
20550964_c0
20550964
prolog
0
Title: Visual Prolog - take some function as argument of another function Problem title: Visual Prolog - take some function as argument of another function Tags: arguments, function, prolog, visual-prolog Problem: Visual Prolog - take some function as argument of another function I'm a new in Visual Prolog, and as I un...
Visual Prolog - take some function as argument of another function Visual Prolog - take some function as argument of another function arguments function prolog visual-prolog Visual Prolog func1 Func2 stdIO::write End stdIO::nl Visual Prolog - take some function as argument of another function I'm a new in Visual Prolog...
[ 0.0106201171875, -0.007781982421875, -0.00946044921875, 0.027099609375, -0.0030670166015625, 0.033935546875, 0.01190185546875, 0.0033416748046875, -0.0031890869140625, -0.0224609375, 0.005035400390625, 0.0308837890625, -0.0244140625, -0.0022735595703125, 0.0272216796875, -0.02270507812...
[ 73372, 1250, 4867, 5646, 3060, 32354, 237, 10750, 111, 15700, 502, 21176, 3454, 7477, 418, 28670, 304, 6138, 71, 17780, 18781, 18878, 13169, 3525, 46876, 37202, 123309, 9655, 831, 642, 54, 14050, 927, 1884, 903, 4398, 47251, 22304, 3871, ...
[ 0.2298583984375, 0.158203125, 0.23291015625, 0.1351318359375, 0.050994873046875, 0.2086181640625, 0.1041259765625, 0.2442626953125, 0.058319091796875, 0.0906982421875, 0.1341552734375, 0.2205810546875, 0.101318359375, 0.10369873046875, 0.00238037109375, 0.08929443359375, 0.0602722167...
embed
56306067_c0
56306067
prolog
0
Title: Hitroi game "Square between pair" technique Problem title: Hitroi game "Square between pair" technique Tags: prolog Problem: Hitroi game "Square between pair" technique I want to program this strategy "square between pair" in the game of Hitori I tried a lot but without interest. this the sit...
Hitroi game "Square between pair" technique Hitroi game "Square between pair" technique prolog Hitroi Square circle_between_a_pair_row num_in_raw Unshaded circle_between_a_pair_col num_in_col Hitroi game "Square between pair" technique I want to program this strategy "square between pair" in the gam...
[ -0.00177764892578125, 0.01361083984375, 0.007354736328125, 0.041015625, -0.011474609375, 0.00238037109375, -0.010498046875, -0.00665283203125, 0.00157928466796875, 0.0186767578125, 0.00726318359375, 0.0291748046875, -0.0034027099609375, 0.006072998046875, -0.01318359375, -0.00288391113...
[ 43482, 54648, 6712, 94727, 17721, 80836, 61353, 502, 4867, 68305, 42154, 133, 4626, 1177, 33, 109637, 15555, 13269, 73, 81456, 992, 99225, 8447, 3444, 47, 1528, 903, 113857, 108047, 23, 2673, 3826, 37842, 5915, 15490, 33946, 1764, 19462, 17...
[ 0.1212158203125, 0.21240234375, 0.0960693359375, 0.15771484375, 0.237060546875, 0.219970703125, 0.184814453125, 0.0982666015625, 0.1328125, 0.1820068359375, 0.1295166015625, 0.0521240234375, 0.0968017578125, 0.1590576171875, 0.132568359375, 0.1832275390625, 0.15283203125, 0.1446533...
embed
33990841_c0
33990841
prolog
0
Title: Check if two list are both even or odd in Prolog Problem title: Check if two list are both even or odd in Prolog Tags: prolog, list Problem: Check if two list are both even or odd in Prolog I am debating on whether I should check to see if the two list are even by dividing with / or % to check to see if the two ...
Check if two list are both even or odd in Prolog Check if two list are both even or odd in Prolog prolog list Check Prolog List1 List2 Output Check if two list are both even or odd in Prolog I am debating on whether I should check to see if the two list are even by dividing with / or % to check to see if the two list a...
[ 0.0029449462890625, 0.0286865234375, -0.005462646484375, 0.0113525390625, -0.014404296875, 0.035888671875, 0.0159912109375, -0.005645751953125, 0.004150390625, 0.0128173828125, 0.0120849609375, -0.000484466552734375, 0.0191650390625, 0.003631591796875, 0.01361083984375, -0.001647949218...
[ 38679, 2174, 6626, 5303, 621, 15044, 3853, 707, 70270, 23, 1250, 4867, 502, 32036, 304, 13538, 12765, 61998, 1745, 1957, 30646, 29568, 98320, 18151, 25632, 9969, 1340, 7108, 2967, 69101, 3034, 176377 ]
[ 0.1363525390625, 0.043914794921875, 0.114013671875, 0.213134765625, 0.04925537109375, 0.1287841796875, 0.194091796875, 0.06695556640625, 0.2122802734375, 0.029754638671875, 0.1531982421875, 0.2125244140625, 0.127685546875, 0.177734375, 0.06573486328125, 0.07080078125, 0.1444091796875...
embed
44614249_c0
44614249
prolog
0
Title: Prolog permutation type_error Problem title: Prolog permutation type_error Tags: prolog-toplevel, swi-prolog, prolog Problem: Prolog permutation type_error Ok I am trying to use the permutation function and i get a weird type error exception. permutation(X,[1,2,3]). X = [1,2,3] When I type a semicolon I get the ...
Prolog permutation type_error Prolog permutation type_error prolog-toplevel swi-prolog prolog Prolog type_error ERROR Type character_code char_code _8378 in_reply init.pl:779 Prolog permutation type_error Ok I am trying to use the permutation function and i get a weird type error exception. When I type a semicolon I ge...
[ 0.01092529296875, 0.022216796875, 0.021240234375, -0.00119781494140625, -0.01220703125, 0.0030670166015625, -0.0257568359375, 0.0030517578125, -0.005462646484375, -0.047119140625, 0.0091552734375, 0.00189971923828125, 0.0203857421875, 0.016845703125, -0.021728515625, 0.01434326171875, ...
[ 1250, 4867, 117, 561, 22062, 10644, 188800, 502, 13784, 67919, 91, 2452, 3454, 151206, 60457, 62816, 40899, 21441, 1019, 134808, 62479, 217, 2424, 104656, 31577, 32354, 179459, 18499, 131527, 40, 46029, 4759, 25632, 2967, 59720, 44691, 8337, ...
[ 0.1614990234375, 0.2408447265625, 0.105224609375, 0.185302734375, 0.0904541015625, 0.184326171875, 0.1627197265625, 0.120849609375, 0.0628662109375, 0.11279296875, 0.022247314453125, 0.1907958984375, 0.1055908203125, 0.126220703125, 0.18310546875, 0.13671875, 0.1175537109375, 0.115...
embed
37226599_c0
37226599
prolog
0
Title: prolog - subsequence of array - each result exactly once Problem title: prolog - subsequence of array - each result exactly once Tags: list, prolog Problem: prolog - subsequence of array - each result exactly once Here, you can see my implementation: subsequence([], _). subsequence([H1|T1], [H1|T2]) :- subsequen...
prolog - subsequence of array - each result exactly once prolog - subsequence of array - each result exactly once list prolog prolog - subsequence of array - each result exactly once Here, you can see my implementation: For example, This result is generally ok, however I would like to get something like that: (order do...
[ 0.00909423828125, 0.0206298828125, 0.0133056640625, -0.00775146484375, -0.0062255859375, -0.007232666015625, -0.0107421875, 0.02294921875, 0.0145263671875, -0.03955078125, -0.0089111328125, 0.0289306640625, 0.004791259765625, 0.01025390625, 0.01025390625, 0.0162353515625, 0.015014648...
[ 502, 4867, 20, 1614, 184, 944, 3956, 111, 10298, 53, 12638, 16750, 66161, 24145, 5303, 831, 1957, 208124, 27781, 137567, 3664, 49903, 2806, 1884, 2046, 9844, 450, 80596, 22027, 18, 26866, 464, 3163, 10593, 67, 171763, 1636, 11249, 54, 442...
[ 0.215576171875, 0.276611328125, 0.01239013671875, 0.13037109375, 0.084228515625, 0.1085205078125, 0.033935546875, 0.053863525390625, 0.1356201171875, 0.072998046875, 0.09515380859375, 0.20361328125, 0.1790771484375, 0.1942138671875, 0.1630859375, 0.012664794921875, 0.0350341796875, ...
embed
49339237_c1
49339237
prolog
1
-prolog/boot/init.pl:337 What I am aiming to do is to express the line \+ abnormalironman:- specialabnormalironman. in correct syntax. I have seen some examples of possible ways to introduce a negation operator in the consequent, but those were user-defined approaches, and I would feel more comfortable using a built in...
-prolog/boot/init.pl:337 What I am aiming to do is to express the line \+ abnormalironman:- specialabnormalironman. in correct syntax. I have seen some examples of possible ways to introduce a negation operator in the consequent, but those were user-defined approaches, and I would feel more comfortable using a built in...
[ 0.01129150390625, -0.03515625, 0.00860595703125, -0.0107421875, -0.0172119140625, 0.0087890625, 0.0027618408203125, 0.000690460205078125, 0.011962890625, -0.00738525390625, -0.001983642578125, 0.0093994140625, -0.00823974609375, -0.01202392578125, 0.012939453125, -0.0048828125, -0.00...
[ 3454, 4867, 80765, 73, 217, 2424, 129176, 1300, 14578, 36510, 13315, 41872, 1328, 1563, 33176, 1900, 669, 12, 9, 5361, 2055, 5, 23, 26785, 6002, 86531, 27781, 65508, 108, 125682, 39933, 210435, 38937, 5983, 51515, 104577, 88303, 55300, 1250...
[ 0.12451171875, 0.22216796875, 0.185791015625, 0.0162811279296875, 0.10662841796875, 0.07879638671875, 0.19921875, 0.031829833984375, 0.02435302734375, 0.095703125, 0.1177978515625, 0.0293121337890625, 0.14404296875, 0.11376953125, 0.197265625, 0.1466064453125, 0.1558837890625, 0.08...
embed
38141764_c0
38141764
prolog
0
Title: Removing consecutive duplicates from a list in Prolog Problem title: Removing consecutive duplicates from a list in Prolog Tags: prolog Problem: Removing consecutive duplicates from a list in Prolog I have list like following : [a,b,b,e,e,f,f,g] The first and last entries are single, while all others are repeate...
Removing consecutive duplicates from a list in Prolog Removing consecutive duplicates from a list in Prolog prolog a Removing Prolog Newlist Removing consecutive duplicates from a list in Prolog I have list like following : The first and last entries are single, while all others are repeated. How can I remove these ext...
[ 0.00921630859375, 0.006134033203125, 0.0089111328125, 0.00341796875, -0.01348876953125, 0.006683349609375, -0.0026397705078125, 0.01904296875, 0.00860595703125, -0.0079345703125, -0.01202392578125, 0.020751953125, -0.000156402587890625, -0.000274658203125, 0.004974365234375, 0.02514648...
[ 853, 432, 6496, 148390, 13, 171763, 1636, 1295, 5303, 1250, 4867, 23, 502, 2356, 6562, 5117, 136, 4568, 112820, 11001, 119140, 87388, 6097, 4173, 100898, 12989, 25632, 201505, 49146, 67, 90 ]
[ 0.016815185546875, 0.1251220703125, 0.0200347900390625, 0.2117919921875, 0.059967041015625, 0.24755859375, 0.1531982421875, 0.056640625, 0.181640625, 0.146240234375, 0.2125244140625, 0.03497314453125, 0.098388671875, 0.05487060546875, 0.19921875, 0.0697021484375, 0.034820556640625, ...
embed
72573728_c0
72573728
prolog
0
Title: Deriving rules from facts(Logic programming) Problem title: Deriving rules from facts(Logic programming) Tags: prolog, logic Problem: Deriving rules from facts(Logic programming) I started learning logical programming, and intrested if some of the rules can be obtained from the dataset. For example there are fol...
Deriving rules from facts(Logic programming) Deriving rules from facts(Logic programming) prolog logic facts Deriving Logic INDEX e.g NEXT IS_ODD Deriving rules from facts(Logic programming) I started learning logical programming, and intrested if some of the rules can be obtained from the dataset. For example there ar...
[ 0.032958984375, 0.0281982421875, 0.0033111572265625, 0.02392578125, 0.000736236572265625, 0.019775390625, 0.0013275146484375, 0.0006561279296875, 0.0211181640625, -0.035400390625, 0.004638671875, -0.0159912109375, -0.01068115234375, -0.014404296875, -0.00750732421875, -0.0089111328125,...
[ 1310, 14, 6496, 91736, 1295, 15824, 7, 113972, 56037, 449, 1771, 502, 4867, 62775, 50592, 238, 51383, 26939, 9960, 70981, 15744, 454, 670, 24057, 26859, 52080, 289, 3060, 831, 113054, 2053, 3509, 25632, 1884, 2499, 234873, 516, 934, 4358, ...
[ 0.1334228515625, 0.0782470703125, 0.0970458984375, 0.224365234375, 0.134765625, 0.217041015625, 0.055755615234375, 0.119140625, 0.1390380859375, 0.038848876953125, 0.045379638671875, 0.10986328125, 0.182373046875, 0.169677734375, 0.170654296875, 0.0076904296875, 0.11474609375, 0.10...
embed
5971862_c0
5971862
prolog
0
Title: Prolog Question - Simple Grammar Implementation Problem title: Prolog Question - Simple Grammar Implementation Tags: dcg, prolog Problem: Prolog Question - Simple Grammar Implementation If I have the following grammar: S → ε S → a S b S How do I implement it in Prolog? I tried this: isMatched([]). isMatched([a,b...
Prolog Question - Simple Grammar Implementation Prolog Question - Simple Grammar Implementation dcg prolog Prolog Question Simple Grammar Implementation List List3 List2 Prolog Question - Simple Grammar Implementation If I have the following grammar: How do I implement it in Prolog? I tried this: But it obviously doesn...
[ 0.02587890625, 0.002593994140625, 0.00775146484375, 0.033203125, -0.025390625, 0.02001953125, -0.0283203125, 0.01470947265625, 0.01953125, -0.013671875, 0.01153564453125, -0.00083160400390625, -0.02392578125, -0.005035400390625, 0.01446533203125, 0.0012054443359375, 0.01409912109375,...
[ 1250, 4867, 68185, 60552, 48078, 1727, 153941, 104, 238, 177, 502, 32036, 363, 304, 765, 25632, 122092, 147, 11249, 29479, 442, 23, 37842, 903, 171259, 22027, 18, 4488, 10336, 111, 5303, 53418, 186, 11389, 28960, 107730, 83, 79520, 74694, ...
[ 0.198974609375, 0.273681640625, 0.1114501953125, 0.13916015625, 0.1103515625, 0.1121826171875, 0.1468505859375, 0.0159454345703125, 0.0292205810546875, 0.07159423828125, 0.1259765625, 0.1331787109375, 0.10693359375, 0.057037353515625, 0.010009765625, 0.068603515625, 0.169677734375, ...
embed