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/heuristic_state_space.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

37 lines
680 B
Plaintext

:- object(heuristic_state_space,
instantiates(class),
specializes(state_space)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 1998/3/23,
comment is 'Heuristic state space.']).
:- public(next_state/3).
:- mode(next_state(+nonvar, -nonvar, -number), zero_or_more).
:- info(next_state/2,
[comment is 'Generates a state sucessor.',
argnames is ['State', 'Next', 'Cost']]).
:- public(heuristic/2).
:- mode(heuristic(+nonvar, -number), one).
:- info(heuristic/2,
[comment is 'Estimates state distance to a goal state.',
argnames is ['State', 'Estimate']]).
next_state(Prev, Next) :-
::next_state(Prev, Next, _).
:- end_object.