This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/searching/blind_search1.lgt
pmoura 75392e54c7 Logtalk 2.15.0 release files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@757 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2003-02-05 00:15:28 +00:00

44 lines
753 B
Plaintext

:- object(blind_search(_),
instantiates(class),
specializes(search_strategy)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 1998/3/23,
comment is 'Blind search state space strategies.',
parnames is ['Bound']]).
:- public(bound/1).
:- mode(bound(?integer), zero_or_one).
:- info(bound/1,
[comment is 'Search depth bound.',
argnames is ['Bound']]).
:- protected(search/4).
:- mode(search(+object, +nonvar, +integer, -list), zero_or_more).
:- info(search/4,
[comment is 'State space search solution.',
argnames is ['Space', 'State', 'Bound', 'Path']]).
bound(Bound) :-
parameter(1, Bound).
solve(Space, State, Path) :-
::bound(Bound),
::search(Space, State, Bound, Path).
:- end_object.