Linas etc.,
In this e-mail I will explore the possibility of implementing a simple
PLN ForwardInferenceStep using Linas's pattern matcher,
The ForwardInferenceStep, as I have defined it, involves
****
1-- grabbing an Atom A from the AttentionalFocus
2-- choosing a PLN Rule R to use (perhaps using weights derived via
experience, etc.)
3-- if the Rule R is unary (like inversion), applying it to A, and
putting the result into the Atomspace
4-- if the Rule R is binary (like deduction) finding another Atom B
that is suitable, and applying R to A and B to get a result... and
putting the result in the Atomspace
****
One approach here would be to create a GroundedSchemaNode of the form
-- GroundedSchemaNode ForwardInferenceStep(Atom A)
which wraps up steps 2-4 ...
... and then use the pattern matcher to do something like
P ==> Q
where
P = Atom $A is in the AttentionalFocus
Q = Execute ForwardInferenceStep( $A)
In Scheme this might look like
****
(define pln-forward-step
(BindLink
;; The variable to be bound
(VariableNode "$var")
(ImplicationLink
;; The pattern to be searched for
(EvaluationLink
(GroundedPredicateNode inAttentionalFocus)
(Atom $var)
)
;; The value to be returned.
(ExecutionLink ForwardInferenceStep "$var")
)
)
)
;; Run the above pattern
(cog-bind pln-forward-step)
****
Here I am defining inAttentionalFocus as a GroundedPredicateNode, that
returns True if its argument is in the AttentionalFocus...
However, I am wondering if the above pln-forward step would give the
desired behavior...
What I would like is: for a single PLN forward step to choose a
*random* Atom from
within the AttentionalFocus (where the AttentionalFocus is defined as
those Atoms for
which the STI is greater than the AttentionalFocusBoundary.... I am
not sure if the
pattern matcher is controllable in this way (i.e. so that it can be
instructed to choose
a single instantiation of $var randomly) ...
Also, I would like to explore options like: having a single PLN
forward step choose
an Atom from within the AttentionalFocus, with the probability of chosing Atom A
being proportional to the STI of Atom A.... I would suppose that the
pattern matcher
is not currently controllable in this way
So it seems to me that, in order to use the pattern matcher to implement a PLN
forward inference step in the above manner, it would be necessary to
significantly
customize or modify the pattern matcher.
What you suggested is
> One way is to create a GroundedSchemaNode that examines the STI. If STI is too small, do nothing.
But that doesn't seem to implement the desired behavior.... In this
case, as I understand it,
the pattern matcher will find an Atom (by whatever means it's
programmed to) and then it will be thrown
out if it's not in the AttentionalFocus.... But this is not
necessarily going to give a random sampling
of the Atoms in the AttentionalFocus; it's going to give a biased
sampling, where the bias is determined
by the particular algorithm inside the pattern matcher...
I like the idea of getting OpenCog AI processing done via small chunks
of intelligent processing packed
into GroundedSchemaNodes.... However, I need to be able to control
the way this processing is done,
e.g. to control the way Atoms are selected for a given process...
thx
Ben
--
Ben Goertzel, PhD
http://goertzel.org
"My humanity is a constant self-overcoming" -- Friedrich Nietzsche
--
Ben Goertzel, PhD
http://goertzel.org
"My humanity is a constant self-overcoming" -- Friedrich Nietzsche