Pm pln

Basic infrastructure for implementation of Attentional Focus filtering inside the the pattern matcher.the preliminary implementation of the callbacks could be changed later. one can use the specific implementation by invoking **cog-bind-pln**  from scheme.
2014-07-02 8:44 GMT+08:00 Cosmo Harrigan <notifications@github.com>:

> In tests/query/AttentionalFocusCBUTest.cxxtest:
>
> > +void AttentionalFocusCBUTest::setUp(void) {
> > +
> > +	pm.set_atomspace(as);
> > +
> > +	config().set("SCM_PRELOAD", "opencog/atomspace/core_types.scm, "
> > +			"opencog/scm/utilities.scm");
> > +
> > +	load_scm_files_from_config(*as);
> > +
> > +	config().set("MODULES", "opencog/query/libQueryModule.so");
> > +
> > +	cogserver().loadModules();
> > +
> > +}
> > +
> > +void AttentionalFocusCBUTest::test_pln_bindlink(void) {
>
>  But one question thats in my mind is, Isn't there a scenario that we may
> need all the matches in the AF regardless of their selection probability?
>
> @misganagit At what step (and where) will that stochastic selection occur?
> The answer to that question may also impact your last question. Depending
> on where it occurs, it might be a consumer of such a method; however, I'm
> not sure what structure you have in mind.
>
@cosmoharrigan <https://github.com/cosmoharrigan> according to my
understanding the stochastic selection is done in the get_incoming_set()
callback.Normally get_incoming_set() will return all atoms in the AF. this
call back might be called multiple times before a single solution is found.
so I was suspecting returning only a single atom in the AF based on
stochastic selection might terminate the search prematurely without no
solution being found but in the normal case all incoming sets in the AF are
searched priortized by their STI value,An unsuccessful search in one of the
incoming set will lead a new search starting from the next higher STI
valued atom from Incoming set.

> —
> Reply to this email directly or view it on GitHub
> <https://github.com/opencog/opencog/pull/891/files#r14436258>.
>



-- 
Misgana B. Belachew
'For everyone who asks receives, and the one who seeks finds, and to the
one who knocks it will be opened '--Jesus