The agent is supposed to visit specific locations (which is also different each time) and it may encounters obstacles. The goal is to visit those locations with the shortest path possible without hitting obstacles. Those locations that need to be visited are fruits that requires the agent to fertilize them. There are different fruits but the agent only have to fertilize specific types. The only available information to the agent is its current location and the type of the fruits to be fertilized. It is possible to know the location of the target crops but not the obstacle beforehand. The fixed information in each episode is the size of the field/grid-world, the type and locations of the fruits, the initial state of the agent.
My question is - can I train the agent with a DQN algorithm, avoiding obstacles and still finding the optimal path to finish the task?