A* Pathfinding Project

Moving AI Characters Penalty Avoidance


#1

Hi Aron!

My team and I are currently making a game with AI characters and was wondering if this package had a way for each individual character to avoid another character based on hostilities with each other. I saw your example scene on Penalties, and it got me thinking if using penalties then updating the graph every time a character moved would be the best solution? Or is there a better feature in this package that I could use? Thanks!


#2

Hey,

I don’t think this is possible out of the box. But definitely possible to implement.
It’s rather simple to change data on the grid graphs.
I recommend looking into the Accessing Data documentation:
https://arongranberg.com/astar/docs/accessingdata.html

For finding ‘safe’ locations to navigate to, the wander AI tutorial has some of the components you could use:
https://arongranberg.com/astar/docs/wander.html

Last but not least I’ll link an interesting paper on influence maps, similar to your use case:


or in video format: https://youtu.be/6RGquWxNock

I hope that helps.
The free version has the required components to try this implementation.

Wolf


#3

Thanks Wolf!

My team and I will look into this.