I’m currently trying to understand how to move my PODs more accurately on Platinium Rift. Ok, there is a loop which gives us all links between zones. But it’s not sufficient, that doesn’t tell us if a zone is on the top/left/bottom/right of another.
I noticed that all zones Id are as that the Id of a zone is higher than the Id of any other zone on the left. And on a same Column, the Id of a zone is higher than the Id of a zone on the top.
With all of that, for responding to my problem, I’m considering that among all the linked zones, if the Id is higher, the zone is one the top/left area. Then, if there is 3 connected zone with an upper id, the smallest correspond to the zone on top and left, the biggest correspond to the zone on the top. Furthermore, if there is only two or one zone with bigger id, I can’t tell precisely the relative position of my zones…
In short, I’m confused and I would like to know if this is he right way to determine the relative position of two zones. If this is not, it would be nice to show me how to respond to my problematic, and to explain me why I was wrong.
Thanks in advance
A pathfinding (A*, BFS, Dijkstra…) is a simple way to move your pod in Platinium Rift.
For example, if a pod on the green cell, wants to join the blue cell , a pathfinding will tell you to go through one of the two yellow cells (1) to reach your goal as soon as possible.
But my problem is rather how to do basic moves, for example in (1) from the green cell go to an adjacent yellow cell.
That’s what block me to implement a pathfinding
When you receive the links during initialisation, you need to map them. This way, from a given zone, you know which other ones are reachable. Then, you can easily go from a zone to another and repeat the process
I’ve tried to do that. For each zones, I can say which zone is attainable, but I can’t precise if those zones are on the top, the bottom, the right, or the left.
The trick is, that you don’t have to know the direction.
Just set up rules which makes one zone more desirable to move than the other.
Imagine if these zones were not this close, like a real graph …
That’s what I thought.
Now I see how to use Djikstra for moving a pod in map like that.
Can you give me references or tips for implementing A* algorithm and for finding adequate evaluation function ?
I’m interested in AI, and intended to learn on this site, but if someone have a cool book/ebook reference, I’m more than interrested
Well, there is a forum for you:
AI books, etc.
Okay I understand your concept of “basic move” and it’s a different approach of PR2. The majority of AI, I think, said to their PODs : “move on that cell N° X” (because there are platinum, enemies,it need reinforcement, or whatever) rather than saying “go towards the NORTH”.