skip to Main Content

I have a project for school that is the following, I have an API structure of an robot in a map with walls and energy stations that were given to me.

What I have to do is to implement the artificial intelligence of the robot so that he can cover the most distance possible in map using the energy stations to recharge energy in the way. The catch here is that the robot when lands on the map doesn’t know anything about the map so I go the follow 2d array:

?????????????????????
?????????????????????
?????????????????????
?????????r???????????
?????????????????????
?????????????????????

I can get the initial position, and the heigh and width of the array but I don’t know nothing else. Objective of the project is to send the most information about the map.

Can you give some suggestions for were to start, because i’ve been cracking my head up without finding a solution.

enter image description here

2

Answers


    1. Move the Robot around the map to discover new tiles
    2. Implement Pathfinding in order to calculate the distance to nearest energy station
    3. Move back nearest energy station if fuel = distance to nearest energy station
    4. Explore every tile
    Login or Signup to reply.
  1. Since you have no information to start with, it would seem a simple depth-first search would be in order since. I would suggest checking google for some information about recursive depth-first searches.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search