HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
stassa
louise
Prolog2019–2026
stassa / louise

louise

Polynomial-time Meta-Interpretive Learning

6Distinct people
25Mentions
1Explicit recommenders
137GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Polynomial-time Meta-Interpretive Learning

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

Hey, if you're interested in higher-order logic programming then you might want to have a look at Meta-Interpretive Learning (MIL). It's a new approach to Inductive Logic…

YeGoblynQueenne used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year25 dated mentions

Observed mentions: 2019-08-04 07:50:07 UTC to 2026-02-24 18:03:33 UTC.

02462019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC606
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

What Hacker News says

25 sources
You said AI: https://github.com/stassa/louise Louise (Patsantzis & Muggleton 2021) is a machine learning system that learns Prolog programs. Louise is a Meta-Interpretive Learning (MIL) system. MIL (Muggleton et al. 2014), (Muggleton et al. 2015), is a new setting for Inductive Logic Programming (ILP) (Muggleton, 1991). ILP is a form of weakly-supervised machine learning of logic programs from examples of program behaviour (meaning examples of the inputs and outputs of the programs to be learned). Unlike conventional, statistical machine learning algorithms, ILP approaches do not need to see examples of programs to learn new programs and instead rely on background knowledge, a library of pre-existing logic programs that they reuse to compose new programs. This is what was done by Douglas Lenat from late 1970-s on [1]. He did his wor
Read the rest
k using Lisp, this thing does something close using Prolog. [1] https://en.wikipedia.org/wiki/Eurisko
In Extending C with Prolog (1994)
Then you get to definitions like ": open ( string -- handle 1 | 0) ... ;" which describes returning algebraic type Maybe Handle unboxed on the stack. Algebraic types are fun, they can easily represent Peano arithmetic and get us into the realm Goedel incompleteness theorem very quickly. Or you can deduce signature for EXEC EXEC sequence. EXEC's stack effect can be described as ( \alpha (\alpha -- \beta) -- \beta), where \greekletter is a placeholder for a stack part of arbitrary length. Notice that this type comment has nested brackets and does not adhere to Forth stack-effect comment convention. When I thought about this more than fifteen years ago, I've got at least two equally valid types for the EXEC EXEC: one where xt at top of stack consumes all its input and leaves no output ( \alpha (\alpha -- \gamma) \beta (\beta -- ) -- \gamma)
Read the rest
and when first EXEC produces something for second to execute upon ( \alpha \beta (\beta -- \gamma (\alpha \gamma -- \theta) -- \theta). One can argue that second type of EXEC EXEC subsume first one, if greek-letter-named-stack-parts are allowed to be empty. Still it shows that typing Forth, at the very least, needs unification on the Peano's arithmetic level, implementing deduction from length zero to unbounded length. So, in my opinion, for LLM to dependably combine typed Forth/concatenative definitions, it needs to call external tool like Prolog to properly deduce type(s) of the sequence of Forth's (or concatenative language's) definitions. And here we enter a realm interesting in itself. Here it is: https://github.com/stassa/louise This is a Prolog system to learn programs in polynomial time. For one example, it can one-shot-learn a grammar, without being "trained" on millions of samples. So, should one use a LLM that either needs a paid access or just slow to run, or freely go where "old school" systems like Eurisco [1] and Cyc went? [1] https://en.wikipedia.org/wiki/Eurisko Eurisco demonstrated superhuman abilities in 1982-83. It also demonstrated knowledge transfer at the time, where rules from VLSI place-and-route algorithms were used to design winning Traveler TCS fleet.
In R3forth: A concatenative language derived from ColorForth
>> If you prefer just the practical side of things then that's a lot easier to explain: I didn't like working with Prolog. Great, but that's aesthetics. You'd save a lot of time by being upfront about that. De gustibus non est disputandum. I note that your aversion for Prolog comes from a course you had in -undergrad, I think? I fell in love with Prolog in my undergrad course and even undertook a substantial project in it, where I loved it even more- but I didn't really get it until my PhD where I had the time to really sit down and study, not just Prolog as a programming language, but logic programming, as a thing unto itself. I didn't even know what sources to read, and I had read all the Prolog textbooks I could find. That's not to gatekeep, or pull rank, but logic programming is a deep and old subject and one really needs guidance to
Read the rest
get to grips with it which you just don't get in undergrad (not least because many tutors themselves aren't that deeply knowledgeable in the subject). I note also that you seem to have been introduced to Prolog in terms of its vaunted declarative qualities: "you just write the rules". That's probably the worst lie one can tell to students and the worst possible way to introduce Prolog, because, as you found out, Prolog just doesn't work that way. For example, back in my undergrad, I only learned about the "declarative paradigm" much later on and even then I thought it was more of a gimmick, the kind of argument people reach for when they try to convince others to be excited about the same things they're excited. This kind of argument is supposed to go beyond aesthetics, but it fails to do so. For example, why is declarative programming better than procedural? It isn't. It's just a matter of taste. The first thing I paid attention to about Prolog was "automated theorem proving", which was what blew my mind. I had just noticed the way manual theorem proving proceeds in a very mechanical manner and was thinking it should be possible to write a program to do it, when I found out someone had done it, for real, and much better than I ever could. I don't think that's aesthetics. It's a real, and distinct, capability, that you don't find e.g. in C or Haskell. How important it is, that's again a personal matter. For me, plenty. For others, not so much. De gustibus etc. The right way to introduce Prolog is the long way around, starting with propositional logic, then FOL, then logic programming, then Resolution, and then only at the end introducing Prolog and other logic programming languages. The way Prolog is taught now, it just doesn't work and everyone leaves university without understanding a thing about it. I can't give a "serious example" of using Mercury or Curry because I have only checked them out once or twice and don't have experience with them. I don't have anything against them, to be clear, as I don't have anything against Datalog. I prefer Prolog because it's more mature, and its implementations more feature-rich. SWI-Prolog in particular is bedecked with libraries like a swiss army knife and its maintainer is a programming super-hero. But if you like Mercury then you could possibly help with its development, which I understand has slowed down for lack of interest, which is a big shame. On meta-interpreters, I use one all the time. The Inductive Logic Programming system that I created during my PhD is based on an inductive, second-order Prolog meta-interpreter: https://github.com/stassa/louise You'll find the early version of that meta-interpreter in https://github.com/stassa/louise/blob/master/src/vanilla.pl A new version, decoupled from any specific learning system, is in a private repo. Let me know if you're very very interested. A write up is here: https://hmlr-lab.github.io/pdfs/Second_Order_SLD_ILP2024.pdf >> Prolog can get stuck in a branch of the search tree that cannot lead to a solution. There's more ways to execute Prolog than DFS so that you don't get stuck in loops. Obviously there'll always be infinite proof branches because Church-Turing. I'm not sure you fully appreciate that?
In Implementing Logic Programming
>> There are quite a few publications that explore the concept of generating programs, either using typed or untyped functional languages. That's Inductive Functional Programming (IFP), a kind of Inductive Programming that also includes Inductive Logic Programming (ILP). The canonical example of IFP is Magic Haskeller: https://nautilus.cs.miyazaki-u.ac.jp/~skata/MagicHaskeller.h... As an example of a modern ILP I suggest Popper: https://github.com/logic-and-learning-lab/Popper/ Or Louise (mine): https://github.com/stassa/louise One of the DreamCoder papers describes Inductive Programming as a form of weakly supervised learning, in the sense that such systems learn to generate programs not from examples of programs, but from examples of the target programs' beuav908rs, i.e. their inputs and outputs. By contrast LLMs or slightly older neura
Read the rest
l program synthesis systems are trained on examples that consist of pairs of (programming-task, program-solving-the-task). Another way to see the difference between Inductive Programming systems and conventional machine learning systems used for program synthesis is that Inductive Programming systems learn by solving problems rather than from observing solutions. The advantage is that, in this way, we can learn programs that we don't know how to write (because we don't have to generate examples of such programs) whereas with conventional machine learning we can only generate programs like the ones the system's been trained on before. Another advantage is that it's much easier to generate examples. For instance, if I want to learn a program that reverses a list, I give some examples of lists and their reverse, e.g. reverse([a,b,c],[c,b,a]) and reverse([1,2,3],[3,2,1]) whereas e.g. an LLM must be trained on explicit examples of list-reversing programs; like, their source code. IFP and ILP systems are also very sample efficient, so they only need a handful of examples, often just one, whereas neural net-based systems may need millions (no exaggeration- can give a ref if needed). The disadvantage is that learning a program usually (but not always - see Louise, above) implies searching a very large combinatorial space and that can get very expensive, very, very fast. But, there are ways around that.
In Discovering algorithms by enumerating terms in Haskell
Here's what I'm doing with Prolog: https://github.com/stassa/louise Louise is a Meta-Interpretive Learning (MIL) system. MIL is like a second-order Prolog where first-order programs are learned from higher-order programs by Resolution. There's a long thread of literature on MIL going back to 2014 but it now seems we're starting to move towards applications, e.g. I'm doing a post-doc where I use MIL to learn autonomous behaviours for an agent that must guide a mobile robot in survey missions. Other colleagues are working on applications in biology. We're going slowly because there's very few of us but MIL is a powerful technique that extends the soundness and completeness of SLD-Resolution to induction, so I'm hopeful that good things will happen with a bit of elbow grease and a bit of patience.
In Ask HN: What's Prolog like in 2024?
Thanks! Well, if you folks are interested in formal methods and learning, then you might be interested in Inductive Logic Programming. Here's a link to my work: https://github.com/stassa/louise The referenced papers include some examples on learning a simple CFG for a small set of Magic: the Gathering examples. More recent work looks at solving mazes and taking names (under review). One of our PhDs is working to implement all this in Rust btw. Sorry for advertising my work on your post :)
In Show HN: Mazelit - My wife and I released our first game
Well, if you're willing to use Prolog I commend you, but then you don't need an LLM because you don't need to do a dumb search of a large space. You can instead use second-order Resolution for induction. Here's how it's done (a.k.a. shameless plug of my PhD work): https://github.com/stassa/louise/blob/master/data/examples/a... >> Disclaimer: did my dissertation on ips (with genetic programming), but in the 90s when we basically had no computer power. The results were horrible outside trivialities, now they aren't anymore. But that's because the training data and the model parameters keep increasing. Performance keeps increasing but not because capabilities improve, only because there's more and more resources spent on the same old problems. There's better ways than that. All the classical AI problems, planning, verification, SAT, now have
Read the rest
fast solutions thanks to better heuristics, not thanks to more data (that are useless to them anyway). That's a real advance. I still would like a quantification of the "vast trim" btw. Numbers, or it didn't happen.
In FunSearch: Making new discoveries in mathematical sciences using LLMs
YeGoblynQueenne·Feb 4, 2023Recommendation phrase
Hey, if you're interested in higher-order logic programming then you might want to have a look at Meta-Interpretive Learning (MIL). It's a new approach to Inductive Logic Programming (ILP) that learns by SLD-resolution with first- and second-order definite clauses (hence, "higher-order"). You won't find much on MIL as "higher-order logic programming" but that's really what it is: it's logic programming; with a higher-order program (i.e. one containing both first- and second-order clauses). The catch is that once you do this any proof you complete gives you instantiations into the second-order variables in the second-order clauses and now you have yourself a first-order program, that you didn't have before; hence "inductive". So it's basically a form of machine learning of logic programs, from other logic programs. There are a few papers y
Read the rest
ou can find online about MIL, but I recommend (PLUG ALERT) the documentation of the MIL system I created for my doctoral thesis as a starting point: https://github.com/stassa/louise I recommend that as a starting point because it's written for people who are familiar with logic programming, but not necessarily ILP. Anyway, plug over. I think MIL is an exciting new development that has of course gone under the radar of the logic programming community at large.
In Scryer Prolog
Regarding the Peano version of the Ackermann-Péter function, I checked again to make sure and I never used the word "elegant" anywhere, either on HN or on Rosetta Code. I would never be so presumptuous, you know? On Rosetta code I pointed out that my version is "pure" because that's what Prolog code without side-effects is usually called. I put it in "quotes" because I personally don't care about purity. What I care about is simplicity of structure. That's because the simpler the structure of a program, the easier the prorgam can be learned. You see, my PhD studies and my research interest are about writing Prolog programs that learn Prolog programs from Prolog programs and to do that it really helps if all the Prolog programs are veeery simple, for combinatorial explosion ever lurks. For example, I'm so delighted that I figured out how t
Read the rest
o write that "pure" version of the Ackermann-Péter function not because I'm so full of myself I think it's "elegant" but because it is simple, and thanks to its simplicity I could then get my ILP system, Louise, to learn it from a single example: https://github.com/stassa/louise/blob/master/data/examples/a... The is/2 version would be much harder to learn, because of the more complex structure. Although I think Louise can do that too. Btw, I got Louise to learn the Function because I was challenged to do it by one of the examiners in my viva, who figured the Function's furious combinatorial complexity makes it unlearnable. That's right, but Louise can get around that because it can learn recursive programs with arbitrary structure from a single example, so it doesn't have to be trained on any example that triggers the Function's combinatorial fury. In any case, Ackermann is a toy function only really useful to make a point about recursion, and that's exactly how I use it also. Who cares if it blows up with n = 2, m = 4, or with n = 5, m = 6? It blows up quickly anyway. That's the whole point. So, your comment above is very stream-of-consciousness and I wonder what motivated you to write such a mad rant of the internets. I guess you must be really passionate about the subject you discuss. If so, I understand. You are not alone :) No, really, I generally agree with you. I asked above what is "usefulness" because for me Prolog is useful and I don't understand why anyone would say it isn't. Reading your other comment in the thread, I got the impression you would agree with me on that. But it's not about agreement. Aye, the night is long and full of errors and we must somehow deal with the dirty, dirty real world. Personally, I'm happy with that. But I do like my tools to also be nice to look at and I find that when I can make them so, they also tend to work better. For example, cleaner, better commented code, is easier to read and maintain. I mean, duh. In any case, in my mind, a well-made tool is a thing of beauty anyway you look at it. Re: "quality of life", well yea, that. If you were to look at my Louise, I think you'd find that I've gone out of my way to make it into a system that people can used. I'm totally inspired to do that by SWI-Prolog, btw. So for example, Louise has logging facilities up the wazoo and so everytime someone tries to use it and it breaks, they send me a nice, friendly dump of their logs, and then I can trudge through them and help my user. Because I want to help my user. I wish people sent me more bug reports, but I guess the majority find that something breaks and they don't bother to tell me. Oh mon dieu, la cruelle tourmente. As another example, I spent considerable effort to make sure that Louise's "metarules" (second-order background knowledge) are easy to read and use. For that purpose there's three metarule formats that Louise's pretty-printer can produce. One is the internal representation of the metarule that's useful for debugging, one is the user-friendly format where metarules are declared at the user-level and a final one is the formal notation, with quantifiers, used in the literature, so users can directly relate the metarules they use to a paper they read. Here's what that looks like ("chain" is the friendly identifier of that particular metarule): ?- print_metarules(expanded, chain). m(chain,P,Q,R):-m(P,X,Y),m(Q,X,Z),m(R,Z,Y) true. ?- print_metarules(user_friendly, chain). configuration:chain metarule 'P(x,y):- Q(x,z),R(z,y)'. true. ?- print_metarules(quantified, chain). (Chain) ∃.P,Q,R ∀.x,y,z: P(x,y)← Q(x,z),R(z,y) true. By contrast, if you look at the original Meta-Interpretive Learning system, Metagol (https://github.com/metagol/metagol), this is what "chain" looks like: metarule([P,Q,R], [P,A,B], [[Q,A,C],[R,C,B]]). % chain If I understand your comments about "quality of life" work correctly, then that's pretty much what I always try to do and what most people in academia never do. Guess what, I'm out of the game now. But, well, at least I tried :)
In Prolog at Work
As triska says, there are different execution strategies for Prolog and left-recursion is not a problem in practice. To plug my own work, the Inductive Logic Programming (ILP) system I developed during my PhD (https://github.com/stassa/louise) can learn left-recursive Prolog programs thanks to an inductive Prolog meta-interpreter executed with SLG-resolution (a.k.a. tabling). I mean to say that the inductive meta-interpreter itself is tabled, so it can prove left-recursive programs without entering an infinite recursion (it needs to do that because it learns a program by proving its generalisation). And so it can learn left-recursive programs without "going infinite". That used to be a big problem for ILP, but it's now well and truly solved, in theory as well as in practice. And I say "now" but SLG-resolution is old as a a very old thing;
Read the rest
Tamaki and Sato described it in 1986, I believe: https://link.springer.com/chapter/10.1007/3-540-16492-8_66 But then implementations took a bit to catch up. >> Prolog is deeply unsuited for work, use Clingo instead. Well, that doesn't make sense. ASP doesn't even allow lists, let alone side-effects (you know, like writing to a stream), so what "work" is it that it's better suited for, than Prolog? Also, if I remember correctly, Clingo is not a language but a grounder? It takes a first-order program and grounds the entire Herbrand base into a set of propositions so that a SAT solver can then derive the stable models of the program? Do I have that wrong? Let me say up front that I've never heard a worse idea in my life, and I've heard a few. First of all, that's why ASP can't use lists, or other functions, because then the Herbrand base goes infinite and good luck grounding it. Second, SAT-solving is NP-complete. As I realised recently (https://news.ycombinator.com/item?id=34072923) ASP is an elegant framework for dealing with uncertainty in a purely symbolic manner, with negation as failure and axiomatic, classical negation. But then, why go and mess this elegance up with a dumb propositionalisation approach that loses all the good stuff about first order logic, and that's terminally inefficient to boot? That, I still don't get.
In Prolog at Work
Thanks, that's a nice example. >> For an example. The potential hypothesis here are pre generated, but you can imagine an algorithm or adapt an existing one with a tight generalise/specialise loop. Yes! I'm thinking of how to adapt Louise (https://github.com/stassa/louise) to do that. The fact that s(CASP) is basically a Prolog-y version of ASP (with constraints) could make it a very natural sort of modification. Or, of course, there's always Well-Founded Semantics (https://www.swi-prolog.org/pldoc/man?section=WFS). What's hyp_gen.pl?
In Potassco: The Answer Set Solving Collection

Showing the 15 most recent of 25 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.