#What's the state of AI with Unity?

1 messages · Page 1 of 1 (latest)

frigid hemlock
#

Let's say I have a horror game where I want a handful of creatures to move around an astar pathfinder mesh and chase the player. Typically I'd do this in behavior trees, but I was thinking that the unpredictability of AI decisions would potentially lead to scarier results.

Is it feasible to run decision-making agents at runtime in Unity? If so, what would be the best tools or approach to follow? How's the performance? I'm new to this area so looking for advice!

cursive vale
#

If you're talking about conventional ai, it's all deterministic. Which makes me think you're referring to machine learning?

cursive vale
#

Well, this is something very new to gamedev and there aren't many games or engines that support that.
But it's not impossible.
First of all there's the ml agents package that allows you to train your own model for specific tasks.
https://docs.unity3d.com/Packages/com.unity.ml-agents@3.0/manual/index.html
If that's not enough, you could maybe implement something with an LLMs, though that's even more unexplored territory in gamedev.
There's the sentis package if you want to run models like llm locally:
https://docs.unity3d.com/Packages/com.unity.sentis@2.1/manual/index.html
You can also chose to use an external service api, like that provided by Open AI. For that you'll need to look up external assets/plugins or implement your own.
Overall, I'd say all of it is a pretty advanced topic and requires decent understanding both of gamedev, machine learning and use of external tools/apis.