PDA

View Full Version : prolog setof not showing all answers?


IronAlex
04-08-2007, 01:47 PM
hey, I think I'm not doing something correctly here..

I have a function nextState(oldState,newState) which takes my game from one state to another. the actual generating of states works fine, but when I use setof like so:

setof(newState, next(oldState,newState), U) it makes U come out as follows:

U = [newState1,newstate2,newstate3,...]

I get ... and [...] instead of the remaining states? How can I get it to show them all?

Trap D
04-08-2007, 02:18 PM
It's just a setting in the user's file "ini.pl"

Uncomment the line
%:- set_prolog_flag(toplevel_print_options,
% [quoted(true), portray(true), max_depth(10)]).
an set max_depth to 0. :
:- set_prolog_flag(toplevel_print_options,
[quoted(true), portray(true), max_depth(0)]).

IronAlex
04-09-2007, 06:55 AM
Thank you my friend! :)