Giter Site home page Giter Site logo

aleph's Introduction

  • ๐ŸŽŠ I'm a big fan of Prolog, Haskell, Java, and Python.
  • ๐Ÿ”ญ Iโ€™m currently working on probabilistic logic programming and statistical relational artificial intelligence
  • ๐ŸŒฑ Iโ€™m currently learning Copilot

aleph's People

Contributors

axettone avatar friguzzi avatar harshakokel avatar jboockmann avatar michael-siebers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aleph's Issues

Missing cut in repeat loop

The repeat loop in the following clause is missing a cut (found by the Logtalk linter):

aleph/prolog/aleph.pl

Lines 11272 to 11278 in 26eef74

show_file(File):-
aleph_open(File,read,Stream),
repeat,
read(Stream,Clause),
(Clause = end_of_file -> close(Stream);
writeq(Clause), write('.'), nl,
fail).

Backtracking to a call to show_file/1 will result in a runtime error (trying to read from a closed stream). Tp prevent this from happening, you can rewrite the clause as:

show_file(File):- 
    aleph_open(File,read,Stream),  
    repeat, 
    read(Stream,Clause), 
    (   Clause = end_of_file -> close(Stream), !
    ;   writeq(Clause), write('.'), nl, fail
    ).

Loads of output even when verbose is 0

Hi!
Not sure if this is a bug or not but i get several hundreds (if not thousands) of lines of output even with
:-aleph_set(verbose, 0)..
Thanks!
/JCR

May need some special treatment for the evaluation function 'accuracy'

The definition is

evalfn(accuracy,[P,N|_],Val):-
	(P = -inf -> Val is 0.5;
		Val is P / (P + N)), !.

It causes an error when P + N = 0. It may happen when users disable the bottom clause and define their own refinement operators. It is possible that generating a clause that does not satisfy any examples.

Perhaps return accuracy 0 when P + N = 0?

problems running local search algorithms

Hello,

I was using your aleph port to get used to Aleph and its different search strategies. So thanks first of all, for providing the SWI-prolog version! This already helped a lot. However, when trying to run induce with local search settings, like this one, I get a warning and no results.

:- aleph_set(search, rls).
:- aleph_set(rls_type, gsat).
:- aleph_set(tries, 100).
:- aleph_set(moves, 10).

The warning is related to the call of
estimate_numbers(_)
It seems that the method which expectes two parameters exists, and that this can be easily fixed by changing to
estimate_numbers(_,M)
However, then another similar warning pops up related to another method call.
Maybe you forget to rewrite some methods calls when porting the code?

Sorry for maybe explaing this issue in a uncommon way. I'm not at all familar with prolog, so I refer to methods instead of goals.

Best regards,
Christian.

Having problem with test_pos setting

Hello,

I am getting the following errors while setting the test_pos parameter. Any idea what am I doing wrong?

Trial 1:
:- aleph_set(test_pos,test_file_pos).
Error:

[error] [set(test_pos,test_file_pos)]

Trial 2:
:- aleph_set(test_pos,'./test_file_pos.f').

Error

Warning: Unknown procedure: aleph:test_file/2
Warning:   However, there are definitions for:
Warning:         aleph:test_file/3
Warning:         aleph:test_files/3

A potential bug about reset_succ

Line 1137 of "aleph.pl" is reset_succ,. But the definition of reset_succ is reset_succ(M):-. It requires an argument. Sometimes it seems can cause warnings and even segmentation faults.

Warning: Unknown procedure: aleph:reset_succ/0
Warning:   However, there are definitions for:
Warning:         aleph:reset_succ/1

Aleph for explainable AI

Hello,

I am trying to use Aleph for explainable AI, but I am struggling to frame the problem. Is there any tutorial is available for it?

Issue with induce_incremental ?

Hi professor Riguzzi,
I am trying to run the 'member' example ( incremental learning) and I am not able to see some of the menu options such as overgeneral overspecific etc. I greatly appreciate your help with that.

Reading lists dynamically

I am fairly new to Prolog and Aleph and need help with the following.

There are two lists: list_A and list_B, where list_A is a shorter list than list_B. For each item in list_A I want to check whether it is present in list_B. I have the following code for the same:

common_list([X],[X]).
common_list([X|Tail],Y):- member(X,Y).
common_list([X|Tail],Y):- common_list(Tail,Y).

But the problem is that I want to input list_A dynamically and want to define the elements of list_B from a database. For the output, I then want to list the elements that matched as a result.

So, for example,

  • list_B = [cho,pip,lib,exo,ram,lik,mangoes]
  • then I want that my program inputs a list from a sentence, say the sentence is 'I like mangoes' then the list should read list_A = [like,mangoes]
  • and then the output should be: true; mangoes.

So my main questions are:

  • how can I take the list_A dynamically as input?
  • how can I read list_B from a database?
  • how do I print the matching list elements?

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.