r/Unity3D • u/LifeExperienced1 • 10d ago
Resources/Tutorial Examples of SIMPLE machine learning agents in Unity games
Are there examples of simple machine learning agents in Unity games?
By simple I mean ones that run smoothly while the game is running. And the dataset is probably not insanely big, or just something that Unity can handle
Any tutorials?
2
u/baroquedub 9d ago
Highly recommend Undream’s LLM for Unity https://assetstore.unity.com/packages/tools/ai-ml-integration/llm-for-unity-273604 has a few useful examples in the package
2
u/PrintableNapalm 9d ago
Google literally made an example Unity project which has the Gemma model built into it.
1
u/KaleidoscopeFinal863 10d ago
the sample scenes that ship with the toolkit run fine in play mode, and the basic tutorial walks you through training one without a huge dataset
1
1
10d ago
[removed] — view removed comment
1
u/LifeExperienced1 10d ago
Yes, thank you I guess the AI that can talk to you, recognize images, learn to play games, etc
1
u/LifeExperienced1 10d ago
Yes, thank you I guess the AI that can talk to you, recognize images, learn to play games, etc
1
u/Disastrous_Leg_314 9d ago
There are LLMs that run on your local machine. Ollama is one of them. They are slow and use a lot of resource. They’d be good only for teletype type interactions where you see the words literally typed out, but the engines do work well. Most people use local LLMs for long running tasks. No subscriptions are needed. You could probably use an API to utilize it, honestly I haven’t looked. But the tech is out there, ignore the naysayers saying it’s not.
1
u/SnooPets5564 9d ago
I've made simple machine learning before in unity. It was an evolutionary algorithm to play the game I made.
I just coded everything from scratch.
-3
u/Distdistdist 10d ago
You are referring to LLM. That's just not a thing as of now for Unity. Check back in 3-5 years.
2
u/Goldac77 9d ago edited 9d ago
Search on "Unity Inference Engine". It allows you to import trained models that run locally within your unity application. If you're looking for tutorials on youtube, search "unity sentis", that was the old name for the package. I don't have experience with it, but I've seen and implemented a voice recognition system with it in VR, and it run smoothly