Using NLP/ML in my game: what are the best (open source) options?

For various reasons, I’m looking to use NLP in my game and I’m wondering what the best options are for doing so.

I’m also hoping for my game to be cross platform (desktop and mobile), so options that are compatible with Android and iOS as well as desktop platforms would be best.

I’m very new to NLP.

From what I can see, Python is the main language for machine learning at the moment, but I’m not sure how well it would integrate with Monogame. IronPython seems like a possible solution.

ML.NET also seems to be a good option, but the syntax looks confusing and I’m not sure it supports neural networks or non-desktop platforms.

Anyone have any recommendations or suggestions?

What are you trying to do with NLP? Your best bet is to use a cloud service like Azure Machine Learning or similar, otherwise there are several models built into the various google packages. NLP is a really broad category, I could probably steer you in a better direction if I knew what exactly you’re trying to accomplish.

If you are trying to run a custom tensorflow model… Building & running tensorflow models is hard enough. Tensorflow on a mobile device is even harder. Tensorflow in .net is nearly impossible. It’s trying to swim upstream 3 different ways :sweat_smile:

I’m experimenting with chatbots for NPCs at the moment.

After more research, I’ve decided to have a go with Catalyst and Keras.NET.

This should work for desktop and I’ll have to wait and see if it works on Android when I develop a prototype for that later.

ugh keras.net is a nightmare, for a large variety of reasons. I’d really recommend using a hosted GPT transformer. I’ve built some awesome chatbots with GPT3, but the ToS totally suck. There are a lot of hosted GPT-J services popping up, which is not as robust but muuuuch more developer friendly:
AI21 Studio
https://apps.aixsolutionsgroup.com/

Since it’s just hitting a rest API, it’d automatically work for every platform.

How is keras.net a ‘nightmare’?

I’m new to it, so could you explain those reasons?

Trying to set up a python environment inside a .net environment is a headache. All the versions of each library need to be perfectly lined up or else nothing will talk to each other.

I highly doubt it is compiled to run on Android or iOS. I looked at a bunch of python options to try and get running under xamarin, but they were all desktop only. Even if you can get it working, you’d have to bundle the entire python ecosystem inside your app, it’d be too big for the app stores.

Just hitting an external rest API is 1000x easier.

Considering the direction Microsoft is heading with .NET 5, I think any compatability issues with Android and iOS may disappear over the next few years.

I’ll have to see how prototype development for desktop goes and then decide from there.