facebookresearch / nocturne

A data-driven, fast driving simulator for multi-agent coordination under partial observability.
MIT License
259 stars 29 forks source link

[Question] Difference in active_masks copying in shared_buffer and separated_buffer files #67

Closed Jaroan closed 1 year ago

Jaroan commented 1 year ago

Question

[Edit: I noticed an error in my post, but I modified my question appropriately] I notice a difference in the way active_masks are being copied in the ppo buffers for insert() and chooseinsert():

In the chooseinsert() it is self.active_masks[self.step] = active_masks.copy() line 184

While in the insert() it is self.active_masks[self.step + 1] = active_masks.copy() line138

Thanks in advance!

eugenevinitsky commented 1 year ago

Hi! So I can't speak for other repos but generally you have freedom with the indexing as long as you correctly account for it when computing the loss. However, in this case a warning that we are confident about the implementation of SharedBuffer since we took it from our repo https://github.com/marlbenchmark/on-policy which has SOTA results in a bunch of envs but the SeparateBuffer is not extensively tested.

Jaroan commented 1 year ago

Thank you for the clarification!