On 24.09.2014 20:38, Marvin Abisrror wrote:
> It is the same code of goal_count_heuristic{cc, h}.
Hi Marvin,
it is not quite the same code. As I wrote, your code includes the
additional lines
cout<<"goal uno"<<"\n\n";
and
cout<<"SSHeuristic ..."<<"\n\n";
which the goal count heuristic does not include. These are causing
syntax errors (because of the missing braces for the surrounding
if/else). After fixing these syntax errors and compiling the code, your
file works for me.
> About the fix of gabi, I have tried and I continue having the same error.
> And about the if/else they are indented and has the same as
> goal_count_heuristic.cc
Indentation has no meaning in C++. If you have more than one line of
code in an if/else block, you need braces ("{" and "}"). The code in
goal_count_heuristic.cc doesn't need braces because there is only one
line in each if/else block, but you have the additional output lines
there, so the braces are needed.
> I am attaching the Makefile (.txt I have changed the extension to
> upload.), please note that it is added with the name ss_heuristic.h under
> the file goal_count_heuristic.h
The Makefile looks good to me.
If you still cannot reproduce the cause of the problem, I suggest you cd
to the "src" directory, type the following commands and send us the
complete output:
./build_all distclean
./build_all
(It's normal for the "./build_all distclean" output to end with an error
message, so this can be ignored.) This should show the syntax error in
ss_heuristic.cc. If it does not show an error, please continue with the
following line and also send us the output:
./plan ../benchmarks/blocks/probBLOCKS-5-0.pddl --search 'astar(ss())'
Cheers,
Malte