#ML and Game Dev
1 messages · Page 1 of 1 (latest)
Do you mean for gameplay or in the editor during development?
Thats it, im just curious. Ive only built ML models before so I’m trying to understand where it fits best in game development. Cause gaming is something im interested in.
I guess you can read through here to see all of Unity's own AI tools
https://unity.com/products/ai
Yea, I'm just a hobby developer focusing on multiplayer
Thats nice, have you ever thought of using AI to improve matchmaking and all?
Not a whole lot to improve there. You either have enough players for matches or you don't. Using AI to match skill instead of ELO won't make much difference
Oh that make sense.
Started training iterations of a quadruped to chase players around a map with some verticality; Have you tried anything out yet from a gameplay standpoint?
hey where can I get some help with ML agents? i’m specifically trying to replicate the walker example from scratch and for some reason (even if i copy over all the scripts verbatim) the models seem to not work - is there an office hour or something i can sign up for ? (I don’t mind paying either)
I would start a new thread here with the exact error messages you are getting
well it’s not error messages. I am reimplementing the ml agents walker example with the exact same code and environment variables. the model is learning but the walker does not learn how to walk by the end (and i cannot stress how literally every joint and script is exactly the same, i have checked so many times i think i have the values memorised)
Either the model is not actually learning, or you're not using the trained model checkpoint at inference time.
guys im new to mlagents
im using mlagents-learn --force to test training
but my agent doesnt move at all and on logs mostly i get no log and sometime i get environment spamming endepisode
should I be using a seperate created .yaml suggested by GPT?
update: even with yaml my agent wont budge T-T
i think it’s the former but but i cannot figure out why it isn’t learning
after purchasing a 5060 i realized it isn't commpatible with cuda12.1 which is required for mlagents... now im *king pissed off lol
should have done my research correctly lol
@bleak harbor I really doubt that ml agents would have such a requirement, as it worked perfectly fine way before the 5000 and even 4000 series.
Also cuda 12.1 seems to be made specifically for the recent dgx spark device. No rtx gpu has support of it.
Im trying to now downgrade my cuda version to 12.1 hopefully it works out
I'm just frustrated, might need to think this one out cool headed
D:\MINICONDA\envs\mlagents\lib\site-packages\torch\cuda_init_.py:218: UserWarning:
NVIDIA GeForce RTX 5060 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5060 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
NVIDIA GeForce RTX 5060
import torch
print(torch.version)
2.2.1+cu121
my torch version

You simply need to install torch build compatible with your installed cuda version.
but the question is will it run mlagents?
Yes. It's just backend support. The same version of torch has multiple backends supports(CPU, different cuda versions and some other stuff).
oh
ill do that asap
if it works out ill let you know
its my first time doing this
tried it
yea
to no avail
everything worked fine
but when I hit the "play button"
I got hit with this in the anaconda powershell
D:\MINICONDA\envs\mlagents\lib\site-packages\torch\cuda_init_.py:326: UserWarning:
NVIDIA GeForce RTX 5060 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.
If you want to use the NVIDIA GeForce RTX 5060 GPU with PyTorch, please check the instructions at --- the website link---
Did you install the correct torch version inside the conda environment?
Because normally it would install in your global env and would not be effective in conda.
yes I did
I installed the correct cuda version 13.0
installed an earlier version first 13.1
and when I activated the ml-agents/envs I got an error
for torch
then I went with 13.0
and did the rest
everything went well
I installed this specific version " pip install torch==2.8.0+cu126 torchvision==0.23.0+cu126 --index-url https://download.pytorch.org/whl/cu126 --force-reinstall"
I gave up at the end and went to gpt to debugg it since I tried everything
Does that mean that you manage to solve the issue?
nope
the latest pytorch only works on gpu below 120 computional capability
like the 4060
which has a computional capability of 8.9
ill have to train the mlagents on my cpu sadly
I might be missing something here
That's definitely not true. Besides, your GPU can support older compute capabilities as well. The issue is with the torch or cuda versions and you're likely not installing it correctly in the environment. Perhaps an older install is not being override for example. Pip would often avoid reinstalling packages of the same or older version if an existing install exists.
Maybe
Ill haveto try it again