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.
2
Answers
fuel = distance to nearest energy station
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.