aidudezzz / deepworlds

Examples and use cases using the deepbots framework (https://github.com/aidudezzz/deepbots) with the Webots robot simulator.
GNU General Public License v3.0
50 stars 23 forks source link

Trained 'find-and -avoid-v2' Model Results in No Robot Movement During Testing Phase #107

Closed wayne-weiwei closed 2 weeks ago

wayne-weiwei commented 3 weeks ago

Hello,

Thank you for this wonderful library! I’ve encountered an issue, and I was hoping you could help me understand what might be going wrong. After training the model, the robot does not move during testing. However, it performs normally during the training phase.

Expected Behavior The robot should move according to the actions predicted by the model during the test phase.

Actual Behavior The robot remains stationary during testing and does not perform any actions.

tsampazk commented 2 weeks ago

Hey @wayne-weiwei, thank you for the appreciation! Sorry for the late reply.

Does this issue occur when you run the simulation out-of-the-box or have you made any modifications to it?

wayne-weiwei commented 2 weeks ago

Hi, Thanks for your time. I just changed command 'only_test = True', and The robot keeps going backwards. Why is that? It's like he's not learning anything.

tsampazk commented 2 weeks ago

If everything else is cloned from the repository and you only changed only_test = True it should be loading the trained agent just for testing.

Your first few lines in the manager should look like this:

https://github.com/aidudezzz/deepworlds/blob/dev/examples/find_and_avoid_v2/controllers/robot_supervisor_manager/robot_supervisor_manager.py#L7-L9

Your directory should have the experiments/trained_agent as in the screenshot:

image

I am noting this just to make sure that the trained_agent_diff_5_agent.zip is being loaded properly and not some other untrained agent you might have locally.

Let me know if this helps!

wayne-weiwei commented 2 weeks ago

Thank you so much for your help. It works now and it is impressive.