0

Here's the deal - I'm working on an algorithm/library that is able to generate a navigation mesh in virtually any environment where I can get coordinates for the controlled agent and/or for other agents within the same static environment. The only input I have, is a collection of points where an agent has been to. (See the image here to hopefully understand what I mean)

I already got to the point where I can create navmeshes manually and navigate on them well enough. However, in larger environments, having only coordinates of, say, the controlled agent, it's really tedious and time-consuming to manually do it.

The uses for such algorithm/library for me are obvious, but I have put a lot of thought into it already, so I'll list a couple of things I'd like to accomplish:

  • Robotics (scans environment, only gets distance from self to a point, hence getting coordinates - no need for complicated image/video processing)
  • AI that is able to navigate an unknown and unseen maze (any shape or size) by exploring it
  • Recording walked areas and creating AI for games that don't know certain places unless they've been there

Now you hopefully see what kind of solutions I'm looking for.

I have tried a couple of things, but couldn't figure them out. One of the most successful things I've tried is giving a range to each individual point (creating a circle), and then looking for places with overlapping circles - you can most likely move on those areas. The problems with this approach started with triangulation of the areas. The resulting mesh may be a little inaccurate, but it must be able to connect to existing ("discovered") parts of the mesh seamlessly (not everything has to be interconnected somehow, as agents can disappear and reappear, but within reasonable proximity, connect the mesh).

Some more information: I'm working in C#, though solutions in java, C++/C, objective C, pseudocode etc are equally acceptable.

P.S. I'm not interested at all in answers like "just use this library" or "use this other language/environment" etc... I want an algorithm. Thank you in advance.

ncdbg
  • 21
  • 1
  • 1
    So, if I understood clearly, you expect us to generate entire algorithms for you? This doesn't seem on-topic for SO. – Camilo Terevinto Jan 08 '16 at 02:00
  • Why would you not be interested in using an existing library to fix your problem? It seems to me that you shouldn't try to reinvent the wheel, especially for this kind of complicated system – Kevin Jan 08 '16 at 23:32

1 Answers1

0

I can help with 2D path finding. You need to find the red outline. Then you can use a voronoi diagram with the red outline (not the agents points). Remove all edges outside the red outline and the remaining edges can be used to navigate the shape by someone/something. Read about it:http://www.cs.columbia.edu/~pblaer/projects/path_planner/.

Micromega
  • 12,486
  • 7
  • 35
  • 72