derkork / godot-utility-ai

A comprehensive AI package for the Godot game engine
MIT License
1 stars 1 forks source link

Consider Godot RL Agents #1

Open GeorgeS2019 opened 1 year ago

GeorgeS2019 commented 1 year ago

WIP Godot RL using c# and Torchsharp exposed as GDExtension

https://github.com/edbeeching/godot_rl_agents/issues/104#issuecomment-1637026695 https://github.com/edbeeching/godot_rl_agents/discussions/114#discussioncomment-6382743

DeepSharp

https://github.com/xin-pu/DeepSharp/discussions/12

derkork commented 1 year ago

I have tried it but it doesn't seem to work for me (https://github.com/edbeeching/godot_rl_agents/issues/132). I like the idea of programming an AI by showing it what to do but at the same time I am not sure that one can implement complex repeatable/debuggable behaviours with this approach. The examples are quite impressive (at least from the descriptions as i could not run them myself) but I currently don't understand how you teach goals to the agent and how you steer more complex behaviour than just "keep on the road", "move towards the closest fruit" (e.g. prioritize different actions, etc.). There is probably a way to do that but there is very little documentation to the project which makes it really hard to get into.

Another issue i see is the dependency with python and C# which seriously limits how you can use the final product (e.g C# exports currently don't work on mobile and web platforms - which will eventually be fixed, and i can hardly tell the end-user to install a conda environment to run the game).

GeorgeS2019 commented 1 year ago

@derkork

First

Using LibGodotSharp, both Android and Iphone using c# work

Godot 4.x c# export to android and iphone is just a matter of time and urgent interest

Second

The Godor_RL_Agent needs python knowledge which many GDScript godot users may not have. Hence challenging

Third

This Godot3 demo ported to .NET by consuming Onnx created by PyTorch Deep AI framework The next step is to replace PyTorch with DeepSharp (TorchSharp) so Everything has no more Python dependency but just .NET uzYkLCgQH1

GeorgeS2019 commented 1 year ago

The godot approach to use Tensorflow DeepAI STOPS as tensorflow c++ API is very challenging , unlike Pytorch c++ API used in Torchsharp

derkork commented 1 year ago

Thanks for the input. I'd like to try the library but right now I can't because of https://github.com/edbeeching/godot_rl_agents/issues/132 . Do I need a specific python version in my conda environment to make this work?

GeorgeS2019 commented 1 year ago

Join discord, many people there will help u https://discord.gg/HMMD2J8SxY

There is one starting simplest tutorial. U can find it through the discord

Conda guide https://www.machinelearningplus.com/deployment/conda-create-environment-and-everything-you-need-to-know-to-manage-conda-virtual-environment/

I use python 3.8 or 3.9

GeorgeS2019 commented 1 year ago

@derkork

Great u manage to get it works!

Try to get some experience.

Some of the communication between Godot and Python server has been ported to .NET below https://github.com/JimFFM/ml-hackathon-2021