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 7f6c6af7d5 Logtalk 2.22.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1218 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2004-12-25 03:06:18 +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/3,
[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.