edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
942 stars 69 forks source link

Using TorchSharp in Godot #18

Closed HangedDream closed 1 year ago

HangedDream commented 2 years ago

Hi, Ed! I have a problem with using TorchSharp nuget lib in Godot C# version. Every time I try to use it in godot I get the error like:

System.DllNotFoundException: LibTorchSharp assembly: unknown assembly type: unknown type member:

But the same code can work in a regular console project without godot involved.

I see you mentioned in other issue #https://github.com/virtualmlnet/hackathon-2021/issues/6#issuecomment-968059783 that you have tried the torchsharp, it seems that it can work but just nor support onnx format. If so, can you share how you configure the godot project to let it work with torchsharp? or maybe you can share a demo project ?

edbeeching commented 2 years ago

Hi. I actually had exactly the sample problem as you and I never managed to resolve it. There are Godot RL frameworks that use the torch c++ library see GodotAIGym, perhaps that could be of help? Let me know if you find a solution to this problem, as I would be interested in including it in the gdrl framework.

GeorgeS2019 commented 1 year ago

@HangedDream Please follow the discussion here

edbeeching commented 1 year ago

Implemented in 0.5.0 release.

GeorgeS2019 commented 1 year ago

@edbeeching Need your feedback => https://github.com/dotnet/TorchSharp/issues/1032#issue-1782525718