Nullspace-Colombia / unray-bridge

Rllib framework for using Unreal Engine 5 (UE5) as external environment for Reinforced Learning training process
MIT License
9 stars 2 forks source link

need little help #11

Closed Veria70 closed 7 months ago

Veria70 commented 11 months ago

Hi, I want to create RL Based Driving Car System, i used Cartpole BP and set everything but i think something was missed in my Implementation, how to define minus reward or using trace channel to Observation system??!! I have RL based car and Goal actor in my scene, i used distance between car and goal actor and connected value to Observation function. Screenshot 2023-11-18 125304 Screenshot 2023-11-18 125333 Screenshot 2023-11-18 125344 Screenshot 2023-11-18 125351 Thank You for your help Best Regards.

GDiaz16 commented 11 months ago

Hi @Veria70, we are going to review your code, but in any case we will publish a video making the example of a RL Driving Car System this week, based in what you have done, so you can understand what you need to do to make your car to drive itself with Unray.

Veria70 commented 11 months ago

Thank you so much, I building track for race and complete my Implementation (UE5 & Python) for RL System. Screenshot 2023-11-19 124501 Screenshot 2023-11-19 124519 Screenshot 2023-11-19 124529 Screenshot 2023-11-19 124537 Screenshot 2023-11-19 124547 Screenshot 2023-11-19 124556 Screenshot 2023-11-19 124603 Screenshot 2023-11-19 124609 Screenshot 2023-11-19 124635

Python Config :

obs_config = {
        "space": BridgeSpaces.Box(np.array([np.finfo(np.float32).min,0,0,0,0,0,0,0,0]),
        np.array([np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max,
        np.finfo(np.float32).max
        ])), 
        "description": "General coordinates of the cartpole"
    }

act_config = {
        "space": BridgeSpaces.Box(np.array([-1,-1,0]),np.array([1,1,1])), #Throttle/Steering/Brake
        "description": "General coordinates of the cartpole"
}

Best Regards.

Veria70 commented 11 months ago

another Request : Give us Help to save model and load model Thanks.

GDiaz16 commented 11 months ago

Hi Veria, we are still working in the video tutorial, in the meantime, this is the documentation on how to save a checkpoint with RLlib: https://docs.ray.io/en/latest/rllib/rllib-saving-and-loading-algos-and-policies.html#how-do-i-create-an-algorithm-checkpoint

And this is how you restore the model checkpoint from your disk drive https://docs.ray.io/en/latest/rllib/rllib-saving-and-loading-algos-and-policies.html#how-do-i-restore-an-algorithm-from-a-checkpoint

vahernandezmo commented 10 months ago

Hi! I wanted to check if you were able to use the trace channel in the observation system.

Veria70 commented 8 months ago

Hi @vahernandezmo @GDiaz16 Do you Publish Tutorial Video About RL Car Racing or Something Similar? I Really Need Practical Tutorial as Document Or Video. Thank You Very Much. Best Regards.

vahernandezmo commented 8 months ago

HI @Veria70 We wanted to ask what do you need a tutorial on? Is it any specific module inside the plugin? Is it something in the python side of things? Please let us know so we can start working on the tutorial Thanks

Veria70 commented 8 months ago

Hi @vahernandezmo I need Document about plugin API and Game specific Example (not Cartpole), you wrote plugin for game engine please give me Game Specified Example with step by step setup, give me reference in RLlib with document. You spent time on writing a software to implement artificial intelligence in the game in order to make it easier for everyone, but without information and examples corresponding to the game, this process will not be easy, it will be more difficult. Thanks

GDiaz16 commented 8 months ago

Hi @Veria70, we are working on a tutorial from 0 to a functional agent car model, step by step. We expect it to be ready next week. image

We will let you know when it is uploaded in Youtube.

Veria70 commented 8 months ago

Hi @GDiaz16 Thank You Very Much, I'm waiting for your tutorial.

GDiaz16 commented 8 months ago

Hi @Veria70, this is an update of the tutorial we are working on, the car is already training to complete the track, let me know if you want something else to be shown in the tutorial. https://github.com/Nullspace-Colombia/unray-bridge/assets/16580160/85bbb0a5-75a2-4da3-be9f-f3ac76437bc1

Veria70 commented 8 months ago

Hi @GDiaz16 It is wonderful, I would be grateful if the method of model inference is included in your tutorial. Thank you for your hard work.

GDiaz16 commented 7 months ago

Hi @Veria70, just to let you know that the tutorial you requested has just been uploaded, you can go and check it out! Sorry for the delay tho. https://youtu.be/O3azZNGmeGo?si=24KDS4sBS6hqF3VU

Veria70 commented 7 months ago

Thank you so much @GDiaz16