|
Revision 4601, 0.7 KB
(checked in by pmoura, 7 weeks ago)
|
|
Added svn:mime-type property to source files (set to text/x-logtalk).
|
-
Property svn:mime-type set to
text/x-logtalk
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | :- object(heuristic_state_space, |
|---|
| 3 | instantiates(class), |
|---|
| 4 | specializes(state_space)). |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | :- info([ |
|---|
| 8 | version is 1.0, |
|---|
| 9 | author is 'Paulo Moura', |
|---|
| 10 | date is 1998/3/23, |
|---|
| 11 | comment is 'Heuristic state space.']). |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | :- public(next_state/3). |
|---|
| 15 | |
|---|
| 16 | :- mode(next_state(+nonvar, -nonvar, -number), zero_or_more). |
|---|
| 17 | |
|---|
| 18 | :- info(next_state/3, |
|---|
| 19 | [comment is 'Generates a state sucessor.', |
|---|
| 20 | argnames is ['State', 'Next', 'Cost']]). |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | :- public(heuristic/2). |
|---|
| 24 | |
|---|
| 25 | :- mode(heuristic(+nonvar, -number), one). |
|---|
| 26 | |
|---|
| 27 | :- info(heuristic/2, |
|---|
| 28 | [comment is 'Estimates state distance to a goal state.', |
|---|
| 29 | argnames is ['State', 'Estimate']]). |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | next_state(Prev, Next) :- |
|---|
| 33 | ::next_state(Prev, Next, _). |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | :- end_object. |
|---|