- Home /
AI algorithm to modify assets based on player behaviour
I am building a game that learns from player behaviour. If the player behaves a certin way, the game is modified to suit the player type. Can this be done in Unity? Is the Python library sickit learn available in Unity?
Answer by Captain_Pineapple · Feb 25 at 08:35 AM
i guess you mean scikit
? In general: no. Scikit is in Python, you'd have to create a python/C# wrapper which accesses the python environment and everyone who'd like to play your game would have to install python as well. Do not do this is you want to create and publish a game.
As @jmgek already noted, Unity has the ML-Agents package which offers access to a Reinforcement Learning framework. However using this is not easy, especially if you are new in the field i can not recommend to try and build a game on it. Especially since you have to differentiate between inference and training of a RL-Agent. Learning is only for learning which takes a "ton" of data and inference if for acting on said learned behaviour.
If you where to build a game on this you'd have to run this on some pretrained model, record the gamedata in some coherent format and start a learning process afterwards. You cannot (except for some special cases) train a model while using it to play back the learned experience.
Please also be aware of the amounts of data you'd need. you might need hundreds of playthroughs of a player for the game to learn some decent behaviour. In addition you have to consider that for ML-Agents some games might not really learnable as they are too complex. So if you really wanna pursue this then you should add some more details on what your plans are.
Your answer
Follow this Question
Related Questions
Monobehaviour new keyword 2 Answers
How can I make the AI in my game wait in lines? 1 Answer
Transform an object in other 2 Answers
How to check what version of ml-agents are on master branch? 0 Answers