Are there plugins for Tensorflow or Torch?

Godot Version

4.7

Question

I was thinking of trying to train an agent to be an AI for a card game I’m developing. I have some experience with PyTorch and Tensorflow, and it would be nice if I could use a plugin that lets me interface with either of those libraries. However, most of what I can find is built around running a separate Python process to do the actually AI work and using sockets to pass message back and forth to your Godot program.

It would be faster and less error prone if I could simply call Tensorflow or Torch via some GDExtension plugin. I can’t find any listed in the Asset Store, though. Are there any good options for this, or do I need to run a separate Python process?

What about using OS.execute() for contacting your Python instances?

I’d probably stick with a separate Python process if there isn’t a solid GDExtension option.

`OS.execute()` could be worth trying for a simple setup.

The main thing is keeping communication between Godot and the AI reliable.