
Creating a Game with Learning AI in Unity! (Tutorial / Machine Learning)
Unity
Views: 109777
Like: 2380
Making a game and programming AI behaviour is a lot of fun. But it’s even more fun, and in certain cases more efficient, where the AI can learn by its own mistakes and the different player behaviours! Let’s take a look at using Machine Learning to create smart AI for our Unity games.
Get access to the Karting Microgame here:
More information on the Machine Learning Agents Toolkit:
BehaviourParameters on Github:
16.08.2021
I remembered using this 1 year ago and it's fun, however you gotta install Tensorflow and the setup is not user-friendly(another beta), not sure how it is today though
now i can try to make my game
thank you for showing how to use the Command prompt, i ran into an error when i did this on the lesson from learn.unity than you for this tutor
I wonder in ML agents preview do you need all these steps do or something is changed with installation?
Wow! This looks incredible! 😄
How To Scam Children Into Thinking Your Game Is Multiplayer: The Video
You can have 5 billion tris in a scene, but if the AI is dumb, the game is dumb.
Best.
Well done unity! I Will try (as a newbie) to apply this to a combat game i'm developing.
Thanks a lot
Wondering if i Need more brain (nn file) in order to let the player win a little XD
I mean , for difficulty setting…
This is awesome and exciting
I really like how Unity themselves using light theme. It looks so familier
Very interesting! Thanks.
Finally!!! We can make a fake multiplayer battle royale game with this!!!
Finnaly some ai machine learning tutorial
Can I use this method if I have procedurally generated tracks? 🙃
Please tell about the android input for the movement for these kind of games
This workflow is AWFUL!
You have to do better than this.
fighting game cpu really needs this
404 brain not found 😀
Atleast use dark mode in Tutorials… Please
Is that bad to say I'm kinda impress by this text2speech vocal synthesis more than this self training cart based on (D)ML ?
Hey, why you don't use ML .Net for training?
This is a good tutorial, but good lord my command prompt window does not want to cooperate with me, as when I try it, I get this:
"[FolderPath]>python -m venv venv"
"[FolderPath]>venvScriptsactivate"
"The system cannot find the path specified."
👍
Teach us how to teach bipedal characters to walk!
Can you do the same for a fps game?
Everything worked fine until I reached the point at 11:35, it says mlagents-learn is not reconized. as internal command :(. The previous steps with python worked fine and im in the virtual enviroment exacly as in the video.
Hi,
I'm having a trouble with venv. I'm on windows and have Python 3.7.7 installed., The creation of the venv does'nt appear to be a problem, but when I try to activate the scripts, with the correct syntax, it's appears that thje path can't be found. Do you have any ideas why?
It's cool but I'm thinking about the uses. If someone is going to say that this can be used for training bots, so as to compete with the user, then writing a script is far simpler, or, if you are going to train cars in a different way to act as opponents, still, a script can be written. It's really cool but using this creatively is key! any ideas peeps?
Unity cant afford their own dark theme subscription…
Is this tutorial even helpful? It’s running through the command prompt which is super weird, and this also means you can’t train an AI in an actual game someone would play. Also, this seems super specific and probably not applicable to anything else. This tutorial seems useless
"[FolderPath]>venvScriptsactivate"
"The system cannot find the path specified."
Has anyone a solution why this problem occurs ?
When everything works and a error message occurs as soon as you type
mlagents-learn AssetsKartingPrefabsAIkart_mg_trainer_config.yaml –train –run-id=custom-track-1
Check if there is a sentence saying something like "Python API-12, Unity API-13". If this is the case change
pip install -Iv mlagents==0.12.0 to
pip install -Iv mlagents==0.13.0
So that the python version matches with the Unity one.
i dont rly know python so i probably can study from this video in future
for error "mlagents.trainers.exception.TrainerConfigError: The option default was specified in your YAML file, but is invalid." They have changed format of yaml so they provide command you may execute this:
python -m mlagents.trainers.upgrade_config AssetsKartingPrefabsAIkart_mg_trainer_config.yaml AssetsKartingPrefabsAIkart_mg_trainer_config_new.yaml
(venv) G:UnityProjcars1>mlagents-learn AssetsKartingPrefabsAIkart_mg_trainer_config.yaml –train –run-id=custom-track-1
"mlagents-learn" is not internal or external
command, executable program, or batch file.
why is there such an error?
woah he is doing this at 9 50 and i am doing it at 9 52
If anyone is still having trouble with "python -m venv venv" and you are on windows go into your command prompt and type python it will launch the Microsoft store and then download that python let it install and once it is done close and reopen your cmd then type "python -m venv venv" and it will work.
My cube isn't showing the yellow direction vector and my agents keep falling off the track. What am I doing wrong? I added the cubes to the colliders
I keep getting errors when i type in cd documents in my terminal and I'm using a mac so I'm having a bit trouble with this. Please help. Anybody!
When I type cd DocumentsProjectsUnitykart-microgame on terminal, it says File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
I need help with this one please. It's been giving me a headache all day
Omg 69k views super EPIC here from dani
how to integrate my own text to speech api into Unity? Any help would be appreciated! What I want to create is to make my own character talk to me in normal human beings way via my API. How can I do that?
When I try to download this package, it tells me that it only works with a previous version of Unity. I'm not gonna download an old version of the engine. Come on, just make the asset available for any version and let us follow through.
lol Dani, a Unity youtuber/developer has more subs than Unity
Waaaaaaaaaaaaaaaait a second . External library TENSORFLOW but in reality you guys use PyTorch ? Am I not getting something guys ?
i have errors when i type mlagents-learn AssetsKartingPrefabsAIkart_mg_trainer_config.yaml–train –run-id=custom-track-1
how can we train multiple brains at same time (or apply genetic algorithm) using ml-agents
unable to find Kart Academy in the AI section
sorruy i have a question, the Kart Academy is missing in my unity package. did i miss anything ?