Re: Issues with Best-first Search on Bratko's book



Thanks Chip, you were right I needed to add the parentheses!

Regards
On Nov 23, 3:04 pm, Chip Eastham <hardm...@xxxxxxxxx> wrote:
On Nov 23, 8:29 am, Seba <sebastian.bo...@xxxxxxxxx> wrote:

Here's the complete code, I'm having a problem with the line with the
bagof. I'm getting an error saying Syntax Error: Operator Expected.
I'm using swi-prolog. I have checked it several times and it's not a
misswriting error, any idea on how to solve this?

[snip]

expand( P, l(N,F/G), Bound, Tree1, Solved, Sol) :-
F =< Bound,
(bagof( M/C, ( s(N,M,C), not member(M,P)), Succ),
!,
succlist( G, Succ, Ts),
bestf( Ts, F1),
expand( P, t(N,F1/G,Ts), Bound, Tree1, Solved, Sol)
;
Solved = never
).

I suspect that metapredicate not/1 requires parentheses
here around its argument.

regards, chip

.