Let me balance my earlier theoretical remarks with some clarifications.
-- Bindlinks are more-or-less pure crisp-logic things. Any single one gives
a pure, crisp true/false result, and you can certainly write solvers with
them.
-- The PLN rules are ways of assembling them into inference trees with
non-crisp probabilistic results.
-- Anatoly's idea sounds like a good one to me. Anything you can do to
limit the search space is always a good thing. Things like
(PresentLink
(InheritanceLink
(VariableNode "?ob")
(ConceptNode "object")))
can vastly speed the search by limiting it only to those ?ob's that are
actually objects, instead of trying everything under the sun. This is very
useful in intermediate steps, to avoid combinatoric explosion.
-- I have no clue what ContextLinks are good for. That's a PLN thing.
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/CAHrUA37r38daLXGaN%2BJmYmm0KgDkacnV7a60pE%3D%2BE0M5DY7s4g%40mail.gmail.com.