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
43508328_c1
43508328
prolog
1
B1',('Wednesday',2)). groupeCours('INF1130', 10, 32003, 100, 'PASB1',('Monday',2)). professor('TREJ4', 'Tremblay', 'Jean'). professor('DEVL2', 'De Vinci', 'Leonard'). professor('PASB1', 'Pascal', 'Blaise'). professor('GOLA1', 'Goldberg', 'Adele'). Code signals: Prolog, LastName, FirstName, FistName, NumberOfCredits, Nb...
B1',('Wednesday',2)). groupeCours('INF1130', 10, 32003, 100, 'PASB1',('Monday',2)). professor('TREJ4', 'Tremblay', 'Jean'). professor('DEVL2', 'De Vinci', 'Leonard'). professor('PASB1', 'Pascal', 'Blaise'). professor('GOLA1', 'Goldberg', 'Adele'). Code signals: Prolog, LastName, FirstName, FistName, NumberOfCredits, Nb...
[ 0.048095703125, 0.0146484375, -0.00701904296875, 0.0296630859375, -0.004974365234375, 0.0084228515625, -0.0218505859375, 0.000209808349609375, 0.0142822265625, -0.0269775390625, -0.00133514404296875, -0.0177001953125, -0.017578125, 0.00096893310546875, -0.0225830078125, 0.023193359375,...
[ 335, 418, 25, 4, 1456, 297, 1444, 5636, 10461, 194, 37769, 10625, 12824, 8852, 919, 1662, 1197, 209, 138, 34498, 805, 98185, 571, 46674, 16030, 56564, 1375, 617, 62731, 6492, 5259, 11670, 66, 170623, 866, 304, 4657, 133953, 5861, 132, 6...
[ 0.1798095703125, 0.130126953125, 0.0225677490234375, 0.04559326171875, 0.0183868408203125, 0.05816650390625, 0.08642578125, 0.1309814453125, 0.0986328125, 0.1673583984375, 0.1795654296875, 0.07220458984375, 0.197265625, 0.0936279296875, 0.1307373046875, 0.1201171875, 0.1773681640625,...
embed
9005953_c0
9005953
prolog
0
Title: Testing whether a list represents a set with no duplicates Problem title: Testing whether a list represents a set with no duplicates Tags: prolog Problem: Testing whether a list represents a set with no duplicates The builtin predicate setof/3 can be used to create an ordered list without duplicates. Can I also ...
Testing whether a list represents a set with no duplicates Testing whether a list represents a set with no duplicates prolog Testing no_duplicates Testing whether a list represents a set with no duplicates The builtin predicate setof/3 can be used to create an ordered list without duplicates. Can I also use it to test ...
[ -0.004791259765625, 0.000518798828125, 0.0279541015625, -0.01031494140625, -0.00168609619140625, 0.0033111572265625, 0.00885009765625, 0.000179290771484375, 0.03369140625, -0.0034637451171875, -0.02197265625, -0.00032806396484375, 0.0152587890625, 0.01116943359375, -0.01507568359375, 0...
[ 8647, 36766, 5303, 33636, 5423, 678, 110, 171763, 1636, 502, 4867, 693, 52721, 88303, 73, 1653, 2063, 67, 4390, 18113, 831, 11814, 28282, 12989, 297, 15490, 4171, 4527, 3034 ]
[ 0.1705322265625, 0.048797607421875, 0.1822509765625, 0.1898193359375, 0.1668701171875, 0.038909912109375, 0.1173095703125, 0.197998046875, 0.10711669921875, 0.060394287109375, 0.1048583984375, 0.06988525390625, 0.1767578125, 0.1099853515625, 0.0833740234375, 0.093505859375, 0.1135253...
embed
43687604_c0
43687604
prolog
0
Title: Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree Problem title: Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree Tags: prolog Problem: Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree How to provide ...
Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree prolog Given Binary UNIQUE Given a Binary tree represented as a list, provide a UNIQUE list of leaves of the tree How to provide a UNIQUE list of ...
[ 0.031494140625, 0.005706787109375, 0.0177001953125, -0.0233154296875, 0.0177001953125, 0.0244140625, -0.019287109375, -0.0089111328125, 0.0157470703125, -0.0208740234375, -0.0185546875, 0.0030517578125, 0.02197265625, -0.0027008056640625, -0.009521484375, 0.0220947265625, 0.020507812...
[ 77878, 54092, 1294, 53201, 33636, 237, 5303, 22691, 8274, 149577, 31358, 7, 10, 502, 4867, 111, 11249, 17368, 1250, 89536, 42341, 19388, 1193, 1369, 238, 71 ]
[ 0.029998779296875, 0.1981201171875, 0.13720703125, 0.2117919921875, 0.1744384765625, 0.06610107421875, 0.2100830078125, 0.1346435546875, 0.1573486328125, 0.196533203125, 0.2188720703125, 0.0938720703125, 0.037506103515625, 0.1275634765625, 0.26513671875, 0.03680419921875, 0.000183105...
embed
49260111_c0
49260111
prolog
0
Title: Ignore undefined facts in SWI Prolog Problem title: Ignore undefined facts in SWI Prolog Tags: prolog Problem: Ignore undefined facts in SWI Prolog I'm running queries against a generated set of facts, and some facts may not exist. When that happens, SWI Prolog errors out with e.g. Undefined procedure: 'LongIden...
Ignore undefined facts in SWI Prolog Ignore undefined facts in SWI Prolog prolog Ignore SWI Prolog Undefined LongIdent Ignore undefined facts in SWI Prolog I'm running queries against a generated set of facts, and some facts may not exist. When that happens, SWI Prolog errors out with e.g. Undefined procedure: 'LongIde...
[ 0.0250244140625, 0.01171875, 0.01544189453125, 0.007537841796875, -0.03515625, -0.00848388671875, 0.0269775390625, 0.00189208984375, 0.00848388671875, -0.0128173828125, -0.011962890625, -0.000598907470703125, -0.021728515625, -0.002349853515625, 0.00152587890625, 0.0213623046875, 0.0...
[ 87, 11137, 107, 9232, 5983, 297, 15824, 7, 159, 38969, 1250, 4867, 23, 502, 79912, 14407, 568, 37379, 51042, 41, 10484, 26548, 139392, 5423, 1543, 959, 32316, 18499, 1810, 50491, 866, 4021, 17357, 6, 3917, 2046, 64457, 69236, 35782 ]
[ 0.0149993896484375, 0.1339111328125, 0.05126953125, 0.1119384765625, 0.20166015625, 0.03955078125, 0.1759033203125, 0.0638427734375, 0.0701904296875, 0.2176513671875, 0.140380859375, 0.2001953125, 0.0165557861328125, 0.1070556640625, 0.11474609375, 0.1435546875, 0.082275390625, 0.1...
embed
21741503_c1
21741503
prolog
1
1, N >= S2, not(member(X/S2, Obs)). successorsDown(X/Y, (1, [X/S2]), Obs, _, _):- S2 is Y - 1, S2 >= 1, not(member(X/S2, Obs)). I am wondering if there is a way to tell prolog to skip the predicate if it's false, and go to the next one. Or is this unachievable and I'm tackling the problem completely wrong? I don't unde...
1, N >= S2, not(member(X/S2, Obs)). successorsDown(X/Y, (1, [X/S2]), Obs, _, _):- S2 is Y - 1, S2 >= 1, not(member(X/S2, Obs)). I am wondering if there is a way to tell prolog to skip the predicate if it's false, and go to the next one. Or is this unachievable and I'm tackling the problem completely wrong? I don't unde...
[ 0.0203857421875, 0.031005859375, 0.007720947265625, 0.0157470703125, -0.01129150390625, 0.007232666015625, -0.010009765625, 0.01531982421875, 0.01519775390625, -0.011474609375, 0.01611328125, 0.015869140625, -0.01153564453125, -0.0025634765625, 0.02001953125, 0.0079345703125, 0.01202...
[ 106, 541, 977, 1369, 159, 304, 959, 27417, 1542, 64, 294, 3545, 7, 39457, 4295, 8331, 7710, 1723, 2858, 90173, 83, 990, 149016, 14192, 502, 4867, 47, 21658, 1653, 2063, 67, 2174, 442, 98320, 738, 11737, 1632, 1861, 2967, 44691, 28219, ...
[ 0.1136474609375, 0.1171875, 0.10614013671875, 0.012420654296875, 0.1138916015625, 0.2049560546875, 0.1348876953125, 0.1593017578125, 0.0406494140625, 0.06756591796875, 0.045562744140625, 0.1783447265625, 0.06396484375, 0.20849609375, 0.0628662109375, 0.07562255859375, 0.1611328125, ...
embed
46517392_c0
46517392
prolog
0
Title: Prolog won't return true(yes) when it should Problem title: Prolog won't return true(yes) when it should Tags: prolog Problem: Prolog won't return true(yes) when it should mergelist([],[],[]). mergelist([X],[],[X]). mergelist([],[Y],[Y]). I'm running this query ?-mergelist([1],[],[1]). which returns tr...
Prolog won't return true(yes) when it should Prolog won't return true(yes) when it should prolog Prolog Prolog won't return true(yes) when it should I'm running this query ?-mergelist([1],[],[1]). which returns true But then I run this query ?-mergelist([1,2],[],[1,2]). it returns false(no). I'm not sure what...
[ 0.0263671875, 0.005218505859375, 0.017333984375, -0.00347900390625, -0.01312255859375, 0.01446533203125, -0.0166015625, 0.00726318359375, -0.0023040771484375, 0.027099609375, -0.00537109375, -0.0003871917724609375, -0.018798828125, -0.0032806396484375, 0.006195068359375, 0.005126953125...
[ 1250, 4867, 23742, 3768, 18, 30646, 29568, 63736, 3229, 5608, 502, 51042, 903, 41, 1294, 705, 1991, 429, 6562, 25256, 1065, 11675, 133063, 98320, 157, 44691, 59947, 9506, 9059, 13, 91532 ]
[ 0.2100830078125, 0.310791015625, 0.134033203125, 0.06842041015625, 0.123779296875, 0.223388671875, 0.2158203125, 0.1800537109375, 0.0999755859375, 0.153564453125, 0.160400390625, 0.08544921875, 0.0115966796875, 0.1092529296875, 0.07342529296875, 0.10504150390625, 0.211181640625, 0....
embed
23511345_c1
23511345
prolog
1
Values 0 = [] tValues n = [v:vs | v <- tValue , vs <- tValues (n-1) ] tValue :: [Bool] tValue = [True, False] but tValues only returns [] . I think I just need some human-to-human engagement to help shake my head clear and maybe grace me with a deeper insight. Many thanks. Code signals: Thinking, Prolog, Haskell, Gener...
Values 0 = [] tValues n = [v:vs | v <- tValue , vs <- tValues (n-1) ] tValue :: [Bool] tValue = [True, False] but tValues only returns [] . I think I just need some human-to-human engagement to help shake my head clear and maybe grace me with a deeper insight. Many thanks. Code signals: Thinking, Prolog, Haskell, Gener...
[ 0.009521484375, 0.015869140625, -0.004547119140625, -0.00007915496826171875, 0.0113525390625, -0.013916015625, 0.0118408203125, -0.01129150390625, 0.0150146484375, 0.003082275390625, 0.01171875, 0.0108642578125, 0.0067138671875, 0.01904296875, -0.0024566650390625, 0.01385498046875, 0...
[ 190060, 7, 757, 2203, 378, 808, 42272, 21049, 653, 334, 12, 18043, 81, 856, 50770, 20209, 4426, 19, 110218, 1984, 12647, 929, 882, 22225, 184, 1284, 4734, 30646, 6, 5351, 3871, 3060, 14135, 188, 69790, 90364, 4358, 174450, 10336, 34735, ...
[ 0.278076171875, 0.08294677734375, 0.1866455078125, 0.1153564453125, 0.0064697265625, 0.1622314453125, 0.2939453125, 0.22900390625, 0.1241455078125, 0.163818359375, 0.035400390625, 0.2288818359375, 0.2010498046875, 0.2259521484375, 0.2890625, 0.198486328125, 0.007232666015625, 0.048...
embed
8748867_c2
8748867
prolog
2
4,S5)),nl. go(Move1,Move2,Move3):-cur_state(State),newstate(State,NextState), pour(State,move(Move1,Move2,Move3), NextState), retractall(cur_state(State):-State = state(_,_,_,_,_)),asserta(cur_state(NextState)), ((end_state(NextState),write('Bravo!!!!')) ;(write(' ---*Eiste sthn katastash --- :'),write(NextState))),nl....
4,S5)),nl. go(Move1,Move2,Move3):-cur_state(State),newstate(State,NextState), pour(State,move(Move1,Move2,Move3), NextState), retractall(cur_state(State):-State = state(_,_,_,_,_)),asserta(cur_state(NextState)), ((end_state(NextState),write('Bravo!!!!')) ;(write(' ---*Eiste sthn katastash --- :'),write(NextState))),nl....
[ -0.00836181640625, 0.000682830810546875, 0.01116943359375, 0.01806640625, 0.00701904296875, 0.010498046875, -0.0191650390625, 0.0213623046875, 0.0189208984375, -0.0299072265625, 0.01251220703125, 0.0224609375, 0.01519775390625, 0.0010986328125, -0.01019287109375, -0.0072021484375, 0,...
[ 201, 294, 43317, 247, 13169, 5, 738, 9083, 272, 418, 304, 21320, 12, 16820, 61340, 135206, 13, 7177, 19888, 81280, 578, 432, 4997, 41499, 238, 91569, 2077, 2203, 11341, 162, 110965, 3611, 454, 434, 18781, 25, 49960, 965, 11305, 647, 443...
[ 0.1844482421875, 0.09295654296875, 0.192138671875, 0.01763916015625, 0.117919921875, 0.05511474609375, 0.1673583984375, 0.1407470703125, 0.156494140625, 0.06427001953125, 0.0889892578125, 0.1513671875, 0.0206756591796875, 0.163330078125, 0.1934814453125, 0.2032470703125, 0.0723876953...
embed
69867909_c0
69867909
prolog
0
Title: how can I query the integers between two values by creating a list of those integers in Prolog.? Problem title: how can I query the integers between two values by creating a list of those integers in Prolog.? Tags: prolog Problem: how can I query the integers between two values by creating a list of those intege...
how can I query the integers between two values by creating a list of those integers in Prolog.? how can I query the integers between two values by creating a list of those integers in Prolog.? prolog Prolog how can I query the integers between two values by creating a list of those integers in Prolog.? For example, If...
[ 0.00482177734375, 0.005859375, 0.0093994140625, 0.0181884765625, -0.005615234375, 0.036865234375, -0.0012359619140625, 0.0068359375, -0.00836181640625, -0.0108642578125, -0.0048828125, -0.01043701171875, -0.00860595703125, 0.01226806640625, 0.01007080078125, -0.01104736328125, 0.0054...
[ 3642, 831, 41, 1294, 892, 26255, 17721, 6626, 142424, 105233, 5303, 1250, 4867, 87, 111, 8382, 502, 23, 284, 108368, 2806, 41206, 1884, 62, 2203, 617, 104629, 903, 7722 ]
[ 0.061553955078125, 0.0635986328125, 0.15576171875, 0.17431640625, 0.167236328125, 0.1495361328125, 0.1934814453125, 0.129638671875, 0.1845703125, 0.14697265625, 0.1671142578125, 0.1632080078125, 0.251953125, 0.049072265625, 0.0182037353515625, 0.02886962890625, 0.0723876953125, 0.0...
embed
40240828_c1
40240828
prolog
1
= [1, [], 3, []] R = [1, []] R = [2, [], 3, []] R = [3, []] R = [] What I want is for it to look like this: R = [1, 2, 3] I've tried a few ways to force the output to what i want, but haven't been able to get anywhere close. Edit: Looks like i can solve it by using a brute force solution of permuting all possible sets...
= [1, [], 3, []] R = [1, []] R = [2, [], 3, []] R = [3, []] R = [] What I want is for it to look like this: R = [1, 2, 3] I've tried a few ways to force the output to what i want, but haven't been able to get anywhere close. Edit: Looks like i can solve it by using a brute force solution of permuting all possible sets...
[ -0.00909423828125, 0.0079345703125, 0.01312255859375, 0.026123046875, 0.00323486328125, 0.022705078125, -0.02685546875, -0.002777099609375, 0.00118255615234375, -0.00762939453125, 0.0269775390625, 0.01116943359375, -0.002471923828125, 0.00531005859375, -0.0230712890625, 0.0087280273437...
[ 2203, 68252, 4, 138, 86245, 627, 304, 122101, 268, 4865, 87, 3444, 83, 100, 442, 47, 6713, 1884, 903, 12, 116, 37842, 10846, 48322, 37772, 70, 140992, 2367, 17, 38246, 19048, 2046, 151107, 20903, 42079, 60818, 831, 86869, 55042, 29806, ...
[ 0.192626953125, 0.1368408203125, 0.06365966796875, 0.226806640625, 0.0823974609375, 0.230224609375, 0.058624267578125, 0.092529296875, 0.0531005859375, 0.0222320556640625, 0.01513671875, 0.152099609375, 0.01397705078125, 0.05255126953125, 0.0706787109375, 0.0948486328125, 0.19921875,...
embed
40656825_c0
40656825
prolog
0
Title: Hosting XSB Prolog in a Server Problem title: Hosting XSB Prolog in a Server Tags: xsb, web-applications, server, prolog Problem: Hosting XSB Prolog in a Server I wanted to host XSB Prolog in a server. Can someone please tell me what the procedure is? The following git link explains how to host SWIPL on a server...
Hosting XSB Prolog in a Server Hosting XSB Prolog in a Server xsb web-applications server prolog Hosting XSB Prolog Server Hosting XSB Prolog in a Server I wanted to host XSB Prolog in a server. Can someone please tell me what the procedure is? The following git link explains how to host SWIPL on a server, but the same...
[ 0.03515625, 0.0263671875, 0.0029449462890625, 0.00189971923828125, -0.01495361328125, 0.035888671875, 0.0027008056640625, -0.01483154296875, -0.00016880035400390625, -0.0255126953125, 0.0014495849609375, -0.0030059814453125, 0.00787353515625, -0.0025482177734375, 0.0042724609375, -0.00...
[ 168098, 1193, 36474, 1250, 4867, 23, 22687, 10, 1022, 7, 275, 1467, 101687, 10723, 502, 36663, 27980, 14192, 50491, 62270, 3126, 73342, 3642, 159, 38969, 21130, 98, 959, 20697, 15769, 32102, 10752, 114686, 4358 ]
[ 0.2015380859375, 0.1182861328125, 0.2462158203125, 0.124755859375, 0.2249755859375, 0.060302734375, 0.18994140625, 0.001617431640625, 0.06982421875, 0.0689697265625, 0.153564453125, 0.001922607421875, 0.0955810546875, 0.1875, 0.08319091796875, 0.056610107421875, 0.185302734375, 0.0...
embed
23266480_c0
23266480
prolog
0
Title: Prolog - parse with DCG Problem title: Prolog - parse with DCG Tags: dcg, prolog Problem: Prolog - parse with DCG I want to write a DCG that can deal with text that is presented in notepad. I've read some online tutorial about writing DCG but none of which delt with a text that is free and that involves strings,...
Prolog - parse with DCG Prolog - parse with DCG dcg prolog Prolog DCG Prolog - parse with DCG I want to write a DCG that can deal with text that is presented in notepad. I've read some online tutorial about writing DCG but none of which delt with a text that is free and that involves strings,dates and integers. I'm not...
[ 0.02783203125, -0.018798828125, 0.00128936767578125, 0.042724609375, -0.0013275146484375, 0.030029296875, -0.016357421875, 0.005828857421875, 0.01104736328125, -0.033447265625, -0.0177001953125, -0.00341796875, -0.00811767578125, 0.004241943359375, 0.004364013671875, 0.01171875, 0.00...
[ 1250, 4867, 366, 184, 678, 391, 56367, 104, 238, 177, 502, 87, 3444, 33022, 10, 831, 35142, 7986, 8121, 20537, 4299, 1118, 57143, 32562, 146, 4092, 83687, 79315, 17489, 892, 9077, 4034, 33636, 13315, 5622, 4358 ]
[ 0.156494140625, 0.2178955078125, 0.1492919921875, 0.140380859375, 0.112060546875, 0.110107421875, 0.23828125, 0.0264739990234375, 0.05499267578125, 0.130859375, 0.126708984375, 0.008819580078125, 0.095947265625, 0.120849609375, 0.011505126953125, 0.0218048095703125, 0.0875244140625, ...
embed
10410082_c0
10410082
prolog
0
Title: List of predicates in Prolog Problem title: List of predicates in Prolog Tags: list, prolog Problem: List of predicates in Prolog Is it possible to define a list, that consists of predicates and how do I call the predicates. Also, is it possible to pass one predicate to another predicate (like passing atoms)? Ex...
List of predicates in Prolog List of predicates in Prolog list prolog List Prolog pre1 pre2 Predicate1 List of predicates in Prolog Is it possible to define a list, that consists of predicates and how do I call the predicates. Also, is it possible to pass one predicate to another predicate (like passing atoms)? Example...
[ 0.0245361328125, 0.0024871826171875, 0.0004711151123046875, 0.01904296875, -0.00185394287109375, 0.0169677734375, 0.017822265625, 0.00010251998901367188, 0.00494384765625, -0.05859375, -0.007568359375, 0.00927734375, -0.03857421875, 0.01025390625, 0.0157470703125, 0.01263427734375, 0...
[ 32036, 1653, 2063, 1636, 23, 1250, 4867, 5303, 502, 479, 418, 304, 7145, 7722, 61924, 10, 58055, 111, 11782, 27875, 1632, 67, 47, 15700, 452, 34627, 89536 ]
[ 0.127197265625, 0.200439453125, 0.243896484375, 0.14013671875, 0.032135009765625, 0.17138671875, 0.2410888671875, 0.214111328125, 0.1212158203125, 0.0931396484375, 0.010772705078125, 0.0164031982421875, 0.1446533203125, 0.1099853515625, 0.1605224609375, 0.013458251953125, 0.060516357...
embed
40148162_c0
40148162
prolog
0
Title: How to get the next ascii char in Prolog? Problem title: How to get the next ascii char in Prolog? Tags: prolog Problem: How to get the next ascii char in Prolog? I want a predicate that works like this: next_char(Curr, Next) :- Next is Curr + 1. Which I could call like this: next_char('D', X). In which it would...
How to get the next ascii char in Prolog? How to get the next ascii char in Prolog? prolog How Prolog next_char Curr Next How to get the next ascii char in Prolog? I want a predicate that works like this: Which I could call like this: In which it would give me X='E' . Unfortunately it doesn't seem like you can do this ...
[ 0.01239013671875, 0.0078125, 0.014404296875, 0.0361328125, 0.016357421875, 0.0194091796875, -0.000457763671875, -0.00543212890625, -0.0036773681640625, -0.0029296875, 0.0147705078125, -0.00958251953125, -0.0196533203125, 0.0106201171875, -0.0072021484375, -0.0128173828125, -0.0137329...
[ 11249, 2046, 70, 11737, 237, 26506, 21441, 23, 1250, 4867, 502, 9254, 17065, 42, 4997, 47, 3444, 1653, 2063, 67, 43240, 11782, 8337, 163, 1193, 1369, 647, 8962 ]
[ 0.046661376953125, 0.07586669921875, 0.038848876953125, 0.15380859375, 0.044403076171875, 0.237060546875, 0.1856689453125, 0.053009033203125, 0.11572265625, 0.2269287109375, 0.03564453125, 0.1451416015625, 0.033447265625, 0.0765380859375, 0.13037109375, 0.001251220703125, 0.041656494...
embed
44267022_c0
44267022
prolog
0
Title: Make matrix from list Problem title: Make matrix from list Tags: prolog Problem: Make matrix from list Good morning. I need your help. I want to make a list of list (matrix with size SQRT(N)*SQRT(N)) from a list with Size N I am tried but It does not work for me :( gen(L,T,Matrix) which T is the size of Matrix Y...
Make matrix from list Make matrix from list prolog list Make Matrix Make matrix from list Good morning. I need your help. I want to make a list of list (matrix with size SQRT(N)*SQRT(N)) from a list with Size N I am tried but It does not work for me :( which T is the size of Matrix You are free to add more param if you...
[ -0.011962890625, 0.01007080078125, 0.00628662109375, -0.010986328125, 0.01513671875, -0.0179443359375, -0.0234375, 0.0181884765625, -0.000629425048828125, -0.037109375, -0.0164794921875, -0.01904296875, -0.0034027099609375, -0.00048828125, -0.040771484375, -0.005859375, 0.02429199218...
[ 26176, 50944, 425, 1295, 5303, 502, 4867, 194234, 42141, 87, 3871, 4358, 3444, 3249, 111, 192, 87427, 13267, 2737, 20503, 839, 1639, 80378, 541, 444, 37842, 1284, 14602, 959, 4488, 163, 31124, 3129, 384, 83, 4092, 15190, 1286, 121, 39, ...
[ 0.1546630859375, 0.263671875, 0.1473388671875, 0.1845703125, 0.264404296875, 0.1204833984375, 0.2064208984375, 0.28125, 0.1328125, 0.005828857421875, 0.08819580078125, 0.1026611328125, 0.08734130859375, 0.133544921875, 0.06414794921875, 0.1358642578125, 0.216796875, 0.161376953125,...
embed
1831488_c1
1831488
prolog
1
,M) :- M #= N/10 , integer(M). integer_div(N,M) :- N1 #= N mod 10 , N2 #= N-N1 , M #= N2/10. solve1([],[],[H],H). solve([H1],[H2],[H3,H4],C) :- H1 #\= 0, H2 #\= 0, H3 #= (C+H1+H2)mod 10, integer_div((C+H1+H2),H4). solve([H1|T1] , [H2|T2] , [H3|T3],C) :- H3 #= (C+H1+H2)mod 10, integer_div((C+H1+H2),C1) , solve(T1,T2,T3,...
,M) :- M #= N/10 , integer(M). integer_div(N,M) :- N1 #= N mod 10 , N2 #= N-N1 , M #= N2/10. solve1([],[],[H],H). solve([H1],[H2],[H3,H4],C) :- H1 #\= 0, H2 #\= 0, H3 #= (C+H1+H2)mod 10, integer_div((C+H1+H2),H4). solve([H1|T1] , [H2|T2] , [H3|T3],C) :- H3 #= (C+H1+H2)mod 10, integer_div((C+H1+H2),C1) , solve(T1,T2,T3,...
[ -0.03076171875, 0.0040283203125, 0.00360107421875, 0.020263671875, 0.004913330078125, 0.00628662109375, -0.023193359375, -0.00750732421875, 0.01153564453125, -0.050537109375, -0.0162353515625, 0.0031890869140625, -0.000255584716796875, 0.01544189453125, 0.00946044921875, -0.02233886718...
[ 4, 594, 15772, 276, 468, 1369, 541, 12988, 892, 1505, 30618, 839, 418, 2811, 209, 304, 9, 86869, 841, 132, 76172, 90173, 363, 617, 441, 572, 757, 1328, 10461, 13415, 29557, 6, 618, 96386, 17727, 5, 3293, 43240, 169123, 91995, 20767, 7...
[ 0.0743408203125, 0.14111328125, 0.057220458984375, 0.1383056640625, 0.0816650390625, 0.03564453125, 0.1226806640625, 0.21484375, 0.1419677734375, 0.1273193359375, 0.2491455078125, 0.122802734375, 0.0745849609375, 0.1719970703125, 0.1524658203125, 0.0765380859375, 0.0155792236328125, ...
embed
20763928_c0
20763928
prolog
0
Title: Writing a Prolog rule for messages before a given date Problem title: Writing a Prolog rule for messages before a given date Tags: prolog Problem: Writing a Prolog rule for messages before a given date How do I write a Prolog rule that given two people, tests if there has been a message sent in either direction ...
Writing a Prolog rule for messages before a given date Writing a Prolog rule for messages before a given date prolog Writing Prolog MBefore Date Writing a Prolog rule for messages before a given date How do I write a Prolog rule that given two people, tests if there has been a message sent in either direction between t...
[ -0.00159454345703125, 0.01031494140625, -0.01446533203125, 0.043212890625, -0.00180816650390625, 0.0036468505859375, -0.02001953125, 0.01300048828125, -0.0002613067626953125, -0.04248046875, 0.00174713134765625, 0.00933837890625, 0.01312255859375, -0.0098876953125, 0.0277099609375, 0.0...
[ 213185, 10, 1250, 4867, 79986, 100, 89914, 8108, 34475, 5622, 502, 13, 89700, 25512, 87, 33022, 6626, 3395, 109921, 2174, 2685, 1556, 2809, 26008, 9325, 40101, 48225, 17721, 2856, 2060, 765 ]
[ 0.1561279296875, 0.080322265625, 0.18994140625, 0.261474609375, 0.210205078125, 0.054840087890625, 0.2020263671875, 0.22021484375, 0.07037353515625, 0.1663818359375, 0.1239013671875, 0.046630859375, 0.175048828125, 0.1849365234375, 0.0015745162963867188, 0.164306640625, 0.14880371093...
embed
8505362_c0
8505362
prolog
0
Title: Prolog counting knowledge base Problem title: Prolog counting knowledge base Tags: prolog, count Problem: Prolog counting knowledge base I have something like this in my knowledge base: number(1). number(3). number(6). number(8). number(9). number(12). Now, I need a predicate that evaluates how many numbers ther...
Prolog counting knowledge base Prolog counting knowledge base prolog count Prolog Prolog counting knowledge base I have something like this in my knowledge base: Now, I need a predicate that evaluates how many numbers there are in the knowledge base, example: How can I do this? please, I'm new with prolog and I can't f...
[ 0.0186767578125, -0.00634765625, -0.001312255859375, -0.00408935546875, 0.015869140625, 0.021728515625, -0.00958251953125, 0.0086669921875, 0.01336669921875, -0.046630859375, 0.000629425048828125, -0.0274658203125, 0.007476806640625, 0.006988525390625, 0.016357421875, -0.00323486328125...
[ 1250, 4867, 54529, 214, 51359, 3647, 502, 9844, 1884, 903, 23, 759, 3871, 1653, 2063, 67, 151575, 90, 3642, 5941, 101935, 2685, 621, 27781, 11249, 831, 54, 22936, 3525, 26366 ]
[ 0.185302734375, 0.26611328125, 0.2069091796875, 0.06573486328125, 0.19287109375, 0.212890625, 0.14208984375, 0.0111236572265625, 0.035430908203125, 0.08349609375, 0.10791015625, 0.0210113525390625, 0.08978271484375, 0.1552734375, 0.1905517578125, 0.12066650390625, 0.17578125, 0.017...
embed
33636667_c0
33636667
prolog
0
Title: How can you translate prolog rules and query into first order logic? Problem title: How can you translate prolog rules and query into first order logic? Tags: prolog, first-order-logic Problem: How can you translate prolog rules and query into first order logic? I am trying to understand how to translate the pro...
How can you translate prolog rules and query into first order logic? How can you translate prolog rules and query into first order logic? prolog first-order-logic How How can you translate prolog rules and query into first order logic? I am trying to understand how to translate the prolog rule to first order logic. is ...
[ 0.0164794921875, 0.00848388671875, -0.0108642578125, 0.0030975341796875, -0.005706787109375, -0.007720947265625, -0.006683349609375, 0.0020904541015625, 0.0096435546875, -0.039794921875, 0.006011962890625, -0.007080078125, -0.0050048828125, -0.014404296875, 0.00177001953125, -0.0071105...
[ 11249, 831, 3900, 19309, 502, 4867, 91736, 136, 41, 1294, 3934, 5117, 12989, 62775, 80596, 137043, 28219, 3642, 79986, 47, 165304, 425, 53, 6369, 9319, 33079, 82953, 177, 706, 26785, 35166 ]
[ 0.052490234375, 0.02850341796875, 0.1336669921875, 0.163330078125, 0.147705078125, 0.2095947265625, 0.1470947265625, 0.049285888671875, 0.0977783203125, 0.091796875, 0.091064453125, 0.0819091796875, 0.1475830078125, 0.1629638671875, 0.1673583984375, 0.1424560546875, 0.032745361328125...
embed
37672656_c0
37672656
prolog
0
Title: Prolog Parse Tree a^n b^n Problem title: Prolog Parse Tree a^n b^n Tags: dcg, prolog Problem: Prolog Parse Tree a^n b^n I am trying to make a parse tree for language a^n b^n. Below is what I've tried, but it just turns true without priting the parse tree. %% a^n, b^n. ex) s([a,a,b,b],[]). = true s --> a,s,b. s -...
Prolog Parse Tree a^n b^n Prolog Parse Tree a^n b^n dcg prolog Prolog Parse Tree Prolog Parse Tree a^n b^n I am trying to make a parse tree for language a^n b^n. Below is what I've tried, but it just turns true without priting the parse tree. For example, I'd like to print ab(ab([])) if I type s(T,[a,a,b,b],[]). Please...
[ 0.0211181640625, 0.01531982421875, -0.01123046875, 0.0262451171875, -0.0218505859375, 0.0390625, -0.0274658203125, -0.00909423828125, 0.0086669921875, -0.019775390625, -0.00994873046875, -0.00396728515625, -0.00083160400390625, -0.002410888671875, 0.01318359375, 0.00799560546875, 0.0...
[ 1250, 4867, 2392, 184, 101344, 10, 8353, 19, 876, 104, 238, 177, 502, 31577, 3249, 366, 53201, 100, 46876, 17336, 37842, 1660, 15504, 29568, 15490, 494, 1916, 1884, 28412, 1563, 132, 2055, 1065, 2174, 10644, 91, 618, 275, 30607, 4358 ]
[ 0.192626953125, 0.2393798828125, 0.2017822265625, 0.1585693359375, 0.27783203125, 0.0589599609375, 0.06219482421875, 0.1044921875, 0.09393310546875, 0.0185089111328125, 0.01361083984375, 0.066162109375, 0.1480712890625, 0.08642578125, 0.058990478515625, 0.2021484375, 0.26171875, 0....
embed
43957819_c0
43957819
prolog
0
Title: prolog meaning of ([(X,_)|T], X) Problem title: prolog meaning of ([(X,_)|T], X) Tags: list, unification, prolog Problem: prolog meaning of ([(X,_)|T], X) So, I have the following phrases dX([(X,_)], X). dX([(X,_)|T], X):- dX(T, R), X > R, !. dX([_|T], R):- dX(T, R). I get the meaning of the first one, which mea...
prolog meaning of ([(X,_)|T], X) prolog meaning of ([(X,_)|T], X) list unification prolog prolog meaning of ([(X,_)|T], X) So, I have the following phrases I get the meaning of the first one, which means if 1st item of the list is X, return X no regardless of the second item. But i struggle with understanding the last ...
[ 0.008544921875, 0.00543212890625, 0.00946044921875, 0.01153564453125, -0.00543212890625, 0.007171630859375, 0.0032196044921875, 0.0027618408203125, 0.007171630859375, -0.0184326171875, 0.029052734375, -0.0028228759765625, -0.0096435546875, 0.001129150390625, -0.005584716796875, 0.02978...
[ 502, 4867, 91084, 111, 1542, 454, 618, 1193, 5303, 51, 41274, 25632, 113860, 5117, 26950, 2174, 106, 271, 35735, 83, 30646, 110, 211460, 17932, 151994, 100094, 4568, 6626, 4358, 29459 ]
[ 0.186767578125, 0.25390625, 0.1551513671875, 0.035247802734375, 0.108642578125, 0.07135009765625, 0.06207275390625, 0.113525390625, 0.1812744140625, 0.11328125, 0.10284423828125, 0.041961669921875, 0.1856689453125, 0.0285491943359375, 0.077880859375, 0.0526123046875, 0.0421142578125,...
embed
27576261_c0
27576261
prolog
0
Title: Convert a char list to a string in Prolog Problem title: Convert a char list to a string in Prolog Tags: prolog, swi-prolog, type-conversion Problem: Convert a char list to a string in Prolog I'm trying to convert a char array to a string, and then convert this string a list. This is what I want: code_list=[97 9...
Convert a char list to a string in Prolog Convert a char list to a string in Prolog prolog swi-prolog type-conversion Convert Prolog code_list string_s string_list Convert a char list to a string in Prolog I'm trying to convert a char array to a string, and then convert this string a list. This is what I want: I'm not ...
[ 0.01043701171875, -0.005462646484375, -0.000041484832763671875, 0.03173828125, -0.016845703125, -0.00433349609375, -0.0123291015625, 0.02001953125, 0.0018768310546875, 0.005157470703125, -0.004302978515625, -0.0242919921875, -0.01043701171875, 0.0235595703125, 0, -0.01519775390625, 0...
[ 1657, 11549, 21441, 5303, 47, 10, 79315, 1250, 4867, 23, 502, 2452, 3454, 10644, 2271, 46354, 18151, 6562, 31577, 96760, 10298, 53, 3444, 110, 22062, 11814, 26785 ]
[ 0.01531982421875, 0.08721923828125, 0.207275390625, 0.216064453125, 0.05291748046875, 0.0177764892578125, 0.2320556640625, 0.1280517578125, 0.205322265625, 0.003662109375, 0.073486328125, 0.097900390625, 0.09002685546875, 0.0943603515625, 0.0256195068359375, 0.0994873046875, 0.101745...
embed
38294954_c0
38294954
prolog
0
Title: Prolog Graph Visualization Problem title: Prolog Graph Visualization Tags: swi-prolog, prolog, java, graphviz, visualize Problem: Prolog Graph Visualization I have a Dijkstra code in Prolog which shows me the shortest path. Now I want to visualize the result as a graph. Since I am very new to Prolog I do not kno...
Prolog Graph Visualization Prolog Graph Visualization swi-prolog prolog java graphviz visualize Prolog Graph Visualization Prolog Graph Visualization I have a Dijkstra code in Prolog which shows me the shortest path. Now I want to visualize the result as a graph. Since I am very new to Prolog I do not know how can I do...
[ 0.0186767578125, 0.01544189453125, 0.00244140625, 0.00775146484375, -0.01416015625, 0.00946044921875, -0.0201416015625, -0.006988525390625, -0.01019287109375, -0.037353515625, 0.0205078125, 0.00009870529174804688, -0.022705078125, -0.0003261566162109375, -0.001800537109375, 0.010559082...
[ 1250, 4867, 6524, 11727, 73372, 47691, 2452, 3454, 502, 79, 330, 41382, 22572, 21176, 20650, 212946, 2816, 18151, 45831, 16610, 525, 60875, 3444, 16750, 237, 10, 4552, 3525, 3714, 3642, 831, 54, 4358, 27781, 223438 ]
[ 0.156005859375, 0.248291015625, 0.1500244140625, 0.1513671875, 0.1820068359375, 0.091552734375, 0.0894775390625, 0.107177734375, 0.10711669921875, 0.051849365234375, 0.1046142578125, 0.21533203125, 0.2408447265625, 0.1956787109375, 0.1151123046875, 0.09375, 0.172119140625, 0.152709...
embed
57740995_c0
57740995
prolog
0
Title: How to find some specific nodes/elements in a list? Problem title: How to find some specific nodes/elements in a list? Tags: prolog Problem: How to find some specific nodes/elements in a list? I have a list in this form: [node(2,5,4,3),node(3,5,4,3),node(2,10,12,4),node(5,2,2,2)] I need a method that returns all...
How to find some specific nodes/elements in a list? How to find some specific nodes/elements in a list? prolog How How to find some specific nodes/elements in a list? I have a list in this form: I need a method that returns all the nodes that have the first value of 2. Then: I tried different methods but without succes...
[ -0.005218505859375, 0.0020904541015625, -0.0003108978271484375, 0.007537841796875, -0.00811767578125, 0.00518798828125, -0.01202392578125, 0.007080078125, 0.0130615234375, -0.043701171875, 0.0084228515625, -0.03076171875, -0.01513671875, -0.0125732421875, -0.004150390625, 0.00424194335...
[ 11249, 47, 7413, 3060, 29458, 110, 988, 64, 62766, 7, 23, 5303, 10, 502, 4867, 3173, 3871, 55300, 30646, 756, 765, 5117, 34292, 111, 787, 37842, 12921, 150624, 15490, 36272, 129745 ]
[ 0.1114501953125, 0.1041259765625, 0.176025390625, 0.0546875, 0.24951171875, 0.1749267578125, 0.1932373046875, 0.044403076171875, 0.1885986328125, 0.06805419921875, 0.095703125, 0.2119140625, 0.0291595458984375, 0.051513671875, 0.128173828125, 0.051666259765625, 0.05694580078125, 0....
embed
47625751_c0
47625751
prolog
0
Title: Prolog - How do i separate a tuple to be part of my pre-existing list? Problem title: Prolog - How do i separate a tuple to be part of my pre-existing list? Tags: prolog Problem: Prolog - How do i separate a tuple to be part of my pre-existing list? I am trying to take the following: [a,b,(c,d)] and turn it to [...
Prolog - How do i separate a tuple to be part of my pre-existing list? Prolog - How do i separate a tuple to be part of my pre-existing list? prolog Prolog How Prolog - How do i separate a tuple to be part of my pre-existing list? I am trying to take the following: and turn it to I am obtaining [a], [b], and [(c,d)] se...
[ 0.0279541015625, -0.000652313232421875, -0.002105712890625, 0.0240478515625, -0.0145263671875, 0.00372314453125, -0.00775146484375, 0.0194091796875, 0.0108642578125, -0.0341796875, -0.00007581710815429688, -0.00958251953125, -0.0179443359375, 0.023193359375, -0.018310546875, -0.0025329...
[ 1250, 4867, 11249, 54, 17, 84797, 370, 8705, 2831, 479, 54376, 214, 5303, 10, 47, 111, 759, 502, 186, 31577, 5646, 25632, 15504, 113054, 11, 275, 136, 71, 12921, 7413, 5584, 1747, 96819, 25842 ]
[ 0.13330078125, 0.2103271484375, 0.11083984375, 0.035888671875, 0.0706787109375, 0.24755859375, 0.149658203125, 0.261962890625, 0.1083984375, 0.1600341796875, 0.1993408203125, 0.054534912109375, 0.187744140625, 0.04168701171875, 0.03131103515625, 0.031585693359375, 0.0128173828125, ...
embed
4148526_c0
4148526
prolog
0
Title: Simple Prolog pattern patching Problem title: Simple Prolog pattern patching Tags: prolog Problem: Simple Prolog pattern patching So if I have something like [(a,b,c,d)] and I wish to remove the ()s (in the whole list there will only be one set of parentheses - immediately after the '[' and before the ']'), how ...
Simple Prolog pattern patching Simple Prolog pattern patching prolog Simple Prolog curly_for_square Simple Prolog pattern patching So if I have something like [(a,b,c,d)] and I wish to remove the ()s (in the whole list there will only be one set of parentheses - immediately after the '[' and before the ']'), how come m...
[ 0.0172119140625, -0.002532958984375, 0.00799560546875, 0.01287841796875, -0.0024261474609375, 0.0130615234375, -0.0196533203125, 0.0186767578125, 0.0172119140625, -0.01226806640625, 0.0169677734375, -0.00946044921875, -0.0162353515625, -0.0228271484375, -0.0027923583984375, -0.01208496...
[ 60552, 1250, 4867, 103510, 110912, 502, 9709, 538, 2472, 108047, 214, 2174, 765, 9844, 1884, 11, 275, 238, 71, 32599, 47, 87388, 70, 15, 16, 7, 28271, 5303, 4734, 186, 1632, 5423, 49129, 35412, 109312, 7103, 1065, 8108, 3642, 1380, 759,...
[ 0.1395263671875, 0.1214599609375, 0.18017578125, 0.1827392578125, 0.1815185546875, 0.06219482421875, 0.1787109375, 0.191650390625, 0.1514892578125, 0.1968994140625, 0.017608642578125, 0.02618408203125, 0.0201416015625, 0.0248565673828125, 0.0247039794921875, 0.038909912109375, 0.0421...
embed
45533640_c0
45533640
prolog
0
Title: How to get output value from python script executed in swi-prolog Problem title: How to get output value from python script executed in swi-prolog Tags: prolog, python, swi-prolog Problem: How to get output value from python script executed in swi-prolog How can I make a swi-prolog program that executes a Python...
How to get output value from python script executed in swi-prolog How to get output value from python script executed in swi-prolog prolog python swi-prolog python How score.py process_create How to get output value from python script executed in swi-prolog How can I make a swi-prolog program that executes a Python fil...
[ 0.0262451171875, 0.006683349609375, -0.003326416015625, 0.022705078125, -0.0152587890625, 0.0157470703125, 0.0184326171875, 0.004547119140625, 0.008544921875, -0.04248046875, 0.0380859375, 0.030517578125, -0.0240478515625, -0.009033203125, -0.0023040771484375, 0.003021240234375, 0.00...
[ 11249, 2046, 140992, 34292, 1295, 17198, 50828, 26499, 71924, 297, 91, 2452, 3454, 4867, 502, 47763, 6493, 9433, 7612, 2182, 47, 23, 3249, 1528, 145581, 11435, 5, 62163, 18113, 1119, 3240, 11583, 209806 ]
[ 0.032012939453125, 0.1273193359375, 0.255859375, 0.201416015625, 0.0853271484375, 0.100341796875, 0.1456298828125, 0.211181640625, 0.129638671875, 0.0279998779296875, 0.0299072265625, 0.195068359375, 0.14990234375, 0.2115478515625, 0.1259765625, 0.20556640625, 0.1610107421875, 0.10...
embed
5408992_c0
5408992
prolog
0
Title: setof-like with duplicates in prolog? Problem title: setof-like with duplicates in prolog? Tags: prolog Problem: setof-like with duplicates in prolog? As you know setof/3 can order a list with duplicate removal. Is there a way to use setof/3 keeping duplicates? Basically is there a built-in sorting function seto...
setof-like with duplicates in prolog? setof-like with duplicates in prolog? prolog setof-like with duplicates in prolog? As you know setof/3 can order a list with duplicate removal. Is there a way to use setof/3 keeping duplicates? Basically is there a built-in sorting function setof-like? (meaning if I have [a,3,2,c,b...
[ 0.0167236328125, 0.01324462890625, 0.04736328125, -0.0235595703125, 0.00165557861328125, -0.000762939453125, -0.01361083984375, -0.01263427734375, 0.0086669921875, -0.0458984375, -0.0185546875, 0.0281982421875, 0.00946044921875, -0.01043701171875, 0.007080078125, 0.01080322265625, -0...
[ 5423, 4390, 5062, 678, 171763, 1636, 23, 502, 4867, 18113, 831, 12989, 5303, 67, 49146, 1405, 3917, 4527, 120260, 88303, 73, 12096, 214, 32354, 363, 304, 2046, 155761, 153941, 42564, 241860 ]
[ 0.1890869140625, 0.248779296875, 0.2132568359375, 0.07989501953125, 0.254150390625, 0.1483154296875, 0.03472900390625, 0.1541748046875, 0.219482421875, 0.228271484375, 0.024627685546875, 0.1917724609375, 0.1419677734375, 0.09124755859375, 0.07763671875, 0.058441162109375, 0.066894531...
embed
19452480_c0
19452480
prolog
0
Title: Prolog program with fixed queries Problem title: Prolog program with fixed queries Tags: prolog, ontology Problem: Prolog program with fixed queries I'm trying to make some queries on my ontology using prolog (with sem_web library). I've already tested queries launching swi-prolog, but what I would do is to writ...
Prolog program with fixed queries Prolog program with fixed queries prolog ontology Prolog Prolog program with fixed queries I'm trying to make some queries on my ontology using prolog (with sem_web library). I've already tested queries launching swi-prolog, but what I would do is to write a .pl file with fixed queries...
[ 0.02783203125, 0.01446533203125, 0.010986328125, 0.0027618408203125, 0.0123291015625, -0.0024871826171875, 0.0086669921875, -0.003662109375, 0.0015869140625, -0.0478515625, 0.0208740234375, -0.00628662109375, -0.0185546875, 0.0120849609375, 0.01324462890625, 0.0074462890625, 0.002944...
[ 1250, 4867, 1528, 678, 188347, 41, 10484, 502, 3283, 25443, 31577, 3249, 98, 484, 14051, 35773, 3034, 83184, 2452, 3454, 2806, 33022, 5, 2424, 11435, 1495, 113054, 50339, 2071, 7722, 2046, 30098, 124326 ]
[ 0.16650390625, 0.22021484375, 0.16845703125, 0.05828857421875, 0.2529296875, 0.1805419921875, 0.15380859375, 0.1417236328125, 0.15087890625, 0.1656494140625, 0.044952392578125, 0.0147857666015625, 0.005462646484375, 0.1136474609375, 0.115966796875, 0.07794189453125, 0.133056640625, ...
embed
64073938_c0
64073938
prolog
0
Title: Write a predicate that tests if all elements of a numeric list are positive. @mndrix Problem title: Write a predicate that tests if all elements of a numeric list are positive. @mndrix Tags: prolog Problem: Write a predicate that tests if all elements of a numeric list are positive. @mndrix how to write clauses,...
Write a predicate that tests if all elements of a numeric list are positive. @mndrix Write a predicate that tests if all elements of a numeric list are positive. @mndrix prolog Write all_greater_than_zero Write a predicate that tests if all elements of a numeric list are positive. @mndrix how to write clauses, predicat...
[ -0.0081787109375, -0.0004673004150390625, -0.00909423828125, 0.005035400390625, -0.003448486328125, 0.01312255859375, 0.0262451171875, 0.007476806640625, -0.005279541015625, 0.0106201171875, 0.01141357421875, -0.01312255859375, -0.0130615234375, 0.005950927734375, 0.0032196044921875, 0...
[ 601, 18781, 1653, 2063, 67, 109921, 2174, 756, 80854, 54744, 238, 5303, 621, 24491, 1374, 29887, 425, 10, 450, 502, 4867, 7134, 46429, 21732, 80510, 3642, 47, 33022, 70731, 90, 1636, 77758, 26785 ]
[ 0.04376220703125, 0.082763671875, 0.1685791015625, 0.2159423828125, 0.16357421875, 0.19580078125, 0.097412109375, 0.0992431640625, 0.1446533203125, 0.1478271484375, 0.034759521484375, 0.1790771484375, 0.04351806640625, 0.20751953125, 0.005615234375, 0.044891357421875, 0.0462341308593...
embed
52027132_c1
52027132
prolog
1
(H2, H1). subtype(func([H|T1],R), func([H|T2],R)) :- subtype(func(T1,R), func(T2,R)). Now, I am still able to do some finite checks, but even trying to enumerate all subtypes of byte fails with stack overflow. ?- isa(func([int,int], bit), func([bit,bit], int)). true ?- isa(X, byte). X = bit ; Stack limit (0.2Gb) exceed...
(H2, H1). subtype(func([H|T1],R), func([H|T2],R)) :- subtype(func(T1,R), func(T2,R)). Now, I am still able to do some finite checks, but even trying to enumerate all subtypes of byte fails with stack overflow. ?- isa(func([int,int], bit), func([bit,bit], int)). true ?- isa(X, byte). X = bit ; Stack limit (0.2Gb) exceed...
[ 0.007415771484375, -0.00830078125, 0.023681640625, 0.00775146484375, -0.02294921875, -0.00909423828125, -0.0174560546875, 0.00439453125, 0.01300048828125, -0.0159912109375, -0.0026397705078125, -0.01177978515625, -0.007171630859375, 0.0037841796875, 0.0024566650390625, -0.004150390625,...
[ 841, 304, 572, 17727, 1614, 50986, 16498, 238, 58745, 618, 76172, 1052, 7477, 90173, 418, 7464, 19048, 94418, 13, 12765, 31577, 189085, 756, 390, 67, 35782, 678, 177261, 645, 118664, 25412, 4288, 4, 4785, 3137, 23, 18, 29568, 1542, 1193, ...
[ 0.10223388671875, 0.1558837890625, 0.1099853515625, 0.0849609375, 0.1971435546875, 0.2529296875, 0.138671875, 0.05010986328125, 0.006744384765625, 0.03546142578125, 0.046966552734375, 0.0809326171875, 0.13037109375, 0.0809326171875, 0.06787109375, 0.07269287109375, 0.0748291015625, ...
embed
20568231_c0
20568231
prolog
0
Title: Prolog - Twice List Problem title: Prolog - Twice List Tags: list, prolog, recursive-query Problem: Prolog - Twice List I am practicing prolog and all and this one is killing me. Trying to do this: twice([1,2,3],X). the output I want is X = [1,1,2,2,3,3]. Here's my latest attempt: twice([HD|TL],[HD2|TL2]):- twic...
Prolog - Twice List Prolog - Twice List list prolog recursive-query Prolog Twice List HD2 TL2 Out Rest Prolog - Twice List I am practicing prolog and all and this one is killing me. Trying to do this: the output I want is Here's my latest attempt: //New
[ 0.009765625, 0.01104736328125, 0.021240234375, 0.00469970703125, 0.00933837890625, 0.040283203125, -0.0211181640625, 0.0093994140625, 0.0137939453125, -0.03125, 0.031982421875, -0.0201416015625, -0.005859375, 0.0184326171875, -0.0081787109375, 0.013671875, 0.035400390625, 0.0229492...
[ 1250, 4867, 384, 2452, 329, 32036, 5303, 502, 195625, 5844, 944, 1294, 4732, 304, 20602, 13538, 49756, 74082, 756, 903, 1632, 83, 200, 30319, 163, 40858, 140992, 87, 3444, 42850, 81887, 4666, 46568 ]
[ 0.166748046875, 0.23828125, 0.0526123046875, 0.1522216796875, 0.1396484375, 0.215087890625, 0.1497802734375, 0.128662109375, 0.1717529296875, 0.10577392578125, 0.10565185546875, 0.036102294921875, 0.1451416015625, 0.12384033203125, 0.12353515625, 0.138916015625, 0.1422119140625, 0....
embed
7490800_c0
7490800
prolog
0
Title: Get random predicate from knowledge base. Prolog Problem title: Get random predicate from knowledge base. Prolog Tags: prolog, random, predicate Problem: Get random predicate from knowledge base. Prolog For example I have: upred(mary, have, knife). upred(john, have, sword). upred(sam, have, bowl). upred(sword, i...
Get random predicate from knowledge base. Prolog Get random predicate from knowledge base. Prolog prolog random predicate knowledge Get Prolog Pred get_random_pred Get random predicate from knowledge base. Prolog For example I have: How can I get random predicate?
[ 0.0130615234375, -0.0013885498046875, 0.01531982421875, -0.01409912109375, 0.0029144287109375, 0.0203857421875, 0.0128173828125, -0.014892578125, -0.010009765625, -0.087890625, 0.0224609375, 0.016357421875, -0.01214599609375, -0.0030059814453125, 0.007232666015625, 0.01336669921875, ...
[ 20779, 96759, 1653, 2063, 67, 1295, 51359, 3647, 1250, 4867, 502, 7145, 2046, 46258, 39, 19714, 27781, 765, 11249, 831, 87 ]
[ 0.1219482421875, 0.2286376953125, 0.198486328125, 0.2269287109375, 0.1407470703125, 0.0909423828125, 0.17724609375, 0.1650390625, 0.16015625, 0.2191162109375, 0.11151123046875, 0.1712646484375, 0.14404296875, 0.1739501953125, 0.107421875, 0.1927490234375, 0.045654296875, 0.03866577...
embed
31110035_c0
31110035
prolog
0
Title: persian language processing prolog Problem title: persian language processing prolog Tags: prolog, expert-system Problem: persian language processing prolog This is my prolog code, which gave me the following error: ERROR: Out of global stack hasA(S,A):- name(S,L1), compar(L1,A). compar([H1,H2|T1],T1):- H1 == 15...
persian language processing prolog persian language processing prolog prolog expert-system persian language processing prolog This is my prolog code, which gave me the following error: What is wrong? Can you help me with it?
[ 0.008056640625, -0.00750732421875, 0.0021820068359375, 0.0257568359375, -0.0203857421875, 0.0147705078125, -0.007354736328125, 0.0189208984375, -0.00098419189453125, -0.04833984375, 0.0262451171875, 0.0047607421875, 0.00341796875, -0.0118408203125, 0.0125732421875, -0.0045166015625, ...
[ 38265, 66, 46876, 9433, 502, 4867, 214, 26808, 16751, 3293, 83, 759, 18151, 26038, 163, 70, 25632, 18499, 12, 4865, 44691, 4171, 398, 4358 ]
[ 0.15625, 0.11083984375, 0.07305908203125, 0.10858154296875, 0.1715087890625, 0.21533203125, 0.007114410400390625, 0.1700439453125, 0.1390380859375, 0.019378662109375, 0.0709228515625, 0.0634765625, 0.173583984375, 0.0543212890625, 0.07525634765625, 0.007785797119140625, 0.13916015625...
embed
65072545_c0
65072545
prolog
0
Title: Remove repeating elements in list, Prolog Problem title: Remove repeating elements in list, Prolog Tags: prolog Problem: Remove repeating elements in list, Prolog I was wondering if there's any way to remove repeating elements in prolog only if they're nearby eachother. At the moment I could only do this: Input:...
Remove repeating elements in list, Prolog Remove repeating elements in list, Prolog prolog Remove Prolog Remove repeating elements in list, Prolog I was wondering if there's any way to remove repeating elements in prolog only if they're nearby eachother. At the moment I could only do this: Input: And i get output: But ...
[ -0.00689697265625, 0.03173828125, -0.00927734375, 0.02294921875, -0.019775390625, 0.00518798828125, -0.00701904296875, 0.0103759765625, 0.00830078125, -0.031005859375, -0.00970458984375, 0.01336669921875, -0.011474609375, -0.0026397705078125, -0.0021514892578125, 0.0263671875, 0.0094...
[ 181139, 119140, 214, 80854, 23, 5303, 1250, 4867, 502, 149016, 3917, 47, 87388, 4734, 2174, 43573, 1272, 12638, 126340, 3095, 5809, 360, 7077, 2046, 140992, 6165, 76, 1957, 1884, 903, 54 ]
[ 0.16064453125, 0.28076171875, 0.14599609375, 0.20166015625, 0.05023193359375, 0.1812744140625, 0.1617431640625, 0.25390625, 0.1405029296875, 0.0249786376953125, 0.047332763671875, 0.006500244140625, 0.189697265625, 0.056121826171875, 0.036407470703125, 0.09307861328125, 0.13793945312...
embed
74838023_c1
74838023
prolog
1
))))),_5488) Exit:clause(\+call(call(call(call(yellow(apple))))),\+call(call(call(call(call(yellow(apple))))))) Call:solve(\+call(call(call(call(call(yellow(apple))))))) Call:clause(\+call(call(call(call(call(yellow(apple)))))),_5508) Exit:clause(\+call(call(call(call(call(yellow(apple)))))),\+call(call(call(call(call(...
))))),_5488) Exit:clause(\+call(call(call(call(yellow(apple))))),\+call(call(call(call(call(yellow(apple))))))) Call:solve(\+call(call(call(call(call(yellow(apple))))))) Call:clause(\+call(call(call(call(call(yellow(apple)))))),_5508) Exit:clause(\+call(call(call(call(call(yellow(apple)))))),\+call(call(call(call(call(...
[ 0.0223388671875, 0.0230712890625, 0.0081787109375, 0.034912109375, -0.027587890625, 0.032470703125, -0.005401611328125, -0.00225830078125, 0.009033203125, 0.0093994140625, -0.0322265625, 0.0079345703125, -0.0216064453125, 0.0262451171875, 0.0157470703125, -0.004119873046875, 0.009948...
[ 6, 80126, 247, 454, 12338, 123641, 5443, 217, 12, 18347, 4032, 1328, 85763, 132, 1033, 41566, 9007, 133, 167089, 26265, 86918, 11663, 109168, 41872, 28864, 26073, 7, 23213, 4, 14631, 6565, 538, 101, 758, 161414, 90393, 1019 ]
[ 0.0897216796875, 0.203857421875, 0.1278076171875, 0.0386962890625, 0.161376953125, 0.25830078125, 0.1820068359375, 0.1622314453125, 0.061187744140625, 0.09912109375, 0.1693115234375, 0.134765625, 0.2078857421875, 0.024261474609375, 0.0916748046875, 0.1917724609375, 0.18115234375, 0...
embed
30180070_c0
30180070
prolog
0
Title: Can someone explain why this prolog query evaluates to false? Problem title: Can someone explain why this prolog query evaluates to false? Tags: prolog, clpfd Problem: Can someone explain why this prolog query evaluates to false? I am trying to write a predicate pythagorean(X,Y,Z,W) that can generate all triples...
Can someone explain why this prolog query evaluates to false? Can someone explain why this prolog query evaluates to false? prolog clpfd Can Can someone explain why this prolog query evaluates to false? I am trying to write a predicate pythagorean(X,Y,Z,W) that can generate all triples such that X^2 + Y^2 = Z^2 , where...
[ 0.0135498046875, 0.0128173828125, -0.00860595703125, -0.002532958984375, -0.0228271484375, 0.00238037109375, 0.005523681640625, -0.0252685546875, -0.00665283203125, 0.005950927734375, 0.00634765625, 0.005706787109375, -0.0020751953125, -0.011474609375, -0.015625, 0.02001953125, 0.001...
[ 4171, 22008, 73342, 15400, 903, 502, 4867, 41, 1294, 151575, 90, 47, 98320, 33139, 39557, 71, 31577, 33022, 1653, 2063, 17198, 3238, 6504, 5073, 1542, 1723, 1511, 1456, 831, 139392, 756, 162738, 1193, 8353, 304, 997, 990, 567, 601, 757, ...
[ 0.0176239013671875, 0.03680419921875, 0.1851806640625, 0.1353759765625, 0.037261962890625, 0.1737060546875, 0.2281494140625, 0.12939453125, 0.07843017578125, 0.16943359375, 0.047821044921875, 0.1083984375, 0.241455078125, 0.0285491943359375, 0.0557861328125, 0.07391357421875, 0.05639...
embed
29301224_c0
29301224
prolog
0
Title: Prolog lists of ascending number inside a list Problem title: Prolog lists of ascending number inside a list Tags: prolog, list Problem: Prolog lists of ascending number inside a list I Have a list of [1,2,3,1,0] at start but need to split it into a number of sub lists where the new lists becomes [[1,2,3],[1],[0...
Prolog lists of ascending number inside a list Prolog lists of ascending number inside a list prolog list Prolog Head HeadTail TailTail Prolog lists of ascending number inside a list I Have a list of [1,2,3,1,0] at start but need to split it into a number of sub lists where the new lists becomes [[1,2,3],[1],[0]]. The ...
[ 0.015380859375, -0.00177001953125, 0.0024566650390625, 0.0035247802734375, -0.0152587890625, 0.019775390625, 0.0047607421875, -0.00390625, 0.00738525390625, -0.00592041015625, 0.01324462890625, -0.006622314453125, -0.0108642578125, 0.0264892578125, 0.00848388671875, -0.00775146484375, ...
[ 1250, 4867, 5303, 82800, 214, 14012, 46132, 502, 44816, 9874, 379, 1218, 10, 87, 31901, 111, 155761, 206808, 99, 4034, 3871, 65450, 3934, 1614, 3525, 24209, 133063, 96386, 25256, 2389, 62822, 23755, 3714, 23, 83, 390, 37397, 101935 ]
[ 0.2061767578125, 0.25634765625, 0.24755859375, 0.2119140625, 0.09906005859375, 0.1722412109375, 0.1781005859375, 0.1845703125, 0.1533203125, 0.1544189453125, 0.1131591796875, 0.1077880859375, 0.00714111328125, 0.01617431640625, 0.0140380859375, 0.010711669921875, 0.09564208984375, ...
embed
34227140_c1
34227140
prolog
1
q :- write('A = '), read(A), A = 0, write('Not a quadratic equation'); write('B = '), read(B), write('C = '), read(C), D is B*B-4*A*C, D = 0, write('x = '), X is -B/2/A, write(X); D > 0, write('x1 = '), X1 is (-B+sqrt(D))/2/A, write(X1), nl, write('x2 = '), X2 is (-B-sqrt(D))/2/A, write(X2); D < 0, write('Delta <0!'),...
q :- write('A = '), read(A), A = 0, write('Not a quadratic equation'); write('B = '), read(B), write('C = '), read(C), D is B*B-4*A*C, D = 0, write('x = '), X is -B/2/A, write(X); D > 0, write('x1 = '), X1 is (-B+sqrt(D))/2/A, write(X1), nl, write('x2 = '), X2 is (-B-sqrt(D))/2/A, write(X2); D < 0, write('Delta <0!'),...
[ -0.0010528564453125, 0.00701904296875, 0.00506591796875, 0.0205078125, 0.000789642333984375, 0.01611328125, 0.0091552734375, -0.01116943359375, 0.000926971435546875, 0.01348876953125, 0.00025177001953125, -0.004364013671875, 0.00007963180541992188, -0.0019989013671875, 0.020751953125, ...
[ 8096, 15772, 33022, 132, 284, 2203, 247, 12301, 62, 757, 122116, 10, 68587, 9523, 28, 5490, 2320, 3142, 571, 441, 391, 83, 335, 1639, 11565, 4, 425, 1193, 20, 12477, 64, 1542, 977, 418, 9, 1328, 864, 3198, 397, 17727, 13169, 304, 10...
[ 0.216064453125, 0.1300048828125, 0.2000732421875, 0.002532958984375, 0.128173828125, 0.154052734375, 0.0306854248046875, 0.188232421875, 0.1134033203125, 0.149169921875, 0.199951171875, 0.05572509765625, 0.206298828125, 0.1358642578125, 0.058746337890625, 0.2144775390625, 0.094970703...
embed
56310184_c2
56310184
prolog
2
that it generates a complete sequence? Update: (more?) complete, but don't understand why (!) Splitting out the check for centuries improves the completeness of the query: leap_year_century_fix(Year) :- Year mod 100 #\= 0. leap_year_century_fix(Year) :- Year mod 100 #= 0, Year mod 400 #= 0. % 2000 is a leap year, 1900...
that it generates a complete sequence? Update: (more?) complete, but don't understand why (!) Splitting out the check for centuries improves the completeness of the query: leap_year_century_fix(Year) :- Year mod 100 #\= 0. leap_year_century_fix(Year) :- Year mod 100 #= 0, Year mod 400 #= 0. % 2000 is a leap year, 1900...
[ -0.00543212890625, 0.0038299560546875, -0.00127410888671875, 0.026611328125, -0.0025177001953125, 0.00144195556640625, -0.00738525390625, -0.0157470703125, 0.0181884765625, 0.00946044921875, -0.0283203125, 0.00188446044921875, 0.007049560546875, 0.00494384765625, 0.01092529296875, -0.0...
[ 450, 442, 139392, 7, 10, 28484, 40, 944, 3956, 28641, 17678, 4, 25, 28219, 15400, 72896, 46474, 1916, 1810, 70, 12765, 100, 202032, 90, 52295, 7432, 41, 1294, 95, 2631, 46799, 16797, 44616, 55923, 69085, 147, 42552, 2811, 805, 757, 4082...
[ 0.0697021484375, 0.07989501953125, 0.2137451171875, 0.0836181640625, 0.0513916015625, 0.2254638671875, 0.06634521484375, 0.1456298828125, 0.0831298828125, 0.0260162353515625, 0.0953369140625, 0.02801513671875, 0.017181396484375, 0.1236572265625, 0.0537109375, 0.03216552734375, 0.1483...
embed
73224069_c0
73224069
prolog
0
Title: Display elements of a list with there index in PROLOG Problem title: Display elements of a list with there index in PROLOG Tags: prolog Problem: Display elements of a list with there index in PROLOG I have a list of numbers : list = [0.5, 0.88, 1, 0.65 ] I want to display elements of this list with there index, ...
Display elements of a list with there index in PROLOG Display elements of a list with there index in PROLOG prolog Display PROLOG List Display elements of a list with there index in PROLOG I have a list of numbers : I want to display elements of this list with there index, and the start index to be 2 To get something l...
[ 0.0135498046875, 0.008056640625, 0.00396728515625, 0.00469970703125, -0.0108642578125, 0.00811767578125, 0.007171630859375, 0.006591796875, 0.005035400390625, -0.01104736328125, 0.0013580322265625, -0.01007080078125, -0.026123046875, 0.029296875, 0.0179443359375, 0.005859375, 0.03613...
[ 90045, 80854, 5303, 678, 2685, 63262, 23, 10514, 47510, 111, 502, 4867, 32036, 101935, 3444, 44116, 4034, 116, 15190 ]
[ 0.14208984375, 0.177001953125, 0.172119140625, 0.107177734375, 0.1346435546875, 0.2386474609375, 0.04669189453125, 0.148193359375, 0.2298583984375, 0.02886962890625, 0.10137939453125, 0.193359375, 0.145751953125, 0.12225341796875, 0.060546875, 0.159423828125, 0.11834716796875, 0.12...
embed
26853751_c1
26853751
prolog
1
), mother(Z, Y). grandmother(X, Y) :- mother(X, Z), father(Z, Y). brother(X, Y) :- male(X), father(Z, X), father(Z, Y), X \== Y. sister(X, Y) :- female(X), father(Z, X), father(Z, Y), X \== Y. /* New realtionships */ parent(X,Y) :- father(X,Y); mother(X,Y). uncle(X,Y) :- parent(Z,Y), brother(X,Z), Z \== X. aunt(X,Y) :-...
), mother(Z, Y). grandmother(X, Y) :- mother(X, Z), father(Z, Y). brother(X, Y) :- male(X), father(Z, X), father(Z, Y), X \== Y. sister(X, Y) :- female(X), father(Z, X), father(Z, Y), X \== Y. /* New realtionships */ parent(X,Y) :- father(X,Y); mother(X,Y). uncle(X,Y) :- parent(Z,Y), brother(X,Z), Z \== X. aunt(X,Y) :-...
[ 0.0223388671875, 0.0108642578125, 0.016357421875, 0.01483154296875, -0.0240478515625, 0.0002269744873046875, -0.00872802734375, 0.0030670166015625, 0.0159912109375, -0.0024566650390625, -0.005401611328125, -0.022216796875, 0.005828857421875, -0.0045166015625, 0.004425048828125, 0.01055...
[ 6, 247, 42732, 132, 1511, 4, 990, 194, 9963, 432, 9319, 1542, 15772, 567, 67373, 82953, 11280, 1193, 69112, 5, 114015, 117776, 248, 1639, 2356, 2773, 1363, 16070, 7, 661, 64, 49129, 1723, 3142, 51, 11030, 10, 9109, 78, 79298, 193429, ...
[ 0.06842041015625, 0.1556396484375, 0.219482421875, 0.03192138671875, 0.1585693359375, 0.05645751953125, 0.17919921875, 0.08935546875, 0.1474609375, 0.150634765625, 0.1612548828125, 0.127197265625, 0.1468505859375, 0.09979248046875, 0.1954345703125, 0.181396484375, 0.1153564453125, ...
embed
68732345_c0
68732345
prolog
0
Title: How to check all conditions in prolog? Problem title: How to check all conditions in prolog? Tags: prolog Problem: How to check all conditions in prolog? I am trying to execute the following code where I want to check all conditions:- w(X):- ( X=1 -> write('Yes'),nl; X=1 -> write('Yes'),nl; X=2 -> write('No')). ...
How to check all conditions in prolog? How to check all conditions in prolog? prolog How Yes How to check all conditions in prolog? I am trying to execute the following code where I want to check all conditions:- I want it to write with X=1. P.S. this is if-else, but I don't want if-else. How can I achieve this, the co...
[ 0.005615234375, 0.0103759765625, -0.024658203125, 0.0203857421875, -0.0067138671875, 0.0166015625, 0.01177978515625, -0.00115203857421875, -0.0035552978515625, 0.00543212890625, 0.0159912109375, -0.00872802734375, 0.0030059814453125, 0.0054931640625, 0.00872802734375, 0.00653076171875,...
[ 11249, 47, 12765, 756, 27289, 23, 502, 4867, 32635, 31577, 71924, 18151, 3444, 33022, 678, 1193, 33000, 2174, 5557, 18, 69307, 30646, 5117, 29568, 7413 ]
[ 0.0750732421875, 0.0921630859375, 0.239501953125, 0.1650390625, 0.272216796875, 0.1011962890625, 0.1748046875, 0.265380859375, 0.023284912109375, 0.0169219970703125, 0.06890869140625, 0.115234375, 0.037445068359375, 0.0743408203125, 0.03192138671875, 0.10302734375, 0.12353515625, 0...
embed
26218312_c0
26218312
prolog
0
Title: Split list on given element Problem title: Split list on given element Tags: prolog Problem: Split list on given element I have a list C and I want to split the list using the element c in the list. The expected results are as example: ?- split([a,c,a,a,c,a,a,a],X). X = [[a],[a,a],[a,a,a]]. Can anybody help? Tha...
Split list on given element Split list on given element prolog Split Split list on given element I have a list C and I want to split the list using the element c in the list. The expected results are as example: Can anybody help? Thanks in advance. I can remove the c in the list now and here is my codes.
[ 0.0030670166015625, 0.0194091796875, 0.000789642333984375, 0.0020904541015625, -0.03173828125, -0.0020294189453125, -0.00335693359375, 0.022705078125, 0.0072021484375, -0.0146484375, -0.0096435546875, -0.01007080078125, -0.041259765625, 0.0228271484375, 0.004608154296875, 0.00714111328...
[ 46474, 5303, 98, 34475, 12830, 502, 4867, 765, 313, 3444, 47, 65450, 70, 17368, 501, 23, 84751, 50339, 27781, 4171, 37873, 4358, 129745, 831, 87388, 5036, 3688, 18151 ]
[ 0.2529296875, 0.2396240234375, 0.1119384765625, 0.13525390625, 0.2003173828125, 0.1412353515625, 0.19287109375, 0.0047607421875, 0.1136474609375, 0.0936279296875, 0.06231689453125, 0.2392578125, 0.0504150390625, 0.08984375, 0.1551513671875, 0.037322998046875, 0.1142578125, 0.099914...
embed
30111807_c0
30111807
prolog
0
Title: Unifying a list of goals in prolog Problem title: Unifying a list of goals in prolog Tags: prolog Problem: Unifying a list of goals in prolog I have a list of goals that I would like to be unified at runtime such that I get a list of Variable, value pairs. How might I do this? Example db.pl: alpha(a). bravo(b). ...
Unifying a list of goals in prolog Unifying a list of goals in prolog prolog Unifying Out Unifying a list of goals in prolog I have a list of goals that I would like to be unified at runtime such that I get a list of Variable, value pairs. How might I do this? Example db.pl: Interpreter:
[ 0.014404296875, 0.0174560546875, 0.00384521484375, -0.005218505859375, -0.01220703125, -0.0014495849609375, -0.018798828125, 0.013916015625, -0.00140380859375, -0.0167236328125, -0.0159912109375, -0.015869140625, 0.0098876953125, -0.007598876953125, -0.01495361328125, 0.01007080078125,...
[ 992, 151138, 5303, 111, 109458, 23, 502, 4867, 13538, 2806, 1884, 186, 51, 47314, 99, 11675, 6032, 2046, 84572, 2886, 34292, 80836, 13648, 54, 903, 89536, 40041, 2424, 5337, 56359, 56 ]
[ 0.2177734375, 0.19775390625, 0.1640625, 0.06658935546875, 0.2364501953125, 0.058258056640625, 0.1715087890625, 0.2386474609375, 0.1810302734375, 0.04473876953125, 0.0858154296875, 0.039581298828125, 0.178955078125, 0.2137451171875, 0.019683837890625, 0.06292724609375, 0.0994262695312...
embed
69670097_c0
69670097
prolog
0
Title: Prolog. Function call, add brackets to output Problem title: Prolog. Function call, add brackets to output Tags: prolog Problem: Prolog. Function call, add brackets to output I have a predicate: test(X, Test) :- Test =.. [integer,X]. When I call it I get: ?- test(1,Test). Test = integer(1). How can I add additio...
Prolog. Function call, add brackets to output Prolog. Function call, add brackets to output prolog Prolog Test Prolog. Function call, add brackets to output I have a predicate: When I call it I get: How can I add additional brackets to the output? I expect it to look like this: Edit. Found it easier to print everything...
[ 0.00136566162109375, 0.01202392578125, -0.004791259765625, -0.0029449462890625, 0.00311279296875, 0.01055908203125, 0.0079345703125, -0.003997802734375, -0.0037689208984375, -0.0223388671875, 0.01141357421875, -0.0016326904296875, -0.02978515625, 0.009765625, 0.0213623046875, -0.006713...
[ 1250, 4867, 28670, 10763, 11782, 15190, 1620, 27853, 7, 47, 140992, 502, 8647, 1653, 2063, 11249, 831, 78301, 41206, 6713, 1884, 215624, 99156, 28412, 26818, 678, 33022, 11583 ]
[ 0.15234375, 0.2330322265625, 0.1336669921875, 0.0274658203125, 0.1455078125, 0.115234375, 0.1944580078125, 0.2127685546875, 0.075927734375, 0.04107666015625, 0.17626953125, 0.1260986328125, 0.16845703125, 0.0297088623046875, 0.06890869140625, 0.011444091796875, 0.0186767578125, 0.1...
embed
4179894_c0
4179894
prolog
0
Title: Custom Prolog arithmetic function Problem title: Custom Prolog arithmetic function Tags: operators, prolog, user-defined-functions Problem: Custom Prolog arithmetic function I'm looking for something like built-in arithmetic operators that has a return value in Prolog (specifically in SWI-Prolog). E.g. if you ru...
Custom Prolog arithmetic function Custom Prolog arithmetic function operators prolog user-defined-functions Custom Prolog Custom Prolog arithmetic function I'm looking for something like built-in arithmetic operators that has a return value in Prolog (specifically in SWI-Prolog). E.g. if you run A is (1+2) + (3+2). , i...
[ 0.02294921875, -0.00677490234375, 0.01031494140625, 0.016357421875, 0.0003681182861328125, 0.016845703125, -0.00830078125, 0.0034332275390625, -0.001373291015625, -0.040283203125, -0.003997802734375, -0.00135040283203125, -0.0181884765625, -0.004791259765625, 0.0235595703125, -0.015563...
[ 130664, 1250, 4867, 8962, 282, 9523, 32354, 39933, 502, 38937, 112, 5983, 137175, 16487, 100, 9844, 88303, 73, 7, 1556, 30646, 34292, 23, 159, 38969, 10752, 11675, 62, 83, 2858, 54651, 997, 6896, 2203, 3217, 6, 61924, 7477, 238, 54, 188...
[ 0.2030029296875, 0.1702880859375, 0.265380859375, 0.1361083984375, 0.0670166015625, 0.0246124267578125, 0.197265625, 0.283447265625, 0.1219482421875, 0.09075927734375, 0.0294036865234375, 0.1007080078125, 0.1851806640625, 0.061981201171875, 0.033935546875, 0.003631591796875, 0.119018...
embed
44122025_c0
44122025
prolog
0
Title: How to move first N elements to the end of the list Problem title: How to move first N elements to the end of the list Tags: list, prolog Problem: How to move first N elements to the end of the list I am wondering how can I move first N elements from a list and put them at the end. For example: [1,2,3,4] and I w...
How to move first N elements to the end of the list How to move first N elements to the end of the list list prolog How List1 List2 How to move first N elements to the end of the list I am wondering how can I move first N elements from a list and put them at the end. For example: [1,2,3,4] and I want to move first 2 el...
[ 0.016357421875, 0.010009765625, -0.00176239013671875, 0.0283203125, -0.0166015625, 0.0322265625, -0.00848388671875, 0.03125, 0.00732421875, -0.0030670166015625, 0.0013275146484375, -0.00089263916015625, -0.005859375, 0.005096435546875, -0.004852294921875, 0.000896453857421875, 0.0228...
[ 11249, 47, 25813, 5117, 541, 80854, 70, 3564, 111, 5303, 502, 4867, 32036, 418, 304, 149016, 3642, 831, 1295, 3884, 2856, 99, 133063, 82449, 3444, 116, 16750, 3714, 4034, 67660 ]
[ 0.10888671875, 0.1329345703125, 0.1798095703125, 0.1861572265625, 0.208984375, 0.2255859375, 0.0755615234375, 0.219970703125, 0.113525390625, 0.200439453125, 0.0914306640625, 0.1435546875, 0.1539306640625, 0.0181732177734375, 0.0728759765625, 0.05279541015625, 0.06689453125, 0.0358...
embed
11774394_c0
11774394
prolog
0
Title: Sicstus Prolog: display current bindings during debugging Problem title: Sicstus Prolog: display current bindings during debugging Tags: sicstus-prolog, debugging, prolog Problem: Sicstus Prolog: display current bindings during debugging I'm very new to Prolog and have been using Sicstus to help debug my code. I...
Sicstus Prolog: display current bindings during debugging Sicstus Prolog: display current bindings during debugging sicstus-prolog debugging prolog Sicstus Prolog Sicstus Prolog: display current bindings during debugging I'm very new to Prolog and have been using Sicstus to help debug my code. Is there a way to view al...
[ 0.01287841796875, 0.026611328125, 0.010498046875, 0.0108642578125, 0.00335693359375, 0.018798828125, -0.006103515625, 0.0133056640625, -0.00482177734375, -0.03515625, 0.00157928466796875, -0.0038604736328125, -0.02490234375, 0.0010833740234375, 0.016357421875, 0.035888671875, -0.0147...
[ 63457, 18253, 1250, 4867, 44116, 43581, 128239, 7, 20271, 8, 978, 36659, 26536, 3454, 502, 4552, 3525, 4358, 85779, 18151, 3917, 47, 21455, 756, 70, 12960, 2288, 26783, 8305, 41, 144851, 107838, 28412, 1810, 98441 ]
[ 0.156005859375, 0.2454833984375, 0.14892578125, 0.2293701171875, 0.1973876953125, 0.2283935546875, 0.2353515625, 0.1051025390625, 0.1214599609375, 0.138671875, 0.17333984375, 0.09857177734375, 0.1072998046875, 0.08984375, 0.0858154296875, 0.002105712890625, 0.040283203125, 0.032958...
embed
35684337_c0
35684337
prolog
0
Title: Prolog combining predicates Problem title: Prolog combining predicates Tags: predicate, prolog-findall, prolog Problem: Prolog combining predicates Just a small question about Prolog. Say I have used the built in predicate findall/3 to obtain a list and used the variable X as my output. I'm wondering how I could...
Prolog combining predicates Prolog combining predicates predicate prolog-findall prolog Prolog Prolog combining predicates Just a small question about Prolog. Say I have used the built in predicate findall/3 to obtain a list and used the variable X as my output. I'm wondering how I could then use this list in another p...
[ -0.004974365234375, 0.00872802734375, -0.0025634765625, 0.01507568359375, -0.007659912109375, 0.03369140625, 0.0072021484375, 0.005035400390625, -0.0021209716796875, -0.044189453125, 0.018310546875, -0.0172119140625, 0.003326416015625, -0.01202392578125, -0.0147705078125, 0.01086425781...
[ 1250, 4867, 375, 964, 1653, 2063, 502, 111607, 5584, 9655, 11814, 88303, 23, 67, 7413, 18113, 113054, 5303, 77336, 1193, 140992, 149016, 5809, 4527, 4568, 12477, 12830, 27781 ]
[ 0.1461181640625, 0.2188720703125, 0.0924072265625, 0.171630859375, 0.1312255859375, 0.1754150390625, 0.1187744140625, 0.0731201171875, 0.1466064453125, 0.006927490234375, 0.06365966796875, 0.08367919921875, 0.011810302734375, 0.031707763671875, 0.115478515625, 0.1697998046875, 0.0453...
embed
72395105_c0
72395105
prolog
0
Title: Map Coloring Prolog Problem title: Map Coloring Prolog Tags: prolog, clpfd Problem: Map Coloring Prolog I wrote this code to solve the map coloring problem using prolog: coloring([A,B,C,D,E,F]):- maplist(=\=(A),[B,C,D,E]), maplist(=\=(B),[C,D,F]), C=\=D, maplist(=\=(D),[E,F]), E=\=F. I try to get solutions using...
Map Coloring Prolog Map Coloring Prolog prolog clpfd Map Coloring Prolog Map Coloring Prolog I wrote this code to solve the map coloring problem using prolog: I try to get solutions using the query: but I always get the error "Arguments not sufficiently instantiated" , how to fix this?
[ 0.000881195068359375, 0.01092529296875, 0.004730224609375, 0.0048828125, -0.017578125, -0.002716064453125, -0.021728515625, 0.006683349609375, -0.00994873046875, -0.0186767578125, -0.00994873046875, -0.0181884765625, 0.007354736328125, 0.0208740234375, -0.000621795654296875, 0.01446533...
[ 42719, 51193, 214, 1250, 4867, 502, 33139, 39557, 71, 54397, 903, 18151, 86869, 22288, 10576, 2967, 17368, 9790, 51347, 70, 41, 1294, 11343, 2046, 18499, 7614, 1234, 9035, 959, 129980, 34648, 14, 27686, 3642, 30022 ]
[ 0.19775390625, 0.2052001953125, 0.1258544921875, 0.177734375, 0.231689453125, 0.1549072265625, 0.049407958984375, 0.081787109375, 0.08392333984375, 0.07318115234375, 0.0438232421875, 0.1337890625, 0.1219482421875, 0.211181640625, 0.221435546875, 0.1455078125, 0.0732421875, 0.037902...
embed
20219263_c0
20219263
prolog
0
Title: XSB Prolog: write my own setof function Problem title: XSB Prolog: write my own setof function Tags: list, prolog, xsb Problem: XSB Prolog: write my own setof function I need to get, from a keyboard input (list), a list without duplicates but without using the inbuild setof (or any other inbuild functions) in XS...
XSB Prolog: write my own setof function XSB Prolog: write my own setof function list prolog xsb XSB Prolog XSB Prolog: write my own setof function I need to get, from a keyboard input (list), a list without duplicates but without using the inbuild setof (or any other inbuild functions) in XSB prolog. How do i write my ...
[ -0.00390625, 0.0213623046875, 0.0167236328125, -0.00653076171875, -0.000514984130859375, 0.01123046875, -0.006744384765625, -0.001800537109375, 0.00360107421875, -0.026611328125, -0.005828857421875, 0.0157470703125, 0.01318359375, 0.005706787109375, -0.00775146484375, 0.0213623046875, ...
[ 1193, 36474, 1250, 4867, 33022, 759, 10002, 5423, 4390, 32354, 5303, 502, 1022, 275, 3871, 2046, 1295, 149186, 107730, 6562, 10, 15490, 171763, 17368, 23, 177149, 11249, 17, 7077, 140992, 6713, 1884, 129745 ]
[ 0.09466552734375, 0.1982421875, 0.098876953125, 0.19091796875, 0.1845703125, 0.07159423828125, 0.1678466796875, 0.1630859375, 0.25830078125, 0.202392578125, 0.192626953125, 0.06915283203125, 0.029296875, 0.0869140625, 0.0572509765625, 0.0892333984375, 0.08349609375, 0.2010498046875...
embed
70477169_c0
70477169
prolog
0
Title: PYSWIP not working in pyinstaller executable Problem title: PYSWIP not working in pyinstaller executable Tags: pyinstaller, python, prolog Problem: PYSWIP not working in pyinstaller executable I've done a project in python and prolog with TKINKTER and PYSWIP. When creating the executable with "pyinstaller -w --o...
PYSWIP not working in pyinstaller executable PYSWIP not working in pyinstaller executable pyinstaller python prolog PYSWIP PYSWIP not working in pyinstaller executable I've done a project in python and prolog with TKINKTER and PYSWIP. When creating the executable with "pyinstaller -w --onefile main.py" it gives me an e...
[ 0.016845703125, 0.001708984375, 0.00634765625, 0.0169677734375, -0.021240234375, 0.00390625, -0.00811767578125, -0.0177001953125, -0.0123291015625, -0.0189208984375, -0.00799560546875, -0.0084228515625, 0.001129150390625, -0.01055908203125, -0.0025177001953125, 0.013427734375, 0.0007...
[ 436, 26947, 1456, 10931, 959, 20697, 23, 17198, 154305, 71924, 2886, 50828, 502, 4867, 13452, 678, 108783, 154610, 14755, 105233, 6493, 434, 3630, 29822, 5201, 18499, 17368, 35773, 24927, 98169, 47, 27512, 7, 2452, 254, 20600, 1829, 2147 ]
[ 0.122314453125, 0.1712646484375, 0.22314453125, 0.26611328125, 0.049957275390625, 0.1461181640625, 0.053497314453125, 0.1014404296875, 0.24658203125, 0.122314453125, 0.10198974609375, 0.12744140625, 0.074462890625, 0.142822265625, 0.05828857421875, 0.003082275390625, 0.03884887695312...
embed
16490111_c0
16490111
prolog
0
Title: Prolog &quot;operator expected error&quot; on predicate commands sequence Problem title: Prolog &quot;operator expected error&quot; on predicate commands sequence Tags: prolog Problem: Prolog "operator expected error" on predicate commands sequence This very simple Prolog example from my study material is giving...
Prolog &quot;operator expected error&quot; on predicate commands sequence Prolog &quot;operator expected error&quot; on predicate commands sequence prolog Prolog How Awfully Prolog "operator expected error" on predicate commands sequence This very simple Prolog example from my study material is giving me an "Operator E...
[ 0.017822265625, -0.004364013671875, -0.01513671875, 0.0185546875, 0.01409912109375, 0.0235595703125, -0.002777099609375, 0.015625, -0.00101470947265625, -0.0142822265625, -0.000518798828125, -0.0042724609375, 0.01361083984375, -0.016357421875, 0.00634765625, -0.00567626953125, -0.013...
[ 1250, 4867, 206469, 84751, 18499, 98, 1653, 2063, 75101, 40, 944, 3956, 67, 502, 11249, 76324, 126351, 8781, 27781, 35187, 4912, 163, 156823, 1290, 60075, 13, 89829, 4865, 87, 132283 ]
[ 0.1588134765625, 0.246337890625, 0.24755859375, 0.215576171875, 0.183349609375, 0.0293426513671875, 0.09600830078125, 0.1732177734375, 0.161865234375, 0.019561767578125, 0.084228515625, 0.003692626953125, 0.031402587890625, 0.108642578125, 0.00262451171875, 0.055816650390625, 0.06713...
embed
11485662_c0
11485662
prolog
0
Title: Not equal and not unify in Prolog Problem title: Not equal and not unify in Prolog Tags: prolog Problem: Not equal and not unify in Prolog What is the difference between A \= B and not(A==B) in Prolog? I found this http://www.learnprolognow.org/lpnpage.php?pagetype=html&pageid=lpn-htmlse5 and this wiki page http...
Not equal and not unify in Prolog Not equal and not unify in Prolog prolog Not Prolog Not equal and not unify in Prolog What is the difference between A \= B and not(A==B) in Prolog? I found this http://www.learnprolognow.org/lpnpage.php?pagetype=html&pageid=lpn-htmlse5 and this wiki page http://en.wikibooks.org/wiki/P...
[ 0.017822265625, 0.0107421875, 0.02197265625, 0.00799560546875, -0.011474609375, -0.0019989013671875, -0.001220703125, -0.02099609375, -0.00408935546875, 0.021240234375, -0.00665283203125, -0.006683349609375, 0.0152587890625, 0.0034942626953125, 0.01904296875, 0.0029296875, 0.00497436...
[ 11205, 105950, 136, 959, 51, 40383, 23, 1250, 4867, 502, 4865, 83, 70, 60212, 17721, 62, 41872, 1369, 335, 284, 69112, 571, 14037, 903, 14071, 35613, 7693, 19, 758, 34356, 81415, 13691, 10752, 7235, 24908, 73, 19714, 2063, 4358, 17306, ...
[ 0.20166015625, 0.2181396484375, 0.079345703125, 0.26708984375, 0.1614990234375, 0.18994140625, 0.07550048828125, 0.1754150390625, 0.261474609375, 0.14111328125, 0.003448486328125, 0.024688720703125, 0.07855224609375, 0.209716796875, 0.08990478515625, 0.1165771484375, 0.1343994140625,...
embed
39524466_c0
39524466
prolog
0
Title: Prolog Error: Out of Local Stack in factorial Problem title: Prolog Error: Out of Local Stack in factorial Tags: prolog, factorial Problem: Prolog Error: Out of Local Stack in factorial I'm trying to make a factorial code in prolog but am getting error of out of local stack, that is, it is stuck in infinite loop...
Prolog Error: Out of Local Stack in factorial Prolog Error: Out of Local Stack in factorial prolog factorial Prolog Error Out Local Stack X-1 Prolog Error: Out of Local Stack in factorial I'm trying to make a factorial code in prolog but am getting error of out of local stack, that is, it is stuck in infinite loop. I c...
[ 0.0277099609375, 0.00092315673828125, 0.00092315673828125, 0.0167236328125, 0.004852294921875, -0.0120849609375, -0.0107421875, -0.000667572021484375, 0.0023193359375, -0.0341796875, 0.0101318359375, -0.0155029296875, -0.004486083984375, -0.0247802734375, 0.04150390625, 0.0040588378906...
[ 1250, 4867, 212059, 13538, 111, 24172, 6512, 2594, 23, 31461, 15403, 502, 1193, 5759, 31577, 18151, 18499, 1810, 4000, 177261, 83, 179933, 54241, 40956, 28219, 7730, 44691 ]
[ 0.1640625, 0.286376953125, 0.177978515625, 0.2044677734375, 0.1822509765625, 0.1961669921875, 0.179443359375, 0.1834716796875, 0.07574462890625, 0.166015625, 0.1766357421875, 0.1248779296875, 0.08837890625, 0.1151123046875, 0.043792724609375, 0.1607666015625, 0.1822509765625, 0.179...
embed
32691313_c0
32691313
prolog
0
Title: Counter in prolog Problem title: Counter in prolog Tags: prolog, counter Problem: Counter in prolog I want to create a counter in prolog. Something like starting it init/0. Adding 1 increment/0, and something like get_counter/1. To get the value. But I don't know how to start something if you have init/0 with no...
Counter in prolog Counter in prolog prolog counter Counter Counter in prolog I want to create a counter in prolog. Something like starting it init/0. Adding 1 increment/0, and something like get_counter/1. To get the value. But I don't know how to start something if you have init/0 with no inputs how to set something t...
[ 0.0146484375, 0.01043701171875, 0.007476806640625, 0.0283203125, 0.003631591796875, -0.0034027099609375, 0.0120849609375, 0.00494384765625, 0.0022735595703125, -0.0400390625, -0.0162353515625, 0.0225830078125, 0.005126953125, 0.0230712890625, 0.0400390625, -0.00738525390625, 0.006561...
[ 197956, 23, 502, 4867, 105416, 3444, 28282, 10, 72134, 442, 217, 107838, 62, 59725, 106, 158661, 2046, 71013, 56, 11583, 34292, 3714, 3642, 4034, 9844, 765, 678, 110, 107730, 5423, 47, 757, 6305, 5608, 9790, 54, 4935, 119578, 34735, 29459...
[ 0.277587890625, 0.082275390625, 0.186279296875, 0.252685546875, 0.293701171875, 0.0845947265625, 0.1505126953125, 0.05633544921875, 0.125732421875, 0.0172882080078125, 0.116943359375, 0.187255859375, 0.03546142578125, 0.0655517578125, 0.02581787109375, 0.1527099609375, 0.043243408203...
embed
69339386_c1
69339386
prolog
1
" with actual voice but for now i cant get it to run after running this i get this error: raise PrologError("".join(["Caused by: '", query, "'. ", pyswip.prolog.PrologError: Caused by: '"asd(sa, X)"'. Returned: 'error(type_error(callable, b'asd(sa, X)'), context(/(pyrun, 2), Variable(74)))'. any advice? Code signals: P...
" with actual voice but for now i cant get it to run after running this i get this error: raise PrologError("".join(["Caused by: '", query, "'. ", pyswip.prolog.PrologError: Caused by: '"asd(sa, X)"'. Returned: 'error(type_error(callable, b'asd(sa, X)'), context(/(pyrun, 2), Variable(74)))'. any advice? Code signals: P...
[ 0.00836181640625, 0.0162353515625, -0.011474609375, 0.02587890625, 0.0050048828125, 0.01141357421875, -0.00762939453125, -0.0225830078125, 0.0014495849609375, -0.056396484375, -0.00150299072265625, 0.000873565673828125, -0.0126953125, -0.0196533203125, 0.013427734375, -0.011474609375, ...
[ 44, 678, 8561, 54479, 1284, 100, 5036, 17, 45767, 2046, 442, 47, 11675, 7103, 51042, 903, 18499, 138804, 1250, 4867, 18468, 31611, 513, 73, 20370, 33740, 390, 41, 1294, 5, 57756, 2452, 254, 3454, 10752, 2041, 162, 71, 433, 1193, 173340,...
[ 0.10675048828125, 0.1363525390625, 0.1771240234375, 0.254638671875, 0.07293701171875, 0.116455078125, 0.156982421875, 0.0240020751953125, 0.1834716796875, 0.1170654296875, 0.0849609375, 0.1025390625, 0.1552734375, 0.0802001953125, 0.137451171875, 0.1058349609375, 0.214599609375, 0....
embed
14685543_c0
14685543
prolog
0
Title: Prolog remove function Problem title: Prolog remove function Tags: prolog Problem: Prolog remove function Im new to prolog and i want to be able to remove two locations from a list. I use this to check my code: remove(e,[(d,1),(e,2),(e,3),(a,4),(b,5),(c,7)], M2). But it only removed one out of the two locations ...
Prolog remove function Prolog remove function prolog Prolog Tail Head Tail1 Prolog remove function Im new to prolog and i want to be able to remove two locations from a list. I use this to check my code: But it only removed one out of the two locations (which is e). Can anyone help me? This is the rest of the code.
[ 0.02392578125, 0.0064697265625, 0.001953125, 0.0286865234375, -0.0125732421875, 0.013427734375, -0.020751953125, 0.00139617919921875, 0.0072021484375, -0.0118408203125, 0.00775146484375, 0.00665283203125, -0.017578125, -0.0224609375, 0.0025482177734375, -0.00982666015625, 0.004516601...
[ 1250, 4867, 87388, 32354, 502, 1218, 379, 44816, 418, 3370, 3525, 3444, 19048, 6626, 31913, 1295, 5303, 4527, 903, 12765, 18151, 4966, 4734, 184750, 1632, 1810, 28, 4358, 10588 ]
[ 0.184326171875, 0.29052734375, 0.2459716796875, 0.227294921875, 0.161865234375, 0.13330078125, 0.12298583984375, 0.1510009765625, 0.07672119140625, 0.002788543701171875, 0.05096435546875, 0.037811279296875, 0.0238494873046875, 0.1474609375, 0.2239990234375, 0.076171875, 0.18518066406...
embed
28482631_c1
28482631
prolog
1
At ?o1) (q ?p2 !ns:hasTravelledAt ?o2) (q ?o1 !ns:hasLocation ?loc) (q ?o2 !ns:hasLocation ?loc) (q ?o1 !ns:fromDate ?fd1) (q ?o2 !ns:fromDate ?fd2) (q ?o1 !ns:toDate ?td1) (q ?o2 !ns:toDate ?td2) ?- (or (and (?fd1 <= fd2) (?fd2 <= ?td1)) (and (?fd2 <= fd1) (?fd1 <= ?td2)) ) (not (= ?p1 ?p2)) ) Can any one help me? How...
At ?o1) (q ?p2 !ns:hasTravelledAt ?o2) (q ?o1 !ns:hasLocation ?loc) (q ?o2 !ns:hasLocation ?loc) (q ?o1 !ns:fromDate ?fd1) (q ?o2 !ns:fromDate ?fd2) (q ?o1 !ns:toDate ?td1) (q ?o2 !ns:toDate ?td2) ?- (or (and (?fd1 <= fd2) (?fd2 <= ?td1)) (and (?fd2 <= fd1) (?fd1 <= ?td2)) ) (not (= ?p1 ?p2)) ) Can any one help me? How...
[ 0.002777099609375, 0.0040283203125, -0.023681640625, -0.006500244140625, 0.00946044921875, -0.0098876953125, -0.005126953125, -0.006561279296875, 0.00592041015625, -0.047607421875, -0.006866455078125, 0.01361083984375, -0.00921630859375, -0.0191650390625, -0.0166015625, 0.0086669921875...
[ 1913, 705, 31, 17727, 864, 254, 304, 1779, 10557, 201142, 6259, 28848, 10461, 15363, 120639, 55043, 161063, 86291, 71, 188, 748, 1238, 10869, 418, 4171, 4358, 163, 11249, 831, 87, 4527, 46312, 32354, 23, 502, 4867, 41, 1294, 22362, 28864,...
[ 0.2073974609375, 0.027099609375, 0.10125732421875, 0.120849609375, 0.081787109375, 0.033782958984375, 0.1212158203125, 0.055419921875, 0.1353759765625, 0.21142578125, 0.1160888671875, 0.1912841796875, 0.144775390625, 0.10174560546875, 0.116943359375, 0.0986328125, 0.09051513671875, ...
embed
28662785_c1
28662785
prolog
1
) addone([3], [4]) ? creep Exit: (7) addone([2, 3], [3, 4]) ? creep Exit: (6) addone([1, 2, 3], [2, 3, 4]) ? creep X = [2, 3, 4]. I get to the point: Call: (9) addone([], _G1286) ? creep Exit: (9) addone([], []) ? creep From here I don't understand how when I reach the base clause Prolog recalls its saved values? Can y...
) addone([3], [4]) ? creep Exit: (7) addone([2, 3], [3, 4]) ? creep Exit: (6) addone([1, 2, 3], [2, 3, 4]) ? creep X = [2, 3, 4]. I get to the point: Call: (9) addone([], _G1286) ? creep Exit: (9) addone([], []) ? creep From here I don't understand how when I reach the base clause Prolog recalls its saved values? Can y...
[ 0.0245361328125, 0.0245361328125, -0.00311279296875, 0.01300048828125, -0.00494384765625, 0.0206298828125, -0.005096435546875, -0.0166015625, 0.03515625, -0.0096435546875, 0.01190185546875, 0.006622314453125, -0.01611328125, 0.02734375, 0.0042724609375, -0.01483154296875, 0.015502929...
[ 606, 64007, 54968, 59535, 49512, 254, 5443, 217, 8696, 304, 138, 201, 6791, 116, 1193, 2203, 6275, 26265, 11438, 132, 724, 1530, 112916, 28219, 3642, 3229, 58359, 3647, 70731, 13, 1250, 4867, 189232, 7, 6863, 57, 4126, 142424, 73342, 903,...
[ 0.1737060546875, 0.272216796875, 0.0684814453125, 0.069091796875, 0.203369140625, 0.171875, 0.1546630859375, 0.1634521484375, 0.03680419921875, 0.034332275390625, 0.0592041015625, 0.0914306640625, 0.05218505859375, 0.0010986328125, 0.1263427734375, 0.038238525390625, 0.1015625, 0.2...
embed
30818607_c0
30818607
prolog
0
Title: Translating a list to another list in prolog Problem title: Translating a list to another list in prolog Tags: prolog Problem: Translating a list to another list in prolog I Tried to write a simple code in Prolog which translate a list to another list. for instance, if we call listtrans([a,b,c],L) , L will becom...
Translating a list to another list in prolog Translating a list to another list in prolog prolog Translating Translating a list to another list in prolog I Tried to write a simple code in Prolog which translate a list to another list. for instance, if we call listtrans([a,b,c],L) , L will become [1,2,3] . (a,b,c is rep...
[ 0.0054931640625, -0.006103515625, 0.007354736328125, 0.00714111328125, 0.01092529296875, -0.0155029296875, -0.0164794921875, 0.01519775390625, -0.00141143798828125, -0.02099609375, -0.0025634765625, 0.006683349609375, 0.002716064453125, 0.0052490234375, -0.0059814453125, -0.00109100341...
[ 11062, 143, 1916, 5303, 47, 15700, 502, 4867, 10, 8781, 18151, 1250, 3900, 19309, 11782, 30145, 11, 275, 238, 866, 339, 24209, 155761, 91995, 25568, 21320, 6002, 86531, 18499, 4568, 13315, 2967 ]
[ 0.172119140625, 0.2078857421875, 0.0472412109375, 0.2222900390625, 0.1171875, 0.1234130859375, 0.140380859375, 0.207763671875, 0.00469970703125, 0.040557861328125, 0.1148681640625, 0.1373291015625, 0.1536865234375, 0.136474609375, 0.085693359375, 0.2327880859375, 0.013153076171875, ...
embed
2194339_c0
2194339
prolog
0
Title: Vector addition in prolog Problem title: Vector addition in prolog Tags: prolog Problem: Vector addition in prolog I'm writing a predicate to add two vectors. This is what I came up with: add( [], [], 0 ). add( [A], 0, A ). add( [A], [B], C ) :- C is A + B. add( A, B, C ) :- add( B, A, C ). add( [H1|T1], [H2|T2]...
Vector addition in prolog Vector addition in prolog prolog Vector WYNIK Vector addition in prolog I'm writing a predicate to add two vectors. This is what I came up with: First four lines work just fine, but I can't get the last one to work - what do I do wrong?
[ -0.001068115234375, 0.0224609375, -0.003997802734375, 0.0162353515625, -0.0206298828125, 0.00787353515625, -0.0262451171875, -0.0123291015625, 0.00927734375, -0.049560546875, 0.0196533203125, -0.0024871826171875, -0.044677734375, 0.00148773193359375, -0.0025634765625, -0.0169677734375,...
[ 2609, 18770, 66044, 502, 4867, 23, 102815, 48918, 32562, 1653, 2063, 67, 15190, 6626, 22834, 22230, 23972, 22759, 124519, 4488, 5885, 831, 18, 2046, 4568, 1632, 47, 44691 ]
[ 0.20849609375, 0.2025146484375, 0.159912109375, 0.135009765625, 0.205810546875, 0.00994110107421875, 0.114013671875, 0.1827392578125, 0.07220458984375, 0.08673095703125, 0.1270751953125, 0.079345703125, 0.140380859375, 0.10430908203125, 0.2061767578125, 0.1719970703125, 0.01132202148...
embed
76891418_c0
76891418
prolog
0
Title: Is there a way to automatically &quot;consult&quot; files on prolog? Problem title: Is there a way to automatically &quot;consult&quot; files on prolog? Tags: swi-prolog, prolog Problem: Is there a way to automatically "consult" files on prolog? I am kind of annoyed by having to manually re-consult my prolog eve...
Is there a way to automatically &quot;consult&quot; files on prolog? Is there a way to automatically &quot;consult&quot; files on prolog? swi-prolog prolog Is there a way to automatically "consult" files on prolog? I am kind of annoyed by having to manually re-consult my prolog every time I made changes in its source f...
[ 0.033203125, 0.00189208984375, 0.0128173828125, 0.0208740234375, -0.02294921875, 0.004150390625, -0.01385498046875, 0.0164794921875, -0.0048828125, -0.068359375, 0.02587890625, 0.017578125, -0.013671875, -0.00020885467529296875, 0.0224609375, 0.006439208984375, 0.01483154296875, 0....
[ 3917, 191082, 147834, 102158, 98, 502, 4867, 47, 2452, 3454, 2685, 10, 58, 8562, 8668, 19441, 23009, 456, 11907, 1733, 7228, 65572, 31344, 11435, 4171, 3249, 11675, 209303, 111938, 20209, 40899, 36497, 29806, 25647, 26499 ]
[ 0.08551025390625, 0.239990234375, 0.28662109375, 0.1947021484375, 0.080322265625, 0.1661376953125, 0.25634765625, 0.03955078125, 0.13818359375, 0.126220703125, 0.0186309814453125, 0.01629638671875, 0.047271728515625, 0.0187530517578125, 0.128173828125, 0.006591796875, 0.111083984375,...
embed
70603296_c0
70603296
prolog
0
Title: Example of pass by reference in Prolog Problem title: Example of pass by reference in Prolog Tags: prolog Problem: Example of pass by reference in Prolog I'm new to Prolog and I can't really find resources on how pass-by-reference works in Prolog. I tested a program here to show the addresses of the variables bu...
Example of pass by reference in Prolog Example of pass by reference in Prolog prolog Example Prolog Example of pass by reference in Prolog I'm new to Prolog and I can't really find resources on how pass-by-reference works in Prolog. I tested a program here to show the addresses of the variables but I think instantiatio...
[ 0.0272216796875, 0.04541015625, 0.0054931640625, 0.0169677734375, 0.0021820068359375, -0.003570556640625, -0.0106201171875, 0.007415771484375, 0.009033203125, -0.01171875, 0.00341796875, 0.00823974609375, -0.01214599609375, 0.018310546875, 0.02294921875, 0.0203857421875, 0.0252685546...
[ 89536, 8705, 27875, 390, 91067, 1250, 4867, 502, 23, 65514, 1272, 239879, 43240, 3034, 1528, 7639, 29823, 111, 77336, 5351, 34648, 14, 2320, 10, 8110, 3917, 18151, 4488 ]
[ 0.1455078125, 0.044036865234375, 0.1668701171875, 0.1285400390625, 0.256103515625, 0.157470703125, 0.2249755859375, 0.1239013671875, 0.0304107666015625, 0.0333251953125, 0.1739501953125, 0.250244140625, 0.0667724609375, 0.06268310546875, 0.076904296875, 0.0963134765625, 0.14306640625...
embed
45123756_c0
45123756
prolog
0
Title: Why do we call a disjunction of literals of which none is positive a goal clause? Problem title: Why do we call a disjunction of literals of which none is positive a goal clause? Tags: prolog, logic Problem: Why do we call a disjunction of literals of which none is positive a goal clause? I think I know the mean...
Why do we call a disjunction of literals of which none is positive a goal clause? Why do we call a disjunction of literals of which none is positive a goal clause? prolog logic Why Why do we call a disjunction of literals of which none is positive a goal clause? I think I know the meaning of goal clauses and horn claus...
[ -0.00811767578125, 0.016845703125, 0.004180908203125, 0.000408172607421875, -0.027587890625, -0.0010528564453125, 0.01165771484375, -0.0264892578125, 0.007659912109375, 0.03515625, -0.004302978515625, -0.0205078125, -0.02734375, -0.0194091796875, -0.0002765655517578125, 0.0233154296875...
[ 44084, 11782, 2837, 17043, 10763, 15659, 16765, 111, 351, 13, 83, 24491, 69236, 70731, 3129, 502, 4867, 62775, 91084, 3328, 19, 15400, 9351 ]
[ 0.06719970703125, 0.06512451171875, 0.0623779296875, 0.182373046875, 0.0770263671875, 0.1407470703125, 0.1260986328125, 0.07464599609375, 0.114501953125, 0.11376953125, 0.084716796875, 0.167236328125, 0.229736328125, 0.1900634765625, 0.032073974609375, 0.04803466796875, 0.1201171875,...
embed
52634440_c0
52634440
prolog
0
Title: Prolog check element in grid Problem title: Prolog check element in grid Tags: prolog Problem: Prolog check element in grid grid([ [w, w, w, b, w], [b ,b, w, w, w], [w, w, w, b, w], [w, b, b, b, b], [w, w, w, w, w] ]). When I have a grid like this I want to check if a cell is white. When you enter the query: whi...
Prolog check element in grid Prolog check element in grid prolog Prolog Prolog check element in grid When I have a grid like this I want to check if a cell is white. When you enter the query: it should say true if the cell is indeed white. I made this: but it doesn't work and I don't know why. (I just started learning ...
[ 0.01397705078125, 0.015869140625, 0.00714111328125, 0.01165771484375, -0.01708984375, 0.00592041015625, 0.00457763671875, 0.0177001953125, -0.01348876953125, 0.0098876953125, 0.00848388671875, 0.02294921875, -0.034912109375, -0.0089111328125, -0.01092529296875, 0.0247802734375, 0.020...
[ 1250, 4867, 12765, 12830, 23, 120067, 502, 1884, 903, 3444, 2174, 38750, 83, 35011, 30957, 41, 1294, 5608, 5154, 29568, 160463, 22027, 18, 4488, 3714, 15400, 52080 ]
[ 0.1260986328125, 0.2357177734375, 0.200927734375, 0.153564453125, 0.0236358642578125, 0.240966796875, 0.09613037109375, 0.0201416015625, 0.006622314453125, 0.02569580078125, 0.0623779296875, 0.212158203125, 0.056365966796875, 0.23095703125, 0.0745849609375, 0.084228515625, 0.07751464...
embed
66410448_c0
66410448
prolog
0
Title: Sum to a number program in Prolog Problem title: Sum to a number program in Prolog Tags: prolog Problem: Sum to a number program in Prolog Can someone explain how this code works. I am new to Prolog and I am having trouble thinking like a Prolog programmer. When you input a number followed by a comma and any var...
Sum to a number program in Prolog Sum to a number program in Prolog prolog Sum Prolog sum_to N-1 Sum to a number program in Prolog Can someone explain how this code works. I am new to Prolog and I am having trouble thinking like a Prolog programmer. When you input a number followed by a comma and any variable name, it ...
[ -0.0089111328125, 0.0086669921875, 0.006561279296875, 0.023193359375, -0.0185546875, 0.016357421875, -0.003509521484375, 0.034423828125, 0.0228271484375, -0.057373046875, -0.00897216796875, -0.0140380859375, -0.00848388671875, 0.006866455078125, 0.0245361328125, -0.010498046875, 0.01...
[ 36335, 47, 14012, 1528, 1250, 4867, 10, 23, 502, 10554, 188, 541, 5759, 22008, 73342, 3642, 903, 18151, 43240, 3525, 63134, 47644, 77848, 107730, 134629, 96117, 77336, 9351, 76199, 1257, 105801, 2203, 4068 ]
[ 0.230224609375, 0.1710205078125, 0.193115234375, 0.223388671875, 0.17431640625, 0.26953125, 0.0164947509765625, 0.04547119140625, 0.104248046875, 0.22607421875, 0.225341796875, 0.1456298828125, 0.2056884765625, 0.0235595703125, 0.1324462890625, 0.061798095703125, 0.05169677734375, ...
embed
10662625_c0
10662625
prolog
0
Title: PROLOG predicate order Problem title: PROLOG predicate order Tags: prolog, clpfd Problem: PROLOG predicate order I've got a very large number of equations which I am trying to use PROLOG to solve. However, I've come a minor cropper in that they are not specified in any sort of useful order- that is, some, if not...
PROLOG predicate order PROLOG predicate order prolog clpfd PROLOG PROLOG predicate order I've got a very large number of equations which I am trying to use PROLOG to solve. However, I've come a minor cropper in that they are not specified in any sort of useful order- that is, some, if not many variables, are used befor...
[ 0.041015625, -0.000911712646484375, -0.01019287109375, -0.000698089599609375, -0.01409912109375, 0.0208740234375, 0.004058837890625, 0.000023245811462402344, 0.002532958984375, -0.032958984375, 0.00087738037109375, -0.01312255859375, -0.003814697265625, -0.009033203125, 0.0166015625, 0...
[ 10514, 47510, 1653, 2063, 67, 12989, 502, 4867, 33139, 39557, 71, 4163, 4552, 14012, 13722, 5256, 31577, 4527, 86869, 1380, 43967, 13081, 8079, 959, 58735, 80234, 3060, 5941, 77336, 11814, 8108, 61924, 28032, 5701, 4171, 11757, 13, 678, 163...
[ 0.189453125, 0.269287109375, 0.171142578125, 0.230712890625, 0.07110595703125, 0.254150390625, 0.09466552734375, 0.2003173828125, 0.012420654296875, 0.037994384765625, 0.06256103515625, 0.0323486328125, 0.013153076171875, 0.028411865234375, 0.1522216796875, 0.041412353515625, 0.02268...
embed
68828686_c0
68828686
prolog
0
Title: Prolog write predicate that decrements all elements of a list of integers Problem title: Prolog write predicate that decrements all elements of a list of integers Tags: prolog, list Problem: Prolog write predicate that decrements all elements of a list of integers as the title suggests, I have to write a predica...
Prolog write predicate that decrements all elements of a list of integers Prolog write predicate that decrements all elements of a list of integers prolog list Prolog N-1 Prolog write predicate that decrements all elements of a list of integers as the title suggests, I have to write a predicate that decreases all the v...
[ 0.00037384033203125, -0.0078125, -0.0079345703125, 0.01806640625, -0.00775146484375, -0.0034637451171875, -0.00185394287109375, 0.01519775390625, -0.01019287109375, 0.00171661376953125, -0.0179443359375, 0.0032196044921875, 0.001617431640625, 0.01080322265625, 0.00408935546875, 0.00303...
[ 1250, 4867, 33022, 1653, 2063, 67, 450, 8, 7612, 9035, 756, 80854, 5303, 892, 26255, 502, 541, 5759, 42459, 765, 227204, 70, 142424, 959, 122991, 4358 ]
[ 0.15283203125, 0.22119140625, 0.127685546875, 0.169677734375, 0.200927734375, 0.089111328125, 0.0390625, 0.1861572265625, 0.2220458984375, 0.1197509765625, 0.1240234375, 0.163330078125, 0.154052734375, 0.131103515625, 0.0635986328125, 0.109130859375, 0.0501708984375, 0.095458984375...
embed
44343668_c0
44343668
prolog
0
Title: How to trace built-in append/3 in SWI-Prolog? Problem title: How to trace built-in append/3 in SWI-Prolog? Tags: swi-prolog, prolog Problem: How to trace built-in append/3 in SWI-Prolog? I would like to trace built-in append/3 in SWI-Prolog, but am getting the result immediately and cannot see what is going on i...
How to trace built-in append/3 in SWI-Prolog? How to trace built-in append/3 in SWI-Prolog? swi-prolog prolog How SWI-Prolog How to trace built-in append/3 in SWI-Prolog? I would like to trace built-in append/3 in SWI-Prolog, but am getting the result immediately and cannot see what is going on in the middle. Is there ...
[ -0.0037078857421875, 0.00909423828125, 0.024658203125, 0.005096435546875, -0.01300048828125, 0.01416015625, 0.000865936279296875, 0.018798828125, 0.01263427734375, -0.01068115234375, 0.011962890625, -0.00179290771484375, -0.0302734375, -0.01007080078125, 0.01202392578125, -0.0075378417...
[ 11249, 47, 144851, 88303, 73, 114689, 71, 18113, 159, 38969, 10752, 4867, 23, 91, 2452, 3454, 502, 9, 16750, 109312, 53418, 1957, 86991, 2886 ]
[ 0.080078125, 0.0222930908203125, 0.231201171875, 0.1358642578125, 0.1134033203125, 0.181640625, 0.165771484375, 0.238525390625, 0.0521240234375, 0.20166015625, 0.1092529296875, 0.189208984375, 0.0211944580078125, 0.007080078125, 0.1343994140625, 0.0755615234375, 0.0706787109375, 0....
embed
29924431_c0
29924431
prolog
0
Title: Recursive reference in prolog Problem title: Recursive reference in prolog Tags: transitive-closure, prolog Problem: Recursive reference in prolog I meet some problem when I try to implement friends(mia, ellen). friends(mia, lucy). friends(X,Y) :- friends(X,Z), friends(Y,Z). and when i ask ?- friends(mia, X). , ...
Recursive reference in prolog Recursive reference in prolog transitive-closure prolog Recursive Recursive reference in prolog I meet some problem when I try to implement and when i ask ?- friends(mia, X). , it run out of local stack. Then I add I ask ?- friends(mia, X). ,it keeps replying X = mia . I can't understand, ...
[ 0.027587890625, 0.01336669921875, 0.006500244140625, 0.031982421875, 0.0142822265625, -0.019287109375, -0.0087890625, 0.031494140625, 0.00836181640625, -0.0303955078125, -0.006561279296875, 0.0010833740234375, -0.01397705078125, 0.040771484375, 0.057861328125, 0.006134033203125, 0.01...
[ 853, 48650, 5844, 91067, 502, 4867, 62621, 170224, 23356, 2967, 9790, 29479, 26458, 705, 9, 23902, 7605, 1193, 11675, 1810, 111, 4000, 177261, 15190, 13695, 75836, 2203, 8132, 28219, 15400, 83, 195625 ]
[ 0.07403564453125, 0.2210693359375, 0.189453125, 0.2493896484375, 0.142578125, 0.2437744140625, 0.1427001953125, 0.2071533203125, 0.05377197265625, 0.0675048828125, 0.046661376953125, 0.160888671875, 0.190673828125, 0.01556396484375, 0.001861572265625, 0.2265625, 0.2236328125, 0.114...
embed
35445609_c1
35445609
prolog
1
I need call(T, [a, b, c],[]). to work but it says T is not sufficiently instantiated. Update 2: The solution I'm currently going with is to query all available functors via current_functor to see which ones are satisfied by the input [a, b, c], [] . Once I have them I just need that they self-identify e.g., by passing...
I need call(T, [a, b, c],[]). to work but it says T is not sufficiently instantiated. Update 2: The solution I'm currently going with is to query all available functors via current_functor to see which ones are satisfied by the input [a, b, c], [] . Once I have them I just need that they self-identify e.g., by passing...
[ 0.01336669921875, 0.0167236328125, 0.003936767578125, 0.0220947265625, -0.01275634765625, 0.0047607421875, -0.01312255859375, -0.004974365234375, 0.01611328125, -0.061279296875, -0.00099945068359375, -0.0274658203125, -0.0166015625, 0.00347900390625, -0.00360107421875, -0.02099609375, ...
[ 3871, 11782, 132, 618, 11, 4, 876, 501, 1065, 4488, 1284, 17378, 384, 83, 959, 129980, 34648, 14, 27686, 28641, 29806, 82424, 41, 1294, 756, 19882, 7477, 18770, 7, 1829, 43581, 16498, 1957, 3129, 214521, 107730, 76556, 765, 2856, 15970, ...
[ 0.119140625, 0.237548828125, 0.07275390625, 0.1600341796875, 0.057647705078125, 0.00469970703125, 0.1090087890625, 0.1116943359375, 0.042816162109375, 0.13427734375, 0.014892578125, 0.04742431640625, 0.1658935546875, 0.064453125, 0.120849609375, 0.2044677734375, 0.1884765625, 0.146...
embed
14639317_c0
14639317
prolog
0
Title: How to create a rule that makes all relations symmetric in Prolog? Problem title: How to create a rule that makes all relations symmetric in Prolog? Tags: prolog Problem: How to create a rule that makes all relations symmetric in Prolog? What I want is when I define: marriedTo(martin, annie). It also makes the f...
How to create a rule that makes all relations symmetric in Prolog? How to create a rule that makes all relations symmetric in Prolog? prolog How Prolog How to create a rule that makes all relations symmetric in Prolog? What I want is when I define: It also makes the following true: I have tried the following, but it's ...
[ 0.00262451171875, 0.01226806640625, 0.01116943359375, 0.01953125, 0.01019287109375, 0.0045166015625, -0.0224609375, 0.021484375, 0.0089111328125, -0.04150390625, -0.00830078125, -0.005035400390625, -0.006439208984375, 0.00244140625, 0.01904296875, 0.0087890625, 0.00250244140625, 0....
[ 11249, 28282, 79986, 30482, 756, 91582, 230612, 238, 1250, 4867, 10, 502, 3444, 61924, 25632, 29568, 37842, 54241, 40956 ]
[ 0.03631591796875, 0.138671875, 0.178466796875, 0.0635986328125, 0.0767822265625, 0.1790771484375, 0.2158203125, 0.107177734375, 0.124755859375, 0.2178955078125, 0.005767822265625, 0.054107666015625, 0.0271453857421875, 0.1229248046875, 0.0675048828125, 0.0662841796875, 0.034362792968...
embed
46947830_c1
46947830
prolog
1
0, Y + 1 < 8, A is X - 2, B is Y + 1. move([X, Y], [A, B]) :- X - 1 >= 0, Y + 2 < 8, A is X - 1, B is Y + 2. knight_move(X,Y,[X,Y],1) :- move(X,Y). knight_move(X,Y,[X|P],C) :- move(X,Z), knight_move(Z,Y,P,Cn), C is Cn+1. predict_moves(X,C,P) :- knight_move(X,_,P,C). Sample call: predict_moves([1,1],3,P). In result I ex...
0, Y + 1 < 8, A is X - 2, B is Y + 1. move([X, Y], [A, B]) :- X - 1 >= 0, Y + 2 < 8, A is X - 1, B is Y + 2. knight_move(X,Y,[X,Y],1) :- move(X,Y). knight_move(X,Y,[X|P],C) :- move(X,Z), knight_move(Z,Y,P,Cn), C is Cn+1. predict_moves(X,C,P) :- knight_move(X,_,P,C). Sample call: predict_moves([1,1],3,P). In result I ex...
[ 0.0047607421875, 0.007598876953125, 0.01104736328125, 0.0235595703125, -0.000644683837890625, 0.0194091796875, -0.00970458984375, 0.0194091796875, 0.0225830078125, -0.037841796875, 0.0032806396484375, 0.00836181640625, 0.005767822265625, 0.00677490234375, 0.010986328125, -0.00552368164...
[ 757, 990, 997, 106, 4426, 382, 62, 83, 1193, 20, 116, 335, 615, 25813, 1542, 15772, 977, 1369, 787, 472, 54350, 432, 272, 1723, 17727, 132, 4, 1511, 247, 21748, 92054, 3132, 947, 33209, 11782, 76172, 363, 683, 16750, 41206, 756, 7722,...
[ 0.1510009765625, 0.17822265625, 0.190673828125, 0.125244140625, 0.0777587890625, 0.2154541015625, 0.059173583984375, 0.046142578125, 0.1517333984375, 0.08740234375, 0.136962890625, 0.1109619140625, 0.0288238525390625, 0.245361328125, 0.1341552734375, 0.0229339599609375, 0.01358032226...
embed
15193777_c0
15193777
prolog
0
Title: How to print out all the solutions in Prolog? Problem title: How to print out all the solutions in Prolog? Tags: prolog Problem: How to print out all the solutions in Prolog? I'm trying to print out the list containing all the solutions to a problem, but Prolog is giving me only part of the solutions and is cutt...
How to print out all the solutions in Prolog? How to print out all the solutions in Prolog? prolog How Prolog How to print out all the solutions in Prolog? I'm trying to print out the list containing all the solutions to a problem, but Prolog is giving me only part of the solutions and is cutting off in the middle like...
[ 0.0174560546875, 0.003631591796875, 0.011474609375, 0.01507568359375, -0.01153564453125, 0.01470947265625, -0.00775146484375, -0.0157470703125, 0.003204345703125, -0.000804901123046875, -0.0079345703125, -0.02978515625, 0.0018310546875, -0.0028839111328125, 0.01165771484375, 0.00585937...
[ 11249, 47, 28412, 1810, 756, 70, 51347, 23, 1250, 4867, 502, 31577, 5303, 70541, 2967, 68772, 163, 2831, 314, 19514, 5773, 86991, 1884, 903, 2046 ]
[ 0.076171875, 0.04541015625, 0.213134765625, 0.1739501953125, 0.153076171875, 0.0894775390625, 0.2490234375, 0.07952880859375, 0.203369140625, 0.258544921875, 0.1204833984375, 0.0289459228515625, 0.115478515625, 0.0222930908203125, 0.1005859375, 0.058746337890625, 0.00677490234375, ...
embed
49879809_c0
49879809
prolog
0
Title: Prolog / true false definition Problem title: Prolog / true false definition Tags: prolog Problem: Prolog / true false definition So, im working with this following code: test:- p(X,Y), r(Y), s(X), write(X), nl, fail. test. test2(X,Y):- p(X,Y), r(Y). p(3,4). p(6,9). p(7,8). r(X):- s(X), t(X). s(7). s(6):-!. s(8)...
Prolog / true false definition Prolog / true false definition prolog Prolog test2 Prolog / true false definition So, im working with this following code: s(X) returns X=7;X=6. t(X) returns X=9;X=8;X=5. Obviously, r(X) returns false . My question is, how the hell then test2(X,Y) returns X=7,Y=8 ?
[ 0.0167236328125, 0.012939453125, -0.004669189453125, 0.006927490234375, -0.004913330078125, 0.0126953125, -0.002044677734375, 0.0014801025390625, 0.015625, 0.017333984375, 0.0179443359375, -0.00537109375, -0.0213623046875, -0.01531982421875, 0.0184326171875, 0.0286865234375, 0.017578...
[ 1250, 4867, 248, 29568, 98320, 80934, 502, 3034, 304, 20697, 25632, 18151, 91, 1542, 30646, 1193, 1369, 966, 910, 808, 1126, 1019, 114997, 1690, 9655, 3642, 33600, 1723 ]
[ 0.178955078125, 0.274169921875, 0.07342529296875, 0.2122802734375, 0.24560546875, 0.1776123046875, 0.135498046875, 0.1820068359375, 0.15234375, 0.05267333984375, 0.0190887451171875, 0.1605224609375, 0.09375, 0.1090087890625, 0.1424560546875, 0.08154296875, 0.017822265625, 0.1314697...
embed
51569154_c0
51569154
prolog
0
Title: anonymous variables - prolog - a few queries Problem title: anonymous variables - prolog - a few queries Tags: prolog, prolog-anonymous-variable Problem: anonymous variables - prolog - a few queries Can you help me understand the engine of answering the next queries? ?- _ = _. ?- _ = 1. ?- A = _, B = _, C = A + ...
anonymous variables - prolog - a few queries anonymous variables - prolog - a few queries prolog prolog-anonymous-variable anonymous variables - prolog - a few queries Can you help me understand the engine of answering the next queries? And some extra query (not related to anonymous variables): I know the answers to ab...
[ 0.0250244140625, 0.0024566650390625, 0.01446533203125, 0.006683349609375, 0.0172119140625, -0.00799560546875, 0.00286865234375, 0.0048828125, 0.005157470703125, -0.0089111328125, -0.0052490234375, 0.005126953125, 0.0111083984375, 0.0250244140625, 0.0091552734375, -0.00102996826171875, ...
[ 52184, 10821, 77336, 502, 4867, 10846, 41, 10484, 7, 66, 45757, 21690, 2886, 4358, 28219, 87907, 111, 35166, 214, 11737, 4173, 1294, 3714, 3444, 3642, 7413 ]
[ 0.1998291015625, 0.1104736328125, 0.21533203125, 0.1322021484375, 0.248779296875, 0.1044921875, 0.10491943359375, 0.0703125, 0.005645751953125, 0.057708740234375, 0.151123046875, 0.12548828125, 0.0927734375, 0.0182037353515625, 0.0897216796875, 0.188232421875, 0.0291290283203125, 0...
embed
11926144_c0
11926144
prolog
0
Title: handling input in prolog with read() Problem title: handling input in prolog with read() Tags: prolog, dcg Problem: handling input in prolog with read() I am using read() to take in user input. I planned that my program would accept input in the form of a,b,c,d,e and then I would convert that into a list of the ...
handling input in prolog with read() handling input in prolog with read() prolog dcg handling input in prolog with read() I am using read() to take in user input. I planned that my program would accept input in the form of and then I would convert that into a list of the elements. But doing a test in prolog i got this ...
[ 0.005035400390625, -0.006195068359375, 0.007354736328125, 0.0152587890625, -0.00592041015625, 0.04052734375, 0.0035552978515625, -0.0147705078125, -0.00311279296875, -0.072265625, 0.002105712890625, -0.023681640625, -0.0198974609375, -0.01495361328125, 0.0021209716796875, -0.0100097656...
[ 45064, 107730, 502, 4867, 678, 12301, 132, 177, 17368, 5646, 23, 38937, 203251, 1528, 26946, 3173, 111, 96760, 3934, 5303, 80854, 3034, 4163, 30646, 45646 ]
[ 0.1337890625, 0.1927490234375, 0.1484375, 0.239501953125, 0.0185699462890625, 0.20947265625, 0.1494140625, 0.054931640625, 0.02972412109375, 0.029022216796875, 0.051361083984375, 0.1181640625, 0.1063232421875, 0.0966796875, 0.1016845703125, 0.04107666015625, 0.006134033203125, 0.07...
embed
12120881_c0
12120881
prolog
0
Title: How to work with difference lists and 3+ lists concatenation? Problem title: How to work with difference lists and 3+ lists concatenation? Tags: prolog Problem: How to work with difference lists and 3+ lists concatenation? I have the following state in my code: After the next step I get (cycle) T1=[26, 25|T1] In...
How to work with difference lists and 3+ lists concatenation? How to work with difference lists and 3+ lists concatenation? prolog How How to work with difference lists and 3+ lists concatenation? I have the following state in my code: After the next step I get In Bindings. How to solve that and make the last conc work...
[ 0.005340576171875, -0.01220703125, -0.012451171875, 0.0113525390625, -0.014404296875, 0.00390625, -0.00640869140625, 0, 0.011962890625, -0.037109375, -0.0072021484375, -0.0013275146484375, 0.00994873046875, 0.033447265625, -0.000896453857421875, 0.007415771484375, 0.0029449462890625,...
[ 11249, 47, 4488, 678, 60212, 5303, 136, 138, 1328, 7, 158, 4460, 33, 2320, 502, 4867, 11341, 18151, 11737, 29954, 360, 1843, 33770, 86869, 4568, 238, 155965, 28219, 3642, 11001, 48716 ]
[ 0.06689453125, 0.016387939453125, 0.142822265625, 0.1077880859375, 0.24755859375, 0.2357177734375, 0.0491943359375, 0.15234375, 0.197509765625, 0.03778076171875, 0.125, 0.133056640625, 0.09649658203125, 0.0269927978515625, 0.0426025390625, 0.0953369140625, 0.0941162109375, 0.090820...
embed
42961686_c0
42961686
prolog
0
Title: How to iterate through structure? Problem title: How to iterate through structure? Tags: prolog Problem: How to iterate through structure? If I have a list like: [atm(abd,bubu,ha), atm(aei),atm(xyz,huhu), atm(aabb,a,e,x)] , how could I 'iterate' through the elements of one of the atm structures? For example, for...
How to iterate through structure? How to iterate through structure? prolog How How to iterate through structure? If I have a list like: [atm(abd,bubu,ha), atm(aei),atm(xyz,huhu), atm(aabb,a,e,x)] , how could I 'iterate' through the elements of one of the atm structures? For example, for atm(abd, bubu, ha) , I would lik...
[ 0.009521484375, -0.00311279296875, -0.003997802734375, 0.0091552734375, 0.0031890869140625, 0.01263427734375, -0.0031890869140625, -0.00994873046875, -0.00360107421875, -0.06103515625, 0.0036163330078125, 0.00482177734375, -0.00555419921875, -0.019287109375, -0.0006256103515625, 0.0009...
[ 11249, 47, 17, 8560, 67, 8305, 45646, 32, 502, 4867, 4263, 765, 10, 5303, 1884, 257, 39, 2055, 71, 87588, 528, 247, 99, 11, 1399, 50878, 169, 62229, 10545, 13, 425, 3642, 5809, 87, 1486, 17957, 80854, 1632, 27781, 256, 16, 2806, 330...
[ 0.1439208984375, 0.1195068359375, 0.1168212890625, 0.28759765625, 0.1739501953125, 0.1995849609375, 0.270751953125, 0.046966552734375, 0.1094970703125, 0.12158203125, 0.04486083984375, 0.057647705078125, 0.027587890625, 0.18798828125, 0.0692138671875, 0.1318359375, 0.1439208984375, ...
embed
16528492_c0
16528492
prolog
0
Title: prolog predicate dependency tree Problem title: prolog predicate dependency tree Tags: yap, dependencies, prolog Problem: prolog predicate dependency tree Let's say I have this scenario: ascendent(X,Y) :- parent(X,Y). ascendent(X,Y) :- parent(X,Z), ascendent(Z,Y). brother(X,Y):-parent(Z,X),parent(Z,Y), X \= Y . ...
prolog predicate dependency tree prolog predicate dependency tree yap dependencies prolog prolog predicate dependency tree Let's say I have this scenario: How can I know the predicates used by ascendent and the predicates that uses ascendent? Is there any built-in function or meta-predicate useful for this task?
[ 0.02294921875, -0.010009765625, -0.011474609375, 0.0185546875, -0.0032958984375, 0.0247802734375, -0.01397705078125, 0.000640869140625, 0.00118255615234375, -0.06884765625, 0.015869140625, -0.0091552734375, -0.0159912109375, 0.00958251953125, 0.0299072265625, 0.017578125, 0.012573242...
[ 502, 4867, 1653, 2063, 67, 42548, 27771, 53201, 15850, 117538, 106117, 11249, 831, 87, 3714, 1636, 11814, 390, 82800, 2517, 136, 450, 4527, 88303, 73, 32354, 23550, 19714, 80234, 903, 66211 ]
[ 0.1685791015625, 0.2259521484375, 0.2000732421875, 0.21630859375, 0.06671142578125, 0.167724609375, 0.0343017578125, 0.218017578125, 0.1673583984375, 0.006923675537109375, 0.09844970703125, 0.032867431640625, 0.058197021484375, 0.01511383056640625, 0.1357421875, 0.14306640625, 0.1533...
embed
64122204_c0
64122204
prolog
0
Title: dif with occurs check Problem title: dif with occurs check Tags: prolog, prolog-dif, occurs-check Problem: dif with occurs check Is there a dif with occurs check? This here works: Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.7) ?- set_prolog_flag(occurs_check, true). true. ?- dif(X,f(Y)), X = Y. X = Y. ...
dif with occurs check dif with occurs check prolog prolog-dif occurs-check Welcome SWI-Prolog set_prolog_flag occurs_check dif with occurs check Is there a dif with occurs check? This here works: But the above is not feasible, since occurs check is a global flag, I get the following:
[ 0.0169677734375, 0.003265380859375, 0.0238037109375, 0.02294921875, -0.00616455078125, -0.0087890625, -0.01318359375, 0.0142822265625, -0.00555419921875, -0.048828125, 0.008056640625, 0.01806640625, -0.00008392333984375, -0.0023193359375, 0.01318359375, -0.005706787109375, 0.01635742...
[ 45755, 678, 74918, 7, 12765, 502, 4867, 428, 420, 78292, 91334, 159, 38969, 10752, 5423, 3454, 190872, 2685, 10, 3688, 43240, 4966, 36917, 959, 3820, 11, 55356, 16792, 83, 7964, 49938, 2046, 25632 ]
[ 0.2445068359375, 0.136962890625, 0.2359619140625, 0.13427734375, 0.270263671875, 0.12396240234375, 0.1805419921875, 0.09405517578125, 0.1556396484375, 0.2425537109375, 0.15087890625, 0.017333984375, 0.13916015625, 0.1064453125, 0.11236572265625, 0.10736083984375, 0.1671142578125, 0...
embed
7099567_c0
7099567
prolog
0
Title: Remove even appearance of elements from list with Lisp or PROLOG Problem title: Remove even appearance of elements from list with Lisp or PROLOG Tags: lisp, prolog Problem: Remove even appearance of elements from list with Lisp or PROLOG I have to delete even appearance of element from list using LISP or PROLOG....
Remove even appearance of elements from list with Lisp or PROLOG Remove even appearance of elements from list with Lisp or PROLOG lisp prolog list Remove Lisp PROLOG Remove even appearance of elements from list with Lisp or PROLOG I have to delete even appearance of element from list using LISP or PROLOG. Here is some ...
[ -0.00885009765625, 0.045166015625, 0.0018310546875, 0.0086669921875, -0.015869140625, 0.028564453125, -0.0017547607421875, 0.0086669921875, 0.0093994140625, -0.006866455078125, 0.017822265625, -0.01177978515625, -0.009765625, 0.0029296875, 0.0035858154296875, 0.033203125, 0.014343261...
[ 181139, 3853, 170894, 111, 80854, 1295, 5303, 1261, 7008, 10514, 47510, 678, 400, 502, 4867, 707, 765, 154109, 12830, 17368, 16970, 9434, 27781, 107730, 104116, 116, 6896, 190, 2788, 201, 32149, 4958, 140992, 9451, 1737, 63667, 238, 47143, ...
[ 0.1380615234375, 0.19921875, 0.1920166015625, 0.0343017578125, 0.1639404296875, 0.10211181640625, 0.1943359375, 0.1552734375, 0.213134765625, 0.1356201171875, 0.2242431640625, 0.0288543701171875, 0.1123046875, 0.1036376953125, 0.183837890625, 0.0197906494140625, 0.001129150390625, ...
embed
41410359_c2
41410359
prolog
2
NumberCount), isSpace(CharacterCode,SpaceCount1,SpaceCount), get_code(InputStream,NextCharacterCode), isWord(CharacterCode,NextCharacterCode,WordCount1,WordCount‌​), Code signals: How, Prolog, Acmak, File, InputStream, get_code, CharacterCode, LowerCount, UpperCount, NumberCount, SpaceCount, WordCount, UpperCoun, Space...
NumberCount), isSpace(CharacterCode,SpaceCount1,SpaceCount), get_code(InputStream,NextCharacterCode), isWord(CharacterCode,NextCharacterCode,WordCount1,WordCount‌​), Code signals: How, Prolog, Acmak, File, InputStream, get_code, CharacterCode, LowerCount, UpperCount, NumberCount, SpaceCount, WordCount, UpperCoun, Space...
[ -0.0135498046875, -0.025634765625, -0.00168609619140625, 0.0185546875, 0.015625, -0.01806640625, -0.01263427734375, -0.0034637451171875, 0.0250244140625, 0.0062255859375, 0.0162353515625, -0.00885009765625, -0.0096435546875, -0.00701904296875, -0.009765625, -0.00799560546875, 0.02380...
[ 103332, 108210, 247, 83, 141012, 84068, 2263, 720, 114211, 418, 2046, 40899, 4153, 7077, 115061, 81280, 164805, 28864, 26073, 7, 12, 11249, 1250, 4867, 9852, 2327, 42724, 360, 21656, 61187, 56, 26655, 4, 43045, 22543, 10625, 309, 441, 4997,...
[ 0.2071533203125, 0.2509765625, 0.0726318359375, 0.112060546875, 0.216796875, 0.045867919921875, 0.09136962890625, 0.039306640625, 0.2034912109375, 0.04986572265625, 0.07373046875, 0.2235107421875, 0.009918212890625, 0.1134033203125, 0.2015380859375, 0.06732177734375, 0.1707763671875,...
embed
28845949_c1
28845949
prolog
1
, the element-order doesn't necessarily matter, I can sort that after. This was the previous code that works for single-lists: xyz(Z, [X|Y]):- f(Z,[X]), !, xyz(X,Y). xyz(_,[]). According to @lurker I need to incorporate the member function, but I am having trouble with it. This is my current approach, but it doesn't w...
, the element-order doesn't necessarily matter, I can sort that after. This was the previous code that works for single-lists: xyz(Z, [X|Y]):- f(Z,[X]), !, xyz(X,Y). xyz(_,[]). According to @lurker I need to incorporate the member function, but I am having trouble with it. This is my current approach, but it doesn't w...
[ 0.008544921875, 0.0166015625, 0.00457763671875, 0.00958251953125, -0.0234375, 0.0205078125, -0.01214599609375, -0.0081787109375, -0.00162506103515625, -0.004058837890625, 0.01177978515625, -0.01318359375, -0.00347900390625, -0.0196533203125, 0.00087738037109375, -0.010498046875, -0.0...
[ 12830, 80596, 22027, 18, 204988, 26866, 87, 831, 12096, 450, 7103, 3293, 96362, 18151, 43240, 100, 11001, 6562, 7, 1022, 32189, 1511, 1542, 58745, 1723, 1238, 132, 247, 711, 14749, 1728, 3871, 49504, 67, 32786, 32354, 19441, 63134, 43581, ...
[ 0.2017822265625, 0.1876220703125, 0.0242919921875, 0.052581787109375, 0.021759033203125, 0.09979248046875, 0.040374755859375, 0.03826904296875, 0.1944580078125, 0.029937744140625, 0.140869140625, 0.007904052734375, 0.039459228515625, 0.2015380859375, 0.0965576171875, 0.035308837890625,...
embed
35971464_c0
35971464
prolog
0
Title: Why does emacs inferior eclipse backtrack only two times? Problem title: Why does emacs inferior eclipse backtrack only two times? Tags: prolog, prolog-toplevel, eclipse-clp Problem: Why does emacs inferior eclipse backtrack only two times? example: [eclipse 6]: X=1;X=2;X=3. X = 1 Yes (0.00s cpu, solution 1, may...
Why does emacs inferior eclipse backtrack only two times? Why does emacs inferior eclipse backtrack only two times? prolog prolog-toplevel eclipse-clp Why Yes Why does emacs inferior eclipse backtrack only two times? example:
[ 0.0198974609375, 0.0172119140625, 0.0111083984375, 0.029541015625, -0.001129150390625, 0.0218505859375, 0.006256103515625, 0.01190185546875, 0.0113525390625, -0.01556396484375, 0.007049560546875, 0.0040283203125, -0.018310546875, 0.037841796875, 0.02490234375, 0.0089111328125, 0.0115...
[ 44084, 352, 2263, 7, 44157, 106371, 184, 4420, 125728, 4734, 6626, 20028, 502, 4867, 13784, 67919, 28, 26775, 32635, 14602, 27781 ]
[ 0.1051025390625, 0.0673828125, 0.1435546875, 0.08087158203125, 0.245361328125, 0.1798095703125, 0.11248779296875, 0.1773681640625, 0.260009765625, 0.145263671875, 0.1756591796875, 0.1920166015625, 0.060699462890625, 0.144775390625, 0.0161285400390625, 0.11602783203125, 0.014968872070...
embed
60205032_c0
60205032
prolog
0
Title: Remove brackets from a list in Prolog Problem title: Remove brackets from a list in Prolog Tags: prolog, list Problem: Remove brackets from a list in Prolog How can i "smoothen out" a list? I want this to be true: smooth([1,[2,3,4],[5,[6,7]],8], [1,2,3,4,5,6,7,8]). This is what i tried so far but it won't work s...
Remove brackets from a list in Prolog Remove brackets from a list in Prolog prolog list a Remove Prolog Remove brackets from a list in Prolog How can i "smoothen out" a list? I want this to be true: smooth([1,[2,3,4],[5,[6,7]],8], [1,2,3,4,5,6,7,8]). This is what i tried so far but it won't work My isList works correct...
[ 0.00830078125, 0.034912109375, 0.00634765625, 0.00139617919921875, -0.0101318359375, -0.003387451171875, -0.005126953125, 0.01043701171875, 0.01483154296875, 0.0008697509765625, 0.01153564453125, -0.0089111328125, -0.0294189453125, 0.0164794921875, -0.0026397705078125, 0.00065231323242...
[ 181139, 1620, 27853, 7, 1295, 5303, 23, 1250, 4867, 502, 11249, 831, 17, 26634, 29827, 33, 1810, 10, 3444, 186, 29568, 156100, 132, 418, 304, 82449, 758, 136555, 1019, 133063, 104629, 136005, 37842, 2060, 23742, 18, 4488, 2646, 83, 154663...
[ 0.1680908203125, 0.228515625, 0.272216796875, 0.05816650390625, 0.09979248046875, 0.234619140625, 0.05853271484375, 0.1815185546875, 0.242431640625, 0.1405029296875, 0.006683349609375, 0.0184478759765625, 0.02886962890625, 0.1387939453125, 0.1820068359375, 0.18798828125, 0.1834716796...
embed
33600243_c0
33600243
prolog
0
Title: Finding the length of a List paired with the first input element Problem title: Finding the length of a List paired with the first input element Tags: prolog Problem: Finding the length of a List paired with the first input element I need to implement a predicate that can size_sub([[a,a,a],[b,b]],X). and returns...
Finding the length of a List paired with the first input element Finding the length of a List paired with the first input element prolog Finding List size_sub Finding the length of a List paired with the first input element I need to implement a predicate that can so far what i have achieved How can i modify the existi...
[ -0.000885009765625, 0.00567626953125, 0.017333984375, 0.01177978515625, -0.0213623046875, 0.006439208984375, -0.000766754150390625, 0.0147705078125, 0.030029296875, -0.038330078125, 0.0162353515625, 0.00994873046875, 0.025390625, 0.01531982421875, 0.00604248046875, -0.014404296875, 0...
[ 26040, 214, 70, 140909, 32036, 80836, 297, 678, 5117, 107730, 12830, 111, 502, 4867, 13267, 22144, 3871, 29479, 1653, 2063, 67, 831, 221, 2060, 765, 69307, 2811, 40383, 144573, 123309, 30646, 34292, 14012 ]
[ 0.1280517578125, 0.0136871337890625, 0.03204345703125, 0.2159423828125, 0.2117919921875, 0.22705078125, 0.03729248046875, 0.06427001953125, 0.0904541015625, 0.1842041015625, 0.147216796875, 0.024200439453125, 0.12225341796875, 0.172607421875, 0.154541015625, 0.190185546875, 0.0789184...
embed
50307494_c0
50307494
prolog
0
Title: Multiply two lists component-wise in Prolog Problem title: Multiply two lists component-wise in Prolog Tags: recursion, list, multiplication, prolog Problem: Multiply two lists component-wise in Prolog I would like to create a function in Prolog that multiplies two lists together component-wise and returns the r...
Multiply two lists component-wise in Prolog Multiply two lists component-wise in Prolog recursion list multiplication prolog Multiply Prolog multiply_lists Multiply two lists component-wise in Prolog I would like to create a function in Prolog that multiplies two lists together component-wise and returns the resulting ...
[ -0.012451171875, 0.0196533203125, 0.0020751953125, 0.0166015625, -0.01611328125, 0.03173828125, -0.005462646484375, 0.001953125, 0.0162353515625, -0.03662109375, -0.01397705078125, -0.018310546875, -0.010986328125, 0.020751953125, 0.0034637451171875, -0.017822265625, 0.019287109375, ...
[ 19335, 62479, 6626, 5303, 82761, 90825, 23, 1250, 4867, 195625, 1830, 127664, 502, 6024, 6562, 7, 1884, 28282, 32354, 118126, 90, 25842, 30646, 16750, 33022, 15490, 88303 ]
[ 0.1474609375, 0.177734375, 0.1458740234375, 0.2044677734375, 0.201416015625, 0.1431884765625, 0.027313232421875, 0.1619873046875, 0.2435302734375, 0.121337890625, 0.014678955078125, 0.130126953125, 0.08837890625, 0.1217041015625, 0.1968994140625, 0.0106201171875, 0.03546142578125, ...
embed
51994448_c0
51994448
prolog
0
Title: What the the variables in following program stores? Problem title: What the the variables in following program stores? Tags: prolog, recursion, list, count Problem: What the the variables in following program stores? total_item([],0). total_item([_|Rest],N) :- total_item(Rest,C), N is C+1. This program takes an ...
What the the variables in following program stores? What the the variables in following program stores? prolog recursion list count What total_item Rest What the the variables in following program stores? This program takes an array as input and count the total number of item in that list. But I am not getting what exa...
[ 0.00138092041015625, 0.004425048828125, -0.0029296875, 0.01611328125, 0.023193359375, 0.01275634765625, -0.00823974609375, 0.0157470703125, 0.0084228515625, -0.0172119140625, 0.0115966796875, -0.041748046875, 0.000949859619140625, 0.012451171875, 0.00836181640625, -0.0205078125, 0.01...
[ 4865, 70, 77336, 7, 23, 25632, 1528, 4343, 502, 4867, 195625, 1830, 5303, 54529, 3622, 217, 195, 49756, 51776, 10298, 53, 107730, 14012, 35735, 541, 136, 313, 187136 ]
[ 0.037078857421875, 0.0264129638671875, 0.25244140625, 0.077880859375, 0.0201568603515625, 0.156005859375, 0.15283203125, 0.1773681640625, 0.1142578125, 0.192626953125, 0.155029296875, 0.0654296875, 0.1368408203125, 0.16162109375, 0.1497802734375, 0.097412109375, 0.0908203125, 0.209...
embed
22874988_c0
22874988
prolog
0
Title: Prolog Recursion breakdown Problem title: Prolog Recursion breakdown Tags: prolog, recursion Problem: Prolog Recursion breakdown Hi can someone breakdown this recursive code so i can fully understand the output it is giving. Im really confused as to how its working: listcomb([],[]). listcomb([X|Y], [X|Z]) :- lis...
Prolog Recursion breakdown Prolog Recursion breakdown prolog recursion Prolog Recursion Prolog Recursion breakdown Hi can someone breakdown this recursive code so i can fully understand the output it is giving. Im really confused as to how its working: thankyou
[ -0.0020751953125, 0.0146484375, 0.01214599609375, 0.033935546875, 0.0206298828125, 0.0169677734375, -0.01495361328125, 0.000827789306640625, 0.012451171875, 0.006134033203125, 0.01019287109375, -0.030029296875, 0.0191650390625, 0.0172119140625, -0.004730224609375, 0.0029754638671875, ...
[ 1250, 4867, 165428, 42, 6889, 36356, 34695, 502, 195625, 1830, 2673, 831, 22008, 903, 5844, 18151, 89554, 28219, 140992, 68772, 3370, 6183, 55681, 3642, 6863, 20697, 53927 ]
[ 0.151123046875, 0.2371826171875, 0.142822265625, 0.1416015625, 0.091552734375, 0.1060791015625, 0.0982666015625, 0.1119384765625, 0.197021484375, 0.0777587890625, 0.034881591796875, 0.0268707275390625, 0.004974365234375, 0.04840087890625, 0.1326904296875, 0.14208984375, 0.0009765625,...
embed
21867168_c0
21867168
prolog
0
Title: Error at Prolog Problem title: Error at Prolog Tags: prolog Problem: Error at Prolog I have this fact at PROLOG (swi) pos(X,[K|T],Z) :- findall(X, (member(X, [K|T])), Z) . and then I write this: pos (5 , [1,4,5] , Z ). and I get the following error. ERROR: Syntax error: Operator expected ERROR: pos ERROR: ** her...
Error at Prolog Error at Prolog prolog Error Prolog Syntax Operator Error at Prolog I have this fact at PROLOG (swi) and then I write this: and I get the following error. I am new to prolog so I cannot understand what the interpreter tells me about and secondly what I am doing wrong Thx in advance.
[ 0.005035400390625, 0.0003814697265625, -0.000736236572265625, 0.010498046875, -0.01129150390625, 0.01611328125, -0.01153564453125, 0.01611328125, -0.00762939453125, -0.034423828125, 0.00872802734375, -0.01177978515625, 0.0103759765625, -0.019775390625, -0.001861572265625, -0.0001792907...
[ 212059, 99, 1250, 4867, 502, 19010, 86531, 150922, 765, 903, 15824, 10514, 47510, 2452, 33022, 2046, 25632, 18499, 3525, 47, 53418, 28219, 29481, 56, 14192, 444, 20594, 44691, 6003, 425, 129745 ]
[ 0.181884765625, 0.1591796875, 0.1553955078125, 0.2626953125, 0.11749267578125, 0.07110595703125, 0.161865234375, 0.2191162109375, 0.01078033447265625, 0.07147216796875, 0.12420654296875, 0.1461181640625, 0.2447509765625, 0.1685791015625, 0.10443115234375, 0.0263671875, 0.113098144531...
embed
66936073_c1
66936073
prolog
1
). And suma (add): suma(0,X,X). suma(s(X),Y,s(Z)) :- suma(X,Y,Z). And ' sumafila ' simply adds N to each element of a row: sumaenfila(_,[],[]). sumaenfila(N,[H|T],[H1|T1]) :- suma(N,H,H1), sumaenfila(N,T,T1). The problems appears to be related to the use of mult , I'm attaching a photo of the debugger. After the 1rsts ...
). And suma (add): suma(0,X,X). suma(s(X),Y,s(Z)) :- suma(X,Y,Z). And ' sumafila ' simply adds N to each element of a row: sumaenfila(_,[],[]). sumaenfila(N,[H|T],[H1|T1]) :- suma(N,H,H1), sumaenfila(N,T,T1). The problems appears to be related to the use of mult , I'm attaching a photo of the debugger. After the 1rsts ...
[ 0.00174713134765625, 0.0211181640625, 0.024658203125, 0.016357421875, -0.002349853515625, -0.0005035400390625, -0.00567626953125, 0.0196533203125, 0.015869140625, -0.00872802734375, 0.0093994140625, -0.0155029296875, -0.01611328125, -0.001373291015625, 0.01123046875, -0.003890991210937...
[ 194, 3493, 15688, 11, 4028, 2389, 1542, 1723, 1511, 15772, 119948, 42856, 15190, 541, 12638, 12830, 15555, 839, 841, 76172, 17727, 44402, 135179, 4527, 3869, 16186, 8, 978, 21407, 24372, 106, 30541, 35782, 30957, 54241, 40956, 162054, 29479, ...
[ 0.06292724609375, 0.0285797119140625, 0.30078125, 0.0506591796875, 0.183837890625, 0.04534912109375, 0.0318603515625, 0.04425048828125, 0.058074951171875, 0.026824951171875, 0.3046875, 0.08599853515625, 0.166748046875, 0.0936279296875, 0.063232421875, 0.1815185546875, 0.19482421875, ...
embed
63432785_c0
63432785
prolog
0
Title: How to join two list in prolog without changing variable name Problem title: How to join two list in prolog without changing variable name Tags: prolog Problem: How to join two list in prolog without changing variable name This is my sample code append( [], X, X). append( [X | Y], Z, [X | W]) :- append( Y, Z, W)...
How to join two list in prolog without changing variable name How to join two list in prolog without changing variable name prolog How DIST How to join two list in prolog without changing variable name This is my sample code I call this program using: But i just get false output. Because I named both variable DIST in t...
[ 0.0003871917724609375, 0.01171875, 0.004547119140625, 0.01165771484375, 0.000858306884765625, 0.00799560546875, -0.019775390625, 0.0230712890625, 0.033203125, -0.01171875, 0.025146484375, -0.0087890625, -0.005889892578125, -0.020751953125, -0.00982666015625, 0.0084228515625, 0.029541...
[ 11249, 33284, 6626, 5303, 502, 4867, 15490, 151134, 77336, 9351, 47, 391, 35602, 23, 121413, 18151, 11782, 1528, 98320, 140992, 24, 4806, 15044, 114689, 71, 132 ]
[ 0.005970001220703125, 0.19677734375, 0.1339111328125, 0.1798095703125, 0.1317138671875, 0.212158203125, 0.07769775390625, 0.1004638671875, 0.1884765625, 0.105712890625, 0.0008630752563476562, 0.10650634765625, 0.18408203125, 0.01113128662109375, 0.0684814453125, 0.0634765625, 0.06555...
embed
17181041_c0
17181041
prolog
0
Title: Assert facts from java to prolog Problem title: Assert facts from java to prolog Tags: swi-prolog, prolog, jpl, java Problem: Assert facts from java to prolog I'm using SWI-Prolog with the JPL library. I have a program written in Java that produces strings like these: fact(1,2) fact(2,3) fact(1,3) Then, there is...
Assert facts from java to prolog Assert facts from java to prolog swi-prolog prolog jpl java java Assert Assert facts from java to prolog I'm using SWI-Prolog with the JPL library. I have a program written in Java that produces strings like these: Then, there is a prolog file that needs this facts in the head of file. ...
[ 0.0238037109375, 0.007080078125, -0.0086669921875, 0.03271484375, -0.021240234375, 0.007659912109375, 0.007659912109375, 0.00836181640625, -0.004241943359375, -0.025390625, 0.0023040771484375, 0.00946044921875, -0.02490234375, 0.003936767578125, 0.0169677734375, 0.000518798828125, 0....
[ 1301, 33657, 15824, 7, 1295, 79, 330, 47, 502, 4867, 91, 2452, 3454, 1647, 2424, 17368, 159, 38969, 9, 10752, 678, 821, 21130, 35773, 1528, 59121, 23, 41925, 27489, 79315, 1884, 6097, 11435, 27117, 903, 10336, 959, 3444, 183540, 18151, ...
[ 0.10076904296875, 0.2177734375, 0.18798828125, 0.09381103515625, 0.11669921875, 0.1470947265625, 0.211181640625, 0.1007080078125, 0.1671142578125, 0.236328125, 0.0225982666015625, 0.1796875, 0.14697265625, 0.037933349609375, 0.143310546875, 0.035919189453125, 0.04852294921875, 0.19...
embed
20711893_c0
20711893
prolog
0
Title: Prolog compare list structure Problem title: Prolog compare list structure Tags: list, prolog Problem: Prolog compare list structure I am trying to compare two lists in prolog like ?- compare([[X],Y,Z],[[A],B,C]). true. ?- compare([X,Y,Z],[[A],B,C]). false. I can't use the ==/2 operator because the logical varia...
Prolog compare list structure Prolog compare list structure list prolog Prolog Prolog compare list structure I am trying to compare two lists in prolog like I can't use the ==/2 operator because the logical variables aren't the same, so this would evaluate false for both cases. And I obviously cant use =/2 because this...
[ 0.01177978515625, 0.0164794921875, 0.00193023681640625, 0.0093994140625, -0.01324462890625, 0.01806640625, 0.005767822265625, 0.0002918243408203125, 0.00115966796875, 0.012939453125, 0.01275634765625, 0.01025390625, 0.0086669921875, -0.002044677734375, 0.013671875, -0.00726318359375, ...
[ 1250, 4867, 69101, 5303, 45646, 502, 31577, 6626, 831, 18, 4527, 70, 69112, 12477, 39933, 62775, 289, 77336, 125381, 5701, 151575, 98320, 15044, 50218, 171259, 45767, 2203, 29568, 157666, 86869, 2967 ]
[ 0.1490478515625, 0.236328125, 0.1927490234375, 0.182373046875, 0.1783447265625, 0.14501953125, 0.036376953125, 0.062255859375, 0.071533203125, 0.053863525390625, 0.08245849609375, 0.00543212890625, 0.1986083984375, 0.260986328125, 0.189697265625, 0.08551025390625, 0.019775390625, 0...
embed
6669973_c0
6669973
prolog
0
Title: Prolog Tail Recursive procedure to count uninstantiated variables in list Problem title: Prolog Tail Recursive procedure to count uninstantiated variables in list Tags: prolog Problem: Prolog Tail Recursive procedure to count uninstantiated variables in list I am trying to write a Tail Recursive procedure to cou...
Prolog Tail Recursive procedure to count uninstantiated variables in list Prolog Tail Recursive procedure to count uninstantiated variables in list prolog Prolog Tail Recursive Prolog Tail Recursive procedure to count uninstantiated variables in list I am trying to write a Tail Recursive procedure to count the number o...
[ 0.02734375, 0.0194091796875, 0.00469970703125, -0.0059814453125, 0.01611328125, 0.012939453125, -0.00677490234375, -0.00335693359375, 0.0108642578125, -0.032470703125, -0.007537841796875, -0.027099609375, 0.0029449462890625, 0.026611328125, 0.0283203125, 0.00860595703125, 0.021606445...
[ 1250, 4867, 1218, 379, 853, 48650, 5844, 50491, 54529, 51, 143034, 14, 27686, 77336, 5303, 23, 502, 31577, 33022, 14012, 10176, 179933, 7730, 44691, 43581, 41, 35064 ]
[ 0.115966796875, 0.205078125, 0.1658935546875, 0.1373291015625, 0.061370849609375, 0.16845703125, 0.088623046875, 0.19287109375, 0.1954345703125, 0.1124267578125, 0.1270751953125, 0.11279296875, 0.08074951171875, 0.2374267578125, 0.1839599609375, 0.0195465087890625, 0.0723876953125, ...
embed
39832882_c0
39832882
prolog
0
Title: Swi Prolog Editor only shows false, not true Problem title: Swi Prolog Editor only shows false, not true Tags: prolog, swi-prolog, unification Problem: Swi Prolog Editor only shows false, not true Assume my knowledge base contains one fact: fact(fact1). If I know submit a query fact(fact1). 39 ?- fact(fact1). 40...
Swi Prolog Editor only shows false, not true Swi Prolog Editor only shows false, not true prolog swi-prolog unification Swi Prolog Editor fact1 Swi Prolog Editor only shows false, not true Assume my knowledge base contains one fact: fact(fact1). If I know submit a query fact(fact1). it says nothing, which is the equiva...
[ 0.039306640625, 0.0084228515625, 0.0194091796875, -0.0005645751953125, -0.011474609375, -0.00958251953125, 0.01373291015625, 0.00897216796875, -0.006927490234375, -0.020751953125, -0.00830078125, 0.0145263671875, -0.01019287109375, -0.0005645751953125, 0.01348876953125, -0.015319824218...
[ 105432, 1250, 4867, 69340, 4734, 45831, 98320, 959, 29568, 502, 2452, 3454, 51, 41274, 15824, 418, 51359, 3647, 114700, 17727, 3714, 137447, 41, 17378, 33720, 183234, 44691, 35644, 15549, 2046 ]
[ 0.20458984375, 0.14501953125, 0.2203369140625, 0.2408447265625, 0.0869140625, 0.1177978515625, 0.2413330078125, 0.1500244140625, 0.1995849609375, 0.0931396484375, 0.1602783203125, 0.080322265625, 0.048492431640625, 0.0171661376953125, 0.1356201171875, 0.030548095703125, 0.07177734375...
embed
41527558_c0
41527558
prolog
0
Title: Explaining a program in prolog Problem title: Explaining a program in prolog Tags: prolog Problem: Explaining a program in prolog I have a simple prolog program which is supposed to write all of the factors of a selected number. However I am starting to think that I can never learn prolog. I just don't get how t...
Explaining a program in prolog Explaining a program in prolog prolog Explaining Explaining a program in prolog I have a simple prolog program which is supposed to write all of the factors of a selected number. However I am starting to think that I can never learn prolog. I just don't get how the program works. The code...
[ 0.00482177734375, 0.006683349609375, -0.0234375, 0.0146484375, -0.00482177734375, 0.0130615234375, 0.01239013671875, -0.001312255859375, 0.0147705078125, -0.0255126953125, 0.01422119140625, -0.01708984375, -0.025634765625, 0.003692626953125, 0.00885009765625, 0.0130615234375, 0.01477...
[ 60075, 143, 14653, 1528, 502, 4867, 23, 765, 8781, 134598, 33022, 756, 120103, 133291, 14012, 72134, 5351, 831, 8306, 30698, 2301, 18, 2046, 3642, 43240, 18151, 35064 ]
[ 0.142578125, 0.198974609375, 0.08172607421875, 0.2034912109375, 0.168701171875, 0.264892578125, 0.061370849609375, 0.025421142578125, 0.10986328125, 0.06353759765625, 0.1370849609375, 0.068359375, 0.210205078125, 0.113525390625, 0.1334228515625, 0.017486572265625, 0.048492431640625, ...
embed