Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wall observations #129

Merged
merged 16 commits into from
Dec 18, 2023
Merged

Wall observations #129

merged 16 commits into from
Dec 18, 2023

Conversation

DennisSoemers
Copy link
Collaborator

@DennisSoemers DennisSoemers commented Dec 12, 2023

The main purpose of this PR is to add wall/terrain observations. This is basically just like #88, but I re-did it because that's a fairly old PR and there have been quite a bunch of other code changes in between, and that old PR also included some other unrelated changes for which I'm not sure whether or not they're still important/desirable.

Before this gets merged, Farama-Foundation/MicroRTS#107 will need to be merged first over on the Java repo.

I have created a [V0.6.1 release] which will be the last version that is still compatible with models trained on the old code (after this PR gets merged, state observations will have one more feature plane than expected by older models).

I have trained a new baseline model (ppo_gridnet architecture, not ppo_gridnet_large) on this new code, with the one extra channel, but otherwise still same conditions as before (just the one 16x16 map, which doesn't actually contain any walls, so the model doesn't learn anything about walls), and it seems to perform quite well. I have also re-generated the league DB with Trueskill ratings for all scripted bots, and ran a Trueskill evaluation of this model post-training, and there it got a Trueskill rating of $39.07$ ($\mu = 43.26$, $\sigma = 1.397$), with the best scripted bot being coacAI with a Trueskill rating of $33.39$ ($\mu = 37.01$, $\sigma = 1.205$).


I think one of the pre-commit hooks has messed with line endings or something, causing many files to look on github as if every single line in them has changed, even though in reality only smaller parts of them changed. So, it's a bit annoying to look at the diffs. The actual changes are:

  • README.md: Updated documentation of the channels. Put the table in markdown instead of an image, so it actually looks fine on GitHub with dark mode enabled too.
  • vec_env.py: updated self.num_planes
  • test_observation.py: updated test to account for the new channel, and added new little test on a map with walls

Still to do:

@DennisSoemers
Copy link
Collaborator Author

@vwxyzjn I made this a draft PR for now, because I still have three little things listed as to do, but it should be fine to already review under the assumption that those three things will be done.

@DennisSoemers DennisSoemers marked this pull request as ready for review December 13, 2023 12:39
@DennisSoemers DennisSoemers merged commit f1457ce into master Dec 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant