FOIL Algorithm Implementation

Hello all, Ive recently been playing around with Prolog this past semester and ran into some neat new concepts in one of my courses at University. The concept in question being Inductive Logic Programming and an algorithm for inferring definitions from predicates known as FOIL. I really thought the idea was cool and would love to be able to learn a definition on a basic data set in Prolog. So I was wondering where I could read up more on this and its implementation in the language (if such a thing is even possible), because at least from my naive perspective Prolog seems like a natural place to implement such a thing. A point in the right direction would be helpful! Or if I’m just in over my head that’d be nice to know too!

Hi and welcome!

I am not sure about FOIL, but you have a couple of ILP systems available:

  • Aleph. This is a pack which you can install for SWI Prolog using pack_install(aleph).. See this link for more info.

  • CPLINT. Also a pack for SWI Prolog. Check out SLIPCOVER. See this link.

  • Louise. See this link.

  • Metagol. See this link. (about to be superseded by Popper)

Aleph and CPLINT are also available online here.

Kind regards, JCR


If you want to read more about ILP - as well as learning more Prolog - I can recommend Ivan Bratko’s excellent “Prolog Programming for Artificial Intelligence”, 4th editon (2011). It introduces Prolog and give a lot of AI examples in Prolog. Chapter 21 explains ILP quite good and shows two ILP programs (MiniHYPER and HYPER) with some examples such as learning predicates as member/2, odd/even, path/3, sort/2, and an arch problem.

The book also has chapters about other types of AI such as Planning, Constraint Logic Programming, and Machine Learning.