Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems running local search algorithms #13

Closed
cmeilicke opened this issue Nov 5, 2019 · 5 comments
Closed

problems running local search algorithms #13

cmeilicke opened this issue Nov 5, 2019 · 5 comments

Comments

@cmeilicke
Copy link

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.

@cmeilicke
Copy link
Author

To clarify: The problems appear when usin aleph.pl. The problems do not show up (as far as I can see) when using aleph_orig.pl. This solves the concrete problem for me.

@friguzzi
Copy link
Owner

friguzzi commented Nov 6, 2019

Yes, it's a problem with porting, can you send me your input file?

@cmeilicke
Copy link
Author

As I said, I'm happy now that it runs nicely with aleph.pl. However, since you might like to fix this in your port, here are the details:

I use the attached file:

cocktail2.txt

Since i could not upload a *.pl file, i renamed the file extension to *.txt. You have to rename it back to cocktail2.pl

I run it like this:

E:\_temp\aleph-master\prolog>swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

1 ?- [cocktail2].
true.

2 ?- induce().
[select example] [1]
[sat] [1]
[poison(c3)]

[bottom clause]
poison(A) :-
   has(A,B), has(A,C), has(A,D), has(A,E),
   lem(E), lem(B), umb(D), str(C),
   first(B), last(E), suc(D,E), suc(C,D),
   suc(B,C).
[literals] [14]
[saturation time] [0.0]
[error] [set(refineop,rls)]
Warning: Undefined procedure: aleph:estimate_numbers/1
Warning:   However, there are definitions for:
Warning:         aleph:estimate_numbers/2
Warning:         aleph:estimate_number/4
Warning:         aleph:estimate_number/5
Warning:         aleph:estimate_numbers/5
Warning:         aleph:estimate_number/6
Warning:         aleph:estimate_numbers/6
[select example] [1]
[sat] [1]
[poison(c3)]

[bottom clause]
poison(A) :-
   has(A,B), has(A,C), has(A,D), has(A,E),
   lem(E), lem(B), umb(D), str(C),
   first(B), last(E), suc(D,E), suc(C,D),
   suc(B,C).
[literals] [14]
[saturation time] [0.015625]
[error] [set(refineop,rls)]
Warning: Undefined procedure: aleph:estimate_numbers/1
Warning:   However, there are definitions for:
Warning:         aleph:estimate_numbers/2
Warning:         aleph:estimate_number/4
Warning:         aleph:estimate_number/5
Warning:         aleph:estimate_numbers/5
Warning:         aleph:estimate_number/6
Warning:         aleph:estimate_numbers/6
[select example] [1]
[sat] [1]
[poison(c3)]
...

@friguzzi
Copy link
Owner

friguzzi commented Nov 6, 2019

Should be fixed in the latest commit, 208adfa
can you check?

@cmeilicke
Copy link
Author

Hi,

Thanks a lot for fixing this so quickly, yes, I checked, now it works nicely.

Regards. Christian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants