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
70743490_c0
70743490
prolog
0
Title: create rules from sentence prolog Problem title: create rules from sentence prolog Tags: prolog Problem: create rules from sentence prolog I have next sentence: John is a footballer. Mary is an actress. All of Mary's friends are footballers and are blond ( their hair ). All of John's friends are footballers or a...
create rules from sentence prolog create rules from sentence prolog prolog sentence Mary create rules from sentence prolog I have next sentence: John is a footballer. Mary is an actress. All of Mary's friends are footballers and are blond ( their hair ). All of John's friends are footballers or actors. How could I get ...
[ 0.021728515625, 0.0086669921875, -0.00079345703125, 0.0322265625, -0.005615234375, 0.00531005859375, 0.0093994140625, 0.022216796875, 0.0076904296875, -0.05810546875, -0.000553131103515625, -0.0142822265625, 0.006134033203125, -0.00001823902130126953, 0.0238037109375, 0.001144409179687...
[ 28282, 91736, 1295, 149357, 502, 4867, 23213, 11737, 4939, 83, 10, 101740, 56, 215542, 3164, 111, 23902, 1314, 136, 621, 30906, 24887, 39329, 5809, 2046, 3934, 4568, 6626, 6777, 5117 ]
[ 0.171142578125, 0.21875, 0.1259765625, 0.199951171875, 0.1668701171875, 0.225830078125, 0.2261962890625, 0.08502197265625, 0.1956787109375, 0.0728759765625, 0.0228271484375, 0.15869140625, 0.10546875, 0.1612548828125, 0.0682373046875, 0.0758056640625, 0.1531982421875, 0.06304931640...
embed
41495040_c0
41495040
prolog
0
Title: Rotate a list in prolog recursively Problem title: Rotate a list in prolog recursively Tags: prolog Problem: Rotate a list in prolog recursively I'm trying to rotate a list in prolog recursively but it does not work as expected. Code: rot([],[]). rot([H|T1], [T2|H]):-rot(T1,T2). Output: ?- rot([1,2,3], V). V = [...
Rotate a list in prolog recursively Rotate a list in prolog recursively prolog Rotate Rotate a list in prolog recursively I'm trying to rotate a list in prolog recursively but it does not work as expected. Code: Output: Expected output: Could anyone explain me why my code does not work?
[ -0.000926971435546875, 0.0084228515625, 0.018798828125, 0.0004634857177734375, -0.01116943359375, -0.0087890625, -0.0191650390625, 0.013427734375, 0.006439208984375, -0.015869140625, 0.006256103515625, 0.00138092041015625, 0.00141143798828125, 0.00482177734375, -0.000904083251953125, 0...
[ 146283, 67, 5303, 23, 502, 4867, 195625, 5844, 538, 31577, 47014, 1284, 14602, 959, 4488, 84751, 28864, 13538, 60075, 13, 140992, 73342, 15400, 18151 ]
[ 0.211181640625, 0.128662109375, 0.186767578125, 0.034332275390625, 0.1541748046875, 0.21435546875, 0.19970703125, 0.146484375, 0.0022258758544921875, 0.051025390625, 0.19091796875, 0.0142059326171875, 0.0166015625, 0.06396484375, 0.08056640625, 0.034423828125, 0.03546142578125, 0.0...
embed
65667559_c0
65667559
prolog
0
Title: Example of how pass by value-result works in Prolog Problem title: Example of how pass by value-result works in Prolog Tags: parameter-passing, prolog Problem: Example of how pass by value-result works in Prolog I'm new to Prolog and I am aware of how pass by value-result works. However, I noticed that there's a...
Example of how pass by value-result works in Prolog Example of how pass by value-result works in Prolog parameter-passing prolog Example Prolog Example of how pass by value-result works in Prolog I'm new to Prolog and I am aware of how pass by value-result works. However, I noticed that there's a lack of learning mater...
[ 0.023193359375, 0.01806640625, -0.00128173828125, 0.0003147125244140625, -0.01300048828125, 0.0079345703125, -0.0179443359375, -0.0184326171875, 0.0172119140625, -0.00775146484375, 0.01080322265625, -0.0062255859375, -0.024658203125, 0.0205078125, 0.01214599609375, -0.01031494140625, ...
[ 89536, 8705, 3642, 27875, 390, 34292, 2109, 7136, 43240, 1250, 4867, 171859, 13409, 502, 9, 23, 92635, 52080, 76319, 27781, 46876 ]
[ 0.12646484375, 0.0313720703125, 0.0350341796875, 0.1478271484375, 0.1768798828125, 0.2384033203125, 0.13134765625, 0.1785888671875, 0.1202392578125, 0.1488037109375, 0.2265625, 0.18701171875, 0.0831298828125, 0.10546875, 0.012664794921875, 0.00689697265625, 0.042022705078125, 0.076...
embed
37093257_c1
37093257
prolog
1
Y2 is Y1+1. calc(left,(X1,Y),(X2,Y)) :- X2 is X1-1. calc(right,(X1,Y),(X2,Y)) :- X2 is X1+1. map_calc(_,[],[]). map_calc((X,Y),[H|T],[(H,X1,Y1)|S]) :- calc(H,(X,Y),(X1,Y1)), map_calc((X,Y),T,S). My possible_moves: movs_possiveis(Lab, (X,Y), Movs, Poss) :- lookup(Lab, (X,Y), Walls), \+memberchk(Movs), map_calc((X,Y), W...
Y2 is Y1+1. calc(left,(X1,Y),(X2,Y)) :- X2 is X1-1. calc(right,(X1,Y),(X2,Y)) :- X2 is X1+1. map_calc(_,[],[]). map_calc((X,Y),[H|T],[(H,X1,Y1)|S]) :- calc(H,(X,Y),(X1,Y1)), map_calc((X,Y),T,S). My possible_moves: movs_possiveis(Lab, (X,Y), Movs, Poss) :- lookup(Lab, (X,Y), Walls), \+memberchk(Movs), map_calc((X,Y), W...
[ 0.015625, -0.0019989013671875, 0.0289306640625, 0.017822265625, -0.006866455078125, 0.004180908203125, -0.007568359375, -0.00102996826171875, 0.019287109375, -0.022705078125, -0.00823974609375, -0.0079345703125, 0.000652313232421875, -0.0038909912109375, 0.000644683837890625, -0.008666...
[ 990, 304, 83, 418, 21748, 6510, 238, 2480, 1542, 1723, 1193, 115727, 54969, 22288, 6827, 841, 17727, 2646, 7722, 432, 3132, 931, 18043, 7522, 29888, 164, 97381, 276, 515, 13498, 7, 6713, 2037, 23706, 1328, 27417, 206, 92, 594, 2071, 903...
[ 0.1876220703125, 0.230224609375, 0.10614013671875, 0.073974609375, 0.1754150390625, 0.12255859375, 0.0906982421875, 0.0787353515625, 0.0775146484375, 0.1400146484375, 0.138427734375, 0.1829833984375, 0.05426025390625, 0.11328125, 0.1397705078125, 0.0404052734375, 0.05712890625, 0.0...
embed
67321723_c0
67321723
prolog
0
Title: Convert numbers to list in Prolog? Problem title: Convert numbers to list in Prolog? Tags: prolog, list Problem: Convert numbers to list in Prolog? I have created a random binary generator but it's "output" are written numbers, how i can make them a list? bin_gen(0). bin_gen(Y) :- random(0,2,S),write(S),Y1 is Y ...
Convert numbers to list in Prolog? Convert numbers to list in Prolog? prolog list Convert Prolog Convert numbers to list in Prolog? I have created a random binary generator but it's "output" are written numbers, how i can make them a list? bin_gen(0). bin_gen(Y) :- random(0,2,S),write(S),Y1 is Y - 1,bin_gen(Y1). Y is t...
[ 0.010498046875, 0.002349853515625, -0.0033721923828125, -0.00567626953125, -0.007110595703125, 0.035400390625, -0.0164794921875, -0.003204345703125, -0.00872802734375, -0.01239013671875, -0.015625, -0.0036773681640625, -0.0230712890625, 0.023681640625, 0.0211181640625, 0.0045166015625,...
[ 1657, 11549, 101935, 47, 5303, 23, 1250, 4867, 502, 75935, 96759, 2394, 6635, 145823, 6056, 7077, 59121, 3642, 831, 3249, 2856, 10, 1409, 177609, 1723, 2389, 304, 294, 18781, 418, 990, 106, 7568, 17727, 140909, 3444, 27781, 140992, 209, 1...
[ 0.049835205078125, 0.1455078125, 0.2059326171875, 0.08221435546875, 0.2220458984375, 0.08868408203125, 0.15869140625, 0.240478515625, 0.1260986328125, 0.0692138671875, 0.17578125, 0.1416015625, 0.095947265625, 0.1732177734375, 0.07177734375, 0.0823974609375, 0.1478271484375, 0.0088...
embed
22384882_c1
22384882
prolog
1
to return X = -1 Y = 5 one time. I tried replacing condition 3 with this: minmaxArray([X,Y,_|T], A, B) :- minmaxArray([Y,_|T], M, K), mymin(X,M,Temp), A is Temp, mymax(X,K,Temp2), B is Temp2. but that crashes the program. What can I do to fix this? Note: I know that I may not be using the terminology correctly by sayi...
to return X = -1 Y = 5 one time. I tried replacing condition 3 with this: minmaxArray([X,Y,_|T], A, B) :- minmaxArray([Y,_|T], M, K), mymin(X,M,Temp), A is Temp, mymax(X,K,Temp2), B is Temp2. but that crashes the program. What can I do to fix this? Note: I know that I may not be using the terminology correctly by sayi...
[ 0.0113525390625, -0.007171630859375, 0.0211181640625, 0.00994873046875, -0.0140380859375, 0.01708984375, 0.0283203125, -0.00628662109375, 0.0198974609375, 0.0159912109375, 0.015625, 0.01611328125, 0.001007080078125, -0.01708984375, 0.0235595703125, -0.01336669921875, 0.00335693359375...
[ 30646, 1193, 2203, 68940, 990, 190, 1632, 1733, 37842, 456, 133266, 35431, 138, 903, 881, 24084, 7614, 7092, 1542, 1723, 618, 62, 335, 4, 341, 759, 1249, 159065, 37446, 605, 10461, 5442, 150631, 1528, 30022, 17368, 18614, 25443, 26785, 21...
[ 0.2259521484375, 0.1182861328125, 0.04998779296875, 0.1739501953125, 0.1429443359375, 0.16845703125, 0.04034423828125, 0.142578125, 0.006317138671875, 0.0278778076171875, 0.10150146484375, 0.2196044921875, 0.1126708984375, 0.0165252685546875, 0.1942138671875, 0.1995849609375, 0.05691...
embed
64618354_c0
64618354
prolog
0
Title: append elements satisfy certain condition to list in swi-prolog Problem title: append elements satisfy certain condition to list in swi-prolog Tags: prolog Problem: append elements satisfy certain condition to list in swi-prolog I would like to append all elements that satisfy some predicate to an empty list. I ...
append elements satisfy certain condition to list in swi-prolog append elements satisfy certain condition to list in swi-prolog prolog append elements satisfy certain condition to list in swi-prolog I would like to append all elements that satisfy some predicate to an empty list. I did something like this: but it didn'...
[ 0.005828857421875, -0.0103759765625, 0.01123046875, 0.003570556640625, -0.00836181640625, 0.02783203125, -0.0018157958984375, 0.0284423828125, 0.013427734375, -0.033447265625, 0.0225830078125, -0.01324462890625, -0.01953125, -0.01202392578125, 0.013916015625, 0.00677490234375, -0.002...
[ 114689, 71, 80854, 40407, 53, 24233, 35431, 47, 5303, 91, 2452, 3454, 4867, 502, 23, 1884, 756, 1653, 2063, 142, 201505, 15935, 18, 4488, 4358 ]
[ 0.1912841796875, 0.1309814453125, 0.2021484375, 0.18115234375, 0.023284912109375, 0.09149169921875, 0.1947021484375, 0.044708251953125, 0.191650390625, 0.03515625, 0.1878662109375, 0.11529541015625, 0.18798828125, 0.126708984375, 0.0021820068359375, 0.06964111328125, 0.07330322265625...
embed
7794911_c0
7794911
prolog
0
Title: Limit Printing of the prolog facts to THREE times? Problem title: Limit Printing of the prolog facts to THREE times? Tags: prolog Problem: Limit Printing of the prolog facts to THREE times? Say I have 10 facts path(X) in the database. How do I limit it to printing the first 3 from the database? I have tried usin...
Limit Printing of the prolog facts to THREE times? Limit Printing of the prolog facts to THREE times? prolog Limit Printing THREE Limit Printing of the prolog facts to THREE times? Say I have 10 facts path(X) in the database. How do I limit it to printing the first 3 from the database? I have tried using recursive tech...
[ 0.01397705078125, 0.0010528564453125, 0.00897216796875, -0.006622314453125, 0.0101318359375, -0.005950927734375, -0.00457763671875, 0.01275634765625, 0.01953125, -0.052490234375, -0.005279541015625, -0.023681640625, -0.01287841796875, 0.00738525390625, 0.010009765625, 0.02392578125, ...
[ 125177, 39754, 214, 111, 502, 4867, 15824, 7, 47, 12232, 148776, 20028, 765, 209, 60875, 1542, 23, 63399, 11249, 54, 17475, 442, 2448, 1916, 5117, 138, 1295, 37842, 195625, 5844, 61353, 4734, 51, 40383, 678, 3164, 112397, 77947 ]
[ 0.2108154296875, 0.221435546875, 0.09423828125, 0.0282745361328125, 0.15869140625, 0.219970703125, 0.1937255859375, 0.134521484375, 0.1214599609375, 0.082275390625, 0.2032470703125, 0.2353515625, 0.060638427734375, 0.1256103515625, 0.2076416015625, 0.05926513671875, 0.013824462890625...
embed
36455985_c0
36455985
prolog
0
Title: Prolog: get symbol predicate Problem title: Prolog: get symbol predicate Tags: prolog Problem: Prolog: get symbol predicate I have a symbol table with structure: key → [value | R] I would like to write a predicate get_symbol/2, which receives a key (its first parameter) and combines a value (its second parameter...
Prolog: get symbol predicate Prolog: get symbol predicate prolog Prolog Prolog: get symbol predicate I have a symbol table with structure: I would like to write a predicate get_symbol/2, which receives a key (its first parameter) and combines a value (its second parameter) to the first value associated with key in the ...
[ 0.00170135498046875, -0.0010986328125, 0.004119873046875, -0.0052490234375, -0.03173828125, 0.017333984375, 0.000659942626953125, 0.018798828125, -0.004241943359375, -0.00714111328125, 0.02490234375, 0.0027923583984375, -0.0301513671875, -0.01055908203125, -0.00921630859375, 0.02563476...
[ 1250, 4867, 2046, 26582, 1653, 2063, 67, 502, 23180, 45646, 2806, 1884, 33022, 176726, 12477, 53299, 22799, 5117, 171859, 70163, 34292, 17932, 137272, 4358, 31089 ]
[ 0.148681640625, 0.2335205078125, 0.1490478515625, 0.2724609375, 0.1749267578125, 0.232177734375, 0.122802734375, 0.1097412109375, 0.197265625, 0.1263427734375, 0.011077880859375, 0.082275390625, 0.12548828125, 0.256591796875, 0.2034912109375, 0.0751953125, 0.16455078125, 0.05905151...
embed
14750429_c0
14750429
prolog
0
Title: How can I read a file in prolog and put in a list just a few words? Problem title: How can I read a file in prolog and put in a list just a few words? Tags: prolog, list, file Problem: How can I read a file in prolog and put in a list just a few words? I must read results.txt that contains a tree consisting of: ...
How can I read a file in prolog and put in a list just a few words? How can I read a file in prolog and put in a list just a few words? prolog list file How How can I read a file in prolog and put in a list just a few words? I must read results.txt that contains a tree consisting of: ROOT ( S( NP(..) NV(..) . . ) ) and...
[ 0.0238037109375, -0.01055908203125, -0.01251220703125, 0.01092529296875, -0.0106201171875, 0.01043701171875, 0.0059814453125, 0.001220703125, 0.017333984375, -0.056396484375, 0.00433349609375, -0.01373291015625, -0.0224609375, -0.02490234375, 0.00970458984375, 0.00927734375, 0.008117...
[ 11249, 831, 12301, 11435, 23, 502, 4867, 3884, 5303, 1660, 10846, 34153, 50339, 124326, 53201, 627, 162727, 159, 28814, 65954, 21265, 3642, 183540, 4734, 1052, 15434 ]
[ 0.0362548828125, 0.0322265625, 0.208251953125, 0.1829833984375, 0.08343505859375, 0.1771240234375, 0.24267578125, 0.07952880859375, 0.2144775390625, 0.086669921875, 0.116455078125, 0.1585693359375, 0.158935546875, 0.1607666015625, 0.169189453125, 0.00579833984375, 0.16162109375, 0....
embed
20925218_c0
20925218
prolog
0
Title: Removing duplicates from a list generated with Findall Problem title: Removing duplicates from a list generated with Findall Tags: prolog-findall, list, email, duplicates, prolog Problem: Removing duplicates from a list generated with Findall I'm practicing Prolog by coming up with a very simple database of who ...
Removing duplicates from a list generated with Findall Removing duplicates from a list generated with Findall prolog-findall list email duplicates prolog a Removing Findall Removing duplicates from a list generated with Findall I'm practicing Prolog by coming up with a very simple database of who has sent and received ...
[ 0.0208740234375, 0.014404296875, 0.01141357421875, 0.016357421875, 0.0031890869140625, 0.00994873046875, -0.004150390625, 0.0230712890625, 0.006988525390625, -0.0191650390625, -0.0091552734375, 0.005645751953125, 0.00848388671875, 0.003692626953125, 0.005950927734375, 0.01171875, 0.0...
[ 432, 6496, 171763, 1636, 1295, 5303, 139392, 26040, 5584, 678, 502, 4867, 111607, 3340, 10, 74082, 1250, 8781, 63399, 2750, 1556, 9325, 75204, 75935, 17368, 7413, 53299, 4295, 479, 16711, 47314, 1193 ]
[ 0.130126953125, 0.048675537109375, 0.247314453125, 0.1378173828125, 0.07171630859375, 0.1959228515625, 0.123046875, 0.1705322265625, 0.2393798828125, 0.034210205078125, 0.0831298828125, 0.1668701171875, 0.1241455078125, 0.11865234375, 0.00201416015625, 0.0789794921875, 0.061218261718...
embed
23586789_c0
23586789
prolog
0
Title: How do I state that two lists have the same length? Problem title: How do I state that two lists have the same length? Tags: prolog Problem: How do I state that two lists have the same length? I need to know how to compare the length of two lists in Prolog. This is what I have so far: sum(N1,N2) :- checklength(N...
How do I state that two lists have the same length? How do I state that two lists have the same length? prolog How What Comp How do I state that two lists have the same length? I need to know how to compare the length of two lists in Prolog. This is what I have so far:
[ -0.0064697265625, 0.01202392578125, 0.00799560546875, 0.0167236328125, -0.0048828125, 0.0037384033203125, 0.00494384765625, 0.01361083984375, 0.030517578125, -0.018310546875, 0.0081787109375, 0.01239013671875, 0.01239013671875, 0.017578125, -0.000919342041015625, -0.018798828125, 0.0...
[ 11249, 54, 87, 11341, 6626, 5303, 7, 765, 5701, 140909, 450, 502, 4867, 15612, 3642, 47, 69101, 1250, 2060 ]
[ 0.04742431640625, 0.018310546875, 0.010223388671875, 0.1851806640625, 0.11376953125, 0.2314453125, 0.044830322265625, 0.067626953125, 0.1412353515625, 0.19970703125, 0.01531982421875, 0.0618896484375, 0.200439453125, 0.1202392578125, 0.025421142578125, 0.0050048828125, 0.161376953125...
embed
20107296_c0
20107296
prolog
0
Title: retrieve functor name knowing its parameters Problem title: retrieve functor name knowing its parameters Tags: prolog Problem: retrieve functor name knowing its parameters How I can retrieve a functor name knowing its parameters , my functor are dynamic and not static . I tried this code Fun=..[Functor,1,2],call...
retrieve functor name knowing its parameters retrieve functor name knowing its parameters prolog Fun Functor retrieve functor name knowing its parameters How I can retrieve a functor name knowing its parameters , my functor are dynamic and not static . I tried this code Fun=..[Functor,1,2],call(Fun). But I got error of...
[ 0.03564453125, -0.0162353515625, 0.017578125, 0.007537841796875, -0.0059814453125, 0.0126953125, 0.01373291015625, 0.005767822265625, 0.002777099609375, -0.034912109375, -0.000713348388671875, -0.0257568359375, -0.007110595703125, -0.0045166015625, 0.0079345703125, -0.0380859375, 0.0...
[ 456, 3996, 3134, 7477, 18770, 9351, 141956, 6863, 171859, 7, 502, 4867, 28670, 831, 10, 84079, 959, 201939, 37842, 18151, 97249, 133063, 85763, 18499, 129980, 190316, 1363, 7722, 3917, 765, 129745 ]
[ 0.1319580078125, 0.1881103515625, 0.1429443359375, 0.2044677734375, 0.2313232421875, 0.2122802734375, 0.208740234375, 0.10546875, 0.26806640625, 0.009613037109375, 0.13916015625, 0.1781005859375, 0.225830078125, 0.0384521484375, 0.008941650390625, 0.1927490234375, 0.10711669921875, ...
embed
22096898_c0
22096898
prolog
0
Title: Prolog ERROR out of global stack Problem title: Prolog ERROR out of global stack Tags: prolog Problem: Prolog ERROR out of global stack ass(a). ass(b). ass(c). con(c,r). arg(A, L) :- forall(member(S, L), (ass(S), \+ con(S,A))). If I run arg(r, [a,b]) it will work but if I run arg(r,X) it returns: ERROR out of gl...
Prolog ERROR out of global stack Prolog ERROR out of global stack prolog Prolog ERROR Prolog ERROR out of global stack If I run arg(r, [a,b]) it will work but if I run arg(r,X) it returns: ERROR out of global stack. I would like it to return [a,b] . I understand this is because L is unbounded, but how can I fix this.
[ 0.0185546875, 0.01202392578125, -0.007781982421875, -0.00921630859375, -0.009521484375, 0.0025177001953125, -0.0189208984375, 0.0125732421875, 0.007110595703125, -0.04150390625, 0.0223388671875, -0.01611328125, 0.017578125, -0.0084228515625, 0.0303955078125, 0.01123046875, 0.00144195...
[ 1250, 4867, 151206, 24638, 1810, 111, 7964, 177261, 502, 11675, 79459, 42, 275, 4488, 1284, 2174, 1542, 30646, 2806, 1884, 11, 4, 28219, 339, 51, 99091, 297, 30022, 903 ]
[ 0.1951904296875, 0.303955078125, 0.1956787109375, 0.200439453125, 0.20458984375, 0.2108154296875, 0.22509765625, 0.26171875, 0.1317138671875, 0.16650390625, 0.172607421875, 0.08770751953125, 0.1153564453125, 0.09814453125, 0.02191162109375, 0.00006103515625, 0.1182861328125, 0.1622...
embed
13690136_c0
13690136
prolog
0
Title: I'm curious if Logic Programs can do algebra Problem title: I'm curious if Logic Programs can do algebra Tags: declarative, prolog, clpq, clpfd, algebra Problem: I'm curious if Logic Programs can do algebra I read a brief article about Prolog and Logic Programming. I'm curious if Logic Programs can do ...
I'm curious if Logic Programs can do algebra I'm curious if Logic Programs can do algebra declarative prolog clpq clpfd algebra Logic Programs I'm curious if Logic Programs can do algebra I read a brief article about Prolog and Logic Programming. I'm curious if Logic Programs can do algebra. Like would you be...
[ 0.0159912109375, 0.031005859375, 0.004486083984375, 0.0299072265625, -0.00732421875, 0.0277099609375, 0.0133056640625, 0.01483154296875, -0.001373291015625, -0.03369140625, 0.009765625, 0.000598907470703125, -0.00445556640625, 0.0181884765625, 0.007415771484375, 0.0022430419921875, -...
[ 3768, 193844, 2174, 50592, 238, 7663, 7, 831, 54, 144, 429, 2844, 21635, 4935, 502, 4867, 864, 39557, 71, 12301, 59335, 1250, 136, 27958, 214, 19048, 26458, 2367, 84572, 2886, 111, 1193, 83, 5490, 190, 1328, 1542, 2203, 361, 2046, 35166...
[ 0.03814697265625, 0.1143798828125, 0.0655517578125, 0.2354736328125, 0.1622314453125, 0.2440185546875, 0.1124267578125, 0.1295166015625, 0.1138916015625, 0.0992431640625, 0.1416015625, 0.1767578125, 0.1363525390625, 0.050506591796875, 0.10986328125, 0.2149658203125, 0.071533203125, ...
embed
28014764_c0
28014764
prolog
0
Title: Prolog - extract edges from an adjacency matrix Problem title: Prolog - extract edges from an adjacency matrix Tags: graph-theory, prolog, list Problem: Prolog - extract edges from an adjacency matrix I have a list of lists which represents an adjacency matrix of a graph. Im looking for a way to extract the grap...
Prolog - extract edges from an adjacency matrix Prolog - extract edges from an adjacency matrix graph-theory prolog list an Prolog Edges Prolog - extract edges from an adjacency matrix I have a list of lists which represents an adjacency matrix of a graph. Im looking for a way to extract the graphs edges from it: thx
[ 0.01708984375, 0.010986328125, 0.004669189453125, 0.00885009765625, -0.005035400390625, -0.00811767578125, -0.0091552734375, 0.01904296875, -0.000476837158203125, -0.02734375, 0.00921630859375, -0.025146484375, -0.02880859375, -0.008056640625, 0.01171875, 0.022705078125, 0.0140380859...
[ 1250, 4867, 125663, 121303, 7, 1295, 123594, 329, 27771, 50944, 425, 41382, 2347, 502, 5303, 142, 69030, 33636, 16487, 3917, 5675 ]
[ 0.1517333984375, 0.2425537109375, 0.1927490234375, 0.2205810546875, 0.0673828125, 0.098388671875, 0.0986328125, 0.08642578125, 0.062744140625, 0.1561279296875, 0.122314453125, 0.19775390625, 0.0157928466796875, 0.09259033203125, 0.1591796875, 0.00872802734375, 0.216064453125, 0.060...
embed
25944153_c0
25944153
prolog
0
Title: Prolog every ith element in sublist Problem title: Prolog every ith element in sublist Tags: prolog Problem: Prolog every ith element in sublist Is it possible to copy every ith element from a list to a sublist with just one ternary predicate sublist(Element, List1, List2) and built-in length and append? I know,...
Prolog every ith element in sublist Prolog every ith element in sublist prolog Prolog Prolog every ith element in sublist Is it possible to copy every ith element from a list to a sublist with just one ternary predicate sublist(Element, List1, List2) and built-in length and append? I know, with 4-element auxiliary pred...
[ -0.00457763671875, -0.00823974609375, 0.01129150390625, 0.0022125244140625, -0.01470947265625, 0.03173828125, 0.0025482177734375, 0.02587890625, 0.01806640625, -0.02880859375, 0.00970458984375, -0.0267333984375, -0.0123291015625, -0.006195068359375, -0.0086669921875, 0.01025390625, 0...
[ 1250, 4867, 11907, 8962, 12830, 23, 1614, 6562, 502, 442, 7722, 47, 43658, 1295, 5303, 1660, 1632, 31586, 1294, 1653, 2063, 19929, 32036, 10461, 136, 88303, 140909, 114689, 71, 7306, 62766, 119591, 42459, 113857 ]
[ 0.1500244140625, 0.2413330078125, 0.1688232421875, 0.2049560546875, 0.2222900390625, 0.04351806640625, 0.2379150390625, 0.2266845703125, 0.10382080078125, 0.0310211181640625, 0.1309814453125, 0.0877685546875, 0.2073974609375, 0.04559326171875, 0.1435546875, 0.047760009765625, 0.05963...
embed
74622926_c0
74622926
prolog
0
Title: Prolog: How to create an empty list Problem title: Prolog: How to create an empty list Tags: prolog Problem: Prolog: How to create an empty list I am trying to "return" (for lack of a better word) an empty list in Prolog. I have this: fibonacci(0, X) :- X is []. But when I do this: fibonacci(0, X). I am receivin...
Prolog: How to create an empty list Prolog: How to create an empty list prolog Prolog How ERROR Type empty_list Prolog: How to create an empty list I am trying to "return" (for lack of a better word) an empty list in Prolog. I have this: fibonacci(0, X) :- X is []. But when I do this: fibonacci(0, X). I am receiving th...
[ 0.037841796875, -0.006988525390625, 0.005126953125, 0.00677490234375, -0.0166015625, 0.0145263671875, 0.00121307373046875, -0.0166015625, 0.013427734375, -0.0177001953125, 0.0184326171875, -0.0235595703125, -0.01385498046875, 0.00023174285888671875, 0.01104736328125, 0.00909423828125, ...
[ 1250, 4867, 11249, 28282, 201505, 5303, 142, 502, 151206, 24638, 60457, 6562, 47, 31577, 65395, 19, 92635, 2565, 903, 809, 20990, 52544, 2389, 1193, 15772, 83, 378, 4966, 3229, 87, 54, 217063, 18499, 159258, 2661, 84751, 14037, 1065, 66 ]
[ 0.1436767578125, 0.2071533203125, 0.05029296875, 0.18798828125, 0.2279052734375, 0.2344970703125, 0.034454345703125, 0.09857177734375, 0.117431640625, 0.09356689453125, 0.1820068359375, 0.2183837890625, 0.007965087890625, 0.05133056640625, 0.09002685546875, 0.037017822265625, 0.03768...
embed
32883891_c0
32883891
prolog
0
Title: Prolog: comparing predicate value with constant Problem title: Prolog: comparing predicate value with constant Tags: yap, prolog, logic, compare Problem: Prolog: comparing predicate value with constant I have some problems with prolog, specifically I can't compare a value of a predicate with a constant. predicat...
Prolog: comparing predicate value with constant Prolog: comparing predicate value with constant yap prolog logic compare Prolog Prolog: comparing predicate value with constant I have some problems with prolog, specifically I can't compare a value of a predicate with a constant. Running the program: Why doesn't it work?...
[ 0.017578125, 0.001953125, 0.00421142578125, -0.01434326171875, 0.004241943359375, 0.020263671875, -0.00026702880859375, 0.00927734375, -0.00799560546875, -0.01171875, 0.0019989013671875, 0.01287841796875, -0.0118408203125, -0.0206298828125, 0.01318359375, 0.00148773193359375, 0.00334...
[ 1250, 4867, 37397, 214, 1653, 2063, 67, 34292, 678, 53697, 15850, 502, 62775, 69101, 44402, 183037, 831, 18, 28398, 1528, 44084, 22027, 442, 4488 ]
[ 0.1796875, 0.240966796875, 0.177001953125, 0.01031494140625, 0.1673583984375, 0.211669921875, 0.1015625, 0.185546875, 0.1104736328125, 0.19091796875, 0.1715087890625, 0.149658203125, 0.138671875, 0.2037353515625, 0.0794677734375, 0.01483917236328125, 0.07916259765625, 0.06951904296...
embed
53934948_c2
53934948
prolog
2
wasIn], [ relationship(wasIn, id_0, 1468), relationship(wasIn, id_0, 1052), relationship(wasIn, id_0, 1069) ] ], [ [ 1468, wasIn ], [ relationship(wasIn, 1468, 1367) ] ], [ [ 1466, wasIn ], [ relationship(wasIn, 1466, 1468) ] ], [ [ 1478, aliasOf ], [ relationship(aliasOf, 1478, 1468) ] ], [ [ 1052, wasIn ], [ Code si...
wasIn], [ relationship(wasIn, id_0, 1468), relationship(wasIn, id_0, 1052), relationship(wasIn, id_0, 1069) ] ], [ [ 1468, wasIn ], [ relationship(wasIn, 1468, 1367) ] ], [ [ 1466, wasIn ], [ relationship(wasIn, 1466, 1468) ] ], [ [ 1478, aliasOf ], [ relationship(aliasOf, 1478, 1468) ] ], [ [ 1052, wasIn ], [ Code si...
[ -0.00122833251953125, -0.0086669921875, -0.00286865234375, 0.0299072265625, -0.0067138671875, -0.0166015625, -0.013916015625, -0.004913330078125, 0.0167236328125, -0.01318359375, -0.021728515625, -0.0186767578125, -0.02001953125, -0.005523681640625, -0.00653076171875, -0.00109100341796...
[ 509, 4153, 268, 4, 378, 76755, 13689, 3447, 2389, 616, 90419, 209, 69622, 84772, 16028, 702, 87053, 14604, 19051, 55109, 132887, 41763, 7, 12744, 28864, 26073, 12, 10760, 129214, 60457, 94341, 134549, 15270, 41076, 31384, 64511, 21115, 107, ...
[ 0.2158203125, 0.299072265625, 0.048614501953125, 0.0214080810546875, 0.0511474609375, 0.261474609375, 0.146240234375, 0.07757568359375, 0.1322021484375, 0.1234130859375, 0.2279052734375, 0.093994140625, 0.18310546875, 0.1689453125, 0.2222900390625, 0.05615234375, 0.145263671875, 0....
embed
19006365_c0
19006365
prolog
0
Title: Prolog regarding list manipulation Problem title: Prolog regarding list manipulation Tags: prolog, list Problem: Prolog regarding list manipulation statement: value(engine,2000). value(frame,605). vehicle(motorbike,[engine,frame]). how to write prolog predicate total(X) . X is your total sum for motorbike. I was...
Prolog regarding list manipulation Prolog regarding list manipulation prolog list Prolog Prolog regarding list manipulation statement: how to write prolog predicate total(X) . X is your total sum for motorbike. I was unable to relate value of engine=2000 plus value of frame=605 that should return answer 2605 if i consu...
[ 0.025390625, 0.004180908203125, -0.006500244140625, -0.0006103515625, -0.01019287109375, 0.0211181640625, 0.0013427734375, 0.0162353515625, 0.006011962890625, -0.03466796875, -0.01519775390625, 0.000698089599609375, -0.016357421875, -0.0205078125, 0.0191650390625, 0.01275634765625, 0...
[ 1250, 4867, 118861, 5303, 45258, 1363, 502, 63805, 3642, 47, 33022, 1653, 2063, 67, 3622, 132, 1542, 1193, 83, 935, 10554, 100, 2926, 60142, 2886, 33444, 34292, 87907, 13821, 1001, 123789, 146560, 30646, 35166, 1381, 8194, 75463, 26541 ]
[ 0.13525390625, 0.251708984375, 0.0031032562255859375, 0.2156982421875, 0.229248046875, 0.036895751953125, 0.1689453125, 0.18212890625, 0.057403564453125, 0.0301361083984375, 0.188720703125, 0.1514892578125, 0.213134765625, 0.10107421875, 0.25634765625, 0.01059722900390625, 0.14819335...
embed
27709632_c0
27709632
prolog
0
Title: Get the length of a list in prolog in a non-recursive way Problem title: Get the length of a list in prolog in a non-recursive way Tags: prolog Problem: Get the length of a list in prolog in a non-recursive way I have the following code for getting the length of a list in prolog, it works recursively. Is there a...
Get the length of a list in prolog in a non-recursive way Get the length of a list in prolog in a non-recursive way prolog Get Get the length of a list in prolog in a non-recursive way I have the following code for getting the length of a list in prolog, it works recursively. Is there any other way for getting the leng...
[ -0.01483154296875, 0.0279541015625, 0.0027008056640625, 0.0089111328125, -0.00191497802734375, -0.01104736328125, -0.001007080078125, 0.0250244140625, 0.0213623046875, -0.07861328125, 0.01446533203125, 0.01531982421875, -0.004730224609375, 0.00396728515625, 0.0166015625, 0.016479492187...
[ 20779, 70, 140909, 111, 5303, 23, 502, 4867, 351, 48650, 5844, 3917, 25632, 18151, 20949, 43240, 195625, 157666, 77947 ]
[ 0.0841064453125, 0.071533203125, 0.1912841796875, 0.08941650390625, 0.190185546875, 0.036407470703125, 0.1566162109375, 0.21728515625, 0.1241455078125, 0.0802001953125, 0.1226806640625, 0.0272064208984375, 0.0173187255859375, 0.0946044921875, 0.10369873046875, 0.0287933349609375, 0.1...
embed
49986312_c0
49986312
prolog
0
Title: Find shortest path between two vertices in undirected graph Problem title: Find shortest path between two vertices in undirected graph Tags: shortest-path, prolog Problem: Find shortest path between two vertices in undirected graph I must find the shortest path. This gives me the list of all paths. How can I pic...
Find shortest path between two vertices in undirected graph Find shortest path between two vertices in undirected graph shortest-path prolog Find Find shortest path between two vertices in undirected graph I must find the shortest path. This gives me the list of all paths. How can I pick the smallest out of these?
[ 0.0096435546875, 0.007568359375, 0.01123046875, -0.0128173828125, -0.01507568359375, 0.00836181640625, 0.0014801025390625, -0.0106201171875, 0.021484375, -0.044189453125, 0.0216064453125, -0.00927734375, -0.01904296875, 0.00970458984375, 0.004669189453125, 0.0400390625, 0.00485229492...
[ 26040, 16610, 525, 60875, 17721, 6626, 95378, 5170, 51, 80581, 41382, 128405, 502, 4867, 297, 8110, 7413, 5303, 39580, 19336 ]
[ 0.08892822265625, 0.197998046875, 0.1591796875, 0.192626953125, 0.152587890625, 0.08538818359375, 0.11676025390625, 0.0325927734375, 0.043243408203125, 0.130615234375, 0.147705078125, 0.168701171875, 0.0811767578125, 0.1358642578125, 0.01361083984375, 0.0204010009765625, 0.0685424804...
embed
60680114_c2
60680114
prolog
2
), parent(P, B), A \= B. % First-cousin Rule: cousin(A, B, 1, 0) :- sibling(P1, P2), parent(P1, A), parent(P2, B). % Second-cousin Rule: cousin(A, B, 2, 0) :- parent(P1, A), parent(P2, B), parent(PP1, P1), % your Code signals: Prolog, Case2, case1, Person1, Person2, TypeOfCousinsTheyAre, DegreesRemovedTheyAre, cousinsC...
), parent(P, B), A \= B. % First-cousin Rule: cousin(A, B, 1, 0) :- sibling(P1, P2), parent(P1, A), parent(P2, B). % Second-cousin Rule: cousin(A, B, 2, 0) :- parent(P1, A), parent(P2, B), parent(PP1, P1), % your Code signals: Prolog, Case2, case1, Person1, Person2, TypeOfCousinsTheyAre, DegreesRemovedTheyAre, cousinsC...
[ 0.017333984375, 0.01165771484375, -0.002532958984375, 0.0390625, 0.001556396484375, -0.0002651214599609375, -0.0101318359375, 0.01141357421875, 0.0115966796875, -0.0205078125, -0.00049591064453125, -0.0206298828125, 0.005706787109375, 0.0032196044921875, -0.000308990478515625, -0.01434...
[ 247, 49129, 683, 335, 62, 1369, 1745, 23972, 12600, 1596, 139118, 12, 193429, 284, 106, 757, 15772, 78, 79298, 418, 436, 10461, 304, 77648, 116, 17487, 935, 28864, 26073, 1250, 4867, 43731, 7225, 15270, 60457, 132887, 441, 796, 6700, 53, ...
[ 0.043365478515625, 0.1806640625, 0.08447265625, 0.121337890625, 0.09222412109375, 0.0552978515625, 0.080322265625, 0.1630859375, 0.2093505859375, 0.2257080078125, 0.2470703125, 0.0251922607421875, 0.279052734375, 0.086669921875, 0.037994384765625, 0.119873046875, 0.072509765625, 0....
embed
48355814_c0
48355814
prolog
0
Title: Can someone explain how prolog interprets this step by step? Problem title: Can someone explain how prolog interprets this step by step? Tags: prefix, prolog Problem: Can someone explain how prolog interprets this step by step? Hi I'm desperately try to understand this snippet from my understanding it sets the v...
Can someone explain how prolog interprets this step by step? Can someone explain how prolog interprets this step by step? prefix prolog Can X:1 Can someone explain how prolog interprets this step by step? Hi I'm desperately try to understand this snippet from my understanding it sets the variables X:1 , Z:[2,3] . Now I...
[ 0.0166015625, -0.00927734375, -0.00897216796875, 0.0205078125, -0.01123046875, 0.00115203857421875, -0.001800537109375, 0.007568359375, 0.01251220703125, -0.00958251953125, 0.01318359375, 0.0098876953125, -0.002899169921875, -0.01141357421875, 0.0106201171875, 0.015380859375, 0.01623...
[ 73342, 3642, 502, 4867, 29481, 7, 903, 29954, 390, 22008, 183114, 4171, 1193, 19721, 145342, 9790, 28219, 93, 58134, 100094, 442, 5423, 77336, 567, 12, 155761 ]
[ 0.155029296875, 0.0469970703125, 0.1298828125, 0.2137451171875, 0.180908203125, 0.04296875, 0.06787109375, 0.178955078125, 0.1016845703125, 0.014251708984375, 0.2137451171875, 0.1181640625, 0.13671875, 0.1663818359375, 0.044921875, 0.005218505859375, 0.0859375, 0.041473388671875, ...
embed
50706159_c0
50706159
prolog
0
Title: PROLOG: process of inference, why returns false Problem title: PROLOG: process of inference, why returns false Tags: prolog, inference Problem: PROLOG: process of inference, why returns false I have a definition of conc : conc([], L2, L2). conc([X1|R1], L2, [X1|RN]) :- conc(R1, L2, RN). I don't understand why co...
PROLOG: process of inference, why returns false PROLOG: process of inference, why returns false prolog inference PROLOG PROLOG: process of inference, why returns false I have a definition of conc : I don't understand why conc([X | green], Y, [red, green, blue]). returns false rather than What is the process of inferenc...
[ 0.025390625, -0.0098876953125, 0.007110595703125, 0.029541015625, -0.015380859375, 0.0155029296875, -0.0133056640625, 0.010986328125, 0.004486083984375, 0.006256103515625, 0.00811767578125, -0.0147705078125, -0.015869140625, -0.0025787353515625, 0.006866455078125, 0.019775390625, 0.0...
[ 10514, 47510, 9433, 111, 53498, 6620, 15400, 30646, 98320, 7, 502, 4867, 80934, 158, 238, 2301, 18, 28219, 1542, 50997, 990, 2822, 57571, 43257, 3501, 3688 ]
[ 0.148681640625, 0.214111328125, 0.1453857421875, 0.11669921875, 0.201904296875, 0.10345458984375, 0.1346435546875, 0.183837890625, 0.231201171875, 0.051666259765625, 0.1282958984375, 0.19921875, 0.09814453125, 0.159912109375, 0.1632080078125, 0.0062255859375, 0.03790283203125, 0.07...
embed
19977404_c0
19977404
prolog
0
Title: Prolog: extract a single list from a list of pairs Problem title: Prolog: extract a single list from a list of pairs Tags: prolog, lambda Problem: Prolog: extract a single list from a list of pairs I have a list of pairs: [{1, a}, {2, b}, {3, c}, {4, d}] How can I extract the second element of each pair and make...
Prolog: extract a single list from a list of pairs Prolog: extract a single list from a list of pairs prolog lambda a Prolog Prolog: extract a single list from a list of pairs I have a list of pairs: [{1, a}, {2, b}, {3, c}, {4, d}] How can I extract the second element of each pair and make that a separate list? So: [a...
[ 0.01080322265625, 0.00653076171875, 0.00775146484375, 0.0186767578125, -0.00677490234375, 0.02685546875, -0.01708984375, 0.010009765625, 0.00860595703125, -0.0238037109375, 0.007598876953125, -0.035400390625, -0.016845703125, -0.004608154296875, -0.0194091796875, 0.01397705078125, -0...
[ 1250, 4867, 125663, 11001, 5303, 1295, 111, 80836, 502, 21, 6492, 85, 10, 7, 87, 765, 418, 304, 876, 363, 501, 617, 104, 11249, 831, 17932, 12830, 12638, 136, 3249, 84797, 11, 275, 238, 71, 35166 ]
[ 0.195556640625, 0.25830078125, 0.226806640625, 0.1634521484375, 0.25634765625, 0.1080322265625, 0.048583984375, 0.2445068359375, 0.1357421875, 0.00482177734375, 0.1539306640625, 0.10205078125, 0.09100341796875, 0.00384521484375, 0.00634765625, 0.04443359375, 0.048583984375, 0.07153...
embed
59203960_c1
59203960
prolog
1
s(b,e). s(c,f). s(c,g). s(d,h). s(e,i). s(e,j). The code above works as solve(a, Sol). returns: Sol = [j, e, b, a] Put simply I cannot get the code to work with goal(f). goal(j). s(a,[b, c]). s(b,[d, e]). s(c,[f, g]). s(d,[h]). s(e,[i, j]). Instead of goal(f). goal(j). s(a,b). s(a,c). s(b,d). s(b,e). s(c,f). s(c,g). s...
s(b,e). s(c,f). s(c,g). s(d,h). s(e,i). s(e,j). The code above works as solve(a, Sol). returns: Sol = [j, e, b, a] Put simply I cannot get the code to work with goal(f). goal(j). s(a,[b, c]). s(b,[d, e]). s(c,[f, g]). s(d,[h]). s(e,[i, j]). Instead of goal(f). goal(j). s(a,b). s(a,c). s(b,d). s(b,e). s(c,f). s(c,g). s...
[ 0.006500244140625, 0.02685546875, -0.0032958984375, 0.0263671875, -0.02294921875, 0.00799560546875, -0.003173828125, -0.01202392578125, 0.01092529296875, -0.01409912109375, -0.01092529296875, 0.00020885467529296875, -0.0108642578125, 0.00372314453125, 0.011474609375, -0.0179443359375, ...
[ 91, 275, 4, 13, 420, 177, 71, 127, 14, 170, 18151, 36917, 43240, 237, 86869, 132, 11, 6678, 30646, 2203, 28, 876, 10, 19577, 42856, 87, 53418, 2046, 47, 4488, 678, 69236, 501, 238, 706, 1647, 175399, 111, 28864, 26073, 7, 11249, 262...
[ 0.163818359375, 0.07598876953125, 0.039642333984375, 0.1182861328125, 0.17578125, 0.0889892578125, 0.08740234375, 0.09320068359375, 0.0853271484375, 0.1702880859375, 0.243896484375, 0.100341796875, 0.1287841796875, 0.09014892578125, 0.2384033203125, 0.04119873046875, 0.091796875, 0...
embed
72538676_c0
72538676
prolog
0
Title: Grades of vertex in graph in Prolog Problem title: Grades of vertex in graph in Prolog Tags: prolog Problem: Grades of vertex in graph in Prolog edge is a :- dynamic edge/2 the edge indicates only if the vertex are joined, example: edge(a, b). edge(c, d). edge(r, c). edge(c, t). edge(a, t). And I want to know if...
Grades of vertex in graph in Prolog Grades of vertex in graph in Prolog prolog Grades Prolog Grades of vertex in graph in Prolog edge is a :- dynamic edge/2 the edge indicates only if the vertex are joined, example: And I want to know if a vertex have 3 or more edges but only one of them, if there are more than one wit...
[ 0.013916015625, 0.017578125, -0.006439208984375, -0.005157470703125, -0.0050048828125, -0.010986328125, -0.01318359375, 0.01336669921875, -0.00225830078125, -0.01373291015625, 0.00147247314453125, -0.04443359375, 0.007659912109375, 0.00543212890625, -0.0087890625, 0.0235595703125, 0....
[ 22453, 90, 111, 493, 24371, 23, 41382, 1250, 4867, 502, 121303, 83, 10, 15772, 84079, 12477, 117414, 4734, 2174, 33284, 27781, 47, 3714, 765, 138, 707, 1286, 1632, 2856, 678, 30646, 110 ]
[ 0.226806640625, 0.1282958984375, 0.040283203125, 0.186279296875, 0.257080078125, 0.07562255859375, 0.2149658203125, 0.1859130859375, 0.259033203125, 0.1287841796875, 0.2127685546875, 0.0233612060546875, 0.024078369140625, 0.0184783935546875, 0.203857421875, 0.185302734375, 0.10632324...
embed
30809357_c0
30809357
prolog
0
Title: What is the difference between _ and _variable in prolog? Problem title: What is the difference between _ and _variable in prolog? Tags: syntax, prolog Problem: What is the difference between _ and _variable in prolog? I have encountered a lot of problems with a literal that starts with a _ such as _Peter . So w...
What is the difference between _ and _variable in prolog? What is the difference between _ and _variable in prolog? syntax prolog What _variable _Peter What is the difference between _ and _variable in prolog? I have encountered a lot of problems with a literal that starts with a _ such as _Peter . So what exactly woul...
[ 0.00732421875, -0.0023956298828125, -0.018310546875, 0.0164794921875, -0.010498046875, 0.0301513671875, -0.003204345703125, 0.0057373046875, 0.002288818359375, 0.004241943359375, 0.0211181640625, -0.006500244140625, -0.0140380859375, 0.000637054443359375, 0.0126953125, -0.0014953613281...
[ 4865, 70, 60212, 17721, 101, 136, 21690, 2886, 23, 502, 4867, 6002, 86531, 128503, 83, 5915, 44402, 15659, 289, 4034, 678, 4127, 454 ]
[ 0.0185699462890625, 0.063232421875, 0.18994140625, 0.138671875, 0.106689453125, 0.11474609375, 0.2037353515625, 0.1737060546875, 0.06842041015625, 0.1573486328125, 0.2076416015625, 0.045745849609375, 0.0821533203125, 0.2418212890625, 0.0206756591796875, 0.01080322265625, 0.0227508544...
embed
61209813_c0
61209813
prolog
0
Title: How to create a list compose from names of a predicate in prolog Problem title: How to create a list compose from names of a predicate in prolog Tags: list, predicate, prolog Problem: How to create a list compose from names of a predicate in prolog How to create a list compose from names of a predicate example: ...
How to create a list compose from names of a predicate in prolog How to create a list compose from names of a predicate in prolog list predicate prolog names How How to create a list compose from names of a predicate in prolog How to create a list compose from names of a predicate example: name(a), name(b), name(c), na...
[ 0.006683349609375, -0.0185546875, 0.003814697265625, 0.027587890625, -0.0224609375, 0.027099609375, 0.00927734375, 0.0291748046875, -0.00567626953125, -0.05712890625, -0.00677490234375, -0.0078125, 0.0032958984375, -0.00396728515625, -0.004150390625, 0.0166015625, -0.00823974609375, ...
[ 11249, 47, 28282, 10, 5303, 150350, 1295, 123055, 111, 1653, 2063, 67, 23, 502, 4867, 27781, 9351, 275, 238, 71, 3444, 69307, 1884, 339, 1369, 4358, 18151, 67660 ]
[ 0.058197021484375, 0.0230560302734375, 0.1717529296875, 0.03863525390625, 0.22705078125, 0.2236328125, 0.123779296875, 0.182373046875, 0.09490966796875, 0.1595458984375, 0.220458984375, 0.1044921875, 0.03912353515625, 0.1424560546875, 0.2091064453125, 0.0699462890625, 0.0838012695312...
embed
19554219_c0
19554219
prolog
0
Title: Prolog, not sure as to why it is returning no Problem title: Prolog, not sure as to why it is returning no Tags: prolog Problem: Prolog, not sure as to why it is returning no In this example Sophia is the mother of George. When I type in the code: motherOf(sophia,george). prolog returns yes. However if I type: m...
Prolog, not sure as to why it is returning no Prolog, not sure as to why it is returning no prolog Prolog Prolog, not sure as to why it is returning no In this example Sophia is the mother of George. When I type in the code: motherOf(sophia,george). prolog returns yes. However if I type: motherOf(X,george). it returns ...
[ 0.013427734375, 0.0169677734375, 0.0009918212890625, 0.00885009765625, -0.00848388671875, 0.0380859375, 0.0166015625, 0.008544921875, -0.0091552734375, -0.0145263671875, 0.01397705078125, -0.046630859375, -0.01361083984375, -0.013671875, 0.0234375, -0.0106201171875, -0.01007080078125...
[ 1250, 4867, 9077, 15400, 30646, 214, 110, 502, 83, 27781, 163614, 70, 42732, 111, 14787, 10644, 23, 18151, 132887, 991, 19379, 11, 429, 1478, 13, 72272, 2174, 1542, 1193, 1369, 113, 1284, 31635, 3229, 5608 ]
[ 0.1844482421875, 0.259521484375, 0.06170654296875, 0.079833984375, 0.18798828125, 0.0643310546875, 0.19189453125, 0.172119140625, 0.044525146484375, 0.059326171875, 0.2320556640625, 0.0546875, 0.177978515625, 0.06610107421875, 0.201171875, 0.17431640625, 0.001617431640625, 0.167236...
embed
37296614_c0
37296614
prolog
0
Title: How does subscript work? Problem title: How does subscript work? Tags: prolog, eclipse-clp Problem: How does subscript work? In this first picture I get the first element of the array by using: subscript(array,[1],First) In this second picture I try the same but then for the second element but it gets everything...
How does subscript work? How does subscript work? prolog eclipse-clp How First How does subscript work? In this first picture I get the first element of the array by using: In this second picture I try the same but then for the second element but it gets everything from the second element to the end of the array. I jus...
[ 0.006866455078125, 0.000606536865234375, 0.006378173828125, 0.0128173828125, -0.01611328125, -0.001068115234375, -0.0166015625, 0.0115966796875, -0.0084228515625, -0.0137939453125, 0.009033203125, 0.0052490234375, -0.015625, 0.009765625, 0.0096435546875, -0.01251220703125, 0.02429199...
[ 11249, 14602, 1614, 32032, 4488, 502, 4867, 106371, 184, 26775, 23972, 49726, 2046, 5117, 12830, 111, 10298, 53, 17368, 9790, 17932, 62163, 26818, 1295, 47, 3564, 3444, 959, 10588, 66161 ]
[ 0.11376953125, 0.1094970703125, 0.259765625, 0.320068359375, 0.1627197265625, 0.09912109375, 0.161376953125, 0.1573486328125, 0.09283447265625, 0.1092529296875, 0.065185546875, 0.09423828125, 0.098388671875, 0.078369140625, 0.1378173828125, 0.0111083984375, 0.11962890625, 0.0444946...
embed
48908809_c1
48908809
prolog
1
> Any ideas as to what I'm doing wrong Code signals: org.xml.sax.SAXParseException, groovy.util.XmlSlurper, groovy.util.XmlParser, groovy.util.slurpersupport.NodeChild, Groovy, XmlSlurper, Content, ctx.getPreviousResult, log.info, StringWriter, parse.parseText, XmlNodePrinter, PrintWriter, UTF-8, soapenv:Envelope, xmln...
> Any ideas as to what I'm doing wrong Code signals: org.xml.sax.SAXParseException, groovy.util.XmlSlurper, groovy.util.XmlParser, groovy.util.slurpersupport.NodeChild, Groovy, XmlSlurper, Content, ctx.getPreviousResult, log.info, StringWriter, parse.parseText, XmlNodePrinter, PrintWriter, UTF-8, soapenv:Envelope, xmln...
[ 0.0072021484375, 0.01116943359375, -0.002349853515625, 0.00634765625, 0.003997802734375, 0.0390625, -0.0091552734375, 0.002685546875, 0.0091552734375, 0.01239013671875, 0.0057373046875, 0.01055908203125, -0.010009765625, -0.0174560546875, 0.0302734375, 0.020263671875, -0.01806640625,...
[ 977, 28541, 25647, 237, 47, 2367, 87, 39, 20594, 44691, 28864, 26073, 7, 12, 30910, 131492, 5, 14263, 6703, 160634, 28004, 19279, 63928, 4, 11969, 67983, 3675, 1542, 7237, 14749, 1264, 28636, 2189, 105363, 5021, 112, 441, 102656, 14854, 1...
[ 0.0953369140625, 0.1195068359375, 0.1785888671875, 0.06591796875, 0.0594482421875, 0.0875244140625, 0.1195068359375, 0.1190185546875, 0.166015625, 0.259521484375, 0.236572265625, 0.266357421875, 0.1046142578125, 0.042724609375, 0.1455078125, 0.255859375, 0.02850341796875, 0.1850585...
embed
50054953_c0
50054953
prolog
0
Title: Write Prolog ordered predicate Problem title: Write Prolog ordered predicate Tags: prolog Problem: Write Prolog ordered predicate I am trying to write a predicate that succeeds if and only if the numbers in the list are in non-decreasing order. I am having a hard time trying to figure this out. I know that if ea...
Write Prolog ordered predicate Write Prolog ordered predicate prolog Write Prolog Write Prolog ordered predicate I am trying to write a predicate that succeeds if and only if the numbers in the list are in non-decreasing order. I am having a hard time trying to figure this out. I know that if each element is less than ...
[ -0.003173828125, 0.01513671875, 0.004425048828125, -0.00970458984375, 0.00408935546875, 0.032958984375, -0.007049560546875, -0.028076171875, -0.01092529296875, 0.0068359375, 0.0152587890625, 0.0079345703125, -0.00543212890625, -0.01129150390625, -0.00421142578125, 0.0274658203125, -0...
[ 601, 18781, 1250, 4867, 12989, 297, 1653, 2063, 67, 502, 31577, 33022, 214493, 2174, 4734, 101935, 5303, 23, 351, 50718, 1283, 6953, 7941, 26366, 12638, 12830, 40715, 3501, 105950, 96362, 30646, 98320, 72856 ]
[ 0.04656982421875, 0.131591796875, 0.18994140625, 0.2255859375, 0.23095703125, 0.0804443359375, 0.1781005859375, 0.232177734375, 0.1123046875, 0.1307373046875, 0.03271484375, 0.1461181640625, 0.192626953125, 0.05712890625, 0.04705810546875, 0.1727294921875, 0.1453857421875, 0.049865...
embed
50238446_c0
50238446
prolog
0
Title: Finite State Automata in Prolog Problem title: Finite State Automata in Prolog Tags: state-machine, prolog Problem: Finite State Automata in Prolog A program in Prolog describing a finite automata.It needs to have 2 arguments-lists,the first one containing the input([a,b,a,b,a]) for example and the other the out...
Finite State Automata in Prolog Finite State Automata in Prolog state-machine prolog Finite State Automata Prolog Finite State Automata in Prolog A program in Prolog describing a finite automata.It needs to have 2 arguments-lists,the first one containing the input([a,b,a,b,a]) for example and the other the output,it sh...
[ 0.019287109375, -0.0081787109375, -0.002685546875, 0.028564453125, -0.0206298828125, 0.0164794921875, -0.01361083984375, 0.0283203125, -0.0174560546875, -0.0159912109375, 0.0185546875, -0.0167236328125, -0.02685546875, 0.0277099609375, -0.002899169921875, -0.016845703125, 0.014099121...
[ 13316, 1486, 22836, 51719, 11, 23, 1250, 4867, 11341, 103149, 502, 1528, 28852, 23709, 94418, 13, 11408, 27117, 116, 10750, 6562, 70541, 107730, 275, 27781, 140992, 5608, 30646, 8305, 148, 11400, 206, 117249, 1556, 2809, 94015, 118201, 363, ...
[ 0.1859130859375, 0.1651611328125, 0.1612548828125, 0.2344970703125, 0.15673828125, 0.07373046875, 0.1763916015625, 0.2462158203125, 0.116943359375, 0.13134765625, 0.1131591796875, 0.172607421875, 0.1094970703125, 0.0153045654296875, 0.23095703125, 0.11865234375, 0.260009765625, 0.0...
embed
4482783_c0
4482783
prolog
0
Title: Which is the best among Visual Prolog, SWI-Prolog, and others? Problem title: Which is the best among Visual Prolog, SWI-Prolog, and others? Tags: prolog Problem: Which is the best among Visual Prolog, SWI-Prolog, and others? I have searched the Internet and stackoverflow.com, but got nothing. Who can give me a ...
Which is the best among Visual Prolog, SWI-Prolog, and others? Which is the best among Visual Prolog, SWI-Prolog, and others? prolog Which Visual Prolog SWI-Prolog Which is the best among Visual Prolog, SWI-Prolog, and others? I have searched the Internet and stackoverflow.com, but got nothing. Who can give me a compar...
[ 0.0213623046875, 0.005615234375, 0.010498046875, 0.00927734375, -0.00860595703125, 0.0033721923828125, 0.006744384765625, -0.00677490234375, 0.01287841796875, 0.00799560546875, -0.002044677734375, 0.010009765625, -0.005340576171875, 0.0029754638671875, 0.003326416015625, -0.00521850585...
[ 130078, 83, 70, 2965, 54940, 73372, 1250, 4867, 159, 38969, 9, 10752, 27060, 502, 177261, 5465, 118664, 33720, 225490, 17721, 67842, 9969, 34759, 36497, 136 ]
[ 0.07415771484375, 0.041839599609375, 0.06304931640625, 0.17578125, 0.09716796875, 0.2457275390625, 0.1776123046875, 0.2548828125, 0.08758544921875, 0.255859375, 0.0504150390625, 0.1697998046875, 0.041778564453125, 0.142822265625, 0.07373046875, 0.06756591796875, 0.094970703125, 0.0...
embed
48714840_c0
48714840
prolog
0
Title: Can atom be both predicate and operator? Problem title: Can atom be both predicate and operator? Tags: clause, operators, prolog Problem: Can atom be both predicate and operator? Is it possible to use atom as both operator and predicate. Something along the lines : :- op(101, fy, rule). :- op(99, xfy, ==>). rule...
Can atom be both predicate and operator? Can atom be both predicate and operator? clause operators prolog Can write_canonical Can atom be both predicate and operator? Is it possible to use atom as both operator and predicate. Something along the lines : So that I can say : instead of :
[ 0.018310546875, -0.0007781982421875, 0.01416015625, 0.0245361328125, 0.007171630859375, 0.0225830078125, 0.012939453125, 0.0037078857421875, -0.0142822265625, -0.0361328125, -0.006500244140625, -0.0054931640625, 0.0108642578125, -0.010986328125, 0.00083160400390625, 0.002410888671875, ...
[ 4171, 34627, 186, 15044, 1653, 2063, 67, 136, 39933, 70731, 502, 4867, 33022, 38938, 19, 21533, 2071, 7722, 4527, 237, 124519, 831, 5154, 152, 64457, 111 ]
[ 0.07513427734375, 0.2298583984375, 0.07183837890625, 0.08380126953125, 0.1307373046875, 0.1842041015625, 0.1138916015625, 0.06573486328125, 0.251953125, 0.1019287109375, 0.06622314453125, 0.12359619140625, 0.0943603515625, 0.0572509765625, 0.0292205810546875, 0.09698486328125, 0.0155...
embed
6011167_c2
6011167
prolog
2
WANT, KNOW, THERE, HOW, DOING, FINE, WELL, WHO, A.I, PROGRAM, THINK, ASKING, INTELLIGENT, YES, OFCORSE, ACTUALY, VERY, REAL, DOES, QUESTION, REALLY, MATERS, MEAN, list_length, Length, Length2, quit_session, WAS, NICE, TALKING, USER, SEE, NEXT, TIME, no_response_found, ListOfResponse, NumOfResponse, NOT, SURE, UNDERSTA...
WANT, KNOW, THERE, HOW, DOING, FINE, WELL, WHO, A.I, PROGRAM, THINK, ASKING, INTELLIGENT, YES, OFCORSE, ACTUALY, VERY, REAL, DOES, QUESTION, REALLY, MATERS, MEAN, list_length, Length, Length2, quit_session, WAS, NICE, TALKING, USER, SEE, NEXT, TIME, no_response_found, ListOfResponse, NumOfResponse, NOT, SURE, UNDERSTA...
[ -0.000881195068359375, 0.019775390625, -0.000911712646484375, 0.0252685546875, 0.001861572265625, 0.0087890625, 0.0185546875, 0.004364013671875, 0.01458740234375, 0.003936767578125, 0.004486083984375, 0.01483154296875, -0.025390625, 0.0035858154296875, 0.006866455078125, -0.00598144531...
[ 601, 33996, 4, 341, 110753, 23373, 11766, 572, 54979, 6197, 23186, 563, 25585, 56051, 125253, 62, 5, 568, 59677, 12232, 154610, 6483, 115228, 102686, 866, 52786, 20157, 990, 6706, 31766, 124853, 9127, 12944, 170693, 1723, 34237, 88491, 21389,...
[ 0.115966796875, 0.2386474609375, 0.0518798828125, 0.135498046875, 0.265869140625, 0.1646728515625, 0.2183837890625, 0.06549072265625, 0.1649169921875, 0.1590576171875, 0.150390625, 0.115478515625, 0.1964111328125, 0.1170654296875, 0.1622314453125, 0.0792236328125, 0.040679931640625, ...
embed
17611960_c0
17611960
prolog
0
Title: how can I pass from DCG in Horn clauses with function \+ Problem title: how can I pass from DCG in Horn clauses with function \+ Tags: dcg, prolog Problem: how can I pass from DCG in Horn clauses with function \+ I want to translate a grammar rule like this, into a clause char(C) --> [C], { code_type(C, graph), ...
how can I pass from DCG in Horn clauses with function \+ how can I pass from DCG in Horn clauses with function \+ dcg prolog DCG Horn code_type Out how can I pass from DCG in Horn clauses with function \+ I want to translate a grammar rule like this, into a clause but does not work
[ 0.0108642578125, 0.005645751953125, 0.00885009765625, -0.000507354736328125, -0.01202392578125, 0.006256103515625, -0.0084228515625, -0.008544921875, 0.00543212890625, -0.033203125, -0.007049560546875, -0.02685546875, -0.00140380859375, 0.0023956298828125, 0.01202392578125, 0.009521484...
[ 3642, 831, 27875, 1295, 391, 56367, 23, 78315, 70731, 90, 678, 32354, 1328, 104, 238, 177, 502, 4867, 18151, 50986, 13538, 3900, 19309, 122092, 147, 79986, 1884, 3934, 4488 ]
[ 0.00670623779296875, 0.048004150390625, 0.1346435546875, 0.144287109375, 0.09405517578125, 0.22021484375, 0.028594970703125, 0.2166748046875, 0.19091796875, 0.061431884765625, 0.0210418701171875, 0.1646728515625, 0.057586669921875, 0.013031005859375, 0.005046844482421875, 0.08306884765...
embed
50450019_c0
50450019
prolog
0
Title: how to read draw search tree from tracing in prolog? Problem title: how to read draw search tree from tracing in prolog? Tags: prolog Problem: how to read draw search tree from tracing in prolog? I am trying to draw a search tree from a query in prolog. I used the tracing function in Swish, but I still don't kno...
how to read draw search tree from tracing in prolog? how to read draw search tree from tracing in prolog? prolog tracing how to read draw search tree from tracing in prolog? I am trying to draw a search tree from a query in prolog. I used the tracing function in Swish, but I still don't know how to write out a search t...
[ 0.026123046875, 0.0211181640625, -0.00811767578125, 0.00128936767578125, -0.011474609375, 0.00848388671875, -0.006011962890625, 0.000701904296875, -0.0101318359375, -0.033203125, 0.0052490234375, -0.0233154296875, 0.00433349609375, 0.00012159347534179688, 0.0107421875, -0.0044860839843...
[ 3642, 12301, 79442, 33938, 53201, 1295, 1152, 21896, 502, 4867, 41, 1294, 32354, 114686, 33022, 1810, 5551, 15122, 28219 ]
[ 0.038604736328125, 0.1953125, 0.1851806640625, 0.183349609375, 0.236083984375, 0.05218505859375, 0.1434326171875, 0.1341552734375, 0.0911865234375, 0.1728515625, 0.04241943359375, 0.01739501953125, 0.0655517578125, 0.2103271484375, 0.056060791015625, 0.0469970703125, 0.04107666015625...
embed
27760689_c0
27760689
prolog
0
Title: sort a list of structures by the size of a list Problem title: sort a list of structures by the size of a list Tags: prolog Problem: sort a list of structures by the size of a list I need to sort a list of structures in this format: (A, B, [...]) by the length of the list. For example, if I have: [(A,B,[1,2,3,4]...
sort a list of structures by the size of a list sort a list of structures by the size of a list prolog sort a list of structures by the size of a list I need to sort a list of structures in this format: (A, B, [...]) by the length of the list. For example, if I have: After the sorting I want this: How can i do it?
[ 0.01409912109375, 0.0174560546875, 0.00634765625, 0.003814697265625, -0.0106201171875, -0.01361083984375, -0.01043701171875, -0.0037078857421875, 0.01708984375, -0.0218505859375, -0.001495361328125, 0.011962890625, -0.004241943359375, -0.0125732421875, 0.0244140625, -0.009765625, 0.0...
[ 12096, 5303, 111, 45646, 7, 390, 70, 13267, 10, 502, 4867, 87, 3871, 47, 23, 903, 9384, 284, 335, 1449, 140909, 27781, 765, 24372, 214, 3444, 11249, 831, 17, 54, 442 ]
[ 0.2421875, 0.189453125, 0.0787353515625, 0.200927734375, 0.054901123046875, 0.10498046875, 0.0111083984375, 0.1710205078125, 0.0230255126953125, 0.108642578125, 0.174560546875, 0.010101318359375, 0.0843505859375, 0.044219970703125, 0.002777099609375, 0.045745849609375, 0.13916015625,...
embed
64916537_c0
64916537
prolog
0
Title: lists in new list in prolog without using flatten/2 Problem title: lists in new list in prolog without using flatten/2 Tags: prolog, list Problem: lists in new list in prolog without using flatten/2 I am retrieving multiple lists from lists and put them into a new list. But I want to make the new list of individ...
lists in new list in prolog without using flatten/2 lists in new list in prolog without using flatten/2 prolog list flatten/2 lists in new list in prolog without using flatten/2 I am retrieving multiple lists from lists and put them into a new list. But I want to make the new list of individual items and not a list wit...
[ 0.006988525390625, 0.01409912109375, -0.003387451171875, 0.015869140625, -0.0091552734375, 0.0341796875, -0.006011962890625, 0.01446533203125, -0.00848388671875, -0.0264892578125, 0.006805419921875, -0.03125, 0.007476806640625, 0.00341796875, 0.00099945068359375, -0.002838134765625, ...
[ 5303, 7, 23, 3525, 502, 4867, 15490, 17368, 49878, 510, 12477, 97351, 48716, 1295, 3884, 3934, 3444, 3249, 11651, 55769, 959, 678, 71, 13, 1884, 2046, 11, 238, 1672 ]
[ 0.23876953125, 0.04241943359375, 0.08343505859375, 0.12939453125, 0.1353759765625, 0.204833984375, 0.0816650390625, 0.001678466796875, 0.176513671875, 0.1419677734375, 0.2066650390625, 0.051483154296875, 0.092041015625, 0.0252227783203125, 0.0162506103515625, 0.03985595703125, 0.0591...
embed
71830185_c0
71830185
prolog
0
Title: Prolog: Find positve numbers in a given list Problem title: Prolog: Find positve numbers in a given list Tags: prolog Problem: Prolog: Find positve numbers in a given list I would like to know how to find a sublist of positive numbers in a given list L , example: L = [-1, 5, 3, -7, 10] Sublist = [5, 3, 10] I tri...
Prolog: Find positve numbers in a given list Prolog: Find positve numbers in a given list prolog Prolog Find pos_sublist Prolog: Find positve numbers in a given list I would like to know how to find a sublist of positive numbers in a given list L , example: L = [-1, 5, 3, -7, 10] Sublist = [5, 3, 10] I tried: How could...
[ -0.00933837890625, -0.011962890625, 0.022705078125, -0.00124359130859375, -0.007171630859375, 0.0233154296875, -0.0017852783203125, 0.0263671875, 0.0223388671875, -0.0181884765625, 0.005157470703125, -0.013427734375, -0.0029449462890625, 0.00872802734375, 0.01104736328125, 0.0205078125...
[ 1250, 4867, 26040, 3864, 37404, 101935, 23, 34475, 5303, 502, 22144, 6562, 2806, 1884, 3714, 3642, 47, 7413, 10, 1614, 111, 24491, 339, 27781, 2203, 5759, 190, 138, 20, 966, 209, 8273, 758, 37842, 5809, 29479, 195625, 1830, 2831 ]
[ 0.1368408203125, 0.213623046875, 0.111083984375, 0.1583251953125, 0.2249755859375, 0.2032470703125, 0.04931640625, 0.0804443359375, 0.2054443359375, 0.1080322265625, 0.1998291015625, 0.23876953125, 0.00946044921875, 0.053802490234375, 0.039031982421875, 0.03778076171875, 0.0349121093...
embed
61668299_c1
61668299
prolog
1
(N,Answer). lgstaranswer(N1,Answer1) :- lgstarcompute(N1,Iterations), ((var(Answer1) -> Answer1 = Iterations); (Answer1 == Iterations -> write('yes'); write('no'))). lgstarcompute(N2,Iterations) :- N3 is floor(log10(N2)/log10(2)), (N3 =< 1 -> Iterations = 1; (lgstarcompute(N3,Iterations2), Iterations is Iterations2+1))...
(N,Answer). lgstaranswer(N1,Answer1) :- lgstarcompute(N1,Iterations), ((var(Answer1) -> Answer1 = Iterations); (Answer1 == Iterations -> write('yes'); write('no'))). lgstarcompute(N2,Iterations) :- N3 is floor(log10(N2)/log10(2)), (N3 =< 1 -> Iterations = 1; (lgstarcompute(N3,Iterations2), Iterations is Iterations2+1))...
[ 0.0012359619140625, 0.00689697265625, -0.00121307373046875, -0.006866455078125, 0.01226806640625, 0.038818359375, -0.006072998046875, 0.00439453125, 0.002716064453125, -0.000049591064453125, -0.0034027099609375, 0.0169677734375, -0.00250244140625, 0.0152587890625, 0.010498046875, -0.00...
[ 839, 7251, 7, 6488, 194, 96, 57348, 9369, 418, 4, 17727, 15772, 177, 5613, 58875, 6743, 568, 720, 21094, 1961, 130373, 87, 6, 33022, 63736, 157, 304, 541, 363, 83, 74912, 4867, 963, 10461, 40970, 16093, 106, 14686, 21748, 28864, 26073, ...
[ 0.1724853515625, 0.12158203125, 0.151123046875, 0.24609375, 0.010162353515625, 0.109130859375, 0.116455078125, 0.11669921875, 0.12255859375, 0.039520263671875, 0.11279296875, 0.06866455078125, 0.128173828125, 0.242919921875, 0.1805419921875, 0.1336669921875, 0.061767578125, 0.20690...
embed
40702230_c0
40702230
prolog
0
Title: What does this error mean? Exception: (13) setup_call_catcher_cleanup Problem title: What does this error mean? Exception: (13) setup_call_catcher_cleanup Tags: prolog, prolog-findall, loops, runtime-error Problem: What does this error mean? Exception: (13) setup_call_catcher_cleanup Code signals: What, Exceptio...
What does this error mean? Exception: (13) setup_call_catcher_cleanup What does this error mean? Exception: (13) setup_call_catcher_cleanup prolog prolog-findall loops runtime-error What Exception setup_call_catcher_cleanup ERROR Out new_findall_bag findall_loop _G15784496 user:member _G15784497 _G15784504 veiculos_tro...
[ 0.0123291015625, 0.00341796875, -0.00110626220703125, 0.0220947265625, 0.0106201171875, 0.02490234375, 0.006561279296875, -0.0155029296875, 0.0184326171875, -0.0301513671875, -0.0101318359375, -0.0223388671875, 0.0004634857177734375, -0.0003299713134765625, 0.0361328125, -0.00570678710...
[ 903, 18499, 29459, 5443, 63928, 28261, 169581, 85763, 4460, 5372, 11030, 66, 2037, 502, 4867, 111607, 5584, 40956, 11675, 6032, 188800, 151206, 13538, 3525, 26015, 7413, 28354, 1837, 157054, 186410, 38937, 27417, 170599, 617, 10092, 42779, 3686...
[ 0.0452880859375, 0.1767578125, 0.052276611328125, 0.08251953125, 0.1185302734375, 0.171875, 0.19677734375, 0.1646728515625, 0.1658935546875, 0.1456298828125, 0.1746826171875, 0.114013671875, 0.1573486328125, 0.097412109375, 0.17138671875, 0.1104736328125, 0.156982421875, 0.21398925...
embed
29381312_c0
29381312
prolog
0
Title: Prolog: solving multi-variable arithmetics Problem title: Prolog: solving multi-variable arithmetics Tags: prolog Problem: Prolog: solving multi-variable arithmetics I am having trouble writing a Prolog predicate that returns the variable values for some arithmetic. For example, the function should return what x...
Prolog: solving multi-variable arithmetics Prolog: solving multi-variable arithmetics prolog Prolog Prolog: solving multi-variable arithmetics I am having trouble writing a Prolog predicate that returns the variable values for some arithmetic. For example, the function should return what x and y can be from the equatio...
[ 0.01458740234375, 0.005096435546875, -0.02197265625, -0.003021240234375, -0.017822265625, 0.022705078125, -0.01324462890625, 0.0089111328125, -0.0010833740234375, -0.0027618408203125, 0.0159912109375, 0.0024566650390625, 0.004669189453125, -0.0035858154296875, 0.004974365234375, 0.0024...
[ 1250, 4867, 3115, 6496, 6024, 21690, 2886, 8962, 41637, 502, 282, 19441, 63134, 32562, 1653, 2063, 67, 30646, 7, 70, 77336, 142424, 3060, 187, 9523, 32354, 5608, 2367, 1022, 136, 113, 831, 186, 1295, 28, 5490, 427, 2203, 138, 425, 997, ...
[ 0.2056884765625, 0.274169921875, 0.10107421875, 0.05279541015625, 0.1187744140625, 0.1583251953125, 0.08160400390625, 0.136962890625, 0.0185546875, 0.125, 0.043792724609375, 0.0338134765625, 0.1505126953125, 0.151611328125, 0.1748046875, 0.224365234375, 0.1138916015625, 0.203735351...
embed
47706694_c0
47706694
prolog
0
Title: Unexpected results in prolog Problem title: Unexpected results in prolog Tags: prolog Problem: Unexpected results in prolog Why do I get so many true results instead of just one? Here are how I define my rules: parent(X,Y):- or(father(X,Y), mother(X,Y)). sister(X,Y):- female(X), parent(P, X), parent(P,Y). aunt(X...
Unexpected results in prolog Unexpected results in prolog prolog Unexpected Unexpected results in prolog Why do I get so many true results instead of just one? Here are how I define my rules:
[ 0.02001953125, 0.0032501220703125, -0.00701904296875, 0.000293731689453125, -0.0439453125, -0.000377655029296875, 0.013671875, 0.01214599609375, 0.0108642578125, -0.02734375, -0.00061798095703125, -0.00689697265625, -0.00146484375, 0.02685546875, 0.019287109375, 0.0021209716796875, 0...
[ 992, 83613, 13, 89829, 50339, 23, 502, 4867, 44084, 54, 2046, 221, 5941, 29568, 64457, 1660, 1632, 61924, 759, 91736 ]
[ 0.08514404296875, 0.12310791015625, 0.12890625, 0.11529541015625, 0.2305908203125, 0.049072265625, 0.1800537109375, 0.262451171875, 0.049072265625, 0.0271759033203125, 0.0958251953125, 0.1162109375, 0.1387939453125, 0.2056884765625, 0.11151123046875, 0.019500732421875, 0.085083007812...
embed
72566616_c1
72566616
prolog
1
is what I don't want. ?- fold_rank(8, [1,l,l,1], [a,b,d,c], Ls). Ls = [l-b, l-d|_] ; Ls = [l-b, l-d, 1-c|_] ; Ls = [1-a, l-b, l-d|_] ; Ls = [1-a, l-b, l-d, 1-c|_] ; false. I traced it but I don't understand how backtracking works, i don't see what the problem is. Could you also explain why this gives multiple results ...
is what I don't want. ?- fold_rank(8, [1,l,l,1], [a,b,d,c], Ls). Ls = [l-b, l-d|_] ; Ls = [l-b, l-d, 1-c|_] ; Ls = [1-a, l-b, l-d|_] ; Ls = [1-a, l-b, l-d, 1-c|_] ; false. I traced it but I don't understand how backtracking works, i don't see what the problem is. Could you also explain why this gives multiple results ...
[ -0.0036163330078125, 0.00762939453125, -0.006195068359375, -0.008544921875, -0.0361328125, -0.004730224609375, -0.00628662109375, -0.0026092529296875, 0.0260009765625, 0.00579833984375, 0.0216064453125, 0.006805419921875, 0.00860595703125, 0.0211181640625, -0.0233154296875, -0.00119781...
[ 83, 2367, 87, 2301, 18, 3444, 42822, 36467, 1019, 68252, 141, 76172, 71, 238, 339, 7, 2203, 275, 4317, 98320, 144851, 28219, 4420, 125728, 214, 43240, 1957, 2967, 73342, 15400, 76199, 48716, 50339, 71864, 28864, 26073, 6407, 19309, 134405, ...
[ 0.04864501953125, 0.049896240234375, 0.036102294921875, 0.109130859375, 0.1702880859375, 0.1727294921875, 0.221435546875, 0.278076171875, 0.1748046875, 0.01666259765625, 0.05010986328125, 0.0211029052734375, 0.0806884765625, 0.0284576416015625, 0.089599609375, 0.036468505859375, 0.01...
embed
24978698_c0
24978698
prolog
0
Title: How to use list to record path from A to B? Problem title: How to use list to record path from A to B? Tags: prolog, transitive-closure Problem: How to use list to record path from A to B? If I have a map with nodes 1,2,...,n, I want to know if I can go from n1 to n2 , I can use the following code: path(1,2). pa...
How to use list to record path from A to B? How to use list to record path from A to B? prolog transitive-closure A How get_to How to use list to record path from A to B? If I have a map with nodes 1,2,...,n, I want to know if I can go from n1 to n2 , I can use the following code: But how can record the path from A to ...
[ 0.0086669921875, -0.003875732421875, 0.00750732421875, 0.039306640625, -0.002838134765625, 0.01019287109375, -0.01385498046875, 0.000034332275390625, 0.01275634765625, -0.050537109375, 0.00567626953125, -0.007781982421875, -0.0135498046875, 0.023681640625, 0.004791259765625, -0.0197753...
[ 11249, 47, 4527, 5303, 17164, 60875, 1295, 62, 335, 502, 4867, 62621, 5844, 170224, 2046, 188, 22288, 678, 110, 988, 25568, 19, 3444, 3714, 831, 738, 653, 418, 304, 25632, 18151, 3642, 7639 ]
[ 0.0914306640625, 0.173095703125, 0.1253662109375, 0.2509765625, 0.2205810546875, 0.23193359375, 0.1552734375, 0.095703125, 0.135009765625, 0.08868408203125, 0.14501953125, 0.1375732421875, 0.0889892578125, 0.1837158203125, 0.03765869140625, 0.10516357421875, 0.1546630859375, 0.0005...
embed
55024920_c0
55024920
prolog
0
Title: How to remove all occurrences? Problem title: How to remove all occurrences? Tags: prolog, list Problem: How to remove all occurrences? I am trying to understand why code 1 works fine but code 2 outputs false: remove(X,[],[]). remove(X,[X|Y],Z):-remove(X,Y,Z). % [X|Y] is the input list remove(X,[F|Y],[F|Z]):-rem...
How to remove all occurrences? How to remove all occurrences? prolog list How How to remove all occurrences? I am trying to understand why code 1 works fine but code 2 outputs false:
[ 0.01025390625, 0.01336669921875, -0.0021820068359375, 0.0157470703125, -0.0135498046875, 0.0048828125, -0.006134033203125, 0.017578125, 0.0048828125, -0.00799560546875, 0.0004482269287109375, 0.0068359375, -0.00604248046875, -0.00958251953125, 0.00063323974609375, -0.000804901123046875...
[ 11249, 87388, 756, 74918, 42, 69098, 47, 502, 4867, 5303, 18151, 43240, 5885, 116, 140992, 98320 ]
[ 0.0701904296875, 0.1942138671875, 0.165283203125, 0.163818359375, 0.11297607421875, 0.1241455078125, 0.073486328125, 0.11871337890625, 0.1724853515625, 0.09375, 0.1063232421875, 0.03515625, 0.028839111328125, 0.0173187255859375, 0.04608154296875, 0.135986328125 ]
embed
70413113_c0
70413113
prolog
0
Title: How to append an element to a list in a forall? Problem title: How to append an element to a list in a forall? Tags: prolog Problem: How to append an element to a list in a forall? Basically trying to append D to a list in a forall so I can then sort this list and extract the smallest value. Here's what I've tri...
How to append an element to a list in a forall? How to append an element to a list in a forall? prolog How smallest_distance How to append an element to a list in a forall? Basically trying to append D to a list in a forall so I can then sort this list and extract the smallest value. Here's what I've tried so far:
[ 0.00555419921875, -0.00439453125, -0.00897216796875, -0.003387451171875, -0.001922607421875, -0.00128936767578125, 0.014892578125, -0.01470947265625, 0.035888671875, -0.04345703125, 0.0164794921875, 0.0091552734375, -0.00099945068359375, -0.01361083984375, -0.045166015625, -0.003448486...
[ 11249, 47, 114689, 71, 12830, 5303, 23, 100, 5584, 10, 502, 4867, 19336, 525, 56883, 329, 12506, 31577, 391, 12096, 125663, 34292, 37842, 2060 ]
[ 0.0882568359375, 0.112060546875, 0.17724609375, 0.120361328125, 0.193115234375, 0.1942138671875, 0.060699462890625, 0.1185302734375, 0.223876953125, 0.006378173828125, 0.080810546875, 0.159423828125, 0.1162109375, 0.120849609375, 0.2064208984375, 0.08245849609375, 0.018341064453125, ...
embed
4088766_c0
4088766
prolog
0
Title: variables in Prolog Problem title: variables in Prolog Tags: prolog Problem: variables in Prolog I need to create a family relationship using Prolog. I installed SWI Prolog on my laptop, and create a file with two variables just to get familiar with Prolog. I did consult to import the file and thought I was good...
variables in Prolog variables in Prolog prolog Prolog variables in Prolog I need to create a family relationship using Prolog. I installed SWI Prolog on my laptop, and create a file with two variables just to get familiar with Prolog. I did consult to import the file and thought I was good to go. However, when i tried ...
[ 0.054443359375, -0.002410888671875, -0.0032501220703125, 0.02099609375, -0.00156402587890625, 0.0150146484375, 0.00494384765625, 0.005157470703125, -0.00634765625, -0.0181884765625, -0.00060272216796875, 0.00274658203125, -0.0216064453125, -0.005889892578125, 0.0201416015625, -0.003417...
[ 77336, 7, 23, 1250, 4867, 502, 3871, 28282, 10, 14449, 76755, 17368, 20600, 159, 38969, 26367, 11435, 6626, 16031, 75463, 24927, 17569, 4127, 33306, 37842, 17203, 1238, 11627, 425, 64457, 30646, 10941, 15824, 214, 9774, 13 ]
[ 0.282470703125, 0.02716064453125, 0.07196044921875, 0.1588134765625, 0.26123046875, 0.095703125, 0.0484619140625, 0.1090087890625, 0.011077880859375, 0.1456298828125, 0.168212890625, 0.0211029052734375, 0.077392578125, 0.0286865234375, 0.173583984375, 0.11669921875, 0.135009765625, ...
embed
33201090_c0
33201090
prolog
0
Title: Force to backtrack in Prolog Problem title: Force to backtrack in Prolog Tags: list, prolog Problem: Force to backtrack in Prolog I want to code a prefix function with prolog, but it does not work. Here's my code: prefix(P,[X|_]) :- P == X. And I want that this input results to true : ?- prefix([1,2],[1,2,3,4])....
Force to backtrack in Prolog Force to backtrack in Prolog list prolog Force Prolog Force to backtrack in Prolog I want to code a prefix function with prolog, but it does not work. Here's my code: And I want that this input results to true : The problem is that I want that the X goes back and tries to get another value ...
[ 0.01416015625, 0.025146484375, 0.0269775390625, 0.00665283203125, -0.0101318359375, -0.0093994140625, 0.005401611328125, 0.005828857421875, 0.00555419921875, -0.023681640625, 0.01300048828125, 0.005950927734375, -0.00482177734375, 0.003204345703125, -0.000293731689453125, 0.00592041015...
[ 59591, 47, 4420, 125728, 23, 1250, 4867, 5303, 502, 3444, 18151, 183114, 32354, 678, 14602, 959, 4488, 107730, 50339, 29568, 2967, 1193, 60899, 1927, 2046, 15700, 34292, 16750, 7639, 121742 ]
[ 0.236083984375, 0.06298828125, 0.2213134765625, 0.29736328125, 0.0567626953125, 0.17626953125, 0.254150390625, 0.1488037109375, 0.13671875, 0.0897216796875, 0.1619873046875, 0.245849609375, 0.1741943359375, 0.023712158203125, 0.01153564453125, 0.058258056640625, 0.080078125, 0.1400...
embed
39422270_c1
39422270
prolog
1
rio,babel)), nl, halt. The last problem I have is when i try to run swipl it goes through and turns on the program. but when i type in [movie]. it just says true and doesn't show that is says compiled or anything of the sort. Code signals: Prolog, Beginner, acted_in, brad_pitt, cate_blanchette, sharlto_copley, district...
rio,babel)), nl, halt. The last problem I have is when i try to run swipl it goes through and turns on the program. but when i type in [movie]. it just says true and doesn't show that is says compiled or anything of the sort. Code signals: Prolog, Beginner, acted_in, brad_pitt, cate_blanchette, sharlto_copley, district...
[ 0.007232666015625, 0.02001953125, 0.00604248046875, 0.0198974609375, -0.0206298828125, 0.0179443359375, -0.01458740234375, 0.005035400390625, -0.0281982421875, -0.028076171875, -0.00714111328125, 0.002410888671875, -0.000881195068359375, 0.000499725341796875, -0.0115966796875, -0.00067...
[ 4726, 402, 4063, 13169, 58810, 4568, 2967, 765, 9790, 11675, 91, 2452, 2424, 8305, 15504, 98, 1528, 1284, 3229, 10644, 23, 136036, 1660, 17378, 29568, 22027, 18, 7639, 375, 5974, 297, 12096, 28864, 26073, 7, 1250, 4867, 67053, 56, 10, 8...
[ 0.2489013671875, 0.07366943359375, 0.198974609375, 0.1158447265625, 0.226318359375, 0.1009521484375, 0.155029296875, 0.048828125, 0.0721435546875, 0.0797119140625, 0.0171661376953125, 0.2137451171875, 0.2369384765625, 0.1177978515625, 0.06280517578125, 0.0909423828125, 0.187622070312...
embed
27819258_c0
27819258
prolog
0
Title: Complexity of ISO Prolog predicates Problem title: Complexity of ISO Prolog predicates Tags: iso-prolog, prolog, time-complexity Problem: Complexity of ISO Prolog predicates Are there any guarantees for upper bounds on the time complexity of the standard Prolog predicates? For example: is it certain that sort(+L...
Complexity of ISO Prolog predicates Complexity of ISO Prolog predicates iso-prolog prolog time-complexity Complexity ISO Prolog List SortedList Complexity of ISO Prolog predicates Are there any guarantees for upper bounds on the time complexity of the standard Prolog predicates? For example: is it certain that sort(+Li...
[ -0.000148773193359375, -0.004638671875, 0.0250244140625, -0.01361083984375, -0.0201416015625, -0.0030670166015625, 0.01116943359375, -0.0186767578125, 0.01806640625, -0.0093994140625, 0.01092529296875, 0.00775146484375, -0.0235595703125, 0.0023040771484375, -0.0036163330078125, 0.00074...
[ 113197, 2481, 17408, 1250, 4867, 1653, 2063, 13882, 3454, 502, 1733, 277, 44974, 32036, 53666, 297, 154663, 2499, 142027, 7, 1407, 56, 99091, 27140, 5570, 1636, 24233, 12096, 1328, 705, 158240, 3674, 127877, 23, 180, 19, 8035, 140909, 9969,...
[ 0.241943359375, 0.091064453125, 0.1971435546875, 0.172607421875, 0.25146484375, 0.170654296875, 0.1949462890625, 0.120361328125, 0.1199951171875, 0.12109375, 0.1556396484375, 0.068603515625, 0.154052734375, 0.15771484375, 0.132080078125, 0.037384033203125, 0.1578369140625, 0.042449...
embed
62583442_c0
62583442
prolog
0
Title: repeat of numbers in prolog and see how many Problem title: repeat of numbers in prolog and see how many Tags: prolog Problem: repeat of numbers in prolog and see how many Is there anybody that can help me with this please? There is a list of numbers for which we know that there are exactly two occurrences of ea...
repeat of numbers in prolog and see how many repeat of numbers in prolog and see how many prolog repeat of numbers in prolog and see how many Is there anybody that can help me with this please? There is a list of numbers for which we know that there are exactly two occurrences of each number except one. Please write a ...
[ -0.004791259765625, 0.003448486328125, 0.002197265625, 0.00885009765625, 0.00799560546875, 0.03271484375, -0.00726318359375, -0.00016498565673828125, 0.02001953125, -0.0308837890625, 0.00799560546875, -0.0146484375, 0.005218505859375, 0.00897216796875, 0.0296630859375, -0.018310546875,...
[ 119140, 111, 101935, 23, 502, 4867, 136, 1957, 3642, 5941, 831, 4358, 22936, 5303, 642, 3714, 66161, 6626, 74918, 42, 69098, 12638, 14012, 40494, 1632, 30607, 33022, 1250, 18151, 7413, 903, 105843, 89536, 54753, 138, 116, 201, 305, 35914, ...
[ 0.2900390625, 0.11083984375, 0.1514892578125, 0.0711669921875, 0.1671142578125, 0.2169189453125, 0.009521484375, 0.1314697265625, 0.041168212890625, 0.1107177734375, 0.009368896484375, 0.05902099609375, 0.051605224609375, 0.112548828125, 0.00531005859375, 0.06634521484375, 0.09155273...
embed
25685964_c1
25685964
prolog
1
: (7) length([1, 2, 3, 4, 5, 6, 7, 8], 8) ? creep Call: (7) _G3041 is 1 mod 2 ? creep Exit: (7) 1 is 1 mod 2 ? creep Call: (7) add([1, 2, 3, 4, 5, 6, 7, 8], 2, [], 8, 1, _G3046) ? creep Fail: (7) add([1, 2, 3, 4, 5, 6, 7, 8], 2, [], 8, 1, _G3046) ? creep Fail: (6) remove([1, 2, 3, 4, 5, 6, 7, 8], 2, _G2941) ? creep fal...
: (7) length([1, 2, 3, 4, 5, 6, 7, 8], 8) ? creep Call: (7) _G3041 is 1 mod 2 ? creep Exit: (7) 1 is 1 mod 2 ? creep Call: (7) add([1, 2, 3, 4, 5, 6, 7, 8], 2, [], 8, 1, _G3046) ? creep Fail: (7) add([1, 2, 3, 4, 5, 6, 7, 8], 2, [], 8, 1, _G3046) ? creep Fail: (6) remove([1, 2, 3, 4, 5, 6, 7, 8], 2, _G2941) ? creep fal...
[ 0.0087890625, 0.03857421875, 0.00799560546875, 0.0181884765625, -0.00927734375, -0.00142669677734375, 0.00121307373046875, 0.004180908203125, 0.022216796875, -0.021240234375, 0.009033203125, 0.0089111328125, -0.022705078125, 0.0120849609375, 0.01904296875, -0.008544921875, 0.01684570...
[ 152, 8696, 140909, 418, 116, 138, 201, 190, 305, 361, 382, 4, 65034, 49512, 254, 26265, 724, 1197, 8894, 83, 106, 2811, 5443, 217, 15190, 117413, 190355, 6791, 87388, 4235, 123001, 98320, 35672, 3714, 7440, 2967, 28864, 26073, 7, 223317, ...
[ 0.08642578125, 0.16162109375, 0.2344970703125, 0.055511474609375, 0.1357421875, 0.103515625, 0.10015869140625, 0.0989990234375, 0.09423828125, 0.06768798828125, 0.1673583984375, 0.03338623046875, 0.1929931640625, 0.1864013671875, 0.1351318359375, 0.174072265625, 0.077392578125, 0.1...
embed
32834612_c0
32834612
prolog
0
Title: Make If statement with OR || and &amp;&amp; checks Problem title: Make If statement with OR || and &amp;&amp; checks Tags: prolog, if-statement Problem: Make If statement with OR || and && checks How may I make something like this in prolog: if(A > -1 && A > 0){ //DoSomething } else{ //DoAnotherThing } Tried thi...
Make If statement with OR || and &amp;&amp; checks Make If statement with OR || and &amp;&amp; checks prolog if-statement Make DoSomething DoAnotherThing Tudo Vazio Make If statement with OR || and && checks How may I make something like this in prolog: Tried this:
[ 0.011962890625, -0.01226806640625, 0.004058837890625, 0.03173828125, 0.006378173828125, 0.004730224609375, 0.002227783203125, -0.000659942626953125, 0.00482177734375, 0.0040283203125, -0.00927734375, 0.00008058547973632812, -0.0150146484375, -0.003753662109375, 0.0111083984375, 0.00250...
[ 26176, 4263, 63805, 678, 33172, 136, 25133, 12765, 7, 1230, 502, 4867, 2174, 61340, 674, 984, 282, 64113, 126340, 20800, 214, 58088, 310, 36971, 619, 1543, 87, 3249, 9844, 1884, 903, 23, 4699 ]
[ 0.12841796875, 0.260986328125, 0.26513671875, 0.1097412109375, 0.27294921875, 0.151123046875, 0.035797119140625, 0.2430419921875, 0.0028057098388671875, 0.1669921875, 0.1756591796875, 0.23681640625, 0.193359375, 0.18212890625, 0.00984954833984375, 0.08404541015625, 0.006195068359375,...
embed
70758110_c0
70758110
prolog
0
Title: How do I get the index of a number in a list in Prolog? Problem title: How do I get the index of a number in a list in Prolog? Tags: prolog Problem: How do I get the index of a number in a list in Prolog? Just heads I'm fairly new to prolog so this might be a bit of a dumb question, but, Basically what I'm tryin...
How do I get the index of a number in a list in Prolog? How do I get the index of a number in a list in Prolog? prolog How Prolog How do I get the index of a number in a list in Prolog? Just heads I'm fairly new to prolog so this might be a bit of a dumb question, but, Basically what I'm trying to accomplish is to get ...
[ -0.0018310546875, 0.00921630859375, -0.0012664794921875, 0.002685546875, -0.0079345703125, 0.010986328125, 0.010009765625, -0.00238037109375, 0.0174560546875, -0.033203125, 0.004791259765625, -0.0233154296875, -0.043701171875, 0.0172119140625, 0.012939453125, -0.01129150390625, 0.021...
[ 11249, 2046, 70, 63262, 111, 14012, 23, 5303, 1250, 4867, 502, 54, 87, 10, 10336, 6492, 31577, 163846, 1295, 6083, 40494, 757, 138, 106, 305 ]
[ 0.047149658203125, 0.113037109375, 0.0889892578125, 0.272216796875, 0.0699462890625, 0.21435546875, 0.06842041015625, 0.1964111328125, 0.156005859375, 0.23681640625, 0.078857421875, 0.0292205810546875, 0.0262908935546875, 0.00372314453125, 0.04974365234375, 0.021697998046875, 0.03607...
embed
37374713_c2
37374713
prolog
2
icontext notation but find it hard to Code signals: Dcg, X-Y, seq_seq_absdis, Seq1, Seq2, Dis, same_length, Dislist, seq_subseq, List1, List2, Subseq, smallseq_largeseq_dis, Sseq, Lseq, Subseqs, Distances, ea_smallseq_largeseq_dis, Subseq-Dis, ea_smallseq_largeseq_dis_h, Pairs, BestSofar1, BestSofar2, accumulate_dis, B...
icontext notation but find it hard to Code signals: Dcg, X-Y, seq_seq_absdis, Seq1, Seq2, Dis, same_length, Dislist, seq_subseq, List1, List2, Subseq, smallseq_largeseq_dis, Sseq, Lseq, Subseqs, Distances, ea_smallseq_largeseq_dis, Subseq-Dis, ea_smallseq_largeseq_dis_h, Pairs, BestSofar1, BestSofar2, accumulate_dis, B...
[ 0.006134033203125, -0.0037689208984375, 0.00750732421875, 0.0233154296875, 0.013671875, -0.0130615234375, -0.00469970703125, 0.0029449462890625, 0.006072998046875, 0.0238037109375, 0.00087738037109375, 0.006744384765625, 0.022216796875, 0.025390625, -0.006591796875, 0.00604248046875, ...
[ 47989, 22829, 110, 22062, 1284, 7413, 442, 7941, 47, 28864, 26073, 7, 12, 391, 238, 177, 4, 1193, 9, 1723, 40, 864, 184, 2055, 3827, 503, 418, 304, 6206, 5701, 23986, 6562, 22144, 32036, 8273, 19336, 154349, 8394, 69070, 44456, 127, 3...
[ 0.2059326171875, 0.291015625, 0.2108154296875, 0.1795654296875, 0.0869140625, 0.16162109375, 0.1192626953125, 0.1998291015625, 0.099365234375, 0.283203125, 0.3076171875, 0.15380859375, 0.056365966796875, 0.037567138671875, 0.055084228515625, 0.148193359375, 0.04266357421875, 0.0971...
embed
36804891_c0
36804891
prolog
0
Title: Prolog Tree Nodes Path Problem title: Prolog Tree Nodes Path Tags: prolog Problem: Prolog Tree Nodes Path Hello, I have basic knowledge about prolog and I am facing problems in writing the prolog code for the following problem: Write the fact about the above figure and write the following prolog rule: pos_path. ...
Prolog Tree Nodes Path Prolog Tree Nodes Path prolog Prolog Tree Nodes Path pos_path Prolog Tree Nodes Path Hello, I have basic knowledge about prolog and I am facing problems in writing the prolog code for the following problem: Write the fact about the above figure and write the following prolog rule: pos_path. Sampl...
[ 0.0250244140625, 0.0021820068359375, 0.006439208984375, -0.004547119140625, -0.006500244140625, 0.017822265625, -0.019775390625, -0.0191650390625, 0.004119873046875, -0.053466796875, 0.00086212158203125, -0.00787353515625, -0.0087890625, -0.01007080078125, 0.0079345703125, 0.0007171630...
[ 1250, 4867, 101344, 438, 988, 108421, 502, 3864, 454, 128405, 62822, 51359, 7808, 44402, 32562, 18151, 25632, 2967, 18781, 15824, 26366, 33022, 79986, 947, 33209, 11675 ]
[ 0.1673583984375, 0.2327880859375, 0.1669921875, 0.1529541015625, 0.11663818359375, 0.2041015625, 0.153076171875, 0.2208251953125, 0.0240478515625, 0.2401123046875, 0.030426025390625, 0.06500244140625, 0.035980224609375, 0.07061767578125, 0.06903076171875, 0.14892578125, 0.01554107666...
embed
6142707_c0
6142707
prolog
0
Title: Looking for examples of the record library for SWI-prolog Problem title: Looking for examples of the record library for SWI-prolog Tags: record, swi-prolog, prolog Problem: Looking for examples of the record library for SWI-prolog I am looking for example uses (or tutorials) of the record library http://www.cs.f...
Looking for examples of the record library for SWI-prolog Looking for examples of the record library for SWI-prolog record swi-prolog prolog Looking SWI-prolog Looking for examples of the record library for SWI-prolog I am looking for example uses (or tutorials) of the record library http://www.cs.fit.edu/~pkc/classes/...
[ 0.0189208984375, 0.025146484375, 0.014892578125, 0.0216064453125, -0.01361083984375, 0.00225830078125, -0.0054931640625, 0.011962890625, -0.0005950927734375, -0.042724609375, 0.0079345703125, -0.031005859375, -0.005340576171875, 0.0009918212890625, 0.0174560546875, -0.0118408203125, ...
[ 157268, 27781, 7, 17164, 35773, 1294, 159, 38969, 3454, 4867, 2452, 502, 4527, 57143, 16086, 15246, 67413, 508, 12662, 20605, 107, 32271, 7693, 110934, 6275, 19943, 1375, 2676 ]
[ 0.0712890625, 0.1761474609375, 0.004974365234375, 0.19873046875, 0.20703125, 0.09246826171875, 0.059295654296875, 0.218994140625, 0.102783203125, 0.1651611328125, 0.185546875, 0.08294677734375, 0.08551025390625, 0.140625, 0.0924072265625, 0.052734375, 0.0557861328125, 0.11047363281...
embed
26849633_c0
26849633
prolog
0
Title: Recursive function in Prolog Problem title: Recursive function in Prolog Tags: function, clpfd, recursion, prolog Problem: Recursive function in Prolog I try to calculate recursive function: f(x, y) = 0 if x = 0; f(x, y) = 1 if x = 1; f(x, y) = y*y*f(x-2,y) if x>1. I tried this way: f(0,_,0). f(1,_,1). f(X,Y,Z):...
Recursive function in Prolog Recursive function in Prolog function clpfd recursion prolog Recursive Prolog x-2 Recursive function in Prolog I try to calculate recursive function: I tried this way: I can only obtain true/false. How can I calculate value of this function? Thank you very much!
[ 0.009765625, -0.00958251953125, 0.00225830078125, 0.005462646484375, -0.0111083984375, 0.0113525390625, 0.0115966796875, 0.010498046875, 0.00628662109375, 0.01202392578125, 0.007598876953125, -0.0263671875, -0.0299072265625, -0.01287841796875, 0.049560546875, 0.0032196044921875, 0.01...
[ 853, 48650, 5844, 32354, 23, 1250, 4867, 33139, 39557, 71, 195625, 1830, 502, 1022, 5428, 9790, 74481, 67, 37842, 3917, 831, 4734, 113054, 29568, 64, 8710, 11249, 34292, 111, 903 ]
[ 0.0965576171875, 0.2198486328125, 0.187744140625, 0.2208251953125, 0.05718994140625, 0.1607666015625, 0.26513671875, 0.005859375, 0.0523681640625, 0.094970703125, 0.2359619140625, 0.002777099609375, 0.09130859375, 0.03741455078125, 0.1527099609375, 0.06121826171875, 0.197021484375, ...
embed
60961924_c1
60961924
prolog
1
-call: 0%, Choice points: 5 ERROR: Probable infinite recursion (cycle): ERROR: [12,197,875] user:outspeeds(tomatoes, _1098) ERROR: [12,197,874] user:outspeeds(tomatoes, _1118) Why is it doing this? What additional clause do I need in the last outspeeds to keep it from a stack overflow? I'm new to Prolog so if there's a...
-call: 0%, Choice points: 5 ERROR: Probable infinite recursion (cycle): ERROR: [12,197,875] user:outspeeds(tomatoes, _1098) ERROR: [12,197,874] user:outspeeds(tomatoes, _1118) Why is it doing this? What additional clause do I need in the last outspeeds to keep it from a stack overflow? I'm new to Prolog so if there's a...
[ 0.0067138671875, 0.01409912109375, -0.00579833984375, -0.000675201416015625, -0.01202392578125, -0.01092529296875, -0.021728515625, -0.01220703125, 0.01251220703125, -0.00885009765625, 0.01025390625, -0.01556396484375, -0.010498046875, 0.00762939453125, 0.0181884765625, 0.0030059814453...
[ 20, 85763, 83137, 181948, 26847, 190, 151206, 24638, 1250, 275, 2886, 54241, 13, 195625, 1830, 75457, 1530, 2947, 136005, 6873, 38937, 6056, 175870, 7, 70233, 31, 90, 963, 125435, 16360, 1662, 56641, 44084, 83, 20594, 903, 78301, 70731, 387...
[ 0.013519287109375, 0.243896484375, 0.2459716796875, 0.24072265625, 0.23681640625, 0.1380615234375, 0.1641845703125, 0.1826171875, 0.167724609375, 0.1868896484375, 0.204345703125, 0.1685791015625, 0.042938232421875, 0.2225341796875, 0.1112060546875, 0.240966796875, 0.05780029296875, ...
embed
29853918_c0
29853918
prolog
0
Title: How is Prolog matching &quot;X = father(X)&quot;? Problem title: How is Prolog matching &quot;X = father(X)&quot;? Tags: unification, prolog Problem: How is Prolog matching "X = father(X)"? In Prolog I entered following query to check if they match: ?- father(X) = X. Prolog responded with this: X = father(X). Bu...
How is Prolog matching &quot;X = father(X)&quot;? How is Prolog matching &quot;X = father(X)&quot;? unification prolog How Prolog How is Prolog matching "X = father(X)"? In Prolog I entered following query to check if they match: Prolog responded with this: But in the book it is written that Prolog should respond like ...
[ 0.01251220703125, 0.0208740234375, 0.01068115234375, 0.0023193359375, -0.015625, -0.0164794921875, 0.020751953125, 0.00335693359375, 0.01031494140625, -0.027587890625, 0.0216064453125, 0.0023651123046875, 0.00262451171875, -0.00665283203125, 0.02783203125, -0.0150146484375, 0.0095825...
[ 11249, 83, 1250, 4867, 14858, 214, 1542, 2203, 67373, 51, 41274, 502, 30957, 41, 12765, 2174, 1836, 45739, 12877, 59121, 5608, 35644, 1884, 903, 44084, 123087 ]
[ 0.080078125, 0.05108642578125, 0.1573486328125, 0.26513671875, 0.203369140625, 0.10675048828125, 0.122314453125, 0.083984375, 0.1903076171875, 0.086181640625, 0.0882568359375, 0.1005859375, 0.0139617919921875, 0.000946044921875, 0.09185791015625, 0.0308074951171875, 0.05523681640625,...
embed
37627862_c0
37627862
prolog
0
Title: How can i convert a list into a circular list in Prolog? Problem title: How can i convert a list into a circular list in Prolog? Tags: prolog, list, circular-list Problem: How can i convert a list into a circular list in Prolog? I have a list [5, 4, 8, 9, 7, 6] , I need compare each digit with next to digit, als...
How can i convert a list into a circular list in Prolog? How can i convert a list into a circular list in Prolog? prolog list circular-list How Prolog How can i convert a list into a circular list in Prolog? I have a list [5, 4, 8, 9, 7, 6] , I need compare each digit with next to digit, also compare first digit and la...
[ 0.0018463134765625, 0.00025177001953125, 0.0191650390625, 0.0308837890625, -0.0174560546875, -0.005340576171875, -0.01177978515625, 0.0103759765625, -0.0016937255859375, -0.0019683837890625, -0.0194091796875, 0.010009765625, -0.011962890625, 0.01007080078125, 0.00201416015625, -0.00421...
[ 11249, 831, 17, 96760, 5303, 3934, 10, 115339, 23, 1250, 4867, 502, 6562, 758, 201, 382, 483, 361, 305, 3871, 69101, 12638, 153939, 678, 11737, 47, 4568, 3789, 87062, 1884, 83, 10932, 23180, 4358, 77947 ]
[ 0.06494140625, 0.0582275390625, 0.057861328125, 0.15771484375, 0.248779296875, 0.0987548828125, 0.058746337890625, 0.269775390625, 0.0604248046875, 0.1563720703125, 0.2362060546875, 0.1258544921875, 0.207275390625, 0.1175537109375, 0.1177978515625, 0.101806640625, 0.130126953125, 0...
embed
59594208_c0
59594208
prolog
0
Title: SWI Prolog give all variables in list of lists specific value Problem title: SWI Prolog give all variables in list of lists specific value Tags: prolog Problem: SWI Prolog give all variables in list of lists specific value I have a List like this: [[X,Y],[X],[Y],[X,Y,Z]] . Now I want to give every free Variable ...
SWI Prolog give all variables in list of lists specific value SWI Prolog give all variables in list of lists specific value prolog SWI Prolog assign_val SWI Prolog give all variables in list of lists specific value I have a List like this: [[X,Y],[X],[Y],[X,Y,Z]] . Now I want to give every free Variable of X the value ...
[ 0.005218505859375, 0.017822265625, 0.014892578125, 0.0130615234375, -0.0247802734375, -0.0029449462890625, 0.017333984375, 0.02978515625, 0.0076904296875, 0.0021514892578125, 0.01458740234375, 0.0203857421875, 0.02587890625, 0.029052734375, -0.01025390625, -0.00689697265625, 0.023681...
[ 159, 38969, 1250, 4867, 8337, 756, 77336, 7, 23, 5303, 111, 29458, 34292, 502, 95486, 1405, 765, 32036, 1884, 903, 1542, 1723, 1511, 3444, 47, 11907, 4092, 84572, 2886, 1193, 70, 9774, 13, 147488 ]
[ 0.06549072265625, 0.230712890625, 0.1541748046875, 0.2279052734375, 0.1334228515625, 0.16455078125, 0.26611328125, 0.04498291015625, 0.078857421875, 0.1922607421875, 0.0435791015625, 0.1944580078125, 0.1895751953125, 0.114990234375, 0.2022705078125, 0.189697265625, 0.008758544921875,...
embed
48135446_c0
48135446
prolog
0
Title: Why prolog uses most-general-unifier and not simply unifier Problem title: Why prolog uses most-general-unifier and not simply unifier Tags: prolog Problem: Why prolog uses most-general-unifier and not simply unifier Prolog uses most general unifier instead of just unifier, why is it so? If I'm not wrong then I ...
Why prolog uses most-general-unifier and not simply unifier Why prolog uses most-general-unifier and not simply unifier prolog Why Why prolog uses most-general-unifier and not simply unifier Prolog uses most general unifier instead of just unifier, why is it so? If I'm not wrong then I think that, since Prolog is based...
[ -0.000492095947265625, 0.0181884765625, 0.0240478515625, -0.026123046875, -0.0157470703125, -0.00335693359375, 0.002410888671875, -0.01043701171875, 0.01312255859375, -0.0181884765625, 0.0002803802490234375, -0.0230712890625, 0, -0.01116943359375, 0.002197265625, 0.006988525390625, -...
[ 44084, 502, 4867, 4527, 2684, 180300, 309, 85789, 51, 959, 1250, 4537, 64457, 15400, 44691, 5351, 35509, 4420, 125728, 214, 18025, 162515, 41274, 77336 ]
[ 0.1046142578125, 0.15380859375, 0.26611328125, 0.1280517578125, 0.146484375, 0.1419677734375, 0.1368408203125, 0.19873046875, 0.135986328125, 0.0418701171875, 0.1485595703125, 0.15625, 0.06494140625, 0.07830810546875, 0.031982421875, 0.0037841796875, 0.0728759765625, 0.089660644531...
embed
49608046_c0
49608046
prolog
0
Title: Read Input till quit statement prolog Problem title: Read Input till quit statement prolog Tags: prolog Problem: Read Input till quit statement prolog So I'm coding a chat Bot and I need to keep taking input from the user as long as they don't type 'quit.', but if they do I must do a certain recap of what the us...
Read Input till quit statement prolog Read Input till quit statement prolog prolog Read Input Read Input till quit statement prolog So I'm coding a chat Bot and I need to keep taking input from the user as long as they don't type 'quit.', but if they do I must do a certain recap of what the user asked and then return t...
[ 0.0108642578125, 0.00494384765625, 0.004547119140625, 0.0181884765625, -0.011962890625, 0.01129150390625, 0.010498046875, -0.007781982421875, -0.0028533935546875, -0.048583984375, 0.002471923828125, 0.004669189453125, -0.029052734375, -0.0016326904296875, 0.0220947265625, 0.00576782226...
[ 4764, 360, 7077, 570, 569, 18, 63805, 502, 4867, 552, 6238, 3245, 23674, 3871, 13695, 35971, 107730, 1295, 38937, 4989, 10644, 3181, 8110, 24233, 173915, 37170, 30646, 29568, 63134, 1653, 2063, 67, 16454, 71, 6, 4358 ]
[ 0.1947021484375, 0.1419677734375, 0.1842041015625, 0.2369384765625, 0.2313232421875, 0.1854248046875, 0.2047119140625, 0.1480712890625, 0.217529296875, 0.1270751953125, 0.0301513671875, 0.1480712890625, 0.1951904296875, 0.0279998779296875, 0.0986328125, 0.0640869140625, 0.20288085937...
embed
23718196_c0
23718196
prolog
0
Title: Prolog - lists and anonymous variables Problem title: Prolog - lists and anonymous variables Tags: list, prolog, arrays Problem: Prolog - lists and anonymous variables I have two lists, for example, L1 = [yellow, green, _, blue] , and L2 = [green, yellow, blue, red] , and i need to create a third list where the ...
Prolog - lists and anonymous variables Prolog - lists and anonymous variables list prolog arrays Prolog Prolog - lists and anonymous variables I have two lists, for example, L1 = [yellow, green, _, blue] , and L2 = [green, yellow, blue, red] , and i need to create a third list where the anonnymous variable in L1 , ( _ ...
[ 0.005859375, 0.00013446807861328125, -0.01361083984375, 0.000209808349609375, 0.002960205078125, 0.017333984375, -0.00146484375, 0.0223388671875, 0.01190185546875, 0.0036773681640625, 0.0162353515625, -0.00250244140625, 0.0033721923828125, 0.0015106201171875, 0.00604248046875, 0.016235...
[ 1250, 4867, 5303, 52184, 10821, 77336, 502, 10298, 4778, 765, 6626, 339, 418, 1033, 41566, 50997, 57571, 304, 99433, 205811, 4842, 3871, 28282, 50960, 70, 142, 191, 5264, 101, 91995, 132283, 2565, 24763, 5701, 13162, 363 ]
[ 0.1446533203125, 0.2374267578125, 0.2125244140625, 0.17529296875, 0.06805419921875, 0.2274169921875, 0.0982666015625, 0.096435546875, 0.031280517578125, 0.004241943359375, 0.06463623046875, 0.0938720703125, 0.0567626953125, 0.016754150390625, 0.1158447265625, 0.10662841796875, 0.1162...
embed
9348640_c0
9348640
prolog
0
Title: Concatenation of Lists in Prolog Problem title: Concatenation of Lists in Prolog Tags: list, prolog Problem: Concatenation of Lists in Prolog Can someone help me find the error in these rules? concat([], List, List). concat([Head|[]], List, [Head|List]). concat([Head|Tail], List, Concat) :- concat(Tail, List, C)...
Concatenation of Lists in Prolog Concatenation of Lists in Prolog list prolog Concatenation Lists Prolog List Head Tail Concat What Concatenation of Lists in Prolog Can someone help me find the error in these rules? Trying to concatenate two lists fails:
[ 0.024658203125, 0.0220947265625, 0.00982666015625, 0.0108642578125, -0.0042724609375, 0.01513671875, -0.032958984375, 0.0140380859375, 0.0054931640625, -0.0234375, -0.0057373046875, -0.0302734375, -0.01239013671875, -0.00135040283203125, 0.0191650390625, -0.000850677490234375, 0.0190...
[ 1657, 4460, 33, 2320, 32036, 23, 1250, 4867, 5303, 502, 44816, 1218, 379, 111, 7413, 18499, 91736, 40858, 158, 33478, 76, 67, 6626, 35782 ]
[ 0.107421875, 0.1868896484375, 0.12432861328125, 0.037841796875, 0.2222900390625, 0.0286712646484375, 0.1441650390625, 0.225341796875, 0.1942138671875, 0.090576171875, 0.11468505859375, 0.10711669921875, 0.108154296875, 0.00749969482421875, 0.010589599609375, 0.1494140625, 0.124450683...
embed
48255377_c2
48255377
prolog
2
):- conectado (posicion,posicion, distancia), valido (nombre, ps1, cantidad). valido (nombre, posicion, cantidad):- estanteria (idestanteria, posicion), ubicacion (nombre, idestanteria, cantidad). /* Resolucion algoritmo */ resuelve (nombre,cantidad):- /* lineapedido = [H|T],*/ /* H = linea (patatas, 200), */ mueve (po...
):- conectado (posicion,posicion, distancia), valido (nombre, ps1, cantidad). valido (nombre, posicion, cantidad):- estanteria (idestanteria, posicion), ubicacion (nombre, idestanteria, cantidad). /* Resolucion algoritmo */ resuelve (nombre,cantidad):- /* lineapedido = [H|T],*/ /* H = linea (patatas, 200), */ mueve (po...
[ -0.004638671875, -0.00921630859375, 0.00640869140625, 0.033447265625, 0.001739501953125, 0.004486083984375, -0.0272216796875, 0.0137939453125, 0.03173828125, -0.028076171875, -0.00799560546875, 0.01226806640625, 0.01806640625, 0.01055908203125, -0.0289306640625, -0.006805419921875, 0...
[ 6, 2077, 9, 180726, 133513, 73274, 247, 35604, 31, 66520, 24014, 418, 52172, 194, 29990, 26206, 82876, 66, 104508, 6447, 5415, 4384, 1639, 163528, 83898, 3332, 34, 76456, 36520, 3812, 42592, 60867, 246, 2203, 841, 58745, 618, 572, 15026, ...
[ 0.0826416015625, 0.139892578125, 0.03192138671875, 0.2568359375, 0.1956787109375, 0.1708984375, 0.018096923828125, 0.189208984375, 0.1588134765625, 0.1162109375, 0.2177734375, 0.107421875, 0.1513671875, 0.09326171875, 0.1444091796875, 0.2247314453125, 0.0157470703125, 0.00561523437...
embed
13334892_c0
13334892
prolog
0
Title: Implementation of Prolog in a Pure Functional Language Problem title: Implementation of Prolog in a Pure Functional Language Tags: pseudocode, language-implementation, logic, prolog, functional-programming Problem: Implementation of Prolog in a Pure Functional Language I would be greatly appreciative of a simple...
Implementation of Prolog in a Pure Functional Language Implementation of Prolog in a Pure Functional Language pseudocode language-implementation logic prolog functional-programming Implementation Prolog Pure Functional Language Implementation of Prolog in a Pure Functional Language I would be greatly appreciative of a ...
[ 0.03857421875, 0.0274658203125, 0.0216064453125, 0.0107421875, -0.0123291015625, 0.01165771484375, -0.010009765625, -0.0262451171875, -0.009033203125, -0.03857421875, 0.01275634765625, 0.0006256103515625, -0.0419921875, 0.0045166015625, 0.017578125, 0.00390625, 0.005462646484375, 0...
[ 153941, 1250, 4867, 23, 118233, 28670, 10763, 83658, 2320, 74189, 40899, 46876, 197648, 62775, 502, 123309, 28966, 87, 2806, 186, 6782, 51606, 45023, 8781, 234873, 29479, 39958, 34166 ]
[ 0.1820068359375, 0.19287109375, 0.2880859375, 0.03851318359375, 0.138427734375, 0.126708984375, 0.06658935546875, 0.1488037109375, 0.006439208984375, 0.2342529296875, 0.220703125, 0.1678466796875, 0.1439208984375, 0.123291015625, 0.1441650390625, 0.1988525390625, 0.08465576171875, ...
embed
68667682_c0
68667682
prolog
0
Title: How to write a prolog program to print between a given range? Problem title: How to write a prolog program to print between a given range? Tags: prolog Problem: How to write a prolog program to print between a given range? How can I write a a program in prolog to print even and odd numbers between a range? Sampl...
How to write a prolog program to print between a given range? How to write a prolog program to print between a given range? prolog How Enter number:2 Second number:15 Even Odd How to write a prolog program to print between a given range? How can I write a a program in prolog to print even and odd numbers between a rang...
[ 0.000438690185546875, 0.01080322265625, 0.00213623046875, 0.000919342041015625, -0.00848388671875, 0.046875, -0.005645751953125, 0.019287109375, 0.007415771484375, 0.0162353515625, -0.0030059814453125, -0.0245361328125, -0.011474609375, -0.006500244140625, 0.03173828125, -0.01037597656...
[ 11249, 47, 33022, 502, 4867, 1528, 28412, 17721, 34475, 37457, 60816, 14012, 304, 77648, 12221, 31267, 67948, 831, 3853, 136, 70270, 101935, 33209, 140992 ]
[ 0.06866455078125, 0.070556640625, 0.1680908203125, 0.18310546875, 0.26513671875, 0.2239990234375, 0.1978759765625, 0.173095703125, 0.06768798828125, 0.1834716796875, 0.1639404296875, 0.134521484375, 0.10589599609375, 0.1273193359375, 0.1544189453125, 0.10198974609375, 0.180908203125,...
embed
42546506_c0
42546506
prolog
0
Title: Prolog Database Recording Problem title: Prolog Database Recording Tags: memoization, prolog-tabling, prolog, factorial Problem: Prolog Database Recording I have this factorial predicate. fact(0, 1). fact(N, F) :- N > 0, N1 is N-1, fact(N1, F1), F is F1 * N. How do I change this predicate such that every time a ...
Prolog Database Recording Prolog Database Recording memoization prolog-tabling prolog factorial Prolog Database Recording N-1 Prolog Database Recording I have this factorial predicate. How do I change this predicate such that every time a query is issued, the result of the calculation is stored in the database? New que...
[ 0.022216796875, -0.0031890869140625, 0.01495361328125, 0.01043701171875, 0.005584716796875, 0.01556396484375, 0.000018835067749023438, 0.0126953125, 0.0081787109375, -0.045166015625, -0.00909423828125, -0.003082275390625, -0.032470703125, -0.0137939453125, 0.009033203125, 0.00442504882...
[ 1250, 4867, 187781, 54877, 163, 432, 47691, 502, 102, 79298, 31461, 15403, 541, 5759, 87, 765, 903, 1653, 2063, 67, 11249, 54, 15549, 11907, 1733, 41, 1294, 31089, 16750, 74481, 83, 4343, 23, 63399, 2356, 10484, 4527, 71, 50339, 2174, 1...
[ 0.156982421875, 0.218994140625, 0.19482421875, 0.1817626953125, 0.07049560546875, 0.109619140625, 0.039154052734375, 0.131591796875, 0.0889892578125, 0.0888671875, 0.200439453125, 0.172119140625, 0.046661376953125, 0.1064453125, 0.0214385986328125, 0.03509521484375, 0.0765380859375, ...
embed
23959967_c0
23959967
prolog
0
Title: Finding Length of List in Prolog Problem title: Finding Length of List in Prolog Tags: list, prolog Problem: Finding Length of List in Prolog I'm running Prolog and trying to write a small function returning the length of a list: len([],0). len([XS], Y) :- len([X|XS], M), Y is M+1. My logic is that the recursive...
Finding Length of List in Prolog Finding Length of List in Prolog list prolog Finding Length List Prolog Finding Length of List in Prolog I'm running Prolog and trying to write a small function returning the length of a list: My logic is that the recursive call should include the tail of the list (XS) and increase 1 to...
[ 0.004608154296875, 0.041748046875, 0.010009765625, 0.022705078125, 0.006439208984375, 0.0019378662109375, -0.0047607421875, 0.0137939453125, 0.0145263671875, -0.032958984375, 0.01513671875, -0.00836181640625, -0.0037841796875, 0.003753662109375, 0.020751953125, 0.01385498046875, 0.02...
[ 26040, 77554, 927, 111, 32036, 23, 1250, 4867, 5303, 502, 51042, 31577, 33022, 19336, 32354, 30646, 140909, 62775, 195625, 5844, 11782, 5608, 26698, 46741, 1542, 294, 51312, 106, 96362, 1723, 276, 21748, 11343, 98320, 38514 ]
[ 0.110595703125, 0.2056884765625, 0.138916015625, 0.113525390625, 0.2159423828125, 0.045928955078125, 0.1658935546875, 0.224609375, 0.1650390625, 0.09637451171875, 0.03436279296875, 0.04388427734375, 0.016876220703125, 0.014190673828125, 0.1055908203125, 0.1153564453125, 0.17126464843...
embed
19269041_c0
19269041
prolog
0
Title: Higher-order predicates Problem title: Higher-order predicates Tags: meta-predicate, prolog, higher-order-functions Problem: Higher-order predicates boolean(true). boolean(false). formula_0(P, Q):- (P; Q), \+ P. solution_for_formula(P, Q, Formula):- maplist(boolean, [P, Q]), call([Formula, P, Q]). A follow-up to...
Higher-order predicates Higher-order predicates meta-predicate prolog higher-order-functions Higher-order formula_0 solution_for_formula Formula Higher-order predicates A follow-up to my earlier question . Why wouldn't this work? (If I replace call([Formula, P, Q]) with formula_0(P, Q) it works.)
[ -0.005584716796875, 0.0059814453125, -0.00262451171875, -0.015869140625, -0.0179443359375, 0.005340576171875, 0.024169921875, -0.01416015625, 0.00775146484375, -0.01904296875, -0.00091552734375, -0.002197265625, -0.01904296875, -0.0179443359375, -0.00244140625, -0.023681640625, 0.015...
[ 19694, 56, 80596, 1653, 2063, 1636, 23550, 19714, 67, 502, 4867, 77546, 137175, 26168, 2389, 29806, 2472, 19908, 72791, 28960, 2037, 9655, 44084, 68746, 18, 903, 4488, 91306, 87, 91995, 11782, 18537, 436, 2396, 268, 678, 683, 4, 16, 442, ...
[ 0.139892578125, 0.1214599609375, 0.190185546875, 0.145263671875, 0.1868896484375, 0.04962158203125, 0.1300048828125, 0.1231689453125, 0.0238494873046875, 0.0777587890625, 0.1531982421875, 0.147705078125, 0.12353515625, 0.2236328125, 0.1834716796875, 0.154541015625, 0.08062744140625, ...
embed
8376763_c1
8376763
prolog
1
'],X). X = [comeza_por, inicio_rango, cero, a, nove, fin_rango]. I want to join both codes into one to test if traducir is well written (if it follows the DCG) and to translate what you enter into text ,so the final program should able to do the following: ?- traducir(['^','[','0','-','9',']'],X). X = [comeza_por, inic...
'],X). X = [comeza_por, inicio_rango, cero, a, nove, fin_rango]. I want to join both codes into one to test if traducir is well written (if it follows the DCG) and to translate what you enter into text ,so the final program should able to do the following: ?- traducir(['^','[','0','-','9',']'],X). X = [comeza_por, inic...
[ 0.00823974609375, -0.01031494140625, 0.003082275390625, 0.016357421875, 0.00457763671875, 0.025146484375, -0.01055908203125, 0.0264892578125, 0.03271484375, -0.031982421875, -0.00384521484375, -0.005218505859375, -0.004669189453125, -0.01123046875, -0.0027923583984375, 0.0186767578125,...
[ 242, 268, 4, 1542, 194, 1193, 2203, 277, 18904, 4680, 42484, 5445, 31, 86013, 10, 13076, 2270, 3444, 33284, 15044, 18151, 3934, 1632, 3034, 2174, 70963, 481, 83, 5299, 59121, 28960, 391, 56367, 3900, 19309, 30957, 7986, 70, 2704, 1528, ...
[ 0.0191650390625, 0.0723876953125, 0.0156097412109375, 0.1351318359375, 0.00091552734375, 0.1605224609375, 0.05389404296875, 0.0869140625, 0.14111328125, 0.1578369140625, 0.1256103515625, 0.1275634765625, 0.10357666015625, 0.1629638671875, 0.1026611328125, 0.19921875, 0.1334228515625,...
embed
42633147_c0
42633147
prolog
0
Title: Need to split lists using Delimite operation in SWI-prolog Problem title: Need to split lists using Delimite operation in SWI-prolog Tags: prolog Problem: Need to split lists using Delimite operation in SWI-prolog I am trying my hands on prolog. I want to do following operation: Suppose, I have a list = [7/5,6/4...
Need to split lists using Delimite operation in SWI-prolog Need to split lists using Delimite operation in SWI-prolog prolog Delimite Need SWI-prolog Need to split lists using Delimite operation in SWI-prolog I am trying my hands on prolog. I want to do following operation: Suppose, I have a list = [7/5,6/4,5/4,6/3] An...
[ 0.002960205078125, 0.0150146484375, -0.01312255859375, 0.0007781982421875, -0.0299072265625, 0.017333984375, -0.000240325927734375, 0.0306396484375, 0.005035400390625, 0.000888824462890625, 0.006622314453125, -0.0008544921875, -0.020263671875, 0.00135040283203125, 0.006317138671875, 0....
[ 52889, 47, 65450, 5303, 7, 17368, 72127, 35093, 41018, 159, 38969, 3454, 4867, 23, 502, 9, 31577, 44540, 3444, 25632, 121691, 765, 2203, 966, 104629, 80389, 64, 128191, 18113, 6626, 106, 1221, 70541, 168628, 116, 758, 124093, 96386, 191147,...
[ 0.1170654296875, 0.0218658447265625, 0.23486328125, 0.259521484375, 0.0733642578125, 0.06524658203125, 0.2254638671875, 0.284912109375, 0.177734375, 0.098876953125, 0.233154296875, 0.1529541015625, 0.1871337890625, 0.008514404296875, 0.1558837890625, 0.00933837890625, 0.0586547851562...
embed
28682477_c0
28682477
prolog
0
Title: Prolog doesn&#x27;t load files properly Problem title: Prolog doesn&#x27;t load files properly Tags: load, macos, prolog Problem: Prolog doesn't load files properly I am running Prolog on a Mac OS Yosemite. I trying SWI and GProlog but no luck. I download the program but how can I load a file ? Is that so diffic...
Prolog doesn&#x27;t load files properly Prolog doesn&#x27;t load files properly load macos prolog Prolog existence_error source_sink test.pl Prolog doesn't load files properly I am running Prolog on a Mac OS Yosemite. I trying SWI and GProlog but no luck. I download the program but how can I load a file ? Is that so di...
[ 0.0233154296875, 0.019775390625, -0.0081787109375, 0.01226806640625, -0.0216064453125, 0.004913330078125, 0.0081787109375, 0.0072021484375, 0.00095367431640625, -0.0478515625, 0.01068115234375, -0.0062255859375, -0.018798828125, -0.0220947265625, 0.0247802734375, -0.01129150390625, 0...
[ 1250, 4867, 22027, 3768, 18, 72367, 102158, 155965, 291, 7840, 502, 116311, 188800, 31344, 7, 14068, 3034, 2424, 51042, 98, 4727, 11787, 6949, 184, 35093, 31577, 159, 38969, 136, 527, 10752, 110, 84434, 7026, 1528, 831, 11435, 221, 34844, ...
[ 0.2252197265625, 0.30078125, 0.07928466796875, 0.055328369140625, 0.07452392578125, 0.206298828125, 0.16357421875, 0.159912109375, 0.04388427734375, 0.1192626953125, 0.1644287109375, 0.2125244140625, 0.191162109375, 0.174072265625, 0.05828857421875, 0.189697265625, 0.1649169921875, ...
embed
15807419_c0
15807419
prolog
0
Title: Prolog compare list elements to Head element Problem title: Prolog compare list elements to Head element Tags: prolog Problem: Prolog compare list elements to Head element I have predicate which shows all numbers which are smaller than 10. small([H|T],H):- H=<10. small([_|T],X):-small(T,X). It is quite simple. B...
Prolog compare list elements to Head element Prolog compare list elements to Head element prolog Prolog Head Prolog compare list elements to Head element I have predicate which shows all numbers which are smaller than 10. It is quite simple. But how should I change it so that I could compare every next item to the firs...
[ 0.00665283203125, -0.01470947265625, -0.0005645751953125, 0.0001621246337890625, -0.00958251953125, 0.00836181640625, 0.00179290771484375, 0.01025390625, 0.0045166015625, -0.00775146484375, 0.0035400390625, 0.01611328125, 0.0036773681640625, 0.00555419921875, 0.01397705078125, -0.02124...
[ 1250, 4867, 69101, 5303, 80854, 47, 44816, 12830, 502, 765, 1653, 2063, 67, 45831, 756, 101935, 621, 164917, 3501, 4068, 32233, 8781, 3642, 5608, 15549, 442, 5809, 11907, 11737, 35735, 70, 5117, 705, 9, 19336, 617, 304, 125157, 206808, 15...
[ 0.1632080078125, 0.2384033203125, 0.2215576171875, 0.1724853515625, 0.1766357421875, 0.1331787109375, 0.2320556640625, 0.1785888671875, 0.10302734375, 0.013397216796875, 0.146728515625, 0.1602783203125, 0.0889892578125, 0.0909423828125, 0.047149658203125, 0.1456298828125, 0.018203735...
embed
55458688_c0
55458688
prolog
0
Title: Question about predicates in prolog with an example Problem title: Question about predicates in prolog with an example Tags: prolog Problem: Question about predicates in prolog with an example so if I have highbmi(bmi>=25). highbmi(bmi=<29.9) has_bmi(person,27). needscheckup(X):-has_bmi(X,bmi>=25). do I have the...
Question about predicates in prolog with an example Question about predicates in prolog with an example prolog Question has_bmi Question about predicates in prolog with an example so if I have do I have the right idea? I am new to this, but I want it to be able to see that the person has a bmi of 27, and needs a check ...
[ 0.0035552978515625, -0.01202392578125, 0.00994873046875, 0.012939453125, 0.00592041015625, 0.044921875, 0.007293701171875, -0.00124359130859375, 0.01611328125, -0.014892578125, 0.01470947265625, 0.00124359130859375, 0.00482177734375, -0.0106201171875, 0.001983642578125, 0.0088500976562...
[ 68185, 1672, 1653, 2063, 1636, 23, 502, 4867, 678, 142, 27781, 1556, 275, 266, 2174, 765, 7108, 6528, 3525, 3444, 19048, 1957, 450, 3445, 10, 876, 111, 30284, 27117, 12765, 1257, 30607, 4358 ]
[ 0.132568359375, 0.0728759765625, 0.199951171875, 0.251953125, 0.14697265625, 0.0880126953125, 0.1693115234375, 0.222412109375, 0.1102294921875, 0.06591796875, 0.2354736328125, 0.188720703125, 0.11328125, 0.2362060546875, 0.03363037109375, 0.1748046875, 0.06988525390625, 0.086181640...
embed
45307754_c0
45307754
prolog
0
Title: How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? Problem title: How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? Tags: prolog Problem: How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? I am practicing from textbook and cannot find the reason when I see the result. On prolog data base, it shows f(1,one). f(s(1)...
How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? prolog How Prolog How does f(s(s(s(s(s(s(1)))))),C) work on Prolog? I am practicing from textbook and cannot find the reason when I see the result. On prolog data base, it shows When I run the program with The response o...
[ 0.0234375, 0.00144195556640625, 0.002960205078125, 0.008056640625, 0.00604248046875, -0.003631591796875, 0.0007781982421875, 0.01287841796875, 0.00537109375, -0.009033203125, 0.00836181640625, -0.0196533203125, -0.02734375, 0.013671875, 0.01708984375, -0.019287109375, 0.0191650390625...
[ 11249, 14602, 1238, 132, 7, 41600, 167089, 441, 16, 4488, 98, 1250, 4867, 502, 4, 74082, 14137, 31635, 16750, 2053, 3647, 45831, 11675, 1528, 678, 57553, 111, 2203, 1632, 442 ]
[ 0.07269287109375, 0.0716552734375, 0.194091796875, 0.103759765625, 0.175537109375, 0.093017578125, 0.177734375, 0.162841796875, 0.003662109375, 0.1649169921875, 0.1195068359375, 0.170166015625, 0.2646484375, 0.109375, 0.010833740234375, 0.05474853515625, 0.0150299072265625, 0.06115...
embed
4924521_c0
4924521
prolog
0
Title: Prolog Changing a fact into a character chain Problem title: Prolog Changing a fact into a character chain Tags: prolog Problem: Prolog Changing a fact into a character chain Lets say i got 2 facts: time(3:44). time(16:28). I need to find the difference between the two. So I figured If I could convert 3:44 into ...
Prolog Changing a fact into a character chain Prolog Changing a fact into a character chain prolog Prolog Changing Prolog Changing a fact into a character chain Lets say i got 2 facts: I need to find the difference between the two. So I figured If I could convert 3:44 into a character chain, I could then go threw the l...
[ 0.0205078125, -0.01226806640625, 0.00579833984375, 0.0169677734375, 0.0076904296875, -0.00994873046875, 0.00051116943359375, 0.002685546875, 0.004791259765625, -0.032470703125, -0.015625, 0.0030059814453125, -0.008056640625, 0.01531982421875, -0.034423828125, 0.000720977783203125, 0....
[ 1250, 4867, 108193, 214, 10, 15824, 3934, 62816, 121293, 502, 5154, 4163, 116, 3871, 7413, 60212, 17721, 6626, 26366, 5809, 96760, 138, 32705, 159399, 434, 5303, 2046, 101935, 1810, 136, 4488, 678, 3642, 831, 17, 15549 ]
[ 0.1605224609375, 0.2474365234375, 0.2060546875, 0.03741455078125, 0.07952880859375, 0.249267578125, 0.1365966796875, 0.237060546875, 0.303466796875, 0.1265869140625, 0.009552001953125, 0.059295654296875, 0.07342529296875, 0.0611572265625, 0.0906982421875, 0.1605224609375, 0.087768554...
embed
69589617_c0
69589617
prolog
0
Title: How to pull one list out of one list in prolog? Problem title: How to pull one list out of one list in prolog? Tags: prolog Problem: How to pull one list out of one list in prolog? I have this list L1 [[a, [b,c]]] and im trying to extract [b,c] into another list. I am using member([_,L2],L1) and it doesn't work....
How to pull one list out of one list in prolog? How to pull one list out of one list in prolog? prolog How How to pull one list out of one list in prolog? I have this list L1 [[a, [b,c]]] and im trying to extract [b,c] into another list. I am using member([_,L2],L1) and it doesn't work. This does seem to work if L1 is ...
[ 0.00946044921875, 0.007232666015625, 0.01092529296875, 0.0087890625, -0.022216796875, 0.00069427490234375, 0.000362396240234375, 0.0107421875, 0.01239013671875, -0.037109375, 0.0179443359375, -0.00958251953125, -0.010009765625, 0.00653076171875, -0.0062255859375, -0.0081787109375, -0...
[ 11249, 50065, 1632, 5303, 1810, 111, 23, 502, 4867, 47, 339, 418, 31577, 125663, 275, 238, 3934, 15700, 17368, 32786, 866, 90173, 17727, 18, 4488, 167785, 420, 12830, 13267, 106 ]
[ 0.07501220703125, 0.231201171875, 0.1326904296875, 0.24755859375, 0.1685791015625, 0.1036376953125, 0.043609619140625, 0.1607666015625, 0.2242431640625, 0.01483154296875, 0.0294189453125, 0.027435302734375, 0.0258941650390625, 0.174560546875, 0.050750732421875, 0.06280517578125, 0.09...
embed
40584945_c0
40584945
prolog
0
Title: Prolog verification of a binary trees Problem title: Prolog verification of a binary trees Tags: prolog, tree, binary-tree Problem: Prolog verification of a binary trees I am a beginner with prolog and I want to write a predicate that turns true if the argument is a tree. I have this code but it gives me always ...
Prolog verification of a binary trees Prolog verification of a binary trees prolog tree binary-tree Prolog arb_true Prolog verification of a binary trees I am a beginner with prolog and I want to write a predicate that turns true if the argument is a tree. I have this code but it gives me always false. can anyone help ...
[ 0.033203125, -0.01318359375, 0.00005507469177246094, -0.002105712890625, -0.004669189453125, 0.02099609375, -0.019775390625, -0.000293731689453125, -0.000934600830078125, -0.03271484375, 0.0128173828125, 0.0013275146484375, 0.0026397705078125, 0.0048828125, 0.0174560546875, 0.004211425...
[ 1250, 4867, 493, 41274, 2394, 6635, 1360, 502, 53201, 62600, 187, 275, 9774, 90, 1679, 3444, 33022, 1653, 2063, 67, 15504, 29568, 2174, 10750, 83, 10, 903, 18151, 1284, 76199, 163, 11343, 98320, 4358, 6456, 41, 1294, 454, 132, 910, 617,...
[ 0.1944580078125, 0.2391357421875, 0.1727294921875, 0.131103515625, 0.180419921875, 0.1260986328125, 0.222900390625, 0.1439208984375, 0.27490234375, 0.2139892578125, 0.1597900390625, 0.139892578125, 0.180419921875, 0.0858154296875, 0.0301971435546875, 0.014434814453125, 0.088134765625...
embed
34403402_c0
34403402
prolog
0
Title: Prolog lists splitting Problem title: Prolog lists splitting Tags: visual-prolog, prolog, list Problem: Prolog lists splitting I have function: onlySecond([],[]). onlySecond([H1,H2|T1],[H2|T2]) :- onlySecond(T1,T2). It returns every second element in the list. But i'm curious why it is not returning nothing (on ...
Prolog lists splitting Prolog lists splitting visual-prolog prolog list Prolog Prolog lists splitting I have function: It returns every second element in the list. But i'm curious why it is not returning nothing (on my opinion, it must return [] - empty list) when first argument is list with 1 element. Example:
[ 0.006744384765625, 0.01385498046875, -0.000591278076171875, -0.00628662109375, -0.0028076171875, 0.0264892578125, 0.00396728515625, 0.01007080078125, -0.00286865234375, 0.0037841796875, 0.000263214111328125, -0.01904296875, -0.0267333984375, 0.0048828125, 0.020263671875, 0.017211914062...
[ 1250, 4867, 5303, 65450, 1916, 21176, 3454, 502, 32354, 30646, 11907, 17932, 12830, 193844, 15400, 959, 214, 33720, 33153, 201505, 5117, 10750, 678, 106 ]
[ 0.12347412109375, 0.1854248046875, 0.1483154296875, 0.1580810546875, 0.060516357421875, 0.14599609375, 0.047882080078125, 0.061676025390625, 0.1455078125, 0.157470703125, 0.05377197265625, 0.1324462890625, 0.1295166015625, 0.0197601318359375, 0.0194091796875, 0.025390625, 0.004344940...
embed
49011249_c0
49011249
prolog
0
Title: How to check if names of datatypes are the same Problem title: How to check if names of datatypes are the same Tags: prolog Problem: How to check if names of datatypes are the same I wonder if there is a quick way to check whether 2 datatypes are the same. Example - let's say I have a list like this: [odd(1), od...
How to check if names of datatypes are the same How to check if names of datatypes are the same prolog How How to check if names of datatypes are the same I wonder if there is a quick way to check whether 2 datatypes are the same. Example - let's say I have a list like this: Now if I pull 2 elements from the list (inde...
[ 0.018798828125, 0.000919342041015625, 0.005340576171875, 0.01611328125, -0.016845703125, 0.00156402587890625, -0.01226806640625, 0.0091552734375, 0.006866455078125, -0.02197265625, 0.01068115234375, -0.00775146484375, 0.0030059814453125, -0.0172119140625, -0.01007080078125, 0.002456665...
[ 11249, 47, 12765, 2174, 123055, 111, 2053, 50986, 7, 621, 70, 5701, 502, 4867, 32195, 63773, 3917, 36766, 116, 5303, 1884, 50065, 80854, 4711, 757, 136, 63262, 4879, 3444, 3714, 1836, 15044, 10644, 12921, 70270 ]
[ 0.06646728515625, 0.063232421875, 0.197021484375, 0.1153564453125, 0.186279296875, 0.08990478515625, 0.13427734375, 0.277099609375, 0.08612060546875, 0.0975341796875, 0.082763671875, 0.196044921875, 0.07781982421875, 0.1353759765625, 0.020751953125, 0.04608154296875, 0.01777648925781...
embed
49644629_c0
49644629
prolog
0
Title: Prolog - print the sum of the EVEN numbers from 1 to 10 Problem title: Prolog - print the sum of the EVEN numbers from 1 to 10 Tags: prolog Problem: Prolog - print the sum of the EVEN numbers from 1 to 10 I am trying to print all the even numbers from 1 to 10 using Prolog, and here is what I have tried: printn(1...
Prolog - print the sum of the EVEN numbers from 1 to 10 Prolog - print the sum of the EVEN numbers from 1 to 10 prolog 1 Prolog EVEN Sum Next Prolog - print the sum of the EVEN numbers from 1 to 10 I am trying to print all the even numbers from 1 to 10 using Prolog, and here is what I have tried: but it returns false.
[ 0.0018463134765625, 0.022705078125, 0.00537109375, 0.00592041015625, -0.00482177734375, 0.032470703125, -0.0196533203125, -0.0023651123046875, -0.000110626220703125, -0.02734375, 0.01239013671875, -0.02880859375, -0.00144195556640625, -0.004119873046875, 0.0177001953125, 0.029663085937...
[ 1250, 4867, 28412, 10554, 241, 30223, 101935, 1295, 106, 47, 209, 20, 502, 36335, 4997, 31577, 756, 3853, 17368, 3688, 37842, 1284, 30646, 98320, 5 ]
[ 0.189697265625, 0.26318359375, 0.186767578125, 0.19287109375, 0.05401611328125, 0.2408447265625, 0.1678466796875, 0.0479736328125, 0.0919189453125, 0.1025390625, 0.1839599609375, 0.013702392578125, 0.14013671875, 0.22998046875, 0.117431640625, 0.0904541015625, 0.040496826171875, 0....
embed
8679146_c0
8679146
prolog
0
Title: operations on elements inside lists in prolog Problem title: operations on elements inside lists in prolog Tags: prolog Problem: operations on elements inside lists in prolog I am writing a prolog code and in the middle i want to check is all the elements in a list are a not included in a certain predicate Here ...
operations on elements inside lists in prolog operations on elements inside lists in prolog prolog Here not_trap operations on elements inside lists in prolog I am writing a prolog code and in the middle i want to check is all the elements in a list are a not included in a certain predicate but this wont work can anyon...
[ 0.000720977783203125, 0.007354736328125, 0.00537109375, -0.0086669921875, -0.015869140625, 0.01220703125, 0.0155029296875, 0.002899169921875, 0.0260009765625, -0.026611328125, -0.01025390625, 0.00225830078125, 0.01422119140625, 0.00787353515625, 0.0030975341796875, 0.002838134765625, ...
[ 41018, 7, 98, 80854, 46132, 5303, 502, 4867, 23, 11853, 959, 107617, 32562, 18151, 86991, 3444, 12765, 756, 621, 99201, 24233, 1653, 2063, 18, 4488, 14192, 23409, 44691 ]
[ 0.1904296875, 0.0301513671875, 0.1551513671875, 0.181396484375, 0.1890869140625, 0.177490234375, 0.1361083984375, 0.2174072265625, 0.0178070068359375, 0.01702880859375, 0.166259765625, 0.241943359375, 0.033935546875, 0.06378173828125, 0.060546875, 0.017059326171875, 0.147216796875, ...
embed
25213929_c0
25213929
prolog
0
Title: Is the Prova implemented with a Prolog compiler or Prolog interpreter? Problem title: Is the Prova implemented with a Prolog compiler or Prolog interpreter? Tags: prolog, logic-programming Problem: Is the Prova implemented with a Prolog compiler or Prolog interpreter? I am looking at the Java-written Prolog syst...
Is the Prova implemented with a Prolog compiler or Prolog interpreter? Is the Prova implemented with a Prolog compiler or Prolog interpreter? prolog logic-programming Prova Prolog Is the Prova implemented with a Prolog compiler or Prolog interpreter? I am looking at the Java-written Prolog system, Prova. https://prova....
[ 0.0206298828125, 0.0089111328125, 0.0213623046875, 0.0390625, -0.017578125, 0.0235595703125, -0.007110595703125, -0.0118408203125, -0.00119781494140625, -0.0166015625, -0.01129150390625, 0.007568359375, -0.0218505859375, -0.00151824951171875, 0.00909423828125, 0.00543212890625, 0.010...
[ 2071, 70, 108120, 29479, 297, 678, 1250, 4867, 9969, 34759, 29481, 56, 502, 62775, 28966, 707, 41925, 5426, 130279, 19725, 34735, 208124, 23009, 35166 ]
[ 0.0230255126953125, 0.0849609375, 0.3095703125, 0.1634521484375, 0.0738525390625, 0.09832763671875, 0.182373046875, 0.2357177734375, 0.1607666015625, 0.1707763671875, 0.1708984375, 0.1265869140625, 0.09637451171875, 0.0870361328125, 0.045440673828125, 0.01055908203125, 0.12255859375,...
embed
5653137_c0
5653137
prolog
0
Title: Good way to declare trees in prolog? Problem title: Good way to declare trees in prolog? Tags: tree, prolog Problem: Good way to declare trees in prolog? I am working with trees (general trees, not limited to binary) in prolog. From the small snippets of code I have seen, though it's easy to define traversals et...
Good way to declare trees in prolog? Good way to declare trees in prolog? tree prolog Good Good way to declare trees in prolog? I am working with trees (general trees, not limited to binary) in prolog. From the small snippets of code I have seen, though it's easy to define traversals etc. on the tree, it's not easy to ...
[ 0.0341796875, 0.01348876953125, -0.0242919921875, -0.033447265625, 0.00145721435546875, 0.00164794921875, -0.0101318359375, -0.0274658203125, -0.00141143798828125, -0.05029296875, 0.0145263671875, -0.006378173828125, -0.0174560546875, 0.005584716796875, 0.028076171875, 0.0140380859375,...
[ 18621, 3917, 47, 159978, 1360, 90, 23, 502, 4867, 53201, 20697, 180300, 2394, 6635, 18151, 23468, 61924, 37317, 16765, 110527, 4127, 9790, 26698, 11001, 191145, 142424, 678, 110, 112 ]
[ 0.0921630859375, 0.0877685546875, 0.033294677734375, 0.214111328125, 0.2479248046875, 0.14501953125, 0.06976318359375, 0.14501953125, 0.2071533203125, 0.22509765625, 0.045989990234375, 0.05511474609375, 0.07806396484375, 0.0142974853515625, 0.03851318359375, 0.05792236328125, 0.15124...
embed
17097403_c0
17097403
prolog
0
Title: Prolog query issue Problem title: Prolog query issue Tags: declarative, prolog Problem: Prolog query issue Ok, let's say i have these two facts: data1([50, 20, 15, 20, 25, 20, 84]). data2([50, 30, 15, 5, 10, 18, 60]). I want to make a query that asks whether the N-th element of the list defined as a part of thos...
Prolog query issue Prolog query issue declarative prolog Prolog Prolog query issue Ok, let's say i have these two facts: data1([50, 20, 15, 20, 25, 20, 84]). data2([50, 30, 15, 5, 10, 18, 60]). I want to make a query that asks whether the N-th element of the list defined as a part of those facts is some value. query([L...
[ 0.013916015625, 0.01495361328125, 0.00946044921875, -0.0111083984375, 0.005950927734375, 0.0107421875, -0.00537109375, 0.0072021484375, -0.0034637451171875, -0.03955078125, 0.00830078125, -0.0037384033203125, -0.02197265625, -0.009033203125, 0.00089263916015625, -0.00115966796875, 0....
[ 1250, 4867, 41, 1294, 31089, 21635, 4935, 502, 765, 6626, 15824, 2053, 418, 2525, 387, 423, 714, 14885, 304, 4, 496, 190, 209, 543, 1496, 3444, 3249, 26458, 36766, 541, 9, 927, 12830, 70, 5303, 61924, 2831, 8382, 83, 3060, 34292, 866,...
[ 0.175048828125, 0.243896484375, 0.1856689453125, 0.1802978515625, 0.1861572265625, 0.1544189453125, 0.0567626953125, 0.12890625, 0.027587890625, 0.077392578125, 0.186279296875, 0.1641845703125, 0.09967041015625, 0.2108154296875, 0.1668701171875, 0.12451171875, 0.117919921875, 0.171...
embed
33571090_c0
33571090
prolog
0
Title: Prolog - formulate query that finds highest value within a finite amount of atoms? Problem title: Prolog - formulate query that finds highest value within a finite amount of atoms? Tags: prolog Problem: Prolog - formulate query that finds highest value within a finite amount of atoms? Suppose I had an atom name ...
Prolog - formulate query that finds highest value within a finite amount of atoms? Prolog - formulate query that finds highest value within a finite amount of atoms? prolog Prolog Prolog - formulate query that finds highest value within a finite amount of atoms? Suppose I had an atom name and age pair: And I wanted to ...
[ 0.014892578125, 0.0179443359375, 0.01025390625, 0.01031494140625, -0.01806640625, 0.0201416015625, -0.001708984375, 0.00335693359375, -0.006072998046875, -0.03466796875, 0.016357421875, -0.00714111328125, -0.0059814453125, -0.022705078125, 0.0147705078125, -0.010986328125, -0.0092773...
[ 1250, 4867, 26168, 67, 41, 1294, 7413, 167375, 34292, 28032, 94418, 13, 41170, 34627, 502, 20, 450, 7, 121691, 87, 1902, 9351, 136, 32070, 80836, 36663, 47, 8305, 10869, 1653, 2063, 70, 27150, 525, 3445, 11249, 2806, 3249, 6044, 10 ]
[ 0.1748046875, 0.283447265625, 0.1614990234375, 0.072021484375, 0.1605224609375, 0.17822265625, 0.1502685546875, 0.20166015625, 0.228515625, 0.13671875, 0.1602783203125, 0.0203857421875, 0.08990478515625, 0.214599609375, 0.1287841796875, 0.0147552490234375, 0.024810791015625, 0.0167...
embed
7463823_c0
7463823
prolog
0
Title: Predicates returning. Prolog Problem title: Predicates returning. Prolog Tags: prolog, console Problem: Predicates returning. Prolog So I have the predicate which returns true several time. % true returns several times and i need to press ';' ?- get_all_transformed_moves. true ; true ; true. Is the swi prolog ha...
Predicates returning. Prolog Predicates returning. Prolog prolog console Predicates Prolog get_all_transformed_moves Wished Predicates returning. Prolog So I have the predicate which returns true several time. Is the swi prolog have some method which can help me to run this predicate without typing';'?
[ 0.01470947265625, 0.0035400390625, 0.0081787109375, 0.025634765625, -0.005523681640625, 0.008544921875, 0.00421142578125, 0.004119873046875, 0.0025482177734375, -0.015625, 0.016845703125, 0.0264892578125, -0.017578125, -0.0006103515625, 0.00144195556640625, -0.00179290771484375, 0.02...
[ 7145, 2063, 1636, 30646, 214, 1250, 4867, 502, 130250, 2046, 5584, 215175, 297, 432, 3132, 174837, 765, 1653, 67, 7, 29568, 40368, 1733, 91, 2452, 55300, 4358, 11675, 903, 15490, 11417, 25 ]
[ 0.209228515625, 0.24267578125, 0.12451171875, 0.2047119140625, 0.061370849609375, 0.1700439453125, 0.21044921875, 0.12359619140625, 0.1593017578125, 0.05108642578125, 0.10845947265625, 0.2103271484375, 0.11712646484375, 0.157958984375, 0.05694580078125, 0.20068359375, 0.0025100708007...
embed
44252647_c0
44252647
prolog
0
Title: Prolog assign value Problem title: Prolog assign value Tags: prolog, list, assign Problem: Prolog assign value a(1). a(5). a(4). b(1). b(2). b(3). sa(X, Y) :- a(X), Y=a. sb(X, Y) :- b(X), Y=b. n([A,B,C], X) :- X=[]. n([A|B],[H|T]):-sa(A,H),n(B,T). n([A|B],[H|T]):-sb(A,H),n(B,T). and my query: n([1,2,3,4,5],X) re...
Prolog assign value Prolog assign value prolog list assign Prolog Prolog assign value and my query: results are [a, b] and [b, b]. I am having hard time with [H|T] part, what does it exactly mean. How does X work with [H | T]. I assume that they are somehow both bound to it.
[ 0.00180816650390625, 0.0054931640625, 0.011962890625, -0.0101318359375, -0.01318359375, 0.009033203125, -0.00482177734375, 0.01348876953125, 0.0113525390625, -0.000423431396484375, 0.0150146484375, -0.0064697265625, 0.000537872314453125, -0.00081634521484375, 0.00091552734375, -0.01708...
[ 1250, 4867, 95486, 34292, 502, 5303, 41, 1294, 50339, 11, 876, 136, 275, 19441, 7941, 1733, 841, 58745, 618, 268, 2831, 2367, 14602, 442, 66161, 29459, 11249, 1193, 4488, 678, 384, 41591, 209303, 15044, 6, 99091, 47 ]
[ 0.1322021484375, 0.2215576171875, 0.2100830078125, 0.2269287109375, 0.1112060546875, 0.1475830078125, 0.10205078125, 0.0772705078125, 0.177490234375, 0.012847900390625, 0.1094970703125, 0.005828857421875, 0.0909423828125, 0.009552001953125, 0.073486328125, 0.069091796875, 0.158081054...
embed
12630326_c0
12630326
prolog
0
Title: Prolog: Access read from parent rule Problem title: Prolog: Access read from parent rule Tags: prolog Problem: Prolog: Access read from parent rule I want a specific rule for reading user input data in SWI-Prolog, something like: process( ... ) :- % do_stuff read_values( ... ), % do_more_stuff with X and Y here....
Prolog: Access read from parent rule Prolog: Access read from parent rule prolog parent Prolog Access do_stuff read_values do_more_stuff Please Prolog: Access read from parent rule I want a specific rule for reading user input data in SWI-Prolog, something like: Is that possible?
[ 0.0125732421875, 0.01275634765625, -0.0012969970703125, 0.005401611328125, -0.0157470703125, 0.01458740234375, 0.013916015625, 0.0030059814453125, -0.01324462890625, -0.050048828125, 0.015869140625, -0.01409912109375, -0.0216064453125, -0.00040435791015625, 0.0167236328125, -0.02294921...
[ 1250, 4867, 40266, 12301, 1295, 49129, 79986, 12, 502, 54, 271, 21493, 27494, 90, 17678, 30607, 3444, 10, 29458, 100, 16454, 38937, 107730, 2053, 23, 159, 38969, 9, 10752, 1884, 2071, 450, 7722 ]
[ 0.140625, 0.257080078125, 0.2083740234375, 0.193603515625, 0.1177978515625, 0.1949462890625, 0.208740234375, 0.00981903076171875, 0.105712890625, 0.07940673828125, 0.0792236328125, 0.1600341796875, 0.1614990234375, 0.006610870361328125, 0.1351318359375, 0.025604248046875, 0.125732421...
embed
2857924_c0
2857924
prolog
0
Title: prolog: reduce then write the value of a predicate Problem title: prolog: reduce then write the value of a predicate Tags: prolog Problem: prolog: reduce then write the value of a predicate This is some of the code I am writing assert(bar(foo)), assert(foo(bar-5)), I'm not sure if it works though. I'm trying to ...
prolog: reduce then write the value of a predicate prolog: reduce then write the value of a predicate prolog bar-5 prolog: reduce then write the value of a predicate This is some of the code I am writing I'm not sure if it works though. I'm trying to get it to reduce foo by 5. I need a way to write the value of foo, bu...
[ 0.004608154296875, -0.0037078857421875, -0.0213623046875, 0.01458740234375, -0.01312255859375, 0.00860595703125, -0.0118408203125, 0.026123046875, 0.0023956298828125, -0.016845703125, 0.005706787109375, 0.0223388671875, -0.0021514892578125, -0.004058837890625, 0.0228271484375, -0.01049...
[ 502, 4867, 34390, 7068, 33022, 34292, 1653, 2063, 67, 1909, 10342, 111, 18151, 32562, 9077, 43240, 31577, 5775, 31, 390, 1892, 3871, 3917, 3584, 83, 997, 62775, 4488 ]
[ 0.17431640625, 0.2431640625, 0.2271728515625, 0.00244140625, 0.1441650390625, 0.1796875, 0.153076171875, 0.188232421875, 0.05462646484375, 0.1700439453125, 0.182373046875, 0.013885498046875, 0.115478515625, 0.011138916015625, 0.0290679931640625, 0.0626220703125, 0.0191802978515625, ...
embed
58194843_c0
58194843
prolog
0
Title: Recursivity | Natural numbers in list swish prolog Problem title: Recursivity | Natural numbers in list swish prolog Tags: prolog Problem: Recursivity | Natural numbers in list swish prolog i have the next problem, "return the numbers of natural numbers of an array" ex. naturales(R,[6,-7,-4,3,2,8]). R = 4 when a...
Recursivity | Natural numbers in list swish prolog Recursivity | Natural numbers in list swish prolog prolog Recursivity Natural Head Tail Recursivity | Natural numbers in list swish prolog i have the next problem, "return the numbers of natural numbers of an array" ex. naturales(R,[6,-7,-4,3,2,8]). R = 4 when a negati...
[ 0.00421142578125, 0.017333984375, -0.00250244140625, 0.0218505859375, 0.003997802734375, 0.00689697265625, 0.0093994140625, 0.0174560546875, 0.01422119140625, -0.0135498046875, 0.0283203125, -0.021240234375, -0.013916015625, 0.0174560546875, 0.0279541015625, -0.001312255859375, 0.029...
[ 853, 48650, 54613, 53, 24955, 101935, 23, 5303, 91, 114686, 502, 4867, 44816, 1218, 379, 11737, 2967, 65395, 19, 111, 6083, 10298, 1119, 99360, 1052, 910, 16709, 11565, 363, 185723, 627, 2203, 201, 3229, 40907, 135179, 30646, 98320, 36356, ...
[ 0.0718994140625, 0.205078125, 0.193359375, 0.0911865234375, 0.225830078125, 0.2183837890625, 0.062469482421875, 0.184326171875, 0.0487060546875, 0.2393798828125, 0.0982666015625, 0.1793212890625, 0.1282958984375, 0.103515625, 0.079833984375, 0.0816650390625, 0.1337890625, 0.1569824...
embed