0

enter image description here

I want to find the solution to the problem shown

I am new to motion planning and also dont know much about graph based search algorithms. Here the "red" obstacles are not already known. Without red obstacles, i can find shortest path using BFS. Now in presence of red obstacles, which is not already known as blue, i am thinking to apply DFS to first fully determine the location of red obstacles and then BFS to solve the shortest path problem. However i doubt whether this is what the the best approach is. I dont know any motion planning algorithms. So it would be great if someone can help me giving few hints.

ravenspoint
  • 19,093
  • 6
  • 57
  • 103
V Adarsh
  • 1
  • 2
  • But how exactly the hiddenness of the obstacle changes the classical Dijkstra's algorithm, where every node is "tested" only from the neighboring node? – astef Jun 24 '22 at 16:30
  • Oh, I got it. So the problem is that we want to minimize the number of nodes. It's a practical question, not a theoretical one. You question title is misleading. – astef Jun 24 '22 at 16:33
  • Take a look at the A* algorithm https://en.wikipedia.org/wiki/A*_search_algorithm – ravenspoint Jun 24 '22 at 16:41
  • The question is oddly phrased. "apply DFS to first fully determine the location of red obstacles" would work, but doesn't it "use energy"? Searching for invisible obstacles means you have to go to them, which is a possibly unneccesary move. Since he can see the exit, I think he should head for the exit and only adjust if he actually hits an invisible object. That is, the A* algorithm. – ravenspoint Jun 24 '22 at 16:45
  • The A* algorithm uses a heuristic to select the next move. Usually that is the Euclidean distance to the goal. In this case, since some of the obstacles are visible, you could make the heuristic more sophisticated by using Dijkstra ( not BFS!!!!! ) to choose the next step around visible and any so far discovered invisible obstacles. – ravenspoint Jun 24 '22 at 16:49
  • ":come to know about the red obstacles one you reach a cell adjacent to it" What does this mean? What do you learn about the obstacle? Just that it exists in front of the cell you reached? Or the entire dimensions of the obstacle? – ravenspoint Jun 24 '22 at 19:11
  • Why are you not answering? I am still waiting for answers 2 hours after posting my questions! – ravenspoint Jun 24 '22 at 19:12
  • @ravenspoint I am checking stackoverflow only now after posting. i actually got caught up in some other work. About visibility of red obstacles, i think the entire dimensions of the obstacles is visible. I will read up on A* and dijkstra and get back to you. ( i actually did not get any notifications about these comments in my mail, also i dont have the app installed yet hence this late response) – V Adarsh Jun 30 '22 at 19:59
  • When you post a question on stackoverflow, you will generally get answers and requests for clarifications within an hour or two. It is bad form not to stick around so you can respond. If you will be unable to to do this, postpone asking your question until you can. – ravenspoint Jul 01 '22 at 15:08
  • @ravenspoint i am sorry for this. I am new to this platform in terms of asking questions( this is only my 2nd question so far, and the 1st question i posted 3-4 months back has not got anything yet except an edit, so i did not expect this response from this one, but maybe due to the tags, i should have expected these responses.). I'll keep this in mind and be active now onwards. – V Adarsh Jul 01 '22 at 15:30
  • ( thumbs up emoji ) – ravenspoint Jul 01 '22 at 15:38
  • Stack Overflow is a far more active site than Mathematics. – ravenspoint Jul 01 '22 at 15:46

0 Answers0