-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use SpaceServer to find near objects quickly #2206
Comments
Sorry for late reply; I just found this now. There are several possibilities, I guess. One possibility would be to have the SpaceServer support a
One easy, but ugly solution is to alter A better, but harder, more complex, riskier solution is to solve each of these problems individually. The overhead of 1. could probably be avoided with the Issue 2. could be partly solved by introducing "greedy globs", so if Issue 3. There is currently an API to halt search after N items are found, but its .. hacky. The correct solution would be to implement #1502 but that is also a large complex change. continued, next post ... |
So, the above proposal obviously has a lot of problems. So here's another possibility... Create a new link type So, with NearestLink, there would again be a special loop, with this loop trying all possible choices, but doing so in order, iterating from nearest to farthest. To obtain this sorted list, it would need to talk to the SpaceServer. How might it talk to the SpaceServer, given that it lives in a different git repo? Well, through Values. Like so -- instead of
During the search, the pattern matcher calls The nice thing about |
Note BTW that the The Another problem with |
So, the question is "how can I do iterators in the atomspace?" It would work like this: SpaceServer provides a special key The way you'd use it with the
I think that's exactly enough info to allow the space server to iterate by distance. So:
If you are diligent with coding, you could even support patterns with |
Thanks @linas, a lot of information here, I need some time to read it carefully and answer. |
I have the following problem: there are many objects (few thousands) on the scene. It is required to find closest red object for each object on the scene.
After reading SpaceServer wiki, one could wrote straightforward request:
But this query leads to brute-force search through all pairs of
item
andother
and will work slowly for big number of objects.@linas, what is your vision how this query could be written in effective way?
The text was updated successfully, but these errors were encountered: