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
49325425_c0
49325425
prolog
0
Title: Why does a recursive function fail when calling for an outside predicatewould make it succeed? Problem title: Why does a recursive function fail when calling for an outside predicatewould make it succeed? Tags: recursion, prolog Problem: Why does a recursive function fail when calling for an outside predicatewou...
Why does a recursive function fail when calling for an outside predicatewould make it succeed? Why does a recursive function fail when calling for an outside predicatewould make it succeed? recursion prolog Why N-1 Why does a recursive function fail when calling for an outside predicatewould make it succeed? I'm writin...
[ -0.01025390625, 0.00726318359375, 0.000446319580078125, 0.0021514892578125, 0.01116943359375, -0.001129150390625, 0.013427734375, 0.003753662109375, -0.004638671875, -0.02392578125, 0.0076904296875, -0.01708984375, -0.0279541015625, -0.00142669677734375, 0.0277099609375, 0.003555297851...
[ 44084, 195625, 5844, 32354, 35782, 159029, 50782, 1653, 2063, 67, 3249, 214493, 1830, 502, 4867, 541, 5759, 14602, 100, 52366, 32562, 35388, 674, 31461, 15403, 9077, 15400, 55300, 7, 68772, 3034, 7225, 64457, 76199, 91853, 390, 757, 18499, ...
[ 0.09454345703125, 0.2088623046875, 0.10235595703125, 0.17236328125, 0.1966552734375, 0.1051025390625, 0.1629638671875, 0.122314453125, 0.1578369140625, 0.044891357421875, 0.02154541015625, 0.1531982421875, 0.055908203125, 0.06298828125, 0.1295166015625, 0.0797119140625, 0.14868164062...
embed
68493300_c0
68493300
prolog
0
Title: Remove meta from reply_html_page Problem title: Remove meta from reply_html_page Tags: swi-prolog, frameworkbenchmarks, prolog Problem: Remove meta from reply_html_page How do I remove the meta tag that is automatically inserted by reply_html_page ? reply_html_page( [title('Fortunes')], [table([ ... ])] ). The g...
Remove meta from reply_html_page Remove meta from reply_html_page swi-prolog frameworkbenchmarks prolog reply_html_page Remove Fortunes DOCTYPE HTML UTF-8 Content-Length Remove meta from reply_html_page How do I remove the meta tag that is automatically inserted by reply_html_page ? The generate code looks like this: A...
[ -0.011474609375, 0.041015625, 0.0026702880859375, 0.01513671875, -0.0184326171875, -0.003875732421875, -0.0234375, 0.01312255859375, -0.01031494140625, -0.036376953125, 0.022216796875, 0.00811767578125, -0.0184326171875, 0.007568359375, 0.0155029296875, 0.020263671875, 0.006164550781...
[ 181139, 23550, 1295, 75836, 7693, 22469, 2452, 3454, 4867, 170846, 776, 88832, 502, 175181, 7, 27143, 19097, 30992, 17376, 70870, 449, 54, 87388, 70, 7909, 191082, 183540, 139392, 18151, 33342, 1884, 903, 3917, 25379, 927, 10336, 56, 678, 5...
[ 0.137451171875, 0.2340087890625, 0.0731201171875, 0.2069091796875, 0.1533203125, 0.114990234375, 0.138671875, 0.0833740234375, 0.1732177734375, 0.050048828125, 0.0247039794921875, 0.00531005859375, 0.061309814453125, 0.184326171875, 0.02056884765625, 0.0611572265625, 0.141845703125, ...
embed
22891150_c0
22891150
prolog
0
Title: Prolog Domain of activity Problem title: Prolog Domain of activity Tags: prolog Problem: Prolog Domain of activity I have found a Prolog program and read about AI programming a little. My program is : causes(measles, spots). causes(mumps, swollen_glands). known(spots). diagnosis(Symptom,Disease) :- causes(Diseas...
Prolog Domain of activity Prolog Domain of activity prolog Prolog Domain swollen_glands Symptom Disease Prolog Domain of activity I have found a Prolog program and read about AI programming a little. My program is : and it's file name is : when i run this command on Linux : I get this prompt My question is how can I as...
[ 0.0201416015625, 0.00106048583984375, 0.007232666015625, 0.0267333984375, -0.0201416015625, 0.02392578125, 0.00121307373046875, 0.01275634765625, 0.006591796875, -0.052734375, 0.0120849609375, 0.00177001953125, -0.022705078125, 0.0086669921875, -0.00445556640625, -0.0009765625, 0.034...
[ 1250, 4867, 93702, 111, 103488, 502, 112141, 8405, 177, 15534, 149450, 229200, 14037, 1528, 38730, 56037, 449, 10176, 11435, 9351, 83, 11675, 903, 75101, 98, 29908, 2046, 105876, 9655, 3642, 831, 26458, 1295, 442, 29568, 707, 98320, 35166, ...
[ 0.1671142578125, 0.267578125, 0.148681640625, 0.1546630859375, 0.1424560546875, 0.0732421875, 0.1435546875, 0.170166015625, 0.07220458984375, 0.20166015625, 0.1715087890625, 0.1192626953125, 0.039947509765625, 0.147705078125, 0.1846923828125, 0.111083984375, 0.01025390625, 0.008911...
embed
49376918_c0
49376918
prolog
0
Title: Prolog Goal Query Returns False Problem title: Prolog Goal Query Returns False Tags: prolog Problem: Prolog Goal Query Returns False I'm a high school student studying Prolog and am getting an error on a goal. I have the following facts: character(jim). character(jenny). character_type(jim, prince). charcter_typ...
Prolog Goal Query Returns False Prolog Goal Query Returns False prolog Prolog Goal Query Returns character_type charcter_type has_skill jenny_invisibility Prolog Goal Query Returns False I'm a high school student studying Prolog and am getting an error on a goal. I have the following facts: I would like to get all the ...
[ 0.0096435546875, 0.0478515625, 0.010498046875, 0.0206298828125, 0.0103759765625, 0.0069580078125, -0.0054931640625, -0.01495361328125, -0.006439208984375, 0.0035247802734375, -0.003692626953125, 0.00592041015625, -0.0167236328125, 0.0185546875, -0.018798828125, 0.0458984375, 0.013122...
[ 1250, 4867, 2016, 289, 58836, 53, 173340, 22225, 184, 502, 62816, 50986, 21441, 147617, 1556, 7, 119261, 7349, 299, 73, 37712, 83259, 11192, 10696, 9836, 35187, 20949, 18499, 69236, 15824, 2806, 1884, 2046, 756, 8093, 124850, 621, 54631, 43...
[ 0.1451416015625, 0.2393798828125, 0.151611328125, 0.11328125, 0.1668701171875, 0.06536865234375, 0.205810546875, 0.14208984375, 0.046905517578125, 0.0953369140625, 0.1636962890625, 0.1578369140625, 0.08660888671875, 0.0947265625, 0.03912353515625, 0.03387451171875, 0.1971435546875, ...
embed
54166805_c0
54166805
prolog
0
Title: Prolog: How to check whether each member of the list has a property? Problem title: Prolog: How to check whether each member of the list has a property? Tags: prolog Problem: Prolog: How to check whether each member of the list has a property? In the book "Prolog by Example: How to Learn, Teach and Use it" on pa...
Prolog: How to check whether each member of the list has a property? Prolog: How to check whether each member of the list has a property? prolog Prolog How satisfy_property Yes Prolog: How to check whether each member of the list has a property? In the book "Prolog by Example: How to Learn, Teach and Use it" on page 32...
[ -0.00616455078125, -0.004791259765625, 0.0322265625, -0.0027923583984375, -0.017333984375, 0.0177001953125, 0.01171875, -0.00518798828125, 0.00537109375, -0.01446533203125, 0.018310546875, -0.00139617919921875, 0.0087890625, -0.0093994140625, -0.000583648681640625, 0.01239013671875, ...
[ 1250, 4867, 11249, 47, 12765, 36766, 12638, 32786, 5303, 1556, 10, 57266, 111, 502, 40407, 53, 36290, 56, 939, 32635, 12877, 10752, 89536, 134031, 172030, 36836, 2789, 38679, 756, 80854, 3060, 220, 1294, 1653, 2063, 50592, 1528, 211603, 395...
[ 0.1512451171875, 0.233642578125, 0.0977783203125, 0.0345458984375, 0.255859375, 0.1444091796875, 0.1072998046875, 0.19140625, 0.220458984375, 0.13427734375, 0.07958984375, 0.2578125, 0.00848388671875, 0.1064453125, 0.19384765625, 0.09912109375, 0.111083984375, 0.105224609375, 0.0...
embed
31161559_c0
31161559
prolog
0
Title: Running SWI Prolog via Terminal Mac Problem title: Running SWI Prolog via Terminal Mac Tags: prolog, macos, swi-prolog, terminal Problem: Running SWI Prolog via Terminal Mac I'm trying to run prolog from terminal. I have installed version 7.2.2 and added it to my environment path using the command: PATH=$PATH:/A...
Running SWI Prolog via Terminal Mac Running SWI Prolog via Terminal Mac prolog macos swi-prolog terminal Running SWI Prolog Terminal Mac PATH Applications SWI-Prolog.app Contents MacOS Illegal Running SWI Prolog via Terminal Mac I'm trying to run prolog from terminal. I have installed version 7.2.2 and added it to my e...
[ 0.0103759765625, 0.0067138671875, 0.00579833984375, 0.0255126953125, -0.020751953125, 0.0164794921875, 0.00946044921875, -0.011474609375, -0.0224609375, -0.04541015625, 0.0106201171875, 0.00775146484375, -0.021240234375, 0.006500244140625, 0.00958251953125, -0.00885009765625, 0.01623...
[ 28398, 592, 159, 38969, 1250, 4867, 1829, 124090, 4727, 502, 291, 7840, 91, 2452, 3454, 33949, 436, 139909, 104921, 9, 10752, 9007, 70870, 7285, 891, 86966, 31577, 11675, 1295, 20600, 11389, 2861, 70147, 49814, 442, 65998, 60875, 75101, 204...
[ 0.1396484375, 0.01287841796875, 0.12890625, 0.277099609375, 0.197265625, 0.2498779296875, 0.1209716796875, 0.247802734375, 0.1602783203125, 0.181396484375, 0.0269622802734375, 0.09002685546875, 0.036346435546875, 0.2236328125, 0.144775390625, 0.26416015625, 0.0830078125, 0.15600585...
embed
22207594_c0
22207594
prolog
0
Title: Multiplying two lists in prolog Problem title: Multiplying two lists in prolog Tags: prolog, list Problem: Multiplying two lists in prolog I am currently working with prolog and want to multiply two lists together but in a certian way. For example: [1,2,3] and [4,5,6] are my two lists. I want to preform the foll...
Multiplying two lists in prolog Multiplying two lists in prolog prolog list Multiplying Multiplying two lists in prolog I am currently working with prolog and want to multiply two lists together but in a certian way. For example: I want to preform the following actions: Such that the first element of each list is multi...
[ -0.00494384765625, 0.021728515625, 0.0013885498046875, 0.018310546875, -0.0155029296875, 0.02880859375, -0.01055908203125, 0.01556396484375, 0.0159912109375, -0.03173828125, 0.0007476806640625, 0.001861572265625, -0.017578125, 0.0185546875, 0.00799560546875, -0.007781982421875, 0.020...
[ 19335, 62479, 6626, 5303, 7, 502, 4867, 23, 20697, 3444, 6024, 25842, 66792, 66, 479, 5037, 61972, 5117, 12830, 12638, 118126, 3789, 49814, 17932, 80854, 7722, 1250, 46876, 54, 195625, 32354, 51776, 10336, 46741, 112820, 114864, 8781, 127664,...
[ 0.145751953125, 0.1917724609375, 0.1910400390625, 0.2220458984375, 0.028533935546875, 0.1693115234375, 0.2393798828125, 0.0263824462890625, 0.0230865478515625, 0.007568359375, 0.1395263671875, 0.110107421875, 0.076416015625, 0.075439453125, 0.019561767578125, 0.10986328125, 0.1109619...
embed
47891122_c0
47891122
prolog
0
Title: How to convert to a Definite Clause Grammar Problem title: How to convert to a Definite Clause Grammar Tags: grammar, dcg, integer-partition, prolog Problem: How to convert to a Definite Clause Grammar I'm trying to write a definite clause grammar that outputs the partitions of a number. For example ?- w(3,L,[])...
How to convert to a Definite Clause Grammar How to convert to a Definite Clause Grammar grammar dcg integer-partition prolog How Definite Clause Grammar PosNumber List PosNumber-X How to convert to a Definite Clause Grammar I'm trying to write a definite clause grammar that outputs the partitions of a number. For examp...
[ -0.01446533203125, 0.007659912109375, -0.01409912109375, 0.01531982421875, -0.01434326171875, 0.0118408203125, -0.00872802734375, -0.03369140625, 0.00518798828125, -0.0059814453125, -0.01531982421875, 0.00836181640625, -0.005462646484375, 0.0081787109375, 0.00186920166015625, 0.0068969...
[ 11249, 96760, 47, 10, 88606, 67, 100700, 13, 48078, 1727, 122092, 147, 238, 177, 892, 1505, 15866, 1363, 502, 4867, 13498, 18444, 26278, 32036, 1542, 31577, 33022, 71496, 70731, 140992, 2878, 5256, 14012, 705, 148, 86827, 866, 1065, 5608, ...
[ 0.032073974609375, 0.18017578125, 0.1104736328125, 0.039093017578125, 0.1868896484375, 0.160888671875, 0.192626953125, 0.110595703125, 0.153076171875, 0.1483154296875, 0.1436767578125, 0.12939453125, 0.012237548828125, 0.061859130859375, 0.0703125, 0.1025390625, 0.1109619140625, 0....
embed
53855011_c0
53855011
prolog
0
Title: Prolog, print employees with same names Problem title: Prolog, print employees with same names Tags: prolog Problem: Prolog, print employees with same names This is my first time using Prolog. I have employees: employee(eID,firstname,lastname,month,year). I have units: unit(uID,type,eId). I want to make a predic...
Prolog, print employees with same names Prolog, print employees with same names prolog Prolog double_name _eID _firstname _name _lastname Prolog, print employees with same names This is my first time using Prolog. I have employees: I have units: I want to make a predicate that prints the last names of the employees wit...
[ 0.01953125, 0.00164031982421875, 0.0277099609375, 0.0128173828125, -0.006866455078125, 0.0194091796875, -0.0201416015625, 0.00823974609375, 0.0033416748046875, 0.0020599365234375, -0.00408935546875, 0.00830078125, 0.0201416015625, -0.00860595703125, -0.01043701171875, 0.027587890625, ...
[ 1250, 4867, 28412, 93215, 678, 5701, 123055, 502, 41929, 11627, 7146, 19777, 5117, 1733, 17368, 765, 25072, 3444, 3249, 1653, 2063, 4568, 9351, 1193, 1884, 903, 4966, 756, 23, 11249, 831, 4734, 70 ]
[ 0.198486328125, 0.2467041015625, 0.2052001953125, 0.2418212890625, 0.1087646484375, 0.1939697265625, 0.189208984375, 0.1419677734375, 0.1358642578125, 0.167236328125, 0.0921630859375, 0.093017578125, 0.0986328125, 0.006317138671875, 0.044769287109375, 0.021026611328125, 0.13977050781...
embed
68658549_c0
68658549
prolog
0
Title: How do I bag elements of tuples in Prolog lists Problem title: How do I bag elements of tuples in Prolog lists Tags: list, prolog Problem: How do I bag elements of tuples in Prolog lists Say I have a list: Os = [(4,P1),(9,P2),(4,P3),(1,P4),(9,P5)]. I want to put every second element of the tuple in a bag that ha...
How do I bag elements of tuples in Prolog lists How do I bag elements of tuples in Prolog lists list prolog How Prolog SortedOs Bag How do I bag elements of tuples in Prolog lists Say I have a list: I want to put every second element of the tuple in a bag that has the same first element like this: Currently I'm using b...
[ 0.013671875, 0.007537841796875, -0.0014801025390625, 0.003509521484375, -0.014404296875, 0.026123046875, -0.000728607177734375, -0.005126953125, 0.0269775390625, 0.0032806396484375, -0.0181884765625, 0.004119873046875, 0.00115203857421875, -0.0086669921875, -0.0018157958984375, 0.01080...
[ 11249, 87, 6157, 80854, 370, 99726, 23, 1250, 4867, 5303, 502, 53666, 297, 42246, 19413, 3444, 3884, 11907, 17932, 12830, 8705, 5701, 5117, 17368, 41780, 420, 18113, 76199, 17497, 71, 1884, 903, 33342, 1257, 82800, 12989, 15549 ]
[ 0.053466796875, 0.01092529296875, 0.2249755859375, 0.1768798828125, 0.1302490234375, 0.2379150390625, 0.03375244140625, 0.1507568359375, 0.218017578125, 0.180419921875, 0.08319091796875, 0.132080078125, 0.0693359375, 0.1170654296875, 0.2061767578125, 0.04949951171875, 0.0482788085937...
embed
48066401_c0
48066401
prolog
0
Title: faster dictionary than assoc, but with same relational/backtracking capabilities Problem title: faster dictionary than assoc, but with same relational/backtracking capabilities Tags: prolog, swi-prolog Problem: faster dictionary than assoc, but with same relational/backtracking capabilities I am making extensive...
faster dictionary than assoc, but with same relational/backtracking capabilities faster dictionary than assoc, but with same relational/backtracking capabilities prolog swi-prolog faster dictionary than assoc, but with same relational/backtracking capabilities I am making extensive use of the swi assoc library. When lo...
[ 0.00872802734375, 0.01007080078125, -0.01171875, -0.01409912109375, 0.005523681640625, -0.03076171875, -0.004058837890625, 0.0218505859375, 0.013671875, -0.060546875, 0.02490234375, 0.0244140625, -0.0194091796875, -0.01708984375, 0.0230712890625, -0.00244140625, 0.004547119140625, ...
[ 4271, 56, 45, 10763, 6635, 3501, 63927, 238, 5701, 41911, 12620, 125728, 130732, 502, 4867, 91, 2452, 3454, 35773, 1294, 72367, 30742, 13442, 605, 80854, 60322, 1733, 16487, 32562, 22799, 115081, 10932, 43581, 11341, 4677, 55993, 3252, 390, ...
[ 0.1419677734375, 0.0906982421875, 0.092529296875, 0.16455078125, 0.085205078125, 0.035430908203125, 0.1539306640625, 0.136962890625, 0.041168212890625, 0.1085205078125, 0.08740234375, 0.159912109375, 0.09375, 0.158935546875, 0.2308349609375, 0.008087158203125, 0.1910400390625, 0.15...
embed
881534_c0
881534
prolog
0
Title: Leaf nodes of directed graph - Prolog Problem title: Leaf nodes of directed graph - Prolog Tags: prolog Problem: Leaf nodes of directed graph - Prolog Does anybody know, how to get a list of leaf nodes in Prolog? Let's say, I have a simple directed graph described by these directed edges: de(0,1). de(0,2). de(2,...
Leaf nodes of directed graph - Prolog Leaf nodes of directed graph - Prolog prolog Leaf Prolog Node Leaf nodes of directed graph - Prolog Does anybody know, how to get a list of leaf nodes in Prolog? Let's say, I have a simple directed graph described by these directed edges: Now, how to recursively browse the graph an...
[ 0.0130615234375, 0.000579833984375, 0.01300048828125, 0.007415771484375, 0.02392578125, 0.01806640625, -0.01446533203125, -0.0032806396484375, -0.005615234375, -0.0224609375, -0.017333984375, -0.00439453125, -0.0162353515625, -0.00177764892578125, 0.0128173828125, 0.000606536865234375,...
[ 636, 2407, 110, 988, 111, 8951, 297, 41382, 1250, 4867, 502, 438, 112, 2499, 37873, 3714, 3642, 2046, 10, 5303, 95, 23, 8781, 151552, 6097, 121303, 195625, 5844, 140773, 33022, 116, 157, 106, 619, 21162, 35166, 1653, 2063, 67, 20697, 65...
[ 0.0772705078125, 0.21728515625, 0.1697998046875, 0.173583984375, 0.04937744140625, 0.1671142578125, 0.064453125, 0.1851806640625, 0.17236328125, 0.2418212890625, 0.06463623046875, 0.1595458984375, 0.0345458984375, 0.00146484375, 0.031585693359375, 0.06732177734375, 0.049346923828125,...
embed
72292814_c0
72292814
prolog
0
Title: how to ignore the first match of a result when generating the combination of K elements in a list in prolog? Problem title: how to ignore the first match of a result when generating the combination of K elements in a list in prolog? Tags: prolog, combinations, list Problem: how to ignore the first match of a res...
how to ignore the first match of a result when generating the combination of K elements in a list in prolog? how to ignore the first match of a result when generating the combination of K elements in a list in prolog? prolog combinations list Comb N-1 how to ignore the first match of a result when generating the combin...
[ -0.01446533203125, 0.0191650390625, 0.0002384185791015625, -0.00921630859375, -0.0115966796875, -0.0078125, -0.005218505859375, 0.006866455078125, 0.006378173828125, -0.01129150390625, 0.00180816650390625, -0.0029754638671875, 0.003875732421875, 0.0164794921875, 0.0031280517578125, 0.0...
[ 3642, 124962, 5117, 14858, 16750, 12663, 162515, 341, 80854, 5303, 502, 4867, 47, 3288, 275, 541, 5759, 1745, 35593, 18151 ]
[ 0.039794921875, 0.20458984375, 0.099853515625, 0.20361328125, 0.1519775390625, 0.1121826171875, 0.1678466796875, 0.1558837890625, 0.1658935546875, 0.142578125, 0.1234130859375, 0.201416015625, 0.01068115234375, 0.090087890625, 0.0816650390625, 0.0111083984375, 0.09466552734375, 0.0...
embed
20407540_c0
20407540
prolog
0
Title: Difference between two set of prolog rules Problem title: Difference between two set of prolog rules Tags: prolog, logic Problem: Difference between two set of prolog rules I'm kind of new to prolog and logical programming in general. Can anyone tell me the difference between these two set of prolog rules? numbe...
Difference between two set of prolog rules Difference between two set of prolog rules prolog logic Difference Difference between two set of prolog rules I'm kind of new to prolog and logical programming in general. Can anyone tell me the difference between these two set of prolog rules? To me they pretty much represent...
[ 0.0125732421875, 0.029296875, 0.013671875, 0.0125732421875, 0.0002593994140625, 0.01434326171875, -0.01031494140625, 0.009033203125, 0.0242919921875, -0.01361083984375, 0.0098876953125, -0.01055908203125, 0.000949859619140625, 0.00958251953125, 0.02685546875, 0.004119873046875, 0.015...
[ 803, 18234, 6620, 17721, 6626, 5423, 502, 4867, 91736, 62775, 3525, 56037, 14192, 60212, 28875, 5045, 33636, 5701, 15400, 14602, 30646, 63736, 2174, 11782, 2606, 1297, 4390, 99547, 3134, 10461, 7464, 7941, 1733, 26747, 1810, 29954, 187136, 77...
[ 0.1107177734375, 0.2078857421875, 0.03900146484375, 0.146484375, 0.1190185546875, 0.1527099609375, 0.1669921875, 0.2264404296875, 0.201904296875, 0.1680908203125, 0.017913818359375, 0.06573486328125, 0.05804443359375, 0.202392578125, 0.001678466796875, 0.031890869140625, 0.1185302734...
embed
26520662_c0
26520662
prolog
0
Title: How to split list in Prolog? Problem title: How to split list in Prolog? Tags: prolog Problem: How to split list in Prolog? I want to write a predicate split(List, Pivot, Result) holds when Result is a list of sublists that List divided by Pivot . For example split(['_', '_', '#', '_', '#', '_'], '#', [['_','_']...
How to split list in Prolog? How to split list in Prolog? prolog How Prolog List Pivot Result Left Right How to split list in Prolog? I want to write a predicate split(List, Pivot, Result) holds when Result is a list of sublists that List divided by Pivot . For example split(['_', '_', '#', '_', '#', '_'], '#', [['_','...
[ -0.017578125, 0.00677490234375, 0.0228271484375, -0.0047607421875, -0.030029296875, 0.0150146484375, -0.0145263671875, -0.004913330078125, 0.0111083984375, 0.004302978515625, 0.01708984375, 0.004302978515625, -0.007568359375, 0.01226806640625, -0.002532958984375, 0.0067138671875, 0.0...
[ 11249, 47, 65450, 5303, 23, 1250, 4867, 502, 32036, 436, 5777, 18, 126684, 636, 2480, 90911, 3444, 33022, 1653, 2063, 67, 154663, 16401, 1614, 6562, 101637, 390, 4904, 29568, 18151, 4488, 51515, 27571, 67660 ]
[ 0.0994873046875, 0.04168701171875, 0.2469482421875, 0.24072265625, 0.09259033203125, 0.176513671875, 0.236083984375, 0.1025390625, 0.1636962890625, 0.052490234375, 0.1820068359375, 0.119384765625, 0.207763671875, 0.00927734375, 0.0745849609375, 0.07763671875, 0.032867431640625, 0.0...
embed
28505323_c0
28505323
prolog
0
Title: An example for using Existential and Universal in prolog Problem title: An example for using Existential and Universal in prolog Tags: prolog Problem: An example for using Existential and Universal in prolog I have this common-sense knowledge: Only birds fly. All mammal are either ‘a’ OR ‘b’. How can I write it ...
An example for using Existential and Universal in prolog An example for using Existential and Universal in prolog prolog Existential Universal Pigeon Fifi An example for using Existential and Universal in prolog I have this common-sense knowledge: Only birds fly. All mammal are either ‘a’ OR ‘b’. How can I write it in ...
[ 0.021728515625, 0.019287109375, 0.01202392578125, 0.017333984375, -0.01177978515625, 0.00146484375, 0.0040283203125, -0.0004367828369140625, 0.0072021484375, -0.025390625, 0.0101318359375, -0.0277099609375, 0.017822265625, -0.00830078125, 0.0084228515625, -0.00933837890625, 0.0083618...
[ 27781, 17368, 122688, 118, 289, 136, 53900, 23, 502, 4867, 58593, 13, 191, 3698, 1029, 100033, 51359, 87293, 263, 6468, 12403, 3164, 21968, 141, 40101, 11, 33172, 275, 11249, 831, 33022, 442, 79986, 15824, 15044, 3917, 32813, 100, 5584, 4...
[ 0.189453125, 0.126220703125, 0.1976318359375, 0.15185546875, 0.18994140625, 0.0784912109375, 0.2177734375, 0.06817626953125, 0.18359375, 0.2391357421875, 0.10345458984375, 0.1080322265625, 0.1414794921875, 0.1058349609375, 0.1634521484375, 0.0538330078125, 0.05279541015625, 0.12561...
embed
63456244_c0
63456244
prolog
0
Title: Prolog: difference between var, nonvar and ground Problem title: Prolog: difference between var, nonvar and ground Tags: prolog Problem: Prolog: difference between var, nonvar and ground In Prolog, especially in it's metaprogramming aspects, people often talk about ground and non-ground variables. As well as usi...
Prolog: difference between var, nonvar and ground Prolog: difference between var, nonvar and ground prolog Prolog Prolog: difference between var, nonvar and ground In Prolog, especially in it's metaprogramming aspects, people often talk about ground and non-ground variables. As well as using predicates such as var/1 , ...
[ 0.017822265625, 0.0167236328125, 0.0040283203125, -0.0091552734375, -0.00262451171875, 0.033935546875, -0.004486083984375, 0.005462646484375, -0.00616455078125, -0.008544921875, 0.01904296875, -0.00909423828125, -0.01177978515625, 0.00897216796875, 0.00885009765625, 0.021484375, 0.02...
[ 1250, 4867, 60212, 17721, 285, 4, 351, 1961, 136, 61585, 502, 23550, 28966, 27983, 22120, 64330, 77336, 17368, 1653, 2063, 11583, 66161, 70, 34973, 6447, 2856, 43581, 100094, 62, 83, 64557, 51, 143034, 14, 27686, 2507, 1193, 34648, 1284, ...
[ 0.173095703125, 0.255615234375, 0.2073974609375, 0.1153564453125, 0.2666015625, 0.024658203125, 0.198974609375, 0.264404296875, 0.07391357421875, 0.2484130859375, 0.1490478515625, 0.110595703125, 0.1251220703125, 0.0214080810546875, 0.05145263671875, 0.2071533203125, 0.24853515625, ...
embed
27221286_c0
27221286
prolog
0
Title: Assistance writing a Prolog rule Problem title: Assistance writing a Prolog rule Tags: prolog-setof, prolog Problem: Assistance writing a Prolog rule Given that I have entered the following facts into the factbase. Each sidedish has two ingredients: maindish(thanksgiving, turkey). sidedish(thanksgiving,pie). ing...
Assistance writing a Prolog rule Assistance writing a Prolog rule prolog-setof prolog Assistance Prolog Holiday Foods Assistance writing a Prolog rule Given that I have entered the following facts into the factbase. Each sidedish has two ingredients: I have written the following rule to return the dishes for a given ho...
[ 0.004302978515625, -0.0252685546875, 0.005523681640625, 0.017822265625, -0.0281982421875, 0.0262451171875, -0.004638671875, 0.00408935546875, 0.00921630859375, -0.02880859375, -0.006011962890625, 0.0025482177734375, -0.006317138671875, -0.010009765625, 0.015380859375, 0.0045166015625, ...
[ 54360, 7154, 32562, 1250, 4867, 79986, 502, 3509, 4390, 62827, 34562, 30957, 25632, 15824, 37382, 98423, 5609, 71, 4745, 1556, 6626, 145170, 59121, 30646, 45, 114942, 100, 34475, 65006, 31577, 33022, 35839, 186227, 154663, 135812, 10644, 44841,...
[ 0.1514892578125, 0.08154296875, 0.1524658203125, 0.1416015625, 0.2275390625, 0.2103271484375, 0.11865234375, 0.05914306640625, 0.106689453125, 0.2042236328125, 0.1783447265625, 0.050323486328125, 0.033477783203125, 0.0872802734375, 0.18310546875, 0.0968017578125, 0.1505126953125, 0...
embed
63401189_c0
63401189
prolog
0
Title: How do I code a fact with variable arguments? Problem title: How do I code a fact with variable arguments? Tags: prolog Problem: How do I code a fact with variable arguments? Let's say I know the following: Wallace likes cheese AND inventing. Grommit also likes cheese. Wendolene likes sheep AND inventing. I have...
How do I code a fact with variable arguments? How do I code a fact with variable arguments? prolog How How do I code a fact with variable arguments? Let's say I know the following: I have a rule: So, Wallace and Grommit can be friends, because they both like cheese. Wallace and Wendolene can both be friends because the...
[ 0.0220947265625, -0.0103759765625, -0.0162353515625, 0.013427734375, -0.006378173828125, 0.0137939453125, 0.0035552978515625, -0.00115203857421875, 0.002685546875, -0.0289306640625, -0.007537841796875, -0.031982421875, -0.01544189453125, 0.01531982421875, -0.00445556640625, 0.010009765...
[ 11249, 54, 87, 18151, 10, 15824, 678, 77336, 10750, 7, 502, 4867, 3714, 25632, 765, 79986, 23706, 8509, 136, 14854, 39, 4007, 831, 186, 23902, 6637, 15044, 1884, 96967, 1401, 557, 22110, 26868, 53418, 959, 2412, 4517, 22, 40899, 6044, 1...
[ 0.1171875, 0.06707763671875, 0.074951171875, 0.305908203125, 0.099853515625, 0.262451171875, 0.194091796875, 0.3212890625, 0.2802734375, 0.15185546875, 0.10260009765625, 0.254150390625, 0.0572509765625, 0.00408935546875, 0.018829345703125, 0.167724609375, 0.1153564453125, 0.1828613...
embed
67185323_c0
67185323
prolog
0
Title: Writting grammar in prolog and can't get it to work correctly Problem title: Writting grammar in prolog and can't get it to work correctly Tags: grammar, dcg, prolog Problem: Writting grammar in prolog and can't get it to work correctly Code signals: Writting, Call, _66584, _67166, _67158, Exit, _67348...
Writting grammar in prolog and can't get it to work correctly Writting grammar in prolog and can't get it to work correctly grammar dcg prolog Writting Call _66584 _67166 _67158 Exit _67348 _67340 _67530 _67574 _67566 _67756 _67748 _67938 _67930 Fail Redo _68076 _68068 _68214 _68206 _68352 _68344 _68490 _6848...
[ 0.0218505859375, 0.00811767578125, -0.00885009765625, 0.01123046875, -0.01556396484375, 0.01116943359375, -0.00933837890625, -0.00921630859375, -0.0009307861328125, -0.0198974609375, 0.003021240234375, -0.000881195068359375, -0.0179443359375, 0.0196533203125, 0.0284423828125, 0.0061645...
[ 601, 2783, 1916, 122092, 147, 23, 502, 4867, 831, 3768, 18, 2046, 442, 47, 4488, 26785, 104, 238, 177, 26265, 101, 170686, 13903, 18197, 156215, 137197, 5443, 195192, 9285, 158045, 170242, 163544, 1197, 190355, 91092, 192508, 184929, 132993, ...
[ 0.0221710205078125, 0.13232421875, 0.00830078125, 0.185791015625, 0.140625, 0.0411376953125, 0.166015625, 0.243896484375, 0.0772705078125, 0.051300048828125, 0.0833740234375, 0.032318115234375, 0.04998779296875, 0.00439453125, 0.12353515625, 0.1021728515625, 0.004669189453125, 0.01...
embed
4100570_c0
4100570
prolog
0
Title: Prolog: Reading input with spaces causes an error Problem title: Prolog: Reading input with spaces causes an error Tags: prolog Problem: Prolog: Reading input with spaces causes an error this is my program tran('father','otosan'). tran('father','chichiwe'). tran('mother','okasan'). tran('mother','hahawe'). tran(...
Prolog: Reading input with spaces causes an error Prolog: Reading input with spaces causes an error prolog Prolog Reading Prolog: Reading input with spaces causes an error this is my program I got an error in the words with spaces how can I solve this problem?
[ 0.0013275146484375, -0.00946044921875, -0.0081787109375, 0.0021514892578125, -0.0009613037109375, 0.015380859375, 0.005279541015625, -0.01104736328125, -0.011962890625, -0.048828125, 0.025390625, 0.0098876953125, -0.032470703125, -0.00848388671875, 0.01007080078125, 0.01336669921875, ...
[ 1250, 4867, 104951, 107730, 678, 32628, 7, 113660, 142, 18499, 12, 502, 903, 83, 759, 1528, 23, 34153, 86869, 2967 ]
[ 0.1707763671875, 0.2413330078125, 0.186767578125, 0.19921875, 0.1405029296875, 0.26025390625, 0.118408203125, 0.1322021484375, 0.062286376953125, 0.1932373046875, 0.007213592529296875, 0.133056640625, 0.05657958984375, 0.06219482421875, 0.052825927734375, 0.135009765625, 0.03125, 0...
embed
21066715_c0
21066715
prolog
0
Title: Prolog variable gets no value Problem title: Prolog variable gets no value Tags: prolog Problem: Prolog variable gets no value I've written the following code in prolog: contains(L1, []). contains(L1, [X | T2]) :- member(X, L1), contains(L1, T2). minus(L, [], L). minus(L1, L2, L3) :- contains(L1, L3), nomembers(...
Prolog variable gets no value Prolog variable gets no value prolog Prolog Prolog variable gets no value I've written the following code in prolog: contains(L1, L2) returns true if all of the members in L2 appear in L1 . ( contains([1,2],[1,1,1]) is true). minus(L1, L2, L3) returns true if L3=L1\L2 , meaning L3 consists...
[ 0.0137939453125, 0.0169677734375, -0.004364013671875, 0.00177764892578125, -0.01904296875, 0.01300048828125, 0.00408935546875, -0.002685546875, -0.01019287109375, 0.0123291015625, 0.0023345947265625, 0.0021820068359375, -0.01373291015625, 0.0013580322265625, 0.0152587890625, 0.00854492...
[ 1250, 4867, 77336, 62163, 110, 34292, 502, 59121, 18151, 70541, 7, 866, 418, 339, 10461, 30646, 29568, 756, 43032, 304, 108975, 133063, 26948, 21320, 363, 58055, 959, 26458, 82449, 76172, 35166, 1369, 12684, 5608, 3714, 15400 ]
[ 0.173095703125, 0.265869140625, 0.275390625, 0.09918212890625, 0.141357421875, 0.2379150390625, 0.1551513671875, 0.0256805419921875, 0.1446533203125, 0.2080078125, 0.00531005859375, 0.115478515625, 0.07867431640625, 0.1468505859375, 0.1602783203125, 0.10595703125, 0.125732421875, 0...
embed
53470483_c1
53470483
prolog
1
value for L that makes the right side true. Start with speaks(bob,L). What can L be? Here are our facts: speaks(allen, russian). speaks(bob, english). speaks(mary, russian). speaks(mary, english). In fact 1, the first slot isn’t bob, so that won’t work. In fact 2, the first slot is bob, so let’s try L = english in spe...
value for L that makes the right side true. Start with speaks(bob,L). What can L be? Here are our facts: speaks(allen, russian). speaks(bob, english). speaks(mary, russian). speaks(mary, english). In fact 1, the first slot isn’t bob, so that won’t work. In fact 2, the first slot is bob, so let’s try L = english in spe...
[ -0.017333984375, 0.0120849609375, 0.007537841796875, 0.0286865234375, -0.0186767578125, 0.003387451171875, -0.0162353515625, -0.007568359375, 0.018310546875, 0.000423431396484375, -0.00191497802734375, -0.006591796875, 0.0118408203125, 0.00189208984375, -0.004547119140625, -0.002426147...
[ 34292, 100, 339, 450, 30482, 70, 7108, 5609, 29568, 13794, 70424, 7, 837, 275, 4, 866, 4865, 831, 186, 2446, 15824, 11, 8405, 7793, 39209, 175457, 1727, 53, 360, 106, 5117, 24897, 56112, 18, 21895, 23742, 4488, 9790, 17390, 113292, 1330...
[ 0.2265625, 0.09130859375, 0.2120361328125, 0.0318603515625, 0.1031494140625, 0.0202484130859375, 0.1759033203125, 0.2047119140625, 0.19921875, 0.05120849609375, 0.239501953125, 0.088623046875, 0.10498046875, 0.1488037109375, 0.0084228515625, 0.2039794921875, 0.0213470458984375, 0.1...
embed
38587088_c0
38587088
prolog
0
Title: Reversible merge Problem title: Reversible merge Tags: list, prolog Problem: Reversible merge We can merge two sorted lists as follows merge_([A|T], [], [A|T]). merge_([], [A|T], [A|T]). merge_([A|T], [B|U], [A|V]) :- A @< B, merge_(T, [B|U], V). merge_([A|T], [B|U], [B|V]) :- A @>= B, merge_([A|T], U, V). which...
Reversible merge Reversible merge list prolog Reversible merge_ Reversible merge We can merge two sorted lists as follows which works fine in one direction. What doesn't work for this definition are queries like following merge_(A, [a, b, c], [a, b, c, d]). , although there's unique and quite obvious solution A = [d]. ...
[ -0.0166015625, 0.0277099609375, 0.0211181640625, 0.004150390625, -0.00933837890625, -0.0007476806640625, -0.015869140625, 0.01226806640625, 0.0218505859375, -0.00933837890625, 0.0162353515625, 0.029541015625, 0.00616455078125, 0.026611328125, 0.0301513671875, -0.01214599609375, -0.01...
[ 853, 814, 55356, 42564, 5303, 502, 4867, 454, 831, 6626, 17497, 71, 7, 28960, 43240, 5885, 1632, 48225, 22027, 18, 4488, 80934, 41, 10484, 25632, 284, 876, 501, 104, 36998, 162520, 29806, 62, 2203, 67, 98767, 645, 335, 27489, 686, 50339...
[ 0.0802001953125, 0.186279296875, 0.188232421875, 0.260009765625, 0.20068359375, 0.090576171875, 0.134033203125, 0.08642578125, 0.04150390625, 0.1251220703125, 0.163818359375, 0.07672119140625, 0.0174102783203125, 0.031768798828125, 0.09185791015625, 0.0716552734375, 0.0560302734375, ...
embed
74637024_c0
74637024
prolog
0
Title: Solving a logic task using Prolog Problem title: Solving a logic task using Prolog Tags: prolog, zebra-puzzle Problem: Solving a logic task using Prolog I started to learn Prolog and I can't solve a difficult task for me. On Halloween, three friends - Bob, Mark, Alex, chose the costumes of three ghosts: a ghost,...
Solving a logic task using Prolog Solving a logic task using Prolog prolog zebra-puzzle Prolog Solving Solving a logic task using Prolog I started to learn Prolog and I can't solve a difficult task for me. On Halloween, three friends - Bob, Mark, Alex, chose the costumes of three ghosts: a ghost, a zombie, a werewolf. ...
[ 0.01116943359375, -0.0029144287109375, -0.0184326171875, 0.03515625, 0.00341796875, 0.005279541015625, -0.0269775390625, 0.01275634765625, 0.014404296875, -0.024169921875, 0.01025390625, 0.000560760498046875, -0.003143310546875, 0.01055908203125, 0.005615234375, 0.0196533203125, 0.00...
[ 6678, 6496, 62775, 66211, 17368, 1250, 4867, 502, 116232, 1766, 13894, 133, 26859, 30698, 831, 86869, 10, 34844, 2161, 70210, 17262, 23902, 25027, 7880, 20984, 19667, 84659, 706, 40294, 134105, 3542, 25400, 420, 51529, 83, 70, 35835, 271, 5...
[ 0.1441650390625, 0.0196533203125, 0.21875, 0.182373046875, 0.047576904296875, 0.2042236328125, 0.27392578125, 0.1514892578125, 0.2310791015625, 0.1204833984375, 0.1474609375, 0.04144287109375, 0.002105712890625, 0.050079345703125, 0.036865234375, 0.158447265625, 0.018035888671875, ...
embed
39645151_c0
39645151
prolog
0
Title: List of Nth prime numbers Prolog Problem title: List of Nth prime numbers Prolog Tags: prolog, recursion Problem: List of Nth prime numbers Prolog I'm trying to learn prolog and now I'm trying to print a list of the Nth primenumber: primes(N, N). primes(N, F):- prime(F), write(F), nl, NewF is F + 1, primes(N, Ne...
List of Nth prime numbers Prolog List of Nth prime numbers Prolog prolog recursion List Nth Prolog NewF List of Nth prime numbers Prolog I'm trying to learn prolog and now I'm trying to print a list of the Nth primenumber: Prime/1 checks wheter the given number is a prime. The output for primes(10) will be 2, 3 where i...
[ -0.01153564453125, 0.0024261474609375, 0.0220947265625, -0.00506591796875, 0.02001953125, 0.0157470703125, 0.00384521484375, -0.01031494140625, 0.0042724609375, -0.0009307861328125, 0.00127410888671875, -0.032958984375, -0.00112152099609375, 0.01312255859375, -0.00506591796875, -0.0089...
[ 32036, 541, 927, 20809, 101935, 1250, 4867, 111, 502, 195625, 1830, 2356, 919, 31577, 30698, 28412, 5303, 2606, 1297, 56195, 11583, 12765, 38325, 34475, 14012, 83, 10, 140992, 7, 90980, 1221, 116, 138, 7440, 5608, 190, 361, 7103, 13956, 9...
[ 0.1236572265625, 0.2056884765625, 0.23583984375, 0.2181396484375, 0.1895751953125, 0.1607666015625, 0.2122802734375, 0.0009765625, 0.1368408203125, 0.1959228515625, 0.014739990234375, 0.135498046875, 0.167236328125, 0.04217529296875, 0.058135986328125, 0.1278076171875, 0.100830078125...
embed
34028670_c0
34028670
prolog
0
Title: Prolog list of &quot;lists&quot; with only one element Problem title: Prolog list of &quot;lists&quot; with only one element Tags: pattern-matching, list, prolog Problem: Prolog list of "lists" with only one element I have a recursive predicate call, and the output of that call is appended to a list with append/...
Prolog list of &quot;lists&quot; with only one element Prolog list of &quot;lists&quot; with only one element pattern-matching list prolog Prolog Prolog list of "lists" with only one element I have a recursive predicate call, and the output of that call is appended to a list with append/3 . So the output is going to be...
[ 0.004119873046875, 0.0147705078125, 0.002197265625, -0.0079345703125, -0.01318359375, 0.016357421875, 0.00836181640625, 0.0025177001953125, 0.0216064453125, -0.02783203125, 0.01275634765625, -0.018798828125, -0.01324462890625, 0.001922607421875, 0.00787353515625, -0.00469970703125, 0...
[ 1250, 4867, 5303, 6562, 7, 678, 4734, 1632, 12830, 103510, 98753, 214, 502, 195625, 5844, 1653, 2063, 67, 11782, 140992, 114689, 48141, 71, 18113, 111, 2967, 68018, 35839, 39556, 25568, 82449, 12765, 8108, 5117, 83, 2886, 28282, 14858, 3642...
[ 0.1480712890625, 0.22119140625, 0.2432861328125, 0.21875, 0.08343505859375, 0.0201873779296875, 0.1385498046875, 0.1446533203125, 0.20654296875, 0.20458984375, 0.1878662109375, 0.0496826171875, 0.11376953125, 0.1546630859375, 0.058746337890625, 0.111083984375, 0.1400146484375, 0.03...
embed
36113685_c0
36113685
prolog
0
Title: How to make query result appear as a list Problem title: How to make query result appear as a list Tags: prolog Problem: How to make query result appear as a list I'm trying to make a small prolog program which can delete a particular number from a list and I cannot seem to make it result in a list. The code goe...
How to make query result appear as a list How to make query result appear as a list prolog How delete_all Ans Answer How to make query result appear as a list I'm trying to make a small prolog program which can delete a particular number from a list and I cannot seem to make it result in a list. The code goes by When I...
[ -0.00054168701171875, 0.0106201171875, -0.00029754638671875, 0.001800537109375, -0.00860595703125, 0.016357421875, 0.004913330078125, 0.000021219253540039062, 0.007232666015625, -0.023681640625, 0.00396728515625, -0.01904296875, -0.00567626953125, 0.019287109375, -0.0016326904296875, 0...
[ 11249, 3249, 41, 1294, 16750, 108975, 237, 10, 5303, 502, 4867, 154109, 5584, 893, 47, 31577, 19336, 1528, 14012, 1295, 53418, 48903, 23, 18151, 390, 107730, 2046, 2060, 37842, 30646, 3444, 140992, 32599, 15549, 3173, 62822 ]
[ 0.045654296875, 0.1002197265625, 0.15673828125, 0.1815185546875, 0.2059326171875, 0.1910400390625, 0.13818359375, 0.040435791015625, 0.2149658203125, 0.1474609375, 0.19970703125, 0.2200927734375, 0.1519775390625, 0.046295166015625, 0.00433349609375, 0.001007080078125, 0.0098266601562...
embed
29272193_c0
29272193
prolog
0
Title: use prolog find the logs of a list Problem title: use prolog find the logs of a list Tags: logging, list, prolog Problem: use prolog find the logs of a list The question is: Write a predicate log_table(NumberList, ResultList) that binds ResultList to the list of pairs consisting of a number and its log, for each...
use prolog find the logs of a list use prolog find the logs of a list logging list prolog log_table Result use prolog find the logs of a list The question is: Write a predicate log_table(NumberList, ResultList) that binds ResultList to the list of pairs consisting of a number and its log, for each number in NumberList....
[ 0.006317138671875, 0.009765625, 0.010986328125, 0.0022735595703125, 0.0014190673828125, 0.016845703125, 0.0045166015625, 0.01129150390625, 0.00762939453125, -0.01806640625, 0.0130615234375, -0.0203857421875, -0.0257568359375, 0.01483154296875, 0.004638671875, -0.006072998046875, 0.01...
[ 4527, 502, 4867, 7413, 70, 12684, 7, 111, 5303, 459, 36659, 22819, 126684, 9655, 601, 18781, 1653, 2063, 67, 18444, 26278, 154663, 68557, 80836, 58055, 14012, 6863, 100, 12638, 103332, 18151, 16750, 831, 959, 16916, 756, 43032, 3370, 9842, ...
[ 0.0699462890625, 0.1673583984375, 0.2252197265625, 0.1229248046875, 0.048187255859375, 0.199462890625, 0.107421875, 0.08404541015625, 0.1905517578125, 0.1019287109375, 0.041351318359375, 0.1876220703125, 0.1864013671875, 0.004486083984375, 0.0074462890625, 0.058868408203125, 0.103637...
embed
14615645_c0
14615645
prolog
0
Title: Table modes and backtracking in B-Prolog Problem title: Table modes and backtracking in B-Prolog Tags: b-prolog, prolog Problem: Table modes and backtracking in B-Prolog Consider the program: :- table cost(+, min). cost(1, 0). cost(1, 1). cost(2, 1). I expected that result to cost(I, C). would be I = 1, C = 0; I...
Table modes and backtracking in B-Prolog Table modes and backtracking in B-Prolog b-prolog prolog Table B-Prolog Table modes and backtracking in B-Prolog Consider the program: I expected that result to cost(I, C). would be I = 1, C = 0; I = 2, C = 1 - all possible input arguments with corresponding minimum results. But...
[ 0.004180908203125, 0.016357421875, 0.005645751953125, 0.01348876953125, -0.0101318359375, 0.0169677734375, 0.0184326171875, 0.005706787109375, 0.0027618408203125, -0.0162353515625, 0.006317138671875, -0.0036773681640625, -0.006011962890625, 0.0201416015625, 0.01116943359375, 0.00515747...
[ 112997, 13736, 4420, 125728, 335, 10752, 4867, 876, 3454, 502, 214, 1528, 84751, 16750, 47, 11034, 568, 313, 87, 2203, 106, 757, 116, 756, 7722, 107730, 10750, 42518, 15440, 50339, 4966, 2046, 4734, 1632, 143726, 6275, 97370, 2449, 2367, ...
[ 0.224365234375, 0.1390380859375, 0.10223388671875, 0.172607421875, 0.13427734375, 0.1163330078125, 0.1663818359375, 0.06964111328125, 0.08758544921875, 0.0865478515625, 0.0193634033203125, 0.128662109375, 0.129638671875, 0.1082763671875, 0.013671875, 0.19970703125, 0.0160064697265625...
embed
65371896_c0
65371896
prolog
0
Title: included_list(List1, List2) Problem title: included_list(List1, List2) Tags: prolog Problem: included_list(List1, List2) included_list is true when list1 is part of list2 . For example, included_list([1,2],[1,2,3,4]) is true. included_list([2,1],[1,2,3,4]) is false. included_list([],[1,2,3,4]) is false. included...
included_list(List1, List2) included_list(List1, List2) prolog included_list List1 List2 Head List Head1 Tail1 Head2 Tail2 included_list(List1, List2) included_list is true when list1 is part of list2 . For example, What predicate should I write in order to get this answers? I have tried this: But it returns true when ...
[ 0.0096435546875, 0.00121307373046875, 0.0037078857421875, 0.021240234375, -0.01153564453125, 0.015625, -0.027587890625, 0.002838134765625, 0.01336669921875, -0.0234375, 0.032958984375, 0.01397705078125, -0.0179443359375, 0.031494140625, 0.007171630859375, 0.0096435546875, 0.015869140...
[ 99201, 454, 6562, 154663, 418, 32036, 10461, 502, 4867, 304, 44816, 1218, 379, 83, 29568, 3229, 5303, 2831, 111, 1653, 2063, 67, 5608, 33022, 2046, 903, 35166, 37842, 30646, 26458, 132, 4, 76172, 133063, 82449, 7722, 54, 15490, 88303, 357...
[ 0.25341796875, 0.08294677734375, 0.25537109375, 0.18408203125, 0.0755615234375, 0.1827392578125, 0.1456298828125, 0.1475830078125, 0.1700439453125, 0.134521484375, 0.1312255859375, 0.04693603515625, 0.0689697265625, 0.0294647216796875, 0.2022705078125, 0.035919189453125, 0.1833496093...
embed
47114202_c0
47114202
prolog
0
Title: Prolog - sort sublists of a list Problem title: Prolog - sort sublists of a list Tags: prolog Problem: Prolog - sort sublists of a list I want to sort the sublists of a list which contains integers eliminating the duplicates. Example: [1, 2, [4, 1, 4], 3, 6, [7, 10, 1, 3, 9], 5, [1, 1, 1], 7] =>>> [1, 2, [1, 4],...
Prolog - sort sublists of a list Prolog - sort sublists of a list prolog Prolog Prolog - sort sublists of a list I want to sort the sublists of a list which contains integers eliminating the duplicates. Example: I know that i have to work with functor s(but i didn't really get it). Here is my code : (the (insert+sortin...
[ -0.0005340576171875, 0.006561279296875, 0.0272216796875, -0.00665283203125, -0.0283203125, 0.01806640625, -0.0218505859375, -0.00616455078125, -0.0048828125, -0.010498046875, -0.005126953125, 0.0106201171875, -0.00494384765625, -0.006591796875, -0.000591278076171875, -0.002838134765625...
[ 1250, 4867, 12096, 1614, 6562, 7, 111, 5303, 502, 3444, 47, 70, 70541, 892, 26255, 27169, 1916, 171763, 1636, 3714, 4488, 7477, 18770, 91, 18151, 73, 33657, 1328, 4970, 32354, 43240, 8781, 3688, 4842, 98320, 11907, 6032 ]
[ 0.1640625, 0.22900390625, 0.2388916015625, 0.224853515625, 0.25537109375, 0.0777587890625, 0.08154296875, 0.1630859375, 0.118896484375, 0.0740966796875, 0.012176513671875, 0.01422119140625, 0.05108642578125, 0.0985107421875, 0.088623046875, 0.10284423828125, 0.08441162109375, 0.164...
embed
47425292_c0
47425292
prolog
0
Title: Prolog: find routes from one city to a collection cities Problem title: Prolog: find routes from one city to a collection cities Tags: prolog Problem: Prolog: find routes from one city to a collection cities If I have a list of facts about flights, how do I write a predict to return all routes from one city to a...
Prolog: find routes from one city to a collection cities Prolog: find routes from one city to a collection cities prolog one Prolog Prolog: find routes from one city to a collection cities If I have a list of facts about flights, how do I write a predict to return all routes from one city to a list cities one by one? f...
[ 0.00689697265625, 0.003021240234375, 0.00994873046875, 0.0250244140625, -0.0205078125, -0.0091552734375, -0.0062255859375, 0.00970458984375, 0.01287841796875, -0.041748046875, -0.00994873046875, -0.010498046875, 0.00020599365234375, -0.005584716796875, -0.0062255859375, 0.0017395019531...
[ 1250, 4867, 12, 7413, 36439, 7, 1295, 1632, 26349, 47, 42486, 162708, 502, 765, 5303, 15824, 1672, 113014, 3642, 54, 87, 33022, 10, 92054, 30646, 756, 390, 12853, 840, 587, 444, 1515, 6229 ]
[ 0.14013671875, 0.238525390625, 0.0167694091796875, 0.115478515625, 0.193115234375, 0.041778564453125, 0.0811767578125, 0.10614013671875, 0.13720703125, 0.1318359375, 0.177978515625, 0.169921875, 0.10455322265625, 0.025390625, 0.166748046875, 0.15625, 0.0159454345703125, 0.184814453...
embed
70105487_c1
70105487
prolog
1
55, 0), time(18, 05, 0)), lesson(fri, time(14, 55, 0), time(18, 05, 0))])). subject('TCO', course('4K3', [lesson(tue, time(19, 55, 0), time(23, 05, 0)), lesson(fri, time(19, 55, 0), time(21, 25, 0))])). subject('PYE', course('2K4', [lesson(thu, time(08, 00, 0), time(10, 25, 0)), lesson(fri, time(08, 00, 0), time(10, 25...
55, 0), time(18, 05, 0)), lesson(fri, time(14, 55, 0), time(18, 05, 0))])). subject('TCO', course('4K3', [lesson(tue, time(19, 55, 0), time(23, 05, 0)), lesson(fri, time(19, 55, 0), time(21, 25, 0))])). subject('PYE', course('2K4', [lesson(thu, time(08, 00, 0), time(10, 25, 0)), lesson(fri, time(08, 00, 0), time(10, 25...
[ 0.0137939453125, 0.0294189453125, 0.00069427490234375, 0.01806640625, -0.0169677734375, -0.026123046875, -0.01495361328125, -0.01043701171875, -0.00144195556640625, -0.035400390625, 0.000354766845703125, 0.00131988525390625, -0.00726318359375, 0.007171630859375, -0.0009765625, 0.013671...
[ 4859, 4, 757, 247, 1733, 117768, 4777, 199, 1681, 7151, 2592, 194, 28368, 618, 9688, 25, 15411, 617, 605, 363, 133, 4503, 458, 120114, 3742, 3117, 714, 132, 683, 46445, 304, 8805, 8318, 7227, 150336, 1052, 2678, 3949, 645, 96091, 82825,...
[ 0.235107421875, 0.0084228515625, 0.1497802734375, 0.0143585205078125, 0.1668701171875, 0.097412109375, 0.149169921875, 0.10498046875, 0.1485595703125, 0.1285400390625, 0.0975341796875, 0.009490966796875, 0.1856689453125, 0.06915283203125, 0.2037353515625, 0.0162200927734375, 0.149414...
embed
72318445_c0
72318445
prolog
0
Title: Prevent cycle in Depth first search using prolog Problem title: Prevent cycle in Depth first search using prolog Tags: prolog, depth-first-search, artificial-intelligence Problem: Prevent cycle in Depth first search using prolog Is there any way to prevent cycle in this code. move(a,b). move(b,a). move(a,c). mov...
Prevent cycle in Depth first search using prolog Prevent cycle in Depth first search using prolog prolog depth-first-search artificial-intelligence prolog Prevent Depth Start Way Goal Prevent cycle in Depth first search using prolog Is there any way to prevent cycle in this code. so when move(a,b) move to (b,c) dont go...
[ 0.022705078125, 0.01025390625, -0.013916015625, 0.030517578125, 0.01007080078125, -0.0067138671875, 0.00002181529998779297, 0.010009765625, 0.0019378662109375, -0.0419921875, -0.0006103515625, 0.005218505859375, -0.007049560546875, 0.0250244140625, 0.0255126953125, 0.021484375, -0.01...
[ 1914, 16274, 105823, 23, 262, 254, 927, 5117, 33938, 17368, 502, 4867, 168867, 13448, 271, 86250, 66733, 130687, 13794, 42261, 2016, 2685, 2499, 3917, 47, 56282, 903, 18151, 221, 3229, 25813, 11, 275, 238, 13319, 4420, 11675, 738, 102588, ...
[ 0.13134765625, 0.18701171875, 0.280029296875, 0.0343017578125, 0.08709716796875, 0.1322021484375, 0.08636474609375, 0.1187744140625, 0.1927490234375, 0.04254150390625, 0.1422119140625, 0.2257080078125, 0.1990966796875, 0.09234619140625, 0.0562744140625, 0.16015625, 0.06610107421875, ...
embed
28679420_c0
28679420
prolog
0
Title: Route goes infinite loop prolog Problem title: Route goes infinite loop prolog Tags: prolog Problem: Route goes infinite loop prolog Just begin for prolog and have a practice for route question train(a,b). train(b,a). train(b,c). train(c,b). route(X,Y,[]) :- train(X,Y) ; train(Y,X). route(X,Y,[H|T]) :- route(X,H...
Route goes infinite loop prolog Route goes infinite loop prolog prolog Route Route goes infinite loop prolog Just begin for prolog and have a practice for route question by doing this route/3 The first rule give two direct connected places an empty set states that there is a route. Second rule states the case where the...
[ 0.018310546875, -0.01226806640625, 0.006561279296875, 0.01202392578125, -0.00982666015625, -0.0115966796875, 0.0064697265625, 0.00008153915405273438, 0.0191650390625, -0.07470703125, 0.0113525390625, 0.007232666015625, -0.0125732421875, 0.005340576171875, 0.00994873046875, 0.0126953125...
[ 106015, 60899, 54241, 13, 40956, 502, 4867, 9842, 41361, 36439, 9655, 20594, 18113, 79986, 8337, 6626, 8951, 162711, 44677, 201505, 5423, 117249, 2685, 83, 10, 77648, 81814, 58359, 1295, 47, 15700, 41, 4358, 56, 1653, 2063, 67, 36997, 71, ...
[ 0.26123046875, 0.1204833984375, 0.1339111328125, 0.041717529296875, 0.218017578125, 0.1326904296875, 0.1927490234375, 0.0205535888671875, 0.1121826171875, 0.25341796875, 0.0897216796875, 0.0035400390625, 0.1236572265625, 0.137451171875, 0.001708984375, 0.05096435546875, 0.11865234375...
embed
13043697_c0
13043697
prolog
0
Title: Configure script failing Problem title: Configure script failing Tags: configuration-files, configuration, linux, prolog, yap Problem: Configure script failing I just installed ubuntu 12.04 in a VMBox and now trying to install "YAP Prolog". Therefore I download the code using "git clone ..." and obtain the code,...
Configure script failing Configure script failing configuration-files configuration linux prolog yap Configure Configure script failing I just installed ubuntu 12.04 in a VMBox and now trying to install "YAP Prolog". Therefore I download the code using "git clone ..." and obtain the code, which i have to configure and ...
[ 0.0126953125, 0.016357421875, -0.0166015625, -0.005828857421875, 0.00098419189453125, -0.0255126953125, 0.01251220703125, -0.026123046875, -0.0004177093505859375, 0.037841796875, 0.00946044921875, -0.0186767578125, -0.0086669921875, -0.012939453125, 0.00311279296875, -0.01171875, 0.0...
[ 1657, 59994, 13, 26499, 35782, 214, 180346, 29822, 11508, 6077, 502, 4867, 15850, 20600, 198996, 5035, 7709, 23, 43084, 72295, 31577, 14671, 683, 1250, 7026, 18151, 15769, 20450, 86, 113054, 222495, 45367, 33976, 43240, 5885, 11787, 1542, 209...
[ 0.099609375, 0.2281494140625, 0.03570556640625, 0.260498046875, 0.2232666015625, 0.097412109375, 0.2261962890625, 0.1048583984375, 0.1011962890625, 0.11181640625, 0.1207275390625, 0.2039794921875, 0.2244873046875, 0.08367919921875, 0.15576171875, 0.132080078125, 0.1650390625, 0.041...
embed
56155648_c0
56155648
prolog
0
Title: Accessing predicates from included prolog file Problem title: Accessing predicates from included prolog file Tags: prolog Problem: Accessing predicates from included prolog file New to writing prolog.I wanted to know how can i access the predicates from an already included prolog file.I want to get the 1rst Stri...
Accessing predicates from included prolog file Accessing predicates from included prolog file prolog included Accessing working.pl Firefighter George Mike Angel Doctor Mary Mikel Fisherman John Pat Accessing predicates from included prolog file New to writing prolog.I wanted to know how can i access the predicates from...
[ 0.0213623046875, -0.0213623046875, -0.00537109375, 0.0206298828125, 0.001739501953125, 0.0185546875, 0.005126953125, 0.002410888671875, -0.003936767578125, -0.0791015625, 0.01214599609375, 0.01611328125, -0.043212890625, -0.01904296875, -0.00616455078125, 0.000904083251953125, 0.0020...
[ 40266, 214, 1653, 2063, 1636, 1295, 99201, 502, 4867, 11435, 20697, 2424, 31143, 202523, 14787, 41576, 26902, 52625, 23213, 126933, 169247, 669, 4939, 9876, 32562, 36663, 3714, 3642, 831, 17203, 21771, 3444, 2046, 106, 30541, 23351, 11907, 35...
[ 0.201171875, 0.079345703125, 0.1998291015625, 0.249755859375, 0.150634765625, 0.0968017578125, 0.21875, 0.179931640625, 0.2314453125, 0.201171875, 0.1993408203125, 0.1761474609375, 0.099609375, 0.228515625, 0.1519775390625, 0.1328125, 0.18798828125, 0.150146484375, 0.097534179687...
embed
17497330_c1
17497330
prolog
1
), select(LH,R,Y), perm_recurse(X, Y). Though its components appear to work fine as mentioned, mysort causes a stack overflow on some inputs, such as mysort([5,3,2],X) . In an already-sorted list, such as mysort([2,3,5],X) , or even a partial one like mysort([3,2,5],X) , the trace can be long, but it does get the answe...
), select(LH,R,Y), perm_recurse(X, Y). Though its components appear to work fine as mentioned, mysort causes a stack overflow on some inputs, such as mysort([5,3,2],X) . In an already-sorted list, such as mysort([2,3,5],X) , or even a partial one like mysort([3,2,5],X) , the trace can be long, but it does get the answe...
[ -0.0010223388671875, 0.017822265625, 0.024169921875, -0.0004024505615234375, -0.01513671875, 0.0019683837890625, -0.0260009765625, -0.014404296875, 0.0126953125, -0.006256103515625, 0.0166015625, 0.017578125, 0.0181884765625, 0.0159912109375, -0.0133056640625, -0.00830078125, -0.0064...
[ 36849, 841, 1052, 1723, 117, 39, 107, 48650, 13, 1542, 990, 82761, 108975, 4488, 5885, 759, 62351, 113660, 177261, 645, 118664, 3060, 107730, 758, 363, 90173, 21771, 5303, 92714, 2878, 71928, 4, 144851, 831, 186, 4989, 14602, 2046, 35166, ...
[ 0.18798828125, 0.100830078125, 0.0249481201171875, 0.084716796875, 0.176513671875, 0.150390625, 0.054595947265625, 0.1737060546875, 0.127197265625, 0.046905517578125, 0.074951171875, 0.116943359375, 0.06134033203125, 0.0889892578125, 0.08404541015625, 0.18359375, 0.319580078125, 0....
embed
18306324_c0
18306324
prolog
0
Title: Prolog - Nth Permutation of 3 elements Problem title: Prolog - Nth Permutation of 3 elements Tags: prolog, permutation Problem: Prolog - Nth Permutation of 3 elements I would like to get the nth permutation of 3 elements. Eg. List = [1,2,3] n = 5 Output [1,2,3,1,2] [1,2,3,2,1] ... I don't want any continuous sam...
Prolog - Nth Permutation of 3 elements Prolog - Nth Permutation of 3 elements prolog permutation Prolog Nth Permutation varia_repp RVaria varia_rep N-1 List Perm Rest Prolog - Nth Permutation of 3 elements I would like to get the nth permutation of 3 elements. Eg. List = [1,2,3] n = 5 Output [1,2,3,1,2] [1,2,3,2,1] ......
[ -0.006622314453125, 0.0137939453125, 0.0032501220703125, -0.004119873046875, -0.0087890625, -0.0010986328125, -0.023193359375, 0.005340576171875, 0.012939453125, -0.02392578125, 0.00787353515625, -0.0106201171875, 0.011474609375, 0.0220947265625, -0.0185546875, 0.0025634765625, 0.003...
[ 1250, 4867, 541, 927, 908, 561, 22062, 138, 80854, 502, 117, 16757, 107, 6366, 61293, 6232, 33581, 5759, 32036, 39, 49756, 111, 87, 2806, 1884, 2046, 70, 653, 22221, 155761, 190, 13538, 133063, 18, 3444, 62005, 5701, 12830, 363, 9790, 1...
[ 0.1534423828125, 0.2252197265625, 0.1759033203125, 0.23388671875, 0.139404296875, 0.2017822265625, 0.1346435546875, 0.21875, 0.2369384765625, 0.0997314453125, 0.1285400390625, 0.199462890625, 0.04278564453125, 0.113037109375, 0.0450439453125, 0.175048828125, 0.1578369140625, 0.1182...
embed
34614482_c0
34614482
prolog
0
Title: Pascal&#x27;s Triangle with Binomial coefficient Problem title: Pascal&#x27;s Triangle with Binomial coefficient Tags: prolog, pascals-triangle Problem: Pascal's Triangle with Binomial coefficient I must write a predicate to compute a row of Pascal's triangle. I try to write this with Binomial coefficient. In a ...
Pascal&#x27;s Triangle with Binomial coefficient Pascal&#x27;s Triangle with Binomial coefficient prolog pascals-triangle the Pascal Triangle Binomial N-1 K-1 Get Pascal's Triangle with Binomial coefficient I must write a predicate to compute a row of Pascal's triangle. I try to write this with Binomial coefficient. In...
[ -0.00665283203125, 0.0113525390625, 0.0093994140625, 0.004608154296875, -0.00506591796875, 0.00347900390625, 0.00921630859375, 0.0157470703125, 0.01434326171875, -0.003082275390625, -0.00421142578125, -0.004058837890625, -0.01806640625, -0.0028076171875, -0.0201416015625, 0.02490234375...
[ 167599, 3768, 74, 4699, 109217, 678, 1843, 1687, 15403, 552, 13, 24500, 45964, 7, 502, 4867, 452, 6827, 3996, 70, 541, 5759, 341, 20779, 25, 87, 8110, 33022, 1653, 2063, 67, 9969, 6743, 15555, 111, 1927, 9790, 903, 5117, 1733, 145755, ...
[ 0.23828125, 0.1148681640625, 0.015716552734375, 0.224365234375, 0.229736328125, 0.115478515625, 0.1468505859375, 0.170654296875, 0.081787109375, 0.104736328125, 0.0609130859375, 0.1473388671875, 0.0924072265625, 0.03668212890625, 0.1324462890625, 0.1724853515625, 0.0947265625, 0.16...
embed
40072311_c0
40072311
prolog
0
Title: Directed Graph In Prolog Problem title: Directed Graph In Prolog Tags: graph-theory, path, prolog, transitive-closure Problem: Directed Graph In Prolog can someone please elaborate upon the functionality/conditions of travel(A,B,Visited,Path) and travel(A,B,P,[B|P]) .. this code finds the path between path A and...
Directed Graph In Prolog Directed Graph In Prolog graph-theory path prolog transitive-closure Directed Graph Prolog Path Visited Directed Graph In Prolog can someone please elaborate upon the functionality/conditions of travel(A,B,Visited,Path) and travel(A,B,P,[B|P]) .. this code finds the path between path A and B in...
[ 0.02783203125, 0.0263671875, 0.02001953125, 0.01904296875, -0.0016326904296875, 0.017333984375, -0.037109375, -0.01165771484375, 0.000507354736328125, -0.039306640625, 0.00109100341796875, 0.01324462890625, -0.0303955078125, 0.0211181640625, -0.001220703125, 0.00653076171875, 0.01458...
[ 42666, 297, 6524, 11727, 360, 1250, 4867, 41382, 2347, 30675, 60875, 502, 62621, 5844, 170224, 108421, 98684, 22008, 22936, 121151, 123309, 2481, 126940, 111, 26983, 284, 571, 65331, 683, 10519, 58745, 18151, 7413, 17721, 62, 136, 335, 23 ]
[ 0.182373046875, 0.06787109375, 0.179931640625, 0.1539306640625, 0.10113525390625, 0.1605224609375, 0.2470703125, 0.231689453125, 0.044708251953125, 0.010284423828125, 0.2213134765625, 0.107177734375, 0.1217041015625, 0.04010009765625, 0.1561279296875, 0.18896484375, 0.1744384765625, ...
embed
37499942_c0
37499942
prolog
0
Title: Is there any way to combine artificial intelligence/expert system with vb.net programs? Problem title: Is there any way to combine artificial intelligence/expert system with vb.net programs? Tags: artificial-intelligence, vb.net, swi-prolog, expert-system, prolog Problem: Is there any way to combine artificial i...
Is there any way to combine artificial intelligence/expert system with vb.net programs? Is there any way to combine artificial intelligence/expert system with vb.net programs? artificial-intelligence vb.net swi-prolog expert-system prolog vb.net Is there any way to combine artificial intelligence/expert system with vb....
[ 0.0181884765625, 0.0186767578125, 0.00168609619140625, 0.020263671875, -0.00750732421875, 0.031982421875, -0.000820159912109375, 0.0174560546875, 0.00113677978515625, -0.0546875, 0.0198974609375, 0.01318359375, 0.010009765625, -0.00872802734375, 0.00506591796875, 0.00014400482177734375...
[ 2071, 2685, 2499, 3917, 47, 70163, 66733, 130687, 64, 81317, 5426, 678, 86482, 5, 1179, 103391, 91, 2452, 3454, 4867, 26808, 16751, 502, 78684, 30698, 18, 159, 38969, 9, 10752, 32329, 11044, 51517, 4527, 21635, 56037, 32599, 144573, 1532, ...
[ 0.0419921875, 0.050384521484375, 0.1077880859375, 0.1492919921875, 0.04962158203125, 0.25634765625, 0.1751708984375, 0.210205078125, 0.0546875, 0.2247314453125, 0.2120361328125, 0.167236328125, 0.251708984375, 0.113525390625, 0.2354736328125, 0.19775390625, 0.042266845703125, 0.208...
embed
5617126_c1
5617126
prolog
1
(Head), changing fd_domain(Puzzle, 1, 4), to Puzzle ins 1..4, Here is the invocation from swipl ?- sudoku([_, _, 2, 3, _, _, _, _, _, _, _, _, 3, 4, _, _], Solution). Solution = [4, 1, 2, 3, 2, 3, 4, 1, 1|...] ; false. The solution is correct right up until it cuts off, at which point prolog seems to determine that the...
(Head), changing fd_domain(Puzzle, 1, 4), to Puzzle ins 1..4, Here is the invocation from swipl ?- sudoku([_, _, 2, 3, _, _, _, _, _, _, _, _, 3, 4, _, _], Solution). Solution = [4, 1, 2, 3, 2, 3, 4, 1, 1|...] ; false. The solution is correct right up until it cuts off, at which point prolog seems to determine that the...
[ 0.01123046875, 0.00017833709716796875, 0.018798828125, 0.010986328125, -0.01080322265625, 0.005218505859375, -0.0166015625, -0.01446533203125, -0.000835418701171875, -0.0162353515625, -0.0211181640625, -0.0130615234375, 0.0072021484375, 0.00872802734375, -0.01373291015625, -0.020385742...
[ 13025, 712, 151134, 1238, 71, 56206, 73, 27559, 13894, 133, 106, 13956, 47, 179277, 23, 615, 617, 11853, 83, 202010, 1295, 91, 2452, 2424, 705, 8932, 38067, 116, 138, 201, 187895, 2203, 4, 98320, 29806, 26785, 24189, 314, 5773, 502, 486...
[ 0.1553955078125, 0.1805419921875, 0.16845703125, 0.043670654296875, 0.099365234375, 0.16552734375, 0.07318115234375, 0.10986328125, 0.14794921875, 0.12744140625, 0.0765380859375, 0.1729736328125, 0.042236328125, 0.2880859375, 0.10076904296875, 0.06298828125, 0.169677734375, 0.04724...
embed
58025642_c0
58025642
prolog
0
Title: getting Syntax error: while trying to execute a prolog program from a shell script Problem title: getting Syntax error: while trying to execute a prolog program from a shell script Tags: prolog Problem: getting Syntax error: while trying to execute a prolog program from a shell script I am getting a Syntax error...
getting Syntax error: while trying to execute a prolog program from a shell script getting Syntax error: while trying to execute a prolog program from a shell script prolog a Syntax test1 rules.pl tp.sh getting Syntax error: while trying to execute a prolog program from a shell script I am getting a Syntax error: "(" u...
[ 0.01116943359375, 0.0224609375, -0.01416015625, 0.022216796875, -0.00107574462890625, -0.01007080078125, -0.00016117095947265625, 0.0084228515625, -0.013671875, -0.031494140625, 0.0155029296875, 0.025390625, -0.03955078125, -0.0126953125, 0.00811767578125, -0.00897216796875, 0.012939...
[ 20949, 19010, 86531, 18499, 12960, 31577, 71924, 502, 4867, 1528, 1295, 128019, 26499, 3034, 418, 91736, 2424, 92790, 1495, 132, 241957, 26008, 7522, 133063, 127877, 3229, 11675, 105237, 15850, 4699, 41, 10484, 28032, 11435, 91, 2452, 3454, 2...
[ 0.047515869140625, 0.14501953125, 0.234375, 0.1826171875, 0.07275390625, 0.12060546875, 0.113525390625, 0.1622314453125, 0.21337890625, 0.1204833984375, 0.0712890625, 0.15673828125, 0.1824951171875, 0.193115234375, 0.083984375, 0.18505859375, 0.115478515625, 0.1224365234375, 0.10...
embed
41835945_c0
41835945
prolog
0
Title: ERROR: Out of global stack in mastermind game Problem title: ERROR: Out of global stack in mastermind game Tags: prolog Problem: ERROR: Out of global stack in mastermind game I'm trying to implement a mastermind game, the rules can be found on https://en.wikipedia.org/wiki/Mastermind_(board_game) . The program g...
ERROR: Out of global stack in mastermind game ERROR: Out of global stack in mastermind game prolog ERROR Out ERROR: Out of global stack in mastermind game I'm trying to implement a mastermind game, the rules can be found on https://en.wikipedia.org/wiki/Mastermind_(board_game) . The program generates a sequence of four...
[ 0.005096435546875, -0.002105712890625, -0.0147705078125, 0.0026702880859375, -0.0027923583984375, 0.01043701171875, -0.01434326171875, 0.027099609375, -0.01019287109375, -0.064453125, -0.0096435546875, 0.0091552734375, 0.0244140625, -0.007049560546875, 0.00537109375, 0.0184326171875, ...
[ 151206, 24638, 13538, 111, 7964, 177261, 23, 31347, 36904, 6712, 502, 4867, 31577, 29479, 91736, 14037, 7168, 13691, 116527, 24351, 35311, 1528, 139392, 944, 22759, 117781, 104988, 58585, 1556, 209, 15504, 47, 57767, 18151, 52295, 86869, 1810, ...
[ 0.169189453125, 0.1640625, 0.2415771484375, 0.2265625, 0.2481689453125, 0.287353515625, 0.077392578125, 0.1632080078125, 0.29345703125, 0.1287841796875, 0.1285400390625, 0.2239990234375, 0.011505126953125, 0.0960693359375, 0.129638671875, 0.03570556640625, 0.052215576171875, 0.0179...
embed
36148808_c1
36148808
prolog
1
:- on_box(S), location(box, L, S), location(bananas, L, S). poss(push(_), S) :- poss(climb_on, S). poss(climb_on, S) :- \+ on_box(S), location(box, L, S), location(monkey, L, S). But I found that the program never stops... After printing the stack info, I found that goal_state generates lists of infinite length. I tri...
:- on_box(S), location(box, L, S), location(bananas, L, S). poss(push(_), S) :- poss(climb_on, S). poss(climb_on, S) :- \+ on_box(S), location(box, L, S), location(monkey, L, S). But I found that the program never stops... After printing the stack info, I found that goal_state generates lists of infinite length. I tri...
[ -0.0174560546875, 0.03466796875, 0.00726318359375, 0.0198974609375, -0.00909423828125, 0.0027923583984375, -0.007537841796875, -0.01409912109375, 0.005462646484375, -0.039306640625, 0.0103759765625, 0.0036163330078125, -0.00897216796875, -0.002197265625, -0.002838134765625, 0.010070800...
[ 15772, 98, 11728, 294, 31913, 339, 159, 105281, 162, 3864, 7, 7332, 127, 3141, 275, 191, 1328, 3796, 19770, 4966, 14037, 70, 1528, 8306, 7279, 2448, 177261, 3004, 69236, 454, 61340, 139392, 5303, 54241, 140909, 37842, 158, 2816, 73, 1556,...
[ 0.05792236328125, 0.203125, 0.20849609375, 0.09814453125, 0.191162109375, 0.097412109375, 0.0980224609375, 0.18896484375, 0.185302734375, 0.109375, 0.04693603515625, 0.06903076171875, 0.05584716796875, 0.1168212890625, 0.05950927734375, 0.1507568359375, 0.106201171875, 0.0377502441...
embed
37135750_c0
37135750
prolog
0
Title: Size Procedure in Prolog Language Problem title: Size Procedure in Prolog Language Tags: list, recursion, prolog Problem: Size Procedure in Prolog Language I am new to Prolog and am not that great when it comes to recursive algorithms as is, thus I am confused with the following two clauses: size([], 0). size([H...
Size Procedure in Prolog Language Size Procedure in Prolog Language list recursion prolog Size Procedure Prolog Language Size Procedure in Prolog Language I am new to Prolog and am not that great when it comes to recursive algorithms as is, thus I am confused with the following two clauses: I am having trouble tracing ...
[ 0.01324462890625, 0.005584716796875, 0.0257568359375, 0.00750732421875, -0.01214599609375, -0.00946044921875, -0.01129150390625, 0.011474609375, -0.00034332275390625, -0.01361083984375, 0.01177978515625, -0.01708984375, -0.0194091796875, -0.023681640625, 0.023681640625, 0.0001201629638...
[ 80378, 170470, 1250, 4867, 83658, 23, 5303, 195625, 502, 5844, 234873, 55681, 6626, 70731, 63134, 1152, 21896, 2967, 3293, 1221, 51, 40383, 17932, 3173, 541, 83, 418, 21748, 77336, 8306, 47314, 142424, 5646, 4358, 144851, 77947 ]
[ 0.21240234375, 0.2041015625, 0.128662109375, 0.212158203125, 0.13232421875, 0.015838623046875, 0.1390380859375, 0.163330078125, 0.09918212890625, 0.005584716796875, 0.147216796875, 0.102294921875, 0.0478515625, 0.1412353515625, 0.04058837890625, 0.046722412109375, 0.040130615234375, ...
embed
30354062_c0
30354062
prolog
0
Title: Prolog - Calculate the total time of a trip Problem title: Prolog - Calculate the total time of a trip Tags: prolog Problem: Prolog - Calculate the total time of a trip I'm trying to calculate the total time I spend on a travel given the hour of departure and arrival of all places. I'm trying to use this functio...
Prolog - Calculate the total time of a trip Prolog - Calculate the total time of a trip prolog Prolog Calculate time_out Hf1 Hi2 Hf2 diff_t To_I To_R HCA Prolog - Calculate the total time of a trip I'm trying to calculate the total time I spend on a travel given the hour of departure and arrival of all places. I'm tryi...
[ 0.0291748046875, 0.004791259765625, 0.0032958984375, -0.0023651123046875, -0.023193359375, -0.0242919921875, -0.009521484375, 0.01055908203125, 0.01300048828125, -0.047607421875, -0.00153350830078125, 0.005157470703125, -0.0167236328125, 0.025390625, 0.0125732421875, -0.0101318359375, ...
[ 1250, 4867, 212467, 2182, 70, 3622, 1733, 111, 10, 24745, 502, 6056, 572, 420, 418, 2673, 304, 71337, 18, 717, 568, 1052, 13133, 31577, 74481, 87, 47445, 98, 26983, 34475, 56816, 2500, 136, 30780, 756, 44677, 4527, 32354, 4734, 47, 1181...
[ 0.1553955078125, 0.2318115234375, 0.1832275390625, 0.09405517578125, 0.010284423828125, 0.1805419921875, 0.2218017578125, 0.0850830078125, 0.04833984375, 0.232666015625, 0.11572265625, 0.1839599609375, 0.03277587890625, 0.06201171875, 0.04345703125, 0.062042236328125, 0.080322265625,...
embed
8089849_c0
8089849
prolog
0
Title: Shuffle in prolog Problem title: Shuffle in prolog Tags: prolog Problem: Shuffle in prolog I'm trying to write a procedure in prolog where if L1 = [1,2,3] and L2 = [4,5,6] then L3 = [1,4,2,5,3,6] so shuffle([1,2,3],[4,5,6],[1,4,2,5,3,6]) I have this so far: shuffle([X],[Y],[X,Y]). shuffle([X|Xs],[Y|Ys],_) :- shu...
Shuffle in prolog Shuffle in prolog prolog Shuffle Shuffle in prolog I'm trying to write a procedure in prolog where if L1 = [1,2,3] and L2 = [4,5,6] then L3 = [1,4,2,5,3,6] so shuffle([1,2,3],[4,5,6],[1,4,2,5,3,6]) I have this so far: This is my first attempt at writing prolog code so I'm still trying to wrap my head ...
[ 0.004486083984375, 0.0201416015625, 0.00128173828125, -0.009033203125, -0.0198974609375, -0.001861572265625, -0.042236328125, -0.003021240234375, 0.00836181640625, 0.002655029296875, 0.00494384765625, 0.0247802734375, -0.0064697265625, 0.01239013671875, 0.005828857421875, 0.01745605468...
[ 13684, 4902, 133, 23, 502, 4867, 31577, 33022, 50491, 7440, 2174, 339, 418, 155761, 304, 617, 104629, 7068, 363, 163324, 71928, 910, 221, 170052, 132, 1065, 133063, 96386, 903, 2060, 5117, 81887, 32562, 18151, 7464, 137565, 10336, 6002, 865...
[ 0.18505859375, 0.254638671875, 0.1832275390625, 0.105712890625, 0.19140625, 0.26416015625, 0.0833740234375, 0.131103515625, 0.1982421875, 0.00445556640625, 0.0872802734375, 0.1146240234375, 0.09765625, 0.1580810546875, 0.1429443359375, 0.128173828125, 0.232421875, 0.03955078125, ...
embed
67984333_c0
67984333
prolog
0
Title: How to split a list into list of list by delimiter in Prolog Problem title: How to split a list into list of list by delimiter in Prolog Tags: split, prolog, list, delimiter Problem: How to split a list into list of list by delimiter in Prolog I know this should be quite simple but I got no idea. Basically given...
How to split a list into list of list by delimiter in Prolog How to split a list into list of list by delimiter in Prolog split prolog list delimiter How Prolog Elem Rest Sub Result NewResult How to split a list into list of list by delimiter in Prolog I know this should be quite simple but I got no idea. Basically giv...
[ -0.00531005859375, -0.0098876953125, 0.01177978515625, -0.01214599609375, -0.0198974609375, 0.0252685546875, 0.00311279296875, 0.016845703125, 0.01416015625, -0.0201416015625, -0.007171630859375, -0.0084228515625, -0.0172119140625, -0.0024261474609375, -0.0022735595703125, 0.0011520385...
[ 11249, 47, 65450, 10, 5303, 3934, 111, 390, 8, 93343, 56, 23, 1250, 4867, 502, 540, 195, 49756, 8273, 126684, 2356, 7, 7136, 5608, 8781, 6528, 34475, 275, 238, 71, 420, 27781, 140992, 82424, 903, 25647 ]
[ 0.0728759765625, 0.029205322265625, 0.212158203125, 0.035888671875, 0.21484375, 0.1246337890625, 0.1390380859375, 0.08154296875, 0.1422119140625, 0.2193603515625, 0.148681640625, 0.051849365234375, 0.162841796875, 0.2242431640625, 0.132568359375, 0.0443115234375, 0.1253662109375, 0...
embed
40452610_c0
40452610
prolog
0
Title: Prolog: Getting certain elements in a list Problem title: Prolog: Getting certain elements in a list Tags: prolog Problem: Prolog: Getting certain elements in a list I am trying to find first and last element of a list such that lastFirstElt(X, L) outputs list L which contains only first and last element. I am a...
Prolog: Getting certain elements in a list Prolog: Getting certain elements in a list prolog Prolog Getting Here List Prolog: Getting certain elements in a list I am trying to find first and last element of a list such that lastFirstElt(X, L) outputs list L which contains only first and last element. I am able to get f...
[ 0.00823974609375, 0.0013275146484375, -0.00148773193359375, -0.000041484832763671875, -0.013916015625, 0.01519775390625, -0.0130615234375, 0.0086669921875, 0.0172119140625, -0.0091552734375, 0.025390625, -0.0023956298828125, -0.0184326171875, 0.00811767578125, 0.01226806640625, 0.00527...
[ 1250, 4867, 210732, 24233, 80854, 23, 5303, 12, 10, 502, 11853, 32036, 31577, 7413, 5117, 136, 4568, 12830, 111, 207263, 7623, 18, 1542, 339, 16, 140992, 70541, 4734, 19048, 2046, 70163, 3934, 209303, 831, 4488 ]
[ 0.1656494140625, 0.2340087890625, 0.175537109375, 0.09747314453125, 0.22998046875, 0.09844970703125, 0.2276611328125, 0.0160064697265625, 0.003387451171875, 0.1212158203125, 0.173095703125, 0.205078125, 0.0894775390625, 0.124267578125, 0.135009765625, 0.115478515625, 0.2064208984375,...
embed
27305085_c0
27305085
prolog
0
Title: prolog sum list using atomic Problem title: prolog sum list using atomic Tags: sum, prolog, flatten, atomic Problem: prolog sum list using atomic I am trying to perform a sumList function in prolog that takes the input: sumList([1,[2,3],[4],5],X). and returns X=15. I understand how to sum a simple list and a lis...
prolog sum list using atomic prolog sum list using atomic sum prolog flatten atomic atomic prolog sum list using atomic I am trying to perform a sumList function in prolog that takes the input: sumList([1,[2,3],[4],5],X). and returns X=15. I understand how to sum a simple list and a list of lists(ie [1,2,3,4,5] & [[1,2...
[ 0.01287841796875, 0.0115966796875, 0.0035552978515625, 0.031982421875, -0.0177001953125, 0.01470947265625, 0.00140380859375, 0.0260009765625, 0.01019287109375, -0.0213623046875, -0.0062255859375, -0.0174560546875, 0.00946044921875, -0.0081787109375, 0.025146484375, 0.007293701171875, ...
[ 502, 4867, 10554, 5303, 17368, 34627, 1771, 49878, 510, 31577, 51339, 154663, 32354, 23, 51776, 107730, 418, 155761, 68714, 758, 1542, 30646, 1193, 1369, 1837, 28219, 3642, 47, 8781, 136, 478, 80389, 619, 133063, 96386, 18499, 155965, 3535, ...
[ 0.162353515625, 0.251220703125, 0.249755859375, 0.2313232421875, 0.07525634765625, 0.20068359375, 0.116943359375, 0.130126953125, 0.13037109375, 0.0701904296875, 0.0885009765625, 0.2178955078125, 0.1331787109375, 0.00152587890625, 0.05999755859375, 0.1639404296875, 0.02093505859375, ...
embed
43078778_c0
43078778
prolog
0
Title: Transpose matrix in prolog Problem title: Transpose matrix in prolog Tags: matrix, prolog Problem: Transpose matrix in prolog %row(H, M, M1). row([],[],[]). row([H|Tt] , [[H|T1]|T] , [T1|Z]) :- row(Tt,T,Z). Where M is to be transposed in T . Row predicate (not sure for the difference between predicate and functi...
Transpose matrix in prolog Transpose matrix in prolog matrix prolog Transpose Transpose matrix in prolog I want to transpose a matrix in prolog , so for example [[1,2,3],[1,2,3],[1,2,3]] should become [[1,1,1],[2,2,2],[3,3,3]] Here is what I've done: Where M is to be transposed in T . Row predicate (not sure for the di...
[ 0.01177978515625, 0.0159912109375, 0.0206298828125, -0.002960205078125, -0.01141357421875, -0.0233154296875, -0.003662109375, 0.0260009765625, 0.00372314453125, -0.01507568359375, 0.0166015625, 0.0125732421875, -0.007171630859375, 0.0012054443359375, -0.0130615234375, 0.00982666015625,...
[ 11062, 78381, 50944, 425, 23, 502, 4867, 3444, 3900, 133063, 96386, 5608, 24209, 363, 78662, 276, 144429, 384, 96190, 1653, 2063, 32354, 10336, 1614, 6562, 2046, 64194, 5117, 15555, 3525, 3034, 27798, 16750, 9790, 8710, 184, 33720, 96276, 1...
[ 0.22802734375, 0.223876953125, 0.2015380859375, 0.1246337890625, 0.0482177734375, 0.161865234375, 0.2337646484375, 0.045013427734375, 0.230224609375, 0.0732421875, 0.06103515625, 0.05322265625, 0.1087646484375, 0.05023193359375, 0.0181427001953125, 0.09674072265625, 0.19189453125, ...
embed
19974124_c1
19974124
prolog
1
. %% property_true/4 % properties_true([], _, _, _) :- !. property_true(-Property, _, False, solve) :- !, member(Property, False). property_true(-Property, True, _, match) :- !, not(member(Property, True)). property_true(Property, True, _, solve) :- !, member(Property, True). property_true(Property, _, False, _) :- !, ...
. %% property_true/4 % properties_true([], _, _, _) :- !. property_true(-Property, _, False, solve) :- !, member(Property, False). property_true(-Property, True, _, match) :- !, not(member(Property, True)). property_true(Property, True, _, solve) :- !, member(Property, True). property_true(Property, _, False, _) :- !, ...
[ -0.006744384765625, -0.004669189453125, 0.046630859375, 0.0032196044921875, -0.007293701171875, -0.0126953125, -0.001068115234375, -0.0037384033203125, 0.0269775390625, 0.01239013671875, 0.016357421875, 0.03515625, -0.00174713134765625, 0.01348876953125, -0.0003299713134765625, 0.03015...
[ 5, 1745, 3949, 57266, 454, 9774, 13, 17357, 183871, 132, 1065, 101, 15772, 711, 10752, 1264, 939, 22225, 184, 86869, 32786, 87599, 14858, 959, 27417, 13319, 5351, 17, 6183, 3871, 903, 89536, 8705, 127689, 705, 9, 157695, 20802, 27771, 20,...
[ 0.0767822265625, 0.18115234375, 0.1461181640625, 0.28759765625, 0.0426025390625, 0.2491455078125, 0.1224365234375, 0.232666015625, 0.2958984375, 0.07061767578125, 0.04876708984375, 0.0880126953125, 0.11181640625, 0.093017578125, 0.06866455078125, 0.1646728515625, 0.133056640625, 0....
embed
67930129_c0
67930129
prolog
0
Title: Combining two facts via a boolean OR in Gnu Prolog Problem title: Combining two facts via a boolean OR in Gnu Prolog Tags: prolog, gnu-prolog, boolean-expression Problem: Combining two facts via a boolean OR in Gnu Prolog I'm totally new to Prolog. So please excuse this possibly extermely simple qiuestion: I hav...
Combining two facts via a boolean OR in Gnu Prolog Combining two facts via a boolean OR in Gnu Prolog prolog gnu-prolog boolean-expression Combining Gnu Prolog likes.pl Combining two facts via a boolean OR in Gnu Prolog I'm totally new to Prolog. So please excuse this possibly extermely simple qiuestion: I have a few f...
[ 0.021728515625, 0.0081787109375, 0, 0.031494140625, -0.01165771484375, 0.01336669921875, 0.00421142578125, 0.0011749267578125, 0.00081634521484375, -0.025146484375, -0.0014495849609375, 0.01470947265625, -0.0189208984375, 0.004730224609375, -0.004119873046875, 0.017333984375, 0.02502...
[ 106935, 592, 6626, 15824, 7, 1829, 337, 31, 34677, 33172, 527, 539, 1250, 4867, 23, 502, 104155, 3454, 204629, 1884, 2424, 112668, 3525, 133207, 8781, 10846, 11435, 31577, 12765, 36766, 249, 202, 2258, 136, 15528, 165132, 9069, 21130, 408, ...
[ 0.216796875, 0.04229736328125, 0.166748046875, 0.1793212890625, 0.13720703125, 0.09197998046875, 0.07537841796875, 0.14892578125, 0.197998046875, 0.2493896484375, 0.08380126953125, 0.2200927734375, 0.1680908203125, 0.2088623046875, 0.03778076171875, 0.1434326171875, 0.166748046875, ...
embed
67373076_c0
67373076
prolog
0
Title: Zipwith application in prolog Problem title: Zipwith application in prolog Tags: prolog, zipwith Problem: Zipwith application in prolog I have a hard time understanding this application of zipwith in Prolog and wondered if someone gets it. I already have an idea of what functor does, but I don't see how it appli...
Zipwith application in prolog Zipwith application in prolog prolog zipwith Zipwith Zipwith application in prolog I have a hard time understanding this application of zipwith in Prolog and wondered if someone gets it. I already have an idea of what functor does, but I don't see how it applies in that case. I vaguely thi...
[ 0.0281982421875, -0.006011962890625, -0.005706787109375, -0.0011749267578125, -0.012451171875, 0.0255126953125, -0.01409912109375, -0.00579833984375, 0.017822265625, -0.007720947265625, 0.0023040771484375, 0.00897216796875, -0.0185546875, 0.002349853515625, 0.01708984375, 0.00811767578...
[ 162150, 76228, 38415, 23, 502, 4867, 68330, 7941, 1733, 100094, 1250, 32195, 22008, 62163, 21771, 7477, 18770, 14602, 1957, 4027, 25720, 7225, 307, 5351, 6626, 79459, 3687, 110, 106, 136, 116, 46323, 3934, 62, 335, 18, 11814, 7103, 1653, ...
[ 0.2301025390625, 0.293212890625, 0.1749267578125, 0.0284881591796875, 0.15478515625, 0.2176513671875, 0.222900390625, 0.038726806640625, 0.008575439453125, 0.047027587890625, 0.1478271484375, 0.0048828125, 0.00115966796875, 0.009368896484375, 0.00140380859375, 0.142822265625, 0.17517...
embed
74620911_c0
74620911
prolog
0
Title: Sum of random digits in Prolog Problem title: Sum of random digits in Prolog Tags: prolog, swi-prolog Problem: Sum of random digits in Prolog The scenario is to mimic rolling 3 six-sided die in Prolog while trying to obey the recursive nature of prolog. This is easily done with the Fibonacci series n_factorial(N...
Sum of random digits in Prolog Sum of random digits in Prolog prolog swi-prolog Sum Prolog n_factorial N-1 roll_dice random_between Sum of random digits in Prolog The scenario is to mimic rolling 3 six-sided die in Prolog while trying to obey the recursive nature of prolog. This is easily done with the Fibonacci series...
[ 0.00823974609375, 0.0181884765625, 0.006591796875, -0.005859375, -0.017578125, 0.0118408203125, -0.0089111328125, 0.01318359375, -0.000873565673828125, -0.053466796875, 0.0240478515625, -0.0230712890625, -0.0191650390625, 0.016357421875, 0.034423828125, 0.0185546875, 0.00787353515625...
[ 36335, 96759, 153939, 1250, 4867, 111, 7, 23, 502, 2452, 3454, 653, 144810, 15403, 541, 5759, 21972, 48226, 4626, 1177, 106117, 324, 21068, 214, 138, 37195, 8752, 68, 31577, 31804, 195625, 31425, 72546, 3698, 20990, 52544, 36549, 34844, 390...
[ 0.19970703125, 0.17578125, 0.195068359375, 0.1705322265625, 0.2401123046875, 0.009765625, 0.002349853515625, 0.0246429443359375, 0.1300048828125, 0.11328125, 0.125, 0.0054931640625, 0.1298828125, 0.003814697265625, 0.03375244140625, 0.1075439453125, 0.1429443359375, 0.128173828125,...
embed
47495964_c0
47495964
prolog
0
Title: Prolog - recursive predicate to output stars 5-1 then back again 1-5 Problem title: Prolog - recursive predicate to output stars 5-1 then back again 1-5 Tags: prolog Problem: Prolog - recursive predicate to output stars 5-1 then back again 1-5 I have the below recursive predicates that outputs asterisks from 1-5...
Prolog - recursive predicate to output stars 5-1 then back again 1-5 Prolog - recursive predicate to output stars 5-1 then back again 1-5 prolog Prolog nl.1 Prolog - recursive predicate to output stars 5-1 then back again 1-5 I have the below recursive predicates that outputs asterisks from 1-5. Could someone tell me h...
[ 0.01171875, 0.002227783203125, 0.00299072265625, -0.0208740234375, -0.008056640625, 0.03173828125, -0.00125885009765625, 0.00982666015625, 0.0040283203125, -0.0029144287109375, 0.0133056640625, -0.01483154296875, -0.00531005859375, 0.0135498046875, 0.0198974609375, -0.01275634765625, ...
[ 1250, 4867, 195625, 5844, 1653, 2063, 67, 47, 140992, 6057, 7, 140960, 7068, 4420, 13438, 106, 10342, 502, 13169, 35064, 1636, 10, 1515, 6581, 1295, 191147, 14192, 3642, 2806, 54, 39531, 184, 111, 84751, 31577, 69307, 60075, 13, 89829, 10...
[ 0.1612548828125, 0.2459716796875, 0.186767578125, 0.11767578125, 0.1435546875, 0.174072265625, 0.06866455078125, 0.033416748046875, 0.1580810546875, 0.1986083984375, 0.05145263671875, 0.248291015625, 0.0251007080078125, 0.1136474609375, 0.08135986328125, 0.056976318359375, 0.21057128...
embed
35535000_c0
35535000
prolog
0
Title: Errors installing OMake on OSX 10.10.5 Problem title: Errors installing OMake on OSX 10.10.5 Tags: prolog, omake, makefile, macos, lambda-prolog Problem: Errors installing OMake on OSX 10.10.5 I'm trying to install OMake so I can install Teyjus so I can start writing a bit of Lambda Prolog but I'm getting I'm ge...
Errors installing OMake on OSX 10.10.5 Errors installing OMake on OSX 10.10.5 prolog omake makefile macos lambda-prolog Errors OMake OSX lm_printf.cmx lm_printf.o Errors installing OMake on OSX 10.10.5 I'm trying to install OMake so I can install Teyjus so I can start writing a bit of Lambda Prolog but I'm getting I'm ...
[ 0.02099609375, 0.01153564453125, 0.0030975341796875, 0.00634765625, 0.0086669921875, -0.0164794921875, -0.0169677734375, -0.006011962890625, -0.002105712890625, 0.0030975341796875, -0.012939453125, -0.056396484375, 0.005340576171875, -0.01287841796875, 0.00933837890625, -0.001174926757...
[ 212059, 20600, 34172, 28088, 98, 11787, 1542, 147546, 93645, 214, 502, 4867, 2309, 350, 3249, 29822, 291, 7840, 21, 6492, 85, 3454, 35662, 420, 3931, 425, 39, 31, 7, 31577, 1413, 53, 13121, 32562, 4785, 122930, 1250, 20949, 147306, 18499,...
[ 0.2158203125, 0.1678466796875, 0.1585693359375, 0.28369140625, 0.075439453125, 0.1494140625, 0.1500244140625, 0.1654052734375, 0.2724609375, 0.035400390625, 0.0987548828125, 0.17919921875, 0.17236328125, 0.1971435546875, 0.106201171875, 0.1727294921875, 0.0237884521484375, 0.150390...
embed
38238570_c0
38238570
prolog
0
Title: Permutations including all members in Prolog Problem title: Permutations including all members in Prolog Tags: prolog, list Problem: Permutations including all members in Prolog Extending on this question Can be this lisp function be implemented recursively? , is it possible to have all combinations in Prolog if...
Permutations including all members in Prolog Permutations including all members in Prolog prolog list Permutations Prolog items1 items2 Permutations including all members in Prolog Extending on this question Can be this lisp function be implemented recursively? , is it possible to have all combinations in Prolog if the...
[ 0.0059814453125, 0.006134033203125, 0.0027923583984375, -0.0019989013671875, -0.016845703125, 0.0250244140625, -0.0196533203125, 0.0020294189453125, -0.00421142578125, -0.0322265625, 0.0152587890625, 0.0206298828125, 0.0283203125, 0.0172119140625, -0.0034332275390625, 0.00958251953125,...
[ 908, 14311, 21094, 26719, 756, 43032, 1250, 4867, 502, 5303, 55769, 304, 23, 903, 400, 7008, 32354, 29479, 195625, 5844, 7722, 765, 162515, 33636, 25632, 9384, 2053, 117, 561, 22062, 1653, 2063, 2452, 3454, 669, 19714, 1264, 12477 ]
[ 0.1160888671875, 0.2384033203125, 0.043731689453125, 0.115478515625, 0.1171875, 0.2091064453125, 0.162353515625, 0.2269287109375, 0.117919921875, 0.149658203125, 0.113037109375, 0.0184326171875, 0.0634765625, 0.01678466796875, 0.10107421875, 0.1773681640625, 0.1387939453125, 0.1370...
embed
70490726_c0
70490726
prolog
0
Title: Prolog: Predicate that combines the elements in a list with same value Problem title: Prolog: Predicate that combines the elements in a list with same value Tags: prolog Problem: Prolog: Predicate that combines the elements in a list with same value Given the following list: S = [(1,100), (1,125), (2,175), (3,10...
Prolog: Predicate that combines the elements in a list with same value Prolog: Predicate that combines the elements in a list with same value prolog Prolog Predicate Prolog: Predicate that combines the elements in a list with same value Given the following list: I need to write a function that will create a new list in...
[ 0.004547119140625, 0.0087890625, -0.00531005859375, 0.0028076171875, -0.0228271484375, 0.0244140625, -0.0164794921875, 0.003265380859375, 0.0115966796875, -0.0023956298828125, 0.008544921875, 0.0184326171875, -0.01123046875, -0.00909423828125, -0.01007080078125, 0.020263671875, 0.000...
[ 1250, 4867, 7145, 2063, 67, 450, 70163, 7, 80854, 5303, 678, 5701, 34292, 12, 23, 502, 3871, 33022, 32354, 28282, 3525, 6044, 3917, 42518, 12830, 5117, 237, 17932, 10554, 142424, 105950, 16750, 5608, 1884, 903 ]
[ 0.1646728515625, 0.236328125, 0.171630859375, 0.20068359375, 0.08795166015625, 0.032806396484375, 0.22900390625, 0.0198822021484375, 0.181884765625, 0.2098388671875, 0.0509033203125, 0.144775390625, 0.16748046875, 0.005279541015625, 0.032867431640625, 0.128662109375, 0.06134033203125...
embed
48023472_c0
48023472
prolog
0
Title: Prolog - split word into separate letters Problem title: Prolog - split word into separate letters Tags: prolog Problem: Prolog - split word into separate letters Follow up to this question . How could I split the word into letters without using lists or built-in predicate atom_chars/2. Something along the lines...
Prolog - split word into separate letters Prolog - split word into separate letters prolog Prolog atom_chars split_word Word Letter Rest predicate_property atom_char Prolog - split word into separate letters Follow up to this question . How could I split the word into letters without using lists or built-in predicate a...
[ 0.0069580078125, -0.00147247314453125, 0.0023651123046875, 0.035400390625, -0.019287109375, 0.035400390625, 0.0166015625, -0.00063323974609375, -0.006683349609375, -0.014404296875, 0.005950927734375, 0.0091552734375, -0.021240234375, 0.00628662109375, 0, 0.0235595703125, 0.0097045898...
[ 1250, 4867, 65450, 2565, 3934, 84797, 120820, 502, 34627, 9254, 47416, 22543, 105451, 49756, 1653, 2063, 36290, 56, 11249, 5809, 87, 70, 15490, 17368, 5303, 88303, 12477, 200905, 124519, 164805, 2806, 106, 271, 31330, 111, 34844, 1916, 79315,...
[ 0.131103515625, 0.2218017578125, 0.2509765625, 0.22119140625, 0.1739501953125, 0.159912109375, 0.229736328125, 0.08148193359375, 0.2120361328125, 0.166015625, 0.174072265625, 0.1397705078125, 0.205322265625, 0.197265625, 0.10577392578125, 0.146484375, 0.0760498046875, 0.06701660156...
embed
67244532_c1
67244532
prolog
1
expresionL(X,1). I get: X = bin(c1, (+), c1) X = bin(c1, (+), v1) Stack limit (0.2Gb) exceeded Stack sizes: local: 0.2Gb, global: 51.1Mb, trail: 1Kb Stack depth: 1,673,655, last-call: 0%, Choice points: 13 Possible non-terminating recursion: [1,673,655] expresionL(_1404, -1673622) [1,673,654] expresionL(<compound bin/...
expresionL(X,1). I get: X = bin(c1, (+), c1) X = bin(c1, (+), v1) Stack limit (0.2Gb) exceeded Stack sizes: local: 0.2Gb, global: 51.1Mb, trail: 1Kb Stack depth: 1,673,655, last-call: 0%, Choice points: 13 Possible non-terminating recursion: [1,673,655] expresionL(_1404, -1673622) [1,673,654] expresionL(<compound bin/...
[ -0.025146484375, 0.0096435546875, -0.0029449462890625, 0.0146484375, 0.01287841796875, 0.00023174285888671875, -0.0008544921875, 0.0025177001953125, 0.0220947265625, -0.0439453125, 0.0142822265625, 0.00640869140625, 0.00167083740234375, 0.0159912109375, 0.033203125, 0.017333984375, 0...
[ 48668, 1830, 866, 1542, 17727, 2046, 1193, 2203, 2394, 418, 22183, 81, 6512, 2594, 17475, 133684, 724, 275, 204839, 13267, 4000, 126175, 7964, 147197, 141037, 168867, 13574, 161689, 4568, 85763, 83137, 181948, 26847, 702, 115861, 351, 30524, ...
[ 0.253173828125, 0.18115234375, 0.158447265625, 0.0963134765625, 0.1170654296875, 0.005401611328125, 0.154296875, 0.002044677734375, 0.21435546875, 0.089111328125, 0.1697998046875, 0.1446533203125, 0.141357421875, 0.1065673828125, 0.25048828125, 0.056488037109375, 0.0069580078125, 0...
embed
52452809_c0
52452809
prolog
0
Title: Introducing predicates in Prolog Problem title: Introducing predicates in Prolog Tags: prolog Problem: Introducing predicates in Prolog We start with an empty database and the following commands are given assert(q(a,b)),assertz(q(1,2)),asserta(q(foo,blug)). What does now the database contain? What happens after ...
Introducing predicates in Prolog Introducing predicates in Prolog prolog Introducing Prolog Introducing predicates in Prolog We start with an empty database and the following commands are given assert(q(a,b)),assertz(q(1,2)),asserta(q(foo,blug)). retract(q(1,2)),assertz((p(X):-h(X))). retract(q(_,_)),fail. MyAttempt I ...
[ 0.01043701171875, 0.00439453125, 0.0034027099609375, 0.03466796875, -0.0191650390625, 0.02880859375, 0.0015411376953125, -0.00089263916015625, 0.00099945068359375, -0.0189208984375, 0.0208740234375, 0.003692626953125, -0.0230712890625, -0.00081634521484375, 0.0159912109375, 0.011535644...
[ 44891, 21896, 1653, 2063, 1636, 23, 1250, 4867, 502, 4034, 201505, 63399, 75101, 34475, 237, 33657, 864, 275, 169, 133063, 162, 110965, 3584, 31, 47491, 177, 41499, 15390, 254, 1542, 127, 120540, 2646, 28848, 34224, 18, 65508, 25632, 94419,...
[ 0.1607666015625, 0.006195068359375, 0.1959228515625, 0.2451171875, 0.1270751953125, 0.014678955078125, 0.1878662109375, 0.2496337890625, 0.1387939453125, 0.0401611328125, 0.103759765625, 0.13818359375, 0.2320556640625, 0.03631591796875, 0.040374755859375, 0.1822509765625, 0.134155273...
embed
8774413_c0
8774413
prolog
0
Title: Finding paths: how to avoid already visited locations Problem title: Finding paths: how to avoid already visited locations Tags: shortest-path, prolog, patch Problem: Finding paths: how to avoid already visited locations I got this code to return a shortest path between 2 cities: goal(Z,Path,Cost) :- A = mycity,...
Finding paths: how to avoid already visited locations Finding paths: how to avoid already visited locations shortest-path prolog patch Finding Path Cost caminhAux2 Path1 Cost1 Dist Vmed CostXY Cost2 Finding paths: how to avoid already visited locations I got this code to return a shortest path between 2 cities: How I c...
[ -0.00112152099609375, 0.00537109375, 0.01275634765625, 0.0223388671875, -0.0037689208984375, -0.00069427490234375, -0.003082275390625, -0.020751953125, 0.01019287109375, -0.06298828125, 0.009765625, -0.006744384765625, -0.01300048828125, -0.0101318359375, 0.01531982421875, 0.0297851562...
[ 26040, 214, 60875, 7, 12, 3642, 47, 71864, 21771, 36997, 71, 31913, 16610, 525, 128405, 502, 4867, 110912, 108421, 63099, 64951, 6457, 6077, 304, 418, 310, 4806, 143907, 4163, 903, 18151, 30646, 10, 17721, 116, 162708, 11249, 87, 831, 324...
[ 0.135498046875, 0.084716796875, 0.218017578125, 0.075927734375, 0.0164031982421875, 0.111328125, 0.0570068359375, 0.232177734375, 0.1732177734375, 0.207275390625, 0.0780029296875, 0.181884765625, 0.1907958984375, 0.160400390625, 0.1817626953125, 0.128173828125, 0.1583251953125, 0.1...
embed
13785300_c0
13785300
prolog
0
Title: Prolog pipe partial input, user-input the rest Problem title: Prolog pipe partial input, user-input the rest Tags: stream, prolog, pipe, gnu-prolog Problem: Prolog pipe partial input, user-input the rest I'm writing a prolog program with an input loop. A good deal of the input is pre-scripted in a response file....
Prolog pipe partial input, user-input the rest Prolog pipe partial input, user-input the rest stream prolog pipe gnu-prolog Prolog response.txt end_of_file Prolog pipe partial input, user-input the rest I'm writing a prolog program with an input loop. A good deal of the input is pre-scripted in a response file. I execu...
[ 0, -0.00982666015625, 0.00168609619140625, -0.0028228759765625, -0.0068359375, -0.00335693359375, 0.001434326171875, -0.0225830078125, -0.00640869140625, -0.035400390625, 0.0164794921875, 0.0177001953125, 0.00052642822265625, 0.00830078125, 0.020263671875, -0.0120849609375, 0.0373535...
[ 1250, 4867, 137158, 2878, 289, 107730, 38937, 73, 7077, 70, 10588, 75973, 502, 104155, 3454, 57553, 124326, 3564, 4390, 29822, 32562, 1528, 40956, 35142, 479, 32032, 11435, 71924, 237, 14847, 1556, 122799, 2806, 1884, 21342, 8305, 149186, 322...
[ 0.1810302734375, 0.24169921875, 0.220947265625, 0.1510009765625, 0.043609619140625, 0.2193603515625, 0.1507568359375, 0.0819091796875, 0.129638671875, 0.0653076171875, 0.17578125, 0.150634765625, 0.1654052734375, 0.147216796875, 0.115966796875, 0.2099609375, 0.190185546875, 0.12121...
embed
29614473_c0
29614473
prolog
0
Title: List of factorials in Prolog Problem title: List of factorials in Prolog Tags: prolog, list, factorial Problem: List of factorials in Prolog I'm having trouble solving the following exercise... A factorial can be described in Prolog as: factorial(0, 1). factorial(N, F) :- N1 is N - 1, factorial(N1, F1), F is N *...
List of factorials in Prolog List of factorials in Prolog prolog list factorial List Prolog ERROR Out list_factorial List of factorials in Prolog I'm having trouble solving the following exercise... A factorial can be described in Prolog as: I need to expand this code in order to return a list of all previous factorial...
[ 0.0189208984375, 0.0018310546875, -0.00396728515625, 0.0123291015625, -0.01220703125, 0.0006103515625, -0.0167236328125, -0.0010986328125, 0.00090789794921875, -0.0361328125, 0.010009765625, -0.01434326171875, 0.0015716552734375, -0.0030059814453125, -0.0019683837890625, 0.021606445312...
[ 32036, 31461, 15403, 7, 23, 1250, 4867, 502, 5303, 151206, 24638, 13538, 144810, 63134, 3115, 81979, 151552, 3871, 71062, 18151, 30646, 756, 96362, 24189, 541, 4734, 5117, 798, 18499, 111, 4000, 177261, 20594, 44691 ]
[ 0.1539306640625, 0.233154296875, 0.251953125, 0.083251953125, 0.06146240234375, 0.197998046875, 0.281005859375, 0.1566162109375, 0.20703125, 0.1453857421875, 0.10498046875, 0.2178955078125, 0.205322265625, 0.05499267578125, 0.04156494140625, 0.07427978515625, 0.10693359375, 0.01248...
embed
65844487_c0
65844487
prolog
0
Title: Unit testing in GNU Prolog Problem title: Unit testing in GNU Prolog Tags: gnu-prolog, prolog, unit-testing Problem: Unit testing in GNU Prolog I'm trying to migrate my SWI Prolog application into the GNU Prolog. Unfortunately I have a problem with unit tests. In SWIPL we can simply use plunit module and write t...
Unit testing in GNU Prolog Unit testing in GNU Prolog gnu-prolog prolog unit-testing Unit GNU Prolog begin_tests my_tests my_predicate_test my_predicate Result second_test end_tests Unit testing in GNU Prolog I'm trying to migrate my SWI Prolog application into the GNU Prolog. Unfortunately I have a problem with unit t...
[ 0.00157928466796875, 0.016845703125, 0.007598876953125, -0.002288818359375, -0.01531982421875, -0.0009307861328125, 0.01373291015625, -0.001678466796875, 0.000537872314453125, -0.036865234375, 0.01031494140625, 0.0189208984375, -0.0274658203125, -0.0021514892578125, 0.01708984375, 0.01...
[ 46640, 134234, 23, 165132, 1250, 4867, 104155, 3454, 502, 25072, 6954, 9842, 759, 19714, 2063, 126684, 17932, 3564, 39666, 159, 38969, 38415, 3934, 2967, 109921, 21130, 831, 4527, 12266, 6773, 88996, 33022, 3034, 50218, 25632, 29479, 35773, 1...
[ 0.2685546875, 0.26611328125, 0.05120849609375, 0.2060546875, 0.15283203125, 0.2132568359375, 0.1527099609375, 0.115478515625, 0.125244140625, 0.23974609375, 0.227294921875, 0.05767822265625, 0.060272216796875, 0.072509765625, 0.07904052734375, 0.087158203125, 0.0965576171875, 0.044...
embed
26323501_c0
26323501
prolog
0
Title: Predicate that will swap the first two letters in an atom in Prolog Problem title: Predicate that will swap the first two letters in an atom in Prolog Tags: prolog Problem: Predicate that will swap the first two letters in an atom in Prolog I have to write a predicate which will swap the first two letters in an ...
Predicate that will swap the first two letters in an atom in Prolog Predicate that will swap the first two letters in an atom in Prolog prolog Predicate Prolog _VCSF Predicate that will swap the first two letters in an atom in Prolog I have to write a predicate which will swap the first two letters in an atom of length...
[ 0.00457763671875, -0.0052490234375, 0.01190185546875, 0.0301513671875, -0.01507568359375, 0.028564453125, -0.006744384765625, 0.0107421875, -0.0147705078125, 0.006256103515625, 0.037841796875, 0.051513671875, -0.017578125, -0.005706787109375, 0.006134033203125, 0.00518798828125, 0.00...
[ 7145, 2063, 67, 450, 1221, 202317, 5117, 6626, 120820, 34627, 23, 1250, 4867, 502, 56349, 38406, 765, 33022, 1653, 140909, 1286, 77554, 1632, 152028, 139124, 4527, 9351, 32354, 65450, 18151, 140992, 52295, 104851, 223438 ]
[ 0.1734619140625, 0.2044677734375, 0.1126708984375, 0.0189666748046875, 0.0582275390625, 0.2181396484375, 0.1339111328125, 0.1507568359375, 0.192138671875, 0.2095947265625, 0.045379638671875, 0.1578369140625, 0.223876953125, 0.1353759765625, 0.1048583984375, 0.1708984375, 0.0215148925...
embed
27674390_c0
27674390
prolog
0
Title: Monkey &amp; Banana in prolog Problem title: Monkey &amp; Banana in prolog Tags: prolog Problem: Monkey & Banana in prolog I have this prolog code for solving monkey and banana problem but my compiler give an error This is my code: move(state(middle, onbox, middle, hasnot), grasp, state(middle, onbox, middle, ha...
Monkey &amp; Banana in prolog Monkey &amp; Banana in prolog prolog Monkey Banana Pos Has Pos1 Pos2 Box State1 Move State2 Monkey & Banana in prolog I have this prolog code for solving monkey and banana problem but my compiler give an error This is my code: Error: Move is Singleton Variable. What is my wrong?
[ 0.009765625, 0.0091552734375, -0.004638671875, 0.034423828125, -0.0018463134765625, 0.021728515625, -0.010498046875, 0.003448486328125, 0.004150390625, -0.0361328125, 0.00872802734375, 0.00836181640625, -0.0181884765625, -0.01519775390625, -0.003204345703125, -0.0013580322265625, -0....
[ 213289, 619, 25133, 74, 53592, 76, 23, 502, 4867, 13498, 20625, 418, 304, 27271, 22836, 135828, 18151, 3115, 2667, 19770, 136, 134399, 2967, 9969, 34759, 18499, 212059, 83, 43609, 1507, 84572, 2886, 44691 ]
[ 0.2445068359375, 0.129150390625, 0.1510009765625, 0.031890869140625, 0.1920166015625, 0.20654296875, 0.0419921875, 0.155029296875, 0.1912841796875, 0.2005615234375, 0.03106689453125, 0.027618408203125, 0.06085205078125, 0.1588134765625, 0.1375732421875, 0.228271484375, 0.144165039062...
embed
32832064_c0
32832064
prolog
0
Title: How can I go through a list of facts in Answer Set Prolog? Problem title: How can I go through a list of facts in Answer Set Prolog? Tags: answer-set-programming, prolog Problem: How can I go through a list of facts in Answer Set Prolog? I have a list of facts like student(mary). student(john). etc, and also cou...
How can I go through a list of facts in Answer Set Prolog? How can I go through a list of facts in Answer Set Prolog? answer-set-programming prolog How Answer Set Prolog can_graduate took_all_courses How can I go through a list of facts in Answer Set Prolog? I have a list of facts like etc, and also etc, and I have to ...
[ 0.029541015625, 0.0128173828125, -0.00174713134765625, 0.03466796875, -0.01190185546875, -0.0147705078125, -0.001739501953125, 0.0062255859375, 0.01373291015625, -0.037109375, -0.0091552734375, -0.000002384185791015625, 0.001251220703125, 0.025390625, -0.0322265625, -0.0018997192382812...
[ 11249, 831, 87, 738, 8305, 10, 5303, 15824, 7, 23, 130373, 19943, 1250, 4867, 35166, 3509, 28966, 502, 88610, 2182, 34739, 5584, 100599, 90, 5154, 2174, 9836, 707, 959, 150180, 717, 765, 47, 756, 70, 132073, 39958, 3642, 15490, 33022, 1...
[ 0.09771728515625, 0.1314697265625, 0.0323486328125, 0.1195068359375, 0.2080078125, 0.013580322265625, 0.204833984375, 0.2080078125, 0.09912109375, 0.07080078125, 0.227294921875, 0.2464599609375, 0.15625, 0.220947265625, 0.1795654296875, 0.173828125, 0.08013916015625, 0.083190917968...
embed
19853629_c0
19853629
prolog
0
Title: Traversing a tree in prolog Problem title: Traversing a tree in prolog Tags: prolog Problem: Traversing a tree in prolog Can someone help me with a problem in Prolog. I want to traverse a tree InOrder . I managed to do it in postOrder because it seemed siplier, but I dont't know how to change it inOrder. I only ...
Traversing a tree in prolog Traversing a tree in prolog prolog Traversing LEFT RIGHT Traversing a tree in prolog Can someone help me with a problem in Prolog. I want to traverse a tree InOrder . I managed to do it in postOrder because it seemed siplier, but I dont't know how to change it inOrder. I only assume that my ...
[ 0.034423828125, -0.01025390625, 0.0031585693359375, -0.00390625, 0.0002689361572265625, 0.015869140625, -0.01397705078125, -0.0030975341796875, -0.001495361328125, -0.07568359375, 0.0047607421875, -0.0050048828125, -0.017578125, -0.0167236328125, 0.005401611328125, 0.01446533203125, ...
[ 4937, 7864, 214, 53201, 23, 502, 4867, 17428, 25217, 167177, 10, 4358, 2967, 1250, 3444, 37317, 13, 360, 143045, 56, 145755, 1305, 115058, 26026, 3714, 15549, 442, 41591, 18151, 43240, 159978, 2016, 289, 40059, 2060 ]
[ 0.114013671875, 0.17138671875, 0.05096435546875, 0.2423095703125, 0.1256103515625, 0.1490478515625, 0.226806640625, 0.0298309326171875, 0.05853271484375, 0.06072998046875, 0.013458251953125, 0.053863525390625, 0.054534912109375, 0.1392822265625, 0.055084228515625, 0.2044677734375, 0....
embed
24959024_c0
24959024
prolog
0
Title: How to set a break-point to a line in debugging prolog? Problem title: How to set a break-point to a line in debugging prolog? Tags: logic, prolog Problem: How to set a break-point to a line in debugging prolog? In Yap, I'm debugging a program and it reads a lot data from a file. I would like to ask whether ther...
How to set a break-point to a line in debugging prolog? How to set a break-point to a line in debugging prolog? logic prolog How How to set a break-point to a line in debugging prolog? In Yap, I'm debugging a program and it reads a lot data from a file. I would like to ask whether there are some ways to set a break-poi...
[ 0.005218505859375, 0.00433349609375, 0.01312255859375, 0.0186767578125, -0.015869140625, 0, 0.0036773681640625, 0.022705078125, -0.00119781494140625, -0.03955078125, 0.0012054443359375, 0.00994873046875, -0.0181884765625, -0.0027313232421875, 0.0267333984375, 0.02978515625, 0.0020141...
[ 11249, 47, 5423, 10, 36356, 9, 38496, 13315, 23, 8, 978, 36659, 502, 4867, 62775, 360, 47246, 1528, 12301, 5915, 11435, 48322, 130028, 1653, 2063, 35839, 57491, 114864, 7279, 99, 84751, 1614, 19714, 3642, 915, 441, 88303, 284 ]
[ 0.0916748046875, 0.138671875, 0.17431640625, 0.0609130859375, 0.2247314453125, 0.128662109375, 0.2261962890625, 0.1983642578125, 0.0789794921875, 0.1519775390625, 0.1944580078125, 0.112060546875, 0.1729736328125, 0.2076416015625, 0.103515625, 0.0040283203125, 0.1470947265625, 0.122...
embed
33966792_c0
33966792
prolog
0
Title: Is there a way to get prolog to print out data structures more nicely? Problem title: Is there a way to get prolog to print out data structures more nicely? Tags: prolog Problem: Is there a way to get prolog to print out data structures more nicely? I'm trying to print out this: [sentence([nounp(_G2571,[noun(_G2...
Is there a way to get prolog to print out data structures more nicely? Is there a way to get prolog to print out data structures more nicely? prolog _G2571 trans_verb _G2587 Is there a way to get prolog to print out data structures more nicely? I'm trying to print out this: [sentence([nounp(_G2571,[noun(_G2571,buffalo)...
[ 0.0244140625, 0.004058837890625, 0.00909423828125, 0.0142822265625, 0.0101318359375, 0.027587890625, 0.00836181640625, -0.0140380859375, 0.00057220458984375, -0.03759765625, 0.0162353515625, -0.01220703125, -0.0011749267578125, -0.0224609375, 0.0189208984375, 0.017578125, -0.00509643...
[ 3917, 2046, 502, 4867, 47, 28412, 1810, 2053, 45646, 1286, 26267, 538, 724, 2588, 15770, 3900, 81465, 19308, 10, 31577, 903, 12832, 6620, 3165, 83018, 309, 123759, 7779, 75161, 254, 30145, 170, 187694, 12301, 2886, 134598, 366, 184, 53201, ...
[ 0.0701904296875, 0.052825927734375, 0.18701171875, 0.27587890625, 0.06866455078125, 0.188232421875, 0.129150390625, 0.111083984375, 0.2001953125, 0.1048583984375, 0.110595703125, 0.0885009765625, 0.032806396484375, 0.10333251953125, 0.1522216796875, 0.0704345703125, 0.1998291015625, ...
embed
5357036_c0
5357036
prolog
0
Title: prolog: built-in or other method to use function-like return values Problem title: prolog: built-in or other method to use function-like return values Tags: prolog, logic, gnu Problem: prolog: built-in or other method to use function-like return values I'm trying to let Prolog instantiate a variable to the oppos...
prolog: built-in or other method to use function-like return values prolog: built-in or other method to use function-like return values prolog logic gnu k_c k_c-1 Init_1 Init_2 Init_3 prolog: built-in or other method to use function-like return values I'm trying to let Prolog instantiate a variable to the opposite key ...
[ 0.014404296875, 0.0191650390625, 0.0101318359375, -0.00823974609375, 0.003997802734375, -0.006561279296875, -0.0059814453125, 0.0027618408203125, 0.0064697265625, -0.020751953125, 0.006439208984375, 0.0012359619140625, -0.002166748046875, 0.004364013671875, 0.021728515625, -0.011169433...
[ 502, 4867, 88303, 73, 55300, 4527, 32354, 5062, 30646, 142424, 62775, 104155, 472, 238, 5759, 217, 115187, 304, 363, 31577, 2633, 1250, 34648, 101426, 77336, 47, 198274, 22799, 3835, 158559, 80836, 7722, 198343, 31425, 5351, 111240, 44084, 87...
[ 0.1990966796875, 0.29638671875, 0.1195068359375, 0.125, 0.1497802734375, 0.07818603515625, 0.13525390625, 0.16943359375, 0.22607421875, 0.156005859375, 0.1795654296875, 0.1451416015625, 0.01336669921875, 0.0220184326171875, 0.0867919921875, 0.060333251953125, 0.07025146484375, 0.01...
embed
54393214_c0
54393214
prolog
0
Title: Doubly Linked List in Prolog Problem title: Doubly Linked List in Prolog Tags: doubly-linked-list, logical-purity, prolog Problem: Doubly Linked List in Prolog I have been learning Prolog in my spare time for about 8 months to a year and now I am moving on to tackle implementing some of the classic data structur...
Doubly Linked List in Prolog Doubly Linked List in Prolog doubly-linked-list logical-purity prolog Doubly Linked List Prolog Doubly Linked List in Prolog I have been learning Prolog in my spare time for about 8 months to a year and now I am moving on to tackle implementing some of the classic data structures and algori...
[ 0.0228271484375, 0.00112152099609375, 0.010986328125, 0.0048828125, -0.00775146484375, 0.036865234375, -0.003173828125, 0.004241943359375, -0.00244140625, -0.03173828125, -0.007720947265625, -0.0037384033203125, -0.01361083984375, -0.011962890625, -0.00787353515625, 0.01446533203125, ...
[ 40641, 38526, 12779, 297, 32036, 1250, 4867, 23, 54, 34, 10187, 6562, 62775, 289, 4717, 2481, 502, 52080, 69463, 1733, 382, 21775, 6602, 29479, 54704, 2053, 45646, 234873, 60892, 55391, 3126, 5303, 4902, 3642, 172337, 110281, 137043, 7398, ...
[ 0.179931640625, 0.1998291015625, 0.217529296875, 0.1207275390625, 0.24755859375, 0.1839599609375, 0.2412109375, 0.011474609375, 0.104248046875, 0.1429443359375, 0.221923828125, 0.23046875, 0.154541015625, 0.059722900390625, 0.1702880859375, 0.0968017578125, 0.1517333984375, 0.07312...
embed
47727940_c0
47727940
prolog
0
Title: Tail-recursive program in prolog which outputs odd numbers in a list Problem title: Tail-recursive program in prolog which outputs odd numbers in a list Tags: prolog, tail-recursion Problem: Tail-recursive program in prolog which outputs odd numbers in a list I've written a tail-recursive predicate in Prolog whi...
Tail-recursive program in prolog which outputs odd numbers in a list Tail-recursive program in prolog which outputs odd numbers in a list prolog tail-recursion Tail-recursive Tail-recursive program in prolog which outputs odd numbers in a list I've written a tail-recursive predicate in Prolog which outputs the integers...
[ 0.027587890625, 0.0155029296875, 0.0172119140625, -0.01806640625, 0.009765625, 0.041015625, -0.00567626953125, 0.003387451171875, 0.01226806640625, -0.001922607421875, 0.00390625, -0.02099609375, -0.006378173828125, 0.01214599609375, 0.03564453125, 0.0024261474609375, 0.021484375, ...
[ 1218, 379, 107, 48650, 5844, 1528, 502, 4867, 140992, 70270, 101935, 5303, 23, 46741, 1830, 59121, 1653, 2063, 67, 1250, 892, 26255, 17721, 62, 136, 335, 341, 11814, 37676, 19095, 3934, 7108, 12989, 58836, 53, 3164, 43240, 5885, 5036, 344...
[ 0.17529296875, 0.1429443359375, 0.10693359375, 0.1890869140625, 0.10308837890625, 0.16650390625, 0.138427734375, 0.211181640625, 0.1505126953125, 0.2496337890625, 0.19482421875, 0.18212890625, 0.01812744140625, 0.2587890625, 0.0178375244140625, 0.050933837890625, 0.124267578125, 0....
embed
65752164_c0
65752164
prolog
0
Title: Returning value of the predicate in Prolog Problem title: Returning value of the predicate in Prolog Tags: prolog Problem: Returning value of the predicate in Prolog I'm new to prolog and I need help understanding how returning value works. I know that it's either pred(Y, X) :- X is Y. So when giving input ?- pr...
Returning value of the predicate in Prolog Returning value of the predicate in Prolog prolog Returning Prolog main_pred List RES SortedList Returning value of the predicate in Prolog I'm new to prolog and I need help understanding how returning value works. I know that it's either So when giving input output is: X = 5....
[ 0.00439453125, 0.0033416748046875, 0.01031494140625, -0.006500244140625, -0.0157470703125, 0.01806640625, 0.00927734375, -0.01129150390625, 0.004180908203125, -0.026611328125, -0.000492095947265625, 0.0072021484375, -0.0086669921875, -0.001617431640625, -0.0027618408203125, -0.00494384...
[ 173340, 214, 34292, 111, 1653, 2063, 67, 1250, 4867, 502, 5201, 19714, 32036, 61661, 53666, 297, 154663, 30646, 43240, 68772, 107730, 140992, 1193, 2203, 1892, 29568, 1884, 113054, 5117, 1295, 33342, 384, 12765, 158240, 3674, 541, 98320, 1675...
[ 0.195556640625, 0.1070556640625, 0.2310791015625, 0.009033203125, 0.1680908203125, 0.2252197265625, 0.1051025390625, 0.1514892578125, 0.242919921875, 0.1077880859375, 0.067626953125, 0.165771484375, 0.134521484375, 0.2098388671875, 0.158935546875, 0.046112060546875, 0.1497802734375, ...
embed
39301987_c0
39301987
prolog
0
Title: Prolog: Code Generation Problem title: Prolog: Code Generation Tags: prolog, metaprogramming, code-generation Problem: Prolog: Code Generation What's the most idiomatic approach to output prolog code from a prolog program (as a side effect)? For instance, in a simple case, I might want to write a Program that, g...
Prolog: Code Generation Prolog: Code Generation prolog metaprogramming code-generation Prolog Generation Prolog: Code Generation What's the most idiomatic approach to output prolog code from a prolog program (as a side effect)? For instance, in a simple case, I might want to write a Program that, given a text input, yi...
[ 0.0216064453125, 0.0054931640625, -0.00408935546875, 0.01373291015625, -0.005767822265625, 0.01104736328125, -0.00156402587890625, -0.00579833984375, 0.0108642578125, -0.045654296875, -0.00225830078125, 0.0016021728515625, -0.037353515625, -0.00141143798828125, 0.022216796875, 0.000789...
[ 1250, 4867, 12, 28864, 83479, 502, 23550, 28966, 18151, 48281, 2684, 49666, 9523, 51515, 140992, 1295, 1528, 162, 5609, 21543, 8781, 13648, 3444, 33022, 7663, 7986, 107730, 11180, 19388, 15700, 33636, 237, 8951, 41382, 199747, 75463, 5465, 11...
[ 0.1739501953125, 0.22216796875, 0.037567138671875, 0.1624755859375, 0.17236328125, 0.1798095703125, 0.1396484375, 0.1219482421875, 0.2122802734375, 0.121826171875, 0.0787353515625, 0.168212890625, 0.1400146484375, 0.1650390625, 0.1690673828125, 0.0394287109375, 0.15380859375, 0.052...
embed
60375867_c0
60375867
prolog
0
Title: Issue with prolog recursion and incrementation Problem title: Issue with prolog recursion and incrementation Tags: prolog Problem: Issue with prolog recursion and incrementation I'm having an issue converting minutes to number of hours and remainder of minutes using recursion, calculating the left over minutes w...
Issue with prolog recursion and incrementation Issue with prolog recursion and incrementation prolog Issue mins_to_hours_and_mins Issue with prolog recursion and incrementation I'm having an issue converting minutes to number of hours and remainder of minutes using recursion, calculating the left over minutes works fin...
[ 0.01483154296875, -0.0015716552734375, 0.016357421875, -0.0033721923828125, -0.01031494140625, -0.0240478515625, -0.011474609375, 0.000644683837890625, 0.005218505859375, -0.02880859375, -0.00830078125, -0.031005859375, 0.007293701171875, 0.024658203125, 0.044921875, -0.0186767578125, ...
[ 223317, 502, 4867, 195625, 1830, 136, 145322, 881, 188, 497, 12824, 2940, 1249, 1363, 31089, 96760, 14633, 47, 14012, 21974, 47143, 17368, 74481, 25737, 645, 43240, 5885, 1284, 45767, 48903, 70, 140992, 5757, 572, 276, 2839, 8110, 4527, 116...
[ 0.1256103515625, 0.1309814453125, 0.2108154296875, 0.190673828125, 0.120361328125, 0.02459716796875, 0.177001953125, 0.190185546875, 0.107666015625, 0.1546630859375, 0.1331787109375, 0.09326171875, 0.2054443359375, 0.03277587890625, 0.102294921875, 0.145263671875, 0.2283935546875, ...
embed
7153727_c0
7153727
prolog
0
Title: Function inputs and outputs in PROLOG Problem title: Function inputs and outputs in PROLOG Tags: prolog Problem: Function inputs and outputs in PROLOG I'm building some relatively simple functions in PROLOG that take one input and one output. For simplicity, something like func(List, Item, [Item | List]). Now, I...
Function inputs and outputs in PROLOG Function inputs and outputs in PROLOG prolog PROLOG List Item Output1 Function inputs and outputs in PROLOG I'm building some relatively simple functions in PROLOG that take one input and one output. For simplicity, something like Now, I've got code that will call several of these ...
[ 0.01556396484375, 0.00787353515625, 0.00093841552734375, 0.005584716796875, -0.01422119140625, 0.00848388671875, 0.00250244140625, -0.01422119140625, 0.01092529296875, -0.015869140625, 0.00921630859375, -0.0030517578125, -0.01611328125, 0.01141357421875, 0.0159912109375, -0.00032806396...
[ 28670, 10763, 107730, 7, 136, 140992, 23, 10514, 47510, 502, 4867, 32036, 78426, 13538, 7077, 418, 33976, 8781, 32354, 5646, 1632, 134381, 14240, 18151, 11782, 40368, 15555, 27875, 16750, 98, 31089, 13695, 105233, 3525, 77336, 123055, 7477, 5...
[ 0.180908203125, 0.06451416015625, 0.2880859375, 0.0123291015625, 0.139404296875, 0.28173828125, 0.0489501953125, 0.1688232421875, 0.250732421875, 0.1092529296875, 0.1817626953125, 0.09564208984375, 0.1466064453125, 0.14208984375, 0.121826171875, 0.035675048828125, 0.039337158203125, ...
embed
17002163_c0
17002163
prolog
0
Title: How to add elements from sublists with 2 elements (the first element is a string and the second one a number)? Problem title: How to add elements from sublists with 2 elements (the first element is a string and the second one a number)? Tags: prolog Problem: How to add elements from sublists with 2 elements (the...
How to add elements from sublists with 2 elements (the first element is a string and the second one a number)? How to add elements from sublists with 2 elements (the first element is a string and the second one a number)? prolog sublists How sum_fire _H1 How to add elements from sublists with 2 elements (the first elem...
[ 0.011962890625, 0.0091552734375, -0.005218505859375, 0.014892578125, -0.0098876953125, 0.01171875, 0.006378173828125, 0.015869140625, 0.01068115234375, -0.01287841796875, 0.0245361328125, -0.0220947265625, -0.0010986328125, 0.01251220703125, -0.010498046875, 0.000027418136596679688, ...
[ 11249, 47, 15190, 80854, 1295, 1614, 6562, 678, 116, 5117, 12830, 79315, 136, 17932, 14012, 83, 1632, 502, 4867, 10554, 73702, 841, 418, 20697, 5303, 12638, 3444, 756, 101935, 37842, 64557, 44691, 4488 ]
[ 0.06500244140625, 0.00738525390625, 0.1739501953125, 0.203369140625, 0.097412109375, 0.21142578125, 0.2288818359375, 0.09393310546875, 0.1826171875, 0.07861328125, 0.16015625, 0.1976318359375, 0.051849365234375, 0.0804443359375, 0.136962890625, 0.024383544921875, 0.032958984375, 0....
embed
51540086_c0
51540086
prolog
0
Title: How to write a prolog predicate to trim first N elements from a List using conc (concatenation) operation Problem title: How to write a prolog predicate to trim first N elements from a List using conc (concatenation) operation Tags: concatenation, list, prolog Problem: How to write a prolog predicate to trim fir...
How to write a prolog predicate to trim first N elements from a List using conc (concatenation) operation How to write a prolog predicate to trim first N elements from a List using conc (concatenation) operation concatenation list prolog a conc How List How to write a prolog predicate to trim first N elements from a Li...
[ 0.0087890625, 0.0067138671875, 0.018798828125, 0.0247802734375, -0.007080078125, 0.0027008056640625, 0.00038909912109375, 0.03173828125, 0.01324462890625, -0.041748046875, -0.0026092529296875, -0.0152587890625, 0.00201416015625, -0.004302978515625, 0.019775390625, 0.00518798828125, 0...
[ 11249, 47, 33022, 502, 4867, 1653, 2063, 67, 85247, 5117, 541, 80854, 1295, 32036, 17368, 158, 238, 2271, 4460, 33, 41018, 10, 5303, 56065, 18151, 41911, 3525, 31089, 26785, 17006, 59121, 114689, 71, 195625, 6889, 8562, 4358, 4527 ]
[ 0.0753173828125, 0.0210723876953125, 0.162109375, 0.199462890625, 0.259521484375, 0.1744384765625, 0.2132568359375, 0.1158447265625, 0.21484375, 0.1241455078125, 0.17138671875, 0.16796875, 0.0880126953125, 0.1622314453125, 0.02581787109375, 0.1800537109375, 0.2015380859375, 0.05105...
embed
34548130_c0
34548130
prolog
0
Title: How to get reverse pairs of the list? Problem title: How to get reverse pairs of the list? Tags: prolog, list, reverse Problem: How to get reverse pairs of the list? How can I reverse pairs of some list in Prolog? For example: ?- reversePairs([1,2,3,4,5,6,7,9], R). R = [2,1,4,3,6,5,9,7]. % expected answer So far...
How to get reverse pairs of the list? How to get reverse pairs of the list? prolog list reverse How ReversedList Accum How to get reverse pairs of the list? How can I reverse pairs of some list in Prolog? For example: So far, I have written the following code: My code gives me the following answer: How can I correct my...
[ -0.022705078125, 0.0296630859375, 0.01116943359375, 0.01397705078125, -0.0184326171875, 0.0390625, -0.01318359375, 0.010498046875, -0.00384521484375, -0.012939453125, 0.01434326171875, 0.00946044921875, 0.00046539306640625, -0.005035400390625, 0.01043701171875, 0.0286865234375, 0.010...
[ 11249, 47, 2046, 39531, 184, 80836, 7, 111, 5303, 502, 4867, 853, 7864, 297, 154663, 29899, 316, 831, 1250, 18151, 26785, 35166 ]
[ 0.06451416015625, 0.02655029296875, 0.1162109375, 0.196044921875, 0.177490234375, 0.23486328125, 0.12255859375, 0.045379638671875, 0.182373046875, 0.0709228515625, 0.1939697265625, 0.0565185546875, 0.1734619140625, 0.049835205078125, 0.15625, 0.025054931640625, 0.1307373046875, 0.0...
embed
63813322_c0
63813322
prolog
0
Title: Prolog, X is older than Y Problem title: Prolog, X is older than Y Tags: prolog, predicate Problem: Prolog, X is older than Y I need to write a predicate that gives true if X is older than Y. MY codes are below. I don't see anything wrong yet. Please help me. born(jan, date(20, 3, 1977)). born(joris, date(17, 3,...
Prolog, X is older than Y Prolog, X is older than Y prolog predicate Prolog Year1 Year2 Month1 Year Month2 Day1 Month Day2 Prolog, X is older than Y I need to write a predicate that gives true if X is older than Y. MY codes are below. I don't see anything wrong yet. Please help me. Query shoul give this.
[ -0.005615234375, 0.00836181640625, 0.022216796875, 0.033203125, -0.0238037109375, 0.00732421875, -0.00860595703125, 0.01708984375, 0.0021514892578125, -0.04345703125, 0.0025177001953125, 0.0167236328125, -0.00189971923828125, -0.0277099609375, 0.00909423828125, -0.0098876953125, -0.0...
[ 1250, 4867, 4, 1193, 83, 114210, 3501, 990, 502, 1653, 2063, 67, 42552, 418, 304, 12982, 10013, 3871, 33022, 76199, 29568, 2174, 54133, 18151, 621, 35064, 1957, 44691, 4358, 58836, 53, 15756, 202, 8337, 903 ]
[ 0.1922607421875, 0.2490234375, 0.017578125, 0.1685791015625, 0.1331787109375, 0.23583984375, 0.1834716796875, 0.1942138671875, 0.1583251953125, 0.176025390625, 0.1949462890625, 0.10546875, 0.1322021484375, 0.06951904296875, 0.08837890625, 0.060028076171875, 0.0955810546875, 0.09655...
embed
1942316_c0
1942316
prolog
0
Title: Prolog Read Skips Lines? Problem title: Prolog Read Skips Lines? Tags: prolog Problem: Prolog Read Skips Lines? Im trying to read a file in gprolog, but I have a small problem, it seems to read a line, then skip one, then read the next one, etc... Heres my code : readFichierEnt([],Fichier_Ent) :- read(end_of_fil...
Prolog Read Skips Lines? Prolog Read Skips Lines? prolog Prolog Read Skips Lines Fichier_Ent end_of_file ExampleList sdfasdf1dfas3fas5end_of_file sdfasdf1 asdfas2 dfas3 fas4 fas5 df6 Prolog Read Skips Lines? Im trying to read a file in gprolog, but I have a small problem, it seems to read a line, then skip one, then re...
[ 0.0169677734375, -0.017333984375, 0.002105712890625, -0.01239013671875, -0.0240478515625, 0.017333984375, 0.0089111328125, 0.01153564453125, 0.01171875, -0.02490234375, 0.019287109375, -0.01043701171875, -0.025146484375, 0.003753662109375, 0.03955078125, -0.0036163330078125, 0.016357...
[ 1250, 4867, 4764, 91958, 7, 16777, 502, 3698, 1861, 56, 7768, 3564, 4390, 29822, 89536, 154663, 31773, 3611, 758, 910, 31577, 12301, 11435, 706, 3454, 19336, 2967, 37202, 13315, 21658, 1632, 11737, 18151, 62952, 25550, 6954, 124326, 237, 10...
[ 0.1802978515625, 0.2200927734375, 0.2216796875, 0.257568359375, 0.1009521484375, 0.22119140625, 0.113037109375, 0.043243408203125, 0.01300048828125, 0.04840087890625, 0.002716064453125, 0.0811767578125, 0.046051025390625, 0.1400146484375, 0.0281524658203125, 0.0633544921875, 0.010833...
embed
59675050_c0
59675050
prolog
0
Title: How do I map certain values to a list in Prolog? Problem title: How do I map certain values to a list in Prolog? Tags: dictionary, list, prolog Problem: How do I map certain values to a list in Prolog? So, I have a predicate defined as map(Letter, Number). For instance: map(j, 0). map(k, 1). etc. I need to make ...
How do I map certain values to a list in Prolog? How do I map certain values to a list in Prolog? dictionary list prolog How Prolog map_list Head Tail Ans NewAns How do I map certain values to a list in Prolog? So, I have a predicate defined as map(Letter, Number). For instance: I need to make a function called map_lis...
[ 0.00921630859375, -0.0023956298828125, 0.0118408203125, -0.0169677734375, -0.0245361328125, 0.022216796875, -0.004058837890625, 0.0181884765625, 0.0201416015625, 0.0031890869140625, 0.00457763671875, -0.0201416015625, -0.003082275390625, 0.025146484375, 0.006683349609375, 0.00854492187...
[ 11249, 54, 87, 22288, 24233, 142424, 47, 10, 5303, 23, 1250, 4867, 10763, 502, 6562, 44816, 1218, 379, 893, 2356, 7251, 1653, 2063, 67, 61924, 5267, 3055, 103332, 3871, 3249, 32354, 154663, 1193, 28282, 32036, 80836, 765, 2060, 3164, 1369...
[ 0.1241455078125, 0.05615234375, 0.0731201171875, 0.261474609375, 0.1090087890625, 0.206787109375, 0.1614990234375, 0.05908203125, 0.2332763671875, 0.0706787109375, 0.1832275390625, 0.2763671875, 0.04205322265625, 0.124755859375, 0.2030029296875, 0.09368896484375, 0.0853271484375, 0...
embed
60850108_c0
60850108
prolog
0
Title: Is there a way to create a mathematical expression in Prolog? Problem title: Is there a way to create a mathematical expression in Prolog? Tags: prolog Problem: Is there a way to create a mathematical expression in Prolog? As another side project of mine for learning Prolog, I was wondering if there is a way to ...
Is there a way to create a mathematical expression in Prolog? Is there a way to create a mathematical expression in Prolog? prolog Prolog Is there a way to create a mathematical expression in Prolog? As another side project of mine for learning Prolog, I was wondering if there is a way to solve this problem. I am tryin...
[ 0.0164794921875, 0.01611328125, -0.0028228759765625, 0.016357421875, 0.010986328125, 0.024658203125, -0.00335693359375, -0.003692626953125, -0.0037689208984375, -0.026611328125, 0.00677490234375, -0.03076171875, -0.00141143798828125, -0.0037078857421875, 0.000560760498046875, 0.0069580...
[ 2685, 10, 3917, 47, 28282, 291, 140363, 70760, 125195, 23, 1250, 4867, 502, 13452, 86869, 2967, 31577, 3249, 1528, 107730, 5303, 101935, 15190, 39933, 17721, 35604, 360, 190, 305, 534, 13538, 1639, 1328, 910, 1662, 110, 7, 49814, 140992, ...
[ 0.03656005859375, 0.07049560546875, 0.121337890625, 0.045196533203125, 0.1829833984375, 0.09429931640625, 0.1898193359375, 0.206787109375, 0.27490234375, 0.0928955078125, 0.1820068359375, 0.27197265625, 0.122314453125, 0.014617919921875, 0.032623291015625, 0.0300750732421875, 0.01957...
embed
17052641_c1
17052641
prolog
1
( Y + L =< GridSize, Y + L =< Y + TY, append([X/NewY], [], Rest), NewY is X + L ). corners(TX/TY, GridSize, Cor, Rest) :- not(member(X/Y, Rest)), X =< GridSize, Y =< GridSize, X > 0, Y > 0, rest(TX/TY, X/Y, Rest), append([X/Y], [], Cor). ntilesHelper(TX/TY, GridSize, 0, P, Cor, Rest) :- append(Cor, [], P). ntilesHelpe...
( Y + L =< GridSize, Y + L =< Y + TY, append([X/NewY], [], Rest), NewY is X + L ). corners(TX/TY, GridSize, Cor, Rest) :- not(member(X/Y, Rest)), X =< GridSize, Y =< GridSize, X > 0, Y > 0, rest(TX/TY, X/Y, Rest), append([X/Y], [], Cor). ntilesHelper(TX/TY, GridSize, 0, P, Cor, Rest) :- append(Cor, [], P). ntilesHelpe...
[ 0.0157470703125, 0.0086669921875, 0.0277099609375, 0.001556396484375, 0.00372314453125, -0.00160980224609375, -0.0079345703125, -0.00439453125, 0.0098876953125, 0.004913330078125, 0.00750732421875, -0.00604248046875, 0.00909423828125, 0.006866455078125, 0.0162353515625, 0.0062561035156...
[ 990, 997, 339, 2203, 16093, 31945, 71, 127167, 13, 95267, 114689, 1542, 64, 46568, 1723, 49756, 2356, 1193, 107767, 7, 54047, 27143, 5631, 959, 27417, 757, 10588, 3598, 1577, 60785, 1264, 4, 50886, 541, 436, 83, 20, 106, 45831, 42946, 3...
[ 0.1552734375, 0.1917724609375, 0.1363525390625, 0.211181640625, 0.263427734375, 0.1572265625, 0.04461669921875, 0.1668701171875, 0.0238037109375, 0.11669921875, 0.10107421875, 0.0904541015625, 0.06884765625, 0.07080078125, 0.132080078125, 0.120361328125, 0.0810546875, 0.13830566406...
embed
31941407_c0
31941407
prolog
0
Title: What is meant by &quot;logical purity&quot; in Prolog? Problem title: What is meant by &quot;logical purity&quot; in Prolog? Tags: prolog, logical-purity, logic Problem: What is meant by "logical purity" in Prolog? What is meant by "logical purity" (in the context of Prolog programming)? The logical-purity tag i...
What is meant by &quot;logical purity&quot; in Prolog? What is meant by &quot;logical purity&quot; in Prolog? prolog logical-purity logic What Prolog if_ What is meant by "logical purity" in Prolog? What is meant by "logical purity" (in the context of Prolog programming)? The logical-purity tag info says "programs usin...
[ 0.0205078125, 0.0380859375, 0.02685546875, 0.0133056640625, -0.01287841796875, 0.0181884765625, 0.001068115234375, -0.00004458427429199219, 0.0118408203125, -0.0234375, -0.01483154296875, 0.02099609375, -0.036376953125, -0.0267333984375, 0.015380859375, 0.0159912109375, 0.00497436523...
[ 131148, 137043, 289, 7398, 2481, 1250, 4867, 502, 62775, 4717, 2174, 23, 56037, 7909, 3004, 18749, 17368, 4734, 78315, 70731, 1653, 2063, 18113, 14768, 5045, 59226, 23550, 18614, 285, 11583, 27226, 67919, 69307, 13, 21543, 29459, 164156, 7334...
[ 0.1142578125, 0.2177734375, 0.1201171875, 0.22119140625, 0.169677734375, 0.1593017578125, 0.223388671875, 0.08758544921875, 0.19140625, 0.2044677734375, 0.1607666015625, 0.002471923828125, 0.0986328125, 0.103759765625, 0.0293121337890625, 0.1541748046875, 0.078857421875, 0.04312133...
embed
50193183_c0
50193183
prolog
0
Title: Prolog: how to check if list contains list from numerous facts Problem title: Prolog: how to check if list contains list from numerous facts Tags: prolog, list Problem: Prolog: how to check if list contains list from numerous facts I am new to prolog and trying to figure out how to solve this one. Number1,number...
Prolog: how to check if list contains list from numerous facts Prolog: how to check if list contains list from numerous facts prolog list numerous Prolog number1 number2 number3 which_icecream Prolog: how to check if list contains list from numerous facts I am new to prolog and trying to figure out how to solve this on...
[ 0.007415771484375, -0.01470947265625, 0.0152587890625, 0.0220947265625, 0.006378173828125, 0.0108642578125, -0.01141357421875, 0.0181884765625, 0.00445556640625, -0.014404296875, 0.01513671875, 0.0035247802734375, -0.016357421875, 0.003662109375, -0.0014190673828125, 0.0128173828125, ...
[ 1250, 4867, 3642, 47, 12765, 2174, 5303, 70541, 7, 1295, 183851, 15824, 502, 14012, 418, 304, 363, 3129, 2980, 114382, 3525, 86869, 903, 1632, 103332, 2606, 86963, 123055, 64507, 669, 519, 3796, 145170, 101935, 7103, 112034, 3871, 4527, 41,...
[ 0.1466064453125, 0.235107421875, 0.04876708984375, 0.031829833984375, 0.2261962890625, 0.1328125, 0.24267578125, 0.156494140625, 0.030426025390625, 0.1053466796875, 0.17236328125, 0.1754150390625, 0.12353515625, 0.0794677734375, 0.0253753662109375, 0.06024169921875, 0.1640625, 0.06...
embed
23523172_c0
23523172
prolog
0
Title: A Prolog code to generate prime numbers from 1 to N Problem title: A Prolog code to generate prime numbers from 1 to N Tags: primes, prolog Problem: A Prolog code to generate prime numbers from 1 to N I've been trying to do a Prolog problem to generate the prime numbers from 1 to N but it keeps replying with tru...
A Prolog code to generate prime numbers from 1 to N A Prolog code to generate prime numbers from 1 to N primes prolog 1 Prolog P-1 X-1 N-1 A Prolog code to generate prime numbers from 1 to N I've been trying to do a Prolog problem to generate the prime numbers from 1 to N but it keeps replying with true or false and i ...
[ -0.0142822265625, 0.017333984375, 0.019287109375, 0.005950927734375, 0.0032806396484375, 0.0185546875, 0.000904083251953125, -0.0150146484375, 0.006439208984375, -0.0194091796875, -0.00823974609375, 0.018310546875, -0.007110595703125, -0.00830078125, 0.0023345947265625, -0.008850097656...
[ 62, 1250, 4867, 18151, 47, 139392, 20809, 101935, 1295, 106, 541, 502, 436, 5759, 1193, 31577, 2967, 1284, 13695, 75836, 678, 29568, 707, 98320, 53418, 7413, 18499, 58836, 27781, 145111, 13, 90980 ]
[ 0.07171630859375, 0.17724609375, 0.253662109375, 0.2249755859375, 0.1031494140625, 0.1927490234375, 0.222412109375, 0.2125244140625, 0.07244873046875, 0.1201171875, 0.15771484375, 0.136474609375, 0.05755615234375, 0.1300048828125, 0.1212158203125, 0.05487060546875, 0.1082763671875, ...
embed
28840572_c1
28840572
prolog
1
a remainder of zero, then the X remains inside the list and is not dropped. Then, prolog moves on to the 2nd drop recursive case which can only be arrived when Z=0 and it will drop X from the list to return Z s. In essence, an element with index n, 2n, 3n... that is returned by indexOf will be dropped if it does not r...
a remainder of zero, then the X remains inside the list and is not dropped. Then, prolog moves on to the 2nd drop recursive case which can only be arrived when Z=0 and it will drop X from the list to return Z s. In essence, an element with index n, 2n, 3n... that is returned by indexOf will be dropped if it does not r...
[ -0.0020294189453125, 0.0255126953125, -0.007354736328125, 0.00066375732421875, -0.0205078125, 0.0230712890625, 0.00970458984375, -0.015869140625, 0.032958984375, -0.004425048828125, 0.013916015625, -0.0128173828125, -0.0269775390625, -0.00958251953125, 0.0146484375, -0.007049560546875,...
[ 47143, 820, 111, 45234, 1193, 46132, 5303, 959, 36069, 20051, 502, 4867, 25813, 116, 2208, 195625, 5844, 7225, 174920, 567, 145407, 1295, 30646, 91, 12830, 678, 63262, 19, 138, 176377, 132887, 101637, 990, 191633, 107730, 30698, 3003, 18, 1...
[ 0.160400390625, 0.13232421875, 0.0748291015625, 0.186279296875, 0.1241455078125, 0.07537841796875, 0.148681640625, 0.0035400390625, 0.20263671875, 0.1163330078125, 0.1461181640625, 0.2381591796875, 0.008514404296875, 0.073486328125, 0.050994873046875, 0.176513671875, 0.1260986328125,...
embed
4004052_c0
4004052
prolog
0
Title: Matching Multiple Lists Problem title: Matching Multiple Lists Tags: prolog Problem: Matching Multiple Lists I can write a predicate that is satisfied when two lists are equal e.g. equal([2,3],[2,3]) would be true and equal([2,3],[4,5]). would be false. However, what if I want to have a list and try and match it...
Matching Multiple Lists Matching Multiple Lists prolog Matching Multiple Lists Matching Multiple Lists I can write a predicate that is satisfied when two lists are equal e.g. equal([2,3],[2,3]) would be true and equal([2,3],[4,5]). would be false. However, what if I want to have a list and try and match it with any lis...
[ -0.0081787109375, 0.0189208984375, 0.0031585693359375, 0.01068115234375, -0.018310546875, 0.006988525390625, 0.0040283203125, 0.004150390625, 0.013671875, -0.0037994384765625, 0.0128173828125, -0.0172119140625, 0.00946044921875, 0.0166015625, 0.00060272216796875, -0.00634765625, 0.01...
[ 67407, 214, 19335, 8705, 32036, 502, 4867, 831, 33022, 1653, 2063, 67, 214521, 3229, 6626, 5303, 105950, 155761, 2806, 186, 29568, 80389, 98320, 3444, 765, 9790, 14858, 678, 2499, 104629, 128191, 4568, 1284, 82449, 617, 18, 23937, 47644, 38...
[ 0.273681640625, 0.072021484375, 0.17138671875, 0.149658203125, 0.252685546875, 0.1243896484375, 0.1468505859375, 0.038909912109375, 0.1148681640625, 0.160400390625, 0.1817626953125, 0.09356689453125, 0.2200927734375, 0.005279541015625, 0.1038818359375, 0.2205810546875, 0.171752929687...
embed
31758845_c0
31758845
prolog
0
Title: Prolog: implement Luhn algorithm with efficiency Problem title: Prolog: implement Luhn algorithm with efficiency Tags: algorithm, prolog, luhn, failure-slice Problem: Prolog: implement Luhn algorithm with efficiency I try to apply Luhn algorithm in SWI-Prolog. But I get some problem in running. When I test with ...
Prolog: implement Luhn algorithm with efficiency Prolog: implement Luhn algorithm with efficiency algorithm prolog luhn failure-slice Prolog Luhn sum_all Res Sum Subsum Prolog: implement Luhn algorithm with efficiency I try to apply Luhn algorithm in SWI-Prolog. But I get some problem in running. When I test with some ...
[ -0.0123291015625, 0.006103515625, 0.027587890625, 0.0086669921875, -0.0177001953125, 0.0093994140625, -0.0098876953125, 0.0179443359375, 0.01171875, -0.03662109375, 0.01226806640625, 0.015869140625, -0.01165771484375, -0.01336669921875, 0.00897216796875, 0.022705078125, 0.01879882812...
[ 1250, 4867, 29479, 3350, 127, 19, 234873, 678, 227066, 502, 79278, 137578, 13348, 10554, 5584, 9624, 36335, 8273, 11832, 9790, 59911, 159, 38969, 10752, 4966, 2046, 3060, 2967, 23, 51042, 14847, 87, 3034, 8781, 14012, 1884, 37638, 76199, 18...
[ 0.1712646484375, 0.2410888671875, 0.1256103515625, 0.138916015625, 0.1767578125, 0.2012939453125, 0.2440185546875, 0.0328369140625, 0.1663818359375, 0.1287841796875, 0.1302490234375, 0.177734375, 0.1090087890625, 0.1319580078125, 0.1390380859375, 0.06500244140625, 0.149169921875, 0...
embed
55949288_c0
55949288
prolog
0
Title: Constraining domain for variable through list Problem title: Constraining domain for variable through list Tags: prolog, constraint-programming, clpfd Problem: Constraining domain for variable through list I have a list defined in one part of my program as people([tom,betty,sue,fred,charles,chay]) I would like t...
Constraining domain for variable through list Constraining domain for variable through list prolog constraint-programming clpfd Constraining GroupCount Group all_different Constraining domain for variable through list I have a list defined in one part of my program as I would like to constraint a variable to be N value...
[ 0.0147705078125, -0.02197265625, 0.01904296875, 0.019287109375, 0.00130462646484375, 0.01385498046875, -0.0194091796875, 0.015869140625, 0.019775390625, -0.052001953125, -0.009765625, -0.01165771484375, 0.005767822265625, 0.012939453125, -0.000579833984375, -0.000820159912109375, 0.0...
[ 39215, 118862, 77758, 77336, 8305, 5303, 502, 4867, 158, 2816, 4288, 28966, 33139, 39557, 71, 10760, 108210, 756, 238778, 61924, 2831, 1528, 1884, 47, 186, 541, 142424, 1250, 186992, 408, 30319, 9232, 5983, 50491, 1984, 23, 106371, 3157, 19...
[ 0.11962890625, 0.2396240234375, 0.2093505859375, 0.2430419921875, 0.1046142578125, 0.2080078125, 0.10888671875, 0.212646484375, 0.1015625, 0.172607421875, 0.1630859375, 0.097900390625, 0.0194854736328125, 0.089599609375, 0.1358642578125, 0.1788330078125, 0.1571044921875, 0.02250671...
embed
21839321_c0
21839321
prolog
0
Title: Find the path of a node X from the root of the tree Problem title: Find the path of a node X from the root of the tree Tags: prolog, nodes, tree Problem: Find the path of a node X from the root of the tree I want to ask your help about a program I want to code in Prolog. I want to make a function path(X,tree,Pat...
Find the path of a node X from the root of the tree Find the path of a node X from the root of the tree prolog nodes tree the Find Path Route Left Right Find the path of a node X from the root of the tree I want to ask your help about a program I want to code in Prolog. I want to make a function path(X,tree,Path) that ...
[ 0.025146484375, 0.0106201171875, 0.00080108642578125, -0.0028076171875, 0.0098876953125, 0.026123046875, -0.005706787109375, -0.01446533203125, 0.01171875, -0.056884765625, 0.000446319580078125, -0.0224609375, -0.02001953125, 0.0174560546875, 0.01611328125, 0.006103515625, 0.02050781...
[ 26040, 60875, 111, 110, 112, 1193, 1295, 74855, 53201, 502, 4867, 988, 70, 108421, 106015, 2480, 90911, 26458, 4358, 1528, 18151, 23, 1250, 3444, 32354, 1542, 62600, 683, 10519, 7413, 17569, 17262, 149357, 2292, 71, 30646, 201505, 5303, 268...
[ 0.15869140625, 0.220458984375, 0.0810546875, 0.153076171875, 0.1317138671875, 0.15625, 0.1280517578125, 0.20703125, 0.1810302734375, 0.093017578125, 0.1895751953125, 0.10565185546875, 0.00323486328125, 0.210693359375, 0.163330078125, 0.045318603515625, 0.05206298828125, 0.016296386...
embed
59591197_c0
59591197
prolog
0
Title: Prolog: Why is there a vertical line and underscore in the output [x,y|_]? Problem title: Prolog: Why is there a vertical line and underscore in the output [x,y|_]? Tags: prolog Problem: Prolog: Why is there a vertical line and underscore in the output [x,y|_]? I don't understand the output of the following exam...
Prolog: Why is there a vertical line and underscore in the output [x,y|_]? Prolog: Why is there a vertical line and underscore in the output [x,y|_]? prolog Prolog Why Terms char_code Out atom_concat Neu Prolog: Why is there a vertical line and underscore in the output [x,y|_]? I don't understand the output of the foll...
[ 0.0223388671875, 0.01531982421875, 0.0036163330078125, 0.0093994140625, -0.01507568359375, 0.0079345703125, 0.006378173828125, 0.01495361328125, -0.007720947265625, 0.00848388671875, 0.0208740234375, -0.029052734375, 0.00159454345703125, -0.0037994384765625, -0.00982666015625, 0.005187...
[ 1250, 4867, 44084, 2685, 10, 79259, 13315, 136, 1379, 30854, 140992, 53, 454, 83, 7, 23, 502, 165504, 21441, 40899, 13538, 34627, 2271, 4460, 11059, 425, 4, 58745, 28219, 27781, 11782, 3249, 35484, 4432, 27591, 31, 56374, 567, 2203, 7763,...
[ 0.1505126953125, 0.222412109375, 0.150390625, 0.051544189453125, 0.04730224609375, 0.251953125, 0.2020263671875, 0.060516357421875, 0.196044921875, 0.1903076171875, 0.2132568359375, 0.07861328125, 0.063232421875, 0.009490966796875, 0.031646728515625, 0.035797119140625, 0.089233398437...
embed
50301785_c0
50301785
prolog
0
Title: Merging two ordered lists ProLog Problem title: Merging two ordered lists ProLog Tags: prolog Problem: Merging two ordered lists ProLog Hey so this is my code so far. I am only a begginer in prolog but i need it for school firstElement([_|_], [Elem1|List1], [Elem2|List2]):- Elem1 =< Elem2, merge([Elem1] , List1,...
Merging two ordered lists ProLog Merging two ordered lists ProLog prolog Merging ProLog Elem1 List1 Elem2 List2 Head Tail Tail1 Merging two ordered lists ProLog Hey so this is my code so far. I am only a begginer in prolog but i need it for school I found out that everytime it gets out of a merge it keeps forgetting th...
[ 0.0286865234375, 0.0250244140625, -0.003936767578125, 0.00128173828125, 0.0018157958984375, 0.03173828125, -0.0155029296875, -0.01214599609375, 0.01007080078125, -0.0123291015625, 0.0286865234375, 0.00058746337890625, -0.0113525390625, 0.00164031982421875, 0.006103515625, -0.0079956054...
[ 6035, 9966, 6626, 12989, 297, 5303, 1250, 113972, 502, 4867, 540, 195, 418, 32036, 304, 44816, 1218, 379, 18151, 2060, 1679, 3871, 100, 10696, 11907, 6032, 62163, 1810, 42564, 13695, 90820, 4568, 14012, 4420, 47, 33720, 3564, 5 ]
[ 0.1890869140625, 0.074462890625, 0.166748046875, 0.2003173828125, 0.07177734375, 0.2117919921875, 0.17578125, 0.2198486328125, 0.126220703125, 0.2125244140625, 0.042388916015625, 0.121826171875, 0.032379150390625, 0.16162109375, 0.03765869140625, 0.1136474609375, 0.0841064453125, 0...
embed