MicroRTS-Py icon indicating copy to clipboard operation
MicroRTS-Py copied to clipboard

Broadcast error running partially observable example

Open 4rChon opened this issue 3 months ago • 3 comments

The fully-observable example ran without errors.

I'm running the partially observable example with the following command:

python ppo_gridnet.py \
    --partial-obs \
    --capture-video \
    --seed 1

However I'm encountering the following broadcasting error: image

num_planes is correctly initialised with an additional entry for partial observation, giving it a length of 7. However, np.array(ro) obtained from responses.observation returned by self.vec_client.reset(...) has a length of 6. I've logged the shapes of the relevant variables here: image

It seems like passing the partial_obs argument to create a new JNIGridnetVecClient removes the unobserved units from the game state but does not add a feature indicating whether a unit is visible or not.

Looking at the GameState.java class, numVectorObservationFeatureMaps is fixed at 6. PartiallyObservableGameState.java does not add a new feature but removes the unseen units for the player.

I might be missing something. Has anyone else managed to run the partially observable example?

Thanks

4rChon avatar Apr 03 '24 13:04 4rChon

@sladic has been looking / will be looking into this, he may already be able to point to a (partial) fix or later have an ETA for when it might be ready for merging into the official repo.

DennisSoemers avatar Apr 05 '24 12:04 DennisSoemers

Hi, any updates on this?

4rChon avatar May 02 '24 15:05 4rChon

Hi, sorry for the delay. There is indeed code missing for marking the visibility of the units. I hope the marking and broadcast error fix will be up early next week.

Sladic avatar May 03 '24 09:05 Sladic