Using A star algorithm for a thief
Posted 15 November 2006 - 05:36 PM
Posted 15 November 2006 - 09:07 PM
Posted 16 November 2006 - 01:33 PM
you mean that find the shortest path but go to the other way? And do you have an opinion to recognize the dead ends?
Posted 16 November 2006 - 02:30 PM
With a bit of preprocessing you can do so even if the maze is autogenerated at runtime.
Ciao ciao : )
(readin' this? you ought to get out more)
Posted 19 November 2006 - 11:01 AM
You could set a "comfortable" range where you consider yourself "safe" from policemen. If your policemen's A* heuristic function is "Distance to target" (where target is the thief), then your thief's heuristic would be "SafeRange - Distance to target" (where target is the policeman).
Now, since you have several policemen, you'd have to get distances to all of them, and possibly use the closest (most dangerous) one in the heuristic, or maybe add all of them together, or some smarter combination.
These are all ideas you can give a thought or try out. The best solution really depends on the way the maze is designed, and what other goals the thief has.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users