Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6238741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:16:04+00:00 2026-05-24T11:16:04+00:00

Bounty This question raises several issues. The bounty will go to an answer which

  • 0

Bounty

This question raises several issues. The bounty will go to an answer which addresses them holistically.


Here’s a problem I’ve been playing with.

NOTE I’m especially interested in solutions that are not based in Euclidian space.

There is a set of Actors which form a crowd of size K. The distance d(ActorA,ActorB) is easily computable for any two actors (solutions should work for various definitions of ‘distance’) and we can find the set of N nearest neighbours for any given Actor using any of a number of established algorithms.

This neighbour set is correct at the first instant but the Actors are always moving and I want to maintain the evolving list of N nearest neighbours for each Actor. What I am interested in is approximate solutions which are more efficient than perfect solutions.

  1. Solutions should converge to correctness after errors have been introduced.
  2. It is acceptable to sometimes perform a full recomputation if the errors become too large but detecting these errors should be cheap.

So far I have been using a friend-of-a-friend algorithm:

recompute_nearest (Actor A)
{
    Actor f_o_f [N*N];
    for each Actor n in A.neighbours
        append n to f_o_f if n != A and n not in f_o_f

    Distance distances [N*N];
    for 0 <= i < f_o_f.size
        distances [i] = distance (A, f_o_f [i])

    sort (f_o_f, distances)
    A .neighbours = first N from f_o_f
}

This performs reasonably well when the crowd is slow-moving and N is suitably large. It converges after small errors, satisfying the first criteria, but

  • I don’t have good way to detect large errors,
  • I have no quantitative description of the size and frequency of errors,
  • it converges in practice but I can’t prove that it always will.

Can you help with any of these points?

Also, do you know of any alternative approaches which perform well

  • when the crowd is fast-moving,
  • when some actors are fast-moving,
  • when N is small,
  • when the crowd is sparse in some places and dense in others,
  • or with particular spacial-indexing algorithms?

The extension I’m working on at the moment is to generalise friend-of-a-friend to take the friend-of-a-friend-of-a-friend in cases when a neighbour is fast-moving. I suspect that this doesn’t scale to well and it’s hard to derive the right parameters without a quantification of the errors.

I welcome all suggestions! It’s a fun little problem 🙂


Notable Suggestions So Far

Fexvez: sample random extra neighbours, sample size depending on the speed of the Agent. Sampling from the area it’s about to move into would probably also help.

Resample the neighbours when an agents speed*delta_time exceeds the distance to the furthest known neighbour.

Maintain the Delaunay triangulation which is a superset of the nearest-neighbour graph. Only accounts for one nearest neighbour.

David Mount’s ANN library Doesn’t seem to handle moving bodies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:16:04+00:00Added an answer on May 24, 2026 at 11:16 am

    A very simple and very fast method from statistics is to use random linear projections. These can help you determine clusters and neighbors very quickly. With more projections, you get more accuracy (addressing your question about errors, I believe).

    This paper offers an extensive quantitative analysis of several methods, including a new method (DPES) that is related to RLP.

    This paper addresses use of RLP including for distance preservation even in the context of moving points.

    This paper addresses RLP for motion planning and details several heuristics.

    RLP methods are:

    1. Very fast
    2. Lead to approximations that are tunable for accuracy and speed
    3. Distance and angle preserving (provable)
    4. Easily scaled to large dimensions and large #s of objects
    5. Useful for dimensionality reduction
    6. Lead to compact projections (e.g. one could project into a hierarchical binary partitioning)
    7. Flexible: you can project into whatever space you feel would be good for you – usually R^d, but projecting into 2^d (i.e. binary space of dimension d) is also allowable, only subject to a reduction in accuracy for a given # of projections.
    8. Statistically interesting

    After embedding into a lower dimensional space, neighbor calculations are very easy, as projections that are, say, binned in the same regions (if you bin the projections into a grid) are very likely to be close in the original space.

    Although the dimensionality of the original data is small (even 10 is small), the ability to rapidly project into a pre-selected grid is very useful for identifying and counting neighbors.

    Finally, you only need to update for those objects whose location (or relative location, if you’re centering and scaling the data) have changed.

    For related works, look into the Johnson-Lindenstrauss lemma.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

**this question is on bounty because the below answers did not solve the problem.
EDIT from normalocity : My answer hasn't been able to solve this problem, so
This question made me question a practice I had been following for years. For
A month ago I asked this question . Even with a Bounty nobody came
Bounty clarification I know it's a subjective question. The ideal answer I'm looking is
Go bounty! This question has earned me a tumbleweed badge (7 views in 7
I have started a bounty for this question ...because I really want the community's
EDIT: I have started a bounty of 50 on this question to who ever
EDIT: I'm starting a bounty on this question. For the moment, I've moved on
Reinstating this question with a bounty! I need an example that stays online ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.