1. How can we find all plans with JSHOP2 like (find-plans 'sample-prob :which :all :verbose 3) in SHOP2?
2. How can other debugging facilities be invoked in JSHOP2 similar to SHOP2? e.g. print-current-state
3. In SHOP2, I find in the manual that call to external functions can be incorporated. However, I am at loss as to how to encode the function as well as function call. Can you please provide with a simple example of the same?
Thanks for your help!
1. I am sorry to disappoint you, but I didn't provide all the facilities of SHOP2 in JSHOP2. Two of the things I didn't include are the first two things you asked for. You will need to change the code slightly to get what you want. In case of the print-current-state, you can just use a call expression in the precondition of the method/operator/axiom before execution of which you want to print the current state, and call JSHOP2.state.print() in the function that implements that call term. (I have defined the state static class member as private, so you might want to either make it public, or add a public function to class JSHOP2 that calls "state.print()".
2. There are two examples provided with the package for external code calls. The domains are called "test" and "freecell". I have also explained in great detail how to do this in JSHOP2's manual (JSHOP2.pdf, included in the package).
Thanks for the prompt response.
On the discussion on external code calls, I see in the JSHOP2 manual and the examples, how this is implemented.
I was asking about this functionality in SHOP2. I do not find any examples or explanation of how one would do this in SHOP2.
I am jumping back and forth between which one (SHOP2 or JSHOP2) to use, since I would want to utilize both external code calls as well as getting all possible plans for my project.
Looking forward to your response. Thanks!
Oops, sorry. Seems that I misunderstood you. In SHOP2 (the LISP version) you can use "eval" terms to make calls to external (LISP) code. Its format is (eval lispExp) where lispExp is any valid LISP expression. Of course the variable symbols in lispExp shoud be bound to something before the eval expression is to be evaluated.
As an additional hint to users of EVAL and CALL in the Lisp version of SHOP2, you will have to be careful about quoting in the expressions you use with EVAL and CALL (and ASSIGN). If you stuff values into these expressions that are lisp symbols, you will have to quote them, or lisp will try to evaluate them (i.e., find their values as variables) at query time. Note that this isn't a problem with numbers, T, NIL, etc., because they evaluate to themselves.
If I get a chance, I will try to stuff an example into the manual to help others avoid this problem.
how do i get list of preconditions from jshop2?
Log in to post a comment.