Code Monkey home page Code Monkey logo

foil_prolog's Introduction

FOIL Prolog

First Order Inductive Learner (FOIL) algorithm implemented in Prolog.

About

The general approach used in an inductive learner is to start from the predicate whose definition is to be learned as the head of a a rule whose body is initialized to be empty. At each step, we add a literal to the body of the rule so that it satisfies several positive examples and none of negative examples. The literal to be added can be one of the predicates from the problem statement, the negation of a predicate from the problem statement, equality between two bound variables and inequality between two bound variables. For choosing between alternative literals, a heuristic measure is used. Here is a good example to illustrate FOIL algorithm.

How to run

  1. Clone repository
  2. Run Prolog IDE (recommended IDE - SWI-Prolog)
  3. Change IDE working directory to the cloned repository directory working_directory(_,'REPOSITORY_DIRECTORY').
  4. Define files to compile [loadall].
  5. Compile load().
  6. Use learn function to learn rules. For example learn(grandfather, Rule).

Note: To learn new rules, corresponding predicates must be added, as well as necessary facts. See "fakty_1" file for an example.

Credits

Authors: @pashok3d, @hpolekha

foil_prolog's People

Contributors

pashok3d avatar zhang-liao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.