wuxiyang1996 / iPLAN

iPLAN: Intent-Aware Planning in Heterogeneous Traffic via Distributed Multi-Agent Reinforcement Learning
https://arxiv.org/abs/2306.06236
MIT License
32 stars 3 forks source link

There are some questions in the create vehicles function #4

Open Captain6606 opened 3 months ago

Captain6606 commented 3 months ago

I took your advice. I added the print(self.road.vehicles) statement here: https://github.com/wuxiyang1996/Heterogeneous_Highway_Env/blob/b96a34754f608bf3e2e9832a35c828bf11782794/envs/highway_env.py#L265 I have two questions 1.In the default.yaml file, I set checkpoint_paths to the saved model path and checkpoint_path is empty. When I ran this program, the Print statement printed 16 times, but why did the console print only 8 episodes? 2.In the default.yaml file, I set checkpoint_path to the saved model path and checkpoint_paths is empty.When I ran this program, the Print statement printed 17 times, the console print only 8 episodes. Hope to get your reply, thank you.

Captain6606 commented 3 months ago

The picture is as follows 78ea2eadaa371b3ae7e7a2b6ddddb32

wuxiyang1996 commented 3 months ago

Kind of confused. Maybe you can run for a bit longer, like ~40 episodes, and see if it's still 16 printouts? I guess 16 comes from initialization before the start (8 rollouts) and 8 rollouts after the 1st run. 17 might come from some delay in transmission.

Captain6606 commented 3 months ago

Thank you for the response. When I changed the num test episodes to 40,print is still executed 16 times,but the console has 40 episodes.In addition, when I set checkpoint_path to the path of the trained model, the output was very poor. What is the purpose of the checkpoint_path and checkpoint_paths parameters? e14acf5df7511deab40f3ee65874626

wuxiyang1996 commented 3 months ago
  1. May I ask where you printed out the vehicle state? I feel the issue is quite rare.
  2. The num test episodes is to run the test episodes on the frozen policy after a few training iterations.
  3. For the checkpoint_paths thing, pls make sure you are using the correct path. You can try to print out the place storing the checkpoint path. Meanwhile, you need to manually set up the start time here: https://github.com/wuxiyang1996/iPLAN/blob/7e4b79a6083fa7800dbfb3e05bdbff981f40bed2/run_ippo.py#L247
Captain6606 commented 3 months ago

I'm going to print out the vehicle state here: https://github.com/wuxiyang1996/Heterogeneous_Highway_Env/blob/b96a34754f608bf3e2e9832a35c828bf11782794/envs/highway_env.py#L265-L267 vehicle_num = len(self.road.vehicles) print(self.road.vehicles) for i in range(vehicle_num): self.road.vehicles[i].vehicle_id = i Then running the program shows print 16 times, but the console gets only 8 results. As shown: 2ea1560dd2cd3c3bd25043a68600266 I haven't changed anything in the default.yaml file except env to "highway", difficulty to "easy", checkpoint_paths to the path of the trained model and checkpoint_paths to True.

wuxiyang1996 commented 2 months ago

Let me check this later. A bit busy these days.