-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Wall observations #129
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
: updatedself.num_planes
test_observation.py
: updated test to account for the new channel, and added new little test on a map with wallsStill to do:
test_e2e.py
again once the new model is in