Robot exploration algorithm

后端 未结 8 1776
情书的邮戳
情书的邮戳 2021-02-01 05:48

I\'m trying to devise an algorithm for a robot trying to find the flag(positioned at unknown location), which is located in a world containing obstacles. Robot\'s mission is to

相关标签:
8条回答
  • 2021-02-01 06:12

    Well, there are two parts to this. 1) Searching for the Flag 2) Returning Home

    For the searching part, I would circle the home point moving outward every time I made a complete loop. This way, you can search every square and idtentify if it is a clear spot, an obstacle, map boundary or the flag. This way, you can create a map of your environment.

    Once the Flag is found, you could either go back the same way, or find a more direct route. If it is more direct route, then you would have to use the map which you have created to find a direct route.

    0 讨论(0)
  • 2021-02-01 06:14

    If you met an obstacle, you can go around to determine its precise dimensions, and after measuring it return to the previous course. With no obstacles in the range of sight you can try to just head in the direction of the nearest unchecked area.

    It maybe doesn't seem the fastest way but, I think, it is the good point to start.

    0 讨论(0)
  • 2021-02-01 06:14

    As many have mentioned, A* is good for global planning if you know where you are and where your goal is. But if you don't have this global knowledge, there is a class of algorithms call "bug" algorithms that you should look into.

    As for exploration, if you want to find the flag the fastest, depending on how much of the local neighborhood your bot can see, you should try to not have this neighborhood overlap. For example if your bot can see one cell around it in every direction, you should explore every third column. (columns 1, 4, 7, etc.). But if the bot can only see the cell it is currently occupying, then the most optimal thing you can do is to not go back over what you already visited.

    0 讨论(0)
  • 2021-02-01 06:19

    I think the approach would be to construct the graph as the robot travels. There will be a function that will return to the robot the particular state of a grid. This is needed since the robot will not know in advance the state of the grid.

    You can apply heuristics in the search so the probability of reaching the flag is increased.

    0 讨论(0)
  • 2021-02-01 06:21

    Part of it will be pathfinding, for example with the A* algorithm.

    Part of it will be exploring. Any cell with an unknown neighbour is worth exploring. The best cells to explore are those closest to the robot and with the largest unexplored neighbourhood.

    If the robot sees through walls some exploration candidates might be inaccessible and exploration might be required even if the flag is already visible.

    It may be worthwhile to reevaluate the current target every time a new cell is revealed. As long as this is only done when new cells are revealed, progress will always be made.

    0 讨论(0)
  • 2021-02-01 06:27

    With a simple DFS search at least you will find the flag:)

    0 讨论(0)
提交回复
热议问题