dijkstra - A specific PathFinding approach -


I am working on Unity, I am using C # for a project which should be very simple. I'm stuck in the path.

I have looked at Dixstros and A * for reference, but for some reason I still can not adopt them to work in my case. I think my brain is : = while (1);

This idea is:

From a text file I import a "map" where each "*" means wall, and in every "Walker" map There were randomly placed two objects in the area: a bomb and an agent

the agent should check the map (which creates a labyrinth) and searches for the bomb if it is not the wall. Agent 8 can go to neighboring tiles in my code, near the agent class His map is that he visits every tile, he asks "world map" for information, about 8 neighboring tiles.

Then he takes a note of the known tile type (wall / instrument) on his map, and if it is a pavement, then he also notes how many times he has visited it. The agent has a "favorite direction" list. It tells you which tile to choose to move forward, if no more than 1 has not been visited.

At this point, I have set it all to good and walk, and if I give it to run, then it finally gets bombed. The issue is because it is only less According to the less visited tile runs in the predefined direction, some tiles are known again as if a fool. Then

I should do this:

If the agent reaches a tile, for which every nag or wall is already visited, then check it for its map And notes from the past to find an unknown tile, and walk over there. There is only one weight / cost towards each walking, so we do not need to consider the cost of the path.

In my opinion, the closest to implementing bicuscus, but I still can not find it right

Any thoughts or help will be highly appreciated

< P> Thanks

Alex

The part of the problem is that you How much information you want to give. If you are willing to know where that goal is, or at least its normal direction in relation to yourself, then you can use it to help influence the agent's decision. This will allow you to always move forward in the direction that leads to the closest goal of the target during the least visited route.

Otherwise, I keep track of every location on which they had visited a different map, as well as 8 neighboring tiles they have "seen" them, as on the side of -1 Represents a wall that has been observed, -2 indicates an undisclosed location, and 0 is seen but unaware. Then I use A * or a type on it which will reach it to the nearest exploration point based on the number of tiles, from which the relationships will be randomly broken. This will lead to a more testing and error rat in a maze approach.


Comments