OK, I talk too much. Sorry. One last note: Michele, I just looked at https://github.com/raschild6/blocksworld_problem and I now understand the problem to be "given some PDDL, convert it to atomese"
I suggest that you should restructure the problem into smaller parts, a sequence of individual demos/examples. So, demo-1-basic-state.scm, demo-2-single-move.scm, demo-3-compound-move.scm, etc. For example: in rules_pickup_stack.scm there are no comments, so I don't really understand what you are trying to do there. I can guess, but guessing is hard. What is the equivalent PDDL? I notice that there are no comments in `domain.pddl` either. Again, I can guess, but buessing is hard. I suggest writing it like so: "here is some PDDL. It means that ?x is a block and ?y is its position and that a block is moved if pqr. Here is the equivalent atomese. The variable ?b is the current block and etc." I think that if you try to explain it in English, in addition to PDDL and Atomese, this will help clarify for you, and for everyone, what's actually happening... --linas On Tue, May 25, 2021 at 10:11 AM Michele Thiella <[email protected]> wrote: > For now I have only added the ContentLinks and the rules to work with to > solve the BC of the blocksworld problem > (for example the put-down and unstack rules are missing). > > It is true that I do not take into account a full state when I do an > action. > This would make sense in a general case, so that any action that is added > is correct regardless of the others, because it is based only on the state. > > Instead, the correctness of my current structure lies in the last > bindlink, the one that corresponds to the complete inference tree that > solves my goal. > The conditions for replacing VariableNodes with ConceptNodes are > accumulated among the various rules used in the tree. > So at the end the blocks will be stacked correctly and the result will > correspond to the probabilistic permutations of the n blocks on the table > taken at X (= number of blocks in my column) > > For now it works (except for this RAM problem), but the unstack and > put-down rules are not there, because they are actually not needed for > correct planning. > > I feel like I'm a bit cheating. > If the correct idea is to use a state it will be good to rewrite the rules. > > Although, I didn't quite understand what the problem with my structure is. > If I do BC I can't have partial solutions so I just need the final > bindlink to contain all the necessary conditions, I don't need them to be > verified for every rule. > > Certainly I have not explained well, perhaps because I have not understood > the matter well. > > Michele > Il giorno martedì 25 maggio 2021 alle 16:11:37 UTC+2 [email protected] ha > scritto: > >> You introduced ContextLinks, but it doesn't provide full state for each >> action. For example in pickup you create (EvaluationLink (PredicateNode >> "not-clear") (VariableNode "?ob")) for some object "?ob", but there are >> probably other objects that are not free. In c++ we can represent a state >> by boolean array. When applying some action we would copy the bit-vector of >> the previous state and modify some bits. You can emulate this behaviour by >> using ConceptNodes for states. You can store values of all boolean >> variables as properties of ConceptNode. You will have to rewrite >> preconditions to call to python or scheme function: >> >> ; precondition of pickup-action >> (AndLink >> (PresentLink >> (InheritanceLink >> (VariableNode "?state") >> (ConceptNode "state"))) >> (PresentLink >> (InheritanceLink >> (VariableNode "?ob") >> (ConceptNode "object"))) >> (EvaluationLink >> (GroundedPredicateNode "py: can_pickup"), >> ListLink( >> (VariableNode "?state") >> (VariableNode "?ob") >> ) >> ) >> >> in can_pickup you check if passed (state, object) pair satisfies the >> precondition. >> >> In ExectionOutputLink you can create a new ConceptNode for a new state by >> copying all the properties from the previous state with necessary changes. >> >> >> пн, 24 мая 2021 г. в 20:27, Michele Thiella <[email protected]>: >> >>> Hello everyone, >>> >>> Finally, I was able to pass the first planning test for the blocksword >>> problem, using ContextLinks. >>> (For now, it has some ad-hoc things/rules and others that are missing) >>> >>> But, as long as I look for a column of 3 blocks everything is fine and >>> the times for the BC are very short, >>> while when I look for a column of 4 or more I go into RAM overflow. >>> Unfortunately, I'm on Linux on an external sdd and the Swap area is >>> there. >>> Consequently, with a goal of 4 blocks, I use more than 8 Giga (I only >>> have 8) and it starts swapping but the time gets longer and I can't finish >>> the execution. >>> >>> Would anyone be able to run the test_pickup_stack.scm file? and share me >>> the log file? >>> it's in my repo: https://github.com/raschild6/blocksworld_problem >>> Thanks a lot in advance! >>> (There should be no errors, just do (load >>> "path/to/file/test_pickup_stack.scm") in the telnet shell. Report me if >>> there is something wrong, thanks!) >>> >>> I'm playing with the URE parameters to see if I can optimize the >>> inference. >>> (extra question) is there a URE parameter to terminate at the first BC >>> solution found? >>> >>> Michele >>> >>> -- >>> >> You received this message because you are subscribed to the Google Groups >>> "opencog" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/opencog/4f5a4761-3ad7-4d6c-87d6-f5bb1f16f993n%40googlegroups.com >>> <https://groups.google.com/d/msgid/opencog/4f5a4761-3ad7-4d6c-87d6-f5bb1f16f993n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "opencog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/opencog/b0effc4c-a09e-4f55-a00c-a4e16bb17f24n%40googlegroups.com > <https://groups.google.com/d/msgid/opencog/b0effc4c-a09e-4f55-a00c-a4e16bb17f24n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Patrick: Are they laughing at us? Sponge Bob: No, Patrick, they are laughing next to us. -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA36HZAfnJkcmHKD%3DoLKy0GRDJVgaospSfGSz4zy3RHoNBg%40mail.gmail.com.
