glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] Alleyways, and pathfinding


From: Andrii Zvorygin
Subject: [glob2-devel] Alleyways, and pathfinding
Date: Fri, 4 Nov 2005 03:13:48 -0500

_andrew and I (Lokadin) were discussing in IRC the problem of how the globules have problems traveling back and forth after harvesting resources

here is a brief definition list of terminology:

we decided that there is no need to solve the one-lane problem as it only happens due to the incompetance of the player and is more or less easily avoidable

we realized that the main issue was the shortcut problem as if that was fixed circuit problem should be as well or at least would be much easier to fix

after much debate we didn't really come up with anything simple, we looked on the web but didn't find anything obvious that could help us with the issue

i was thinking of two possible sollutions
  1. if the shortest path from the inn to the wheat is marked as all 0's in the inn to the wheat wavefront, and then the second shortest path is marked as al zero's in the wheat wavefront, then it might work
  2. another alternative is that we can change the whole alogrithm, to maybe something like an ant colony, like getting rid of gradients we can find the end location with A*, but as this wouldn't be efficient to do for every glob,  we can have say some ratio of globs finding it with A*, or if they are the first they find it with A*. then when they have actually found the route what they do is add a directional label to every map sqaure they pass in the to wheat type and they spread a pheramone three squares to every side of them. (btw for this algorithm you need a few variables attached to every map square, one for amount of pheramone, one for direction and one for type). so anyways the glob gets to where it's going and does an A* algorithm to get back, however in doing the calculations of how to get back it won't go in the opposite direction of squares which have the reverse direction written on them (of course the direction has to reach a threshold pheramone level before it can't be disobeyed, say after 3 globs have passed in the same direction going on that square.) pheramones degenerate slowly every second or so btw. 
If we implement this then it will also be able to solve a number of other problems actually. for instance explorers will be able to try and explore places with the least amount of explored pheramone. Warriors and workers can excrete a danger pheramone when under attack so as to warn other workers not to venture there and to attract more Warriors.


anyways, we were wonderinng for other peopels suggestions on solutions to the problem and perhaps some comments

btw, I am willing to do the coding or at least help a lot with it, so it's not like i'm just throwing ideas that i expect other people should do :S kk anyways

i have to go to sleep now as it is very late here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]