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/CAFj%2Bw-tNkzbekNocEH0Qm%3D12oFz12Uu72Srk6c4J%3DG%3D4MXhZFw%40mail.gmail.com.