Need ideas about how remove unnecessary edges. [HARD]

Hello guys! I wanted to try experiment with AI which can navigate trough various obstacles with only input available being camera data. After some time, I finally was able to detect possible navigational mesh vertex and all possible edges (approximately bc resolution). But, as you can see on image below, I have got a lot of unnecessary edges, which cross eachother, overlap, or cannot create valid triangle for mesh.
image

Also, I must note, that AI receives this types of input data: Color, Distance, Surface’s normal vectors, Attraction (-1 is bad and 1 is good), Movement (although this type not used in current calculations)
(Example of camera input - color on picture)
image
AI is unable to connect ANYTHING that he don’t see with camera!
How I can remove all unnecessary edges from my mesh (and vertex if possible)? I need any sort of help - even just idea may work!

2 Likes