Comments (11)
An obvious "quick fix" would be to alter the pattern matcher callbacks to simply not consider any atoms that are not in a focus-set. This is quite easy to do. It's somewhat similar to the attention-based variant of the pattern matcher, which avoids looking at atoms with low AV.
A focus-set variant of the matcher could provide the determinism that the current chainers have, and surely run faster than the current chainers. It would also avoid some of the indeterminism associated with the AV subsystem.
from ure.
The forward chainer is rather messy as compared to the new backward chainer. I intend as soon as I start running the large experiments on the BC to re-organize the FC code to be cleaner and ultimately faster.
from ure.
I wasn't worried about the mess, per-se, more about the copy-in and copy-out of the focus-set. This affects the backwards-chainer too, not just the forwards-chainer. (right? because BC also does this copy-in?)
I deleted my other comments and moved them to issue #26..
from ure.
The BC does no copying. There is little in common between the BC and FC. The BC has been re-written from scratch and, although not being optimized at a low level, is more thoughtfully designed. I'll soon revisit and simplify the FC, so I'd advice not to spend too much on it yet.
from ure.
Am I right that problem still here? I mean DefaultPatternMatchCB::eval_term()
still creates new atomspace each time and profiler shows that it has huge impact on performance.
from ure.
Thanks @ivan-ushakov for your interest, however as I said the FC is soon gonna be redesigned. It's gonna be merged to the BC to form a mixed chainer, and its main routines exposed so that the user can easily build his/her own chainer. So unless you or other users have a strong immediate incentive to have an optimized FC I wouldn't bother.
from ure.
@ivan-ushakov that is said, any profiling results you have would still be of interest, even if it's about FC, so feel free to paste them here. If you happen to do some profiling on the BC that would be of even more interest. Thanks!
from ure.
There is supposed to be a pool of empty atom-spaces, ready to be used, and so grabbing one should be very fast ... is this not the case? Maybe there is an overhead for the first one or two being created, but after that, they are supposed to be recycled ... Curtis implemented this, exactly to avoid the heavy overhead of creating them over and over.
from ure.
(and, no, we probably do not have a unit test to make sure that this pool is working as designed. Writing such a unit test should be easy -- first, measure the time to create 100 normal atomspaces, then measure the time to create 100 temp atomspaces -- the second time should be at least 10x faster or maybe 1000x faster than the first)
from ure.
I misread @ivan-ushakov message, indeed it's not about FC profiling per se. @ivan-ushakov, could you be more specific? How and what did you profile?
from ure.
I'm talking about method DefaultPatternMatchCB::eval_term()
and this comment inside it:
Evaluation of the link requires working with an atomspace of some sort, so that the atoms can be communicated to scheme or python for the actual evaluation. We don't want to put the proposed grounding into the "real" atomspace, because the grounding might be insane. So we put it here. This is probably not very efficient, but will do for now...
Also about caching. I found that key CACHED_IMPLICATOR
not enabled by default. So am I right that we don't have this cache if we do usual build?
from ure.
Related Issues (20)
- cmake fails due to unify already existing HOT 6
- BackwardChainerUTest fails to build referencing Atomtable HOT 3
- Unbalanced quotations
- Forward chainer is not stable against library changes. HOT 3
- The hyperlink to the term unifier in the README leads nowhere. HOT 1
- Have the URE fully support formula premises wrapped in SetLink
- Add GlobNode support to the unifier HOT 1
- Why not DualLink ? HOT 2
- Using GlobNode in Backward Chainer HOT 2
- forward chainer finds that Tweety is a green frog in examples/ure/frog HOT 2
- add api to extract inference trace HOT 4
- URE compilation fails: warning: control reaches end of non-void function HOT 1
- Rule::unify_source method execution takes about 30% of ForwardChainer execution time HOT 6
- Add BackwardChainerGetLink
- Backward chainer takes super long in this case HOT 3
- Fix replacement example inference tree expansion
- Add python ure_logger bindings HOT 6
- test_conditional_instantiation_1 triggers warnings in pattern engine HOT 6
- Bogus always-false clauses HOT 1
- Possible bug in AndBIT::expand() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ure.