League evaluation for partial observable environments#63
Draft
League evaluation for partial observable environments#63
Conversation
Co-authored-by: Costa Huang <costa.huang@outlook.com>
vwxyzjn
reviewed
Feb 25, 2022
| help='if toggled, the database will be updated') | ||
| parser.add_argument('--cuda', type=lambda x: bool(strtobool(x)), default=True, nargs='?', const=True, | ||
| help='if toggled, cuda will not be enabled by default') | ||
| parser.add_argument('--maps', nargs='+', default=["maps/16x16/basesWorkers16x16B.xml","maps/16x16/basesWorkers16x16C.xml","maps/16x16/basesWorkers16x16D.xml", "maps/16x16/basesWorkers16x16E.xml", "maps/16x16/basesWorkers16x16F.xml"], # [], |
Collaborator
There was a problem hiding this comment.
The map-related changes should be incorporated into the master.
|
|
||
| class Match: | ||
| def __init__(self, partial_obs: bool, match_up=None): | ||
| def __init__(self, partial_obs: bool, match_up=None, map_path="maps/16x16/basesWorkers16x16A.xml"): |
Collaborator
There was a problem hiding this comment.
The map-related changes should be incorporated into the master.
| built_in_ais2=None | ||
| rl_ai=None | ||
| rl_ai2=None | ||
| self.map_path = map_path |
Collaborator
There was a problem hiding this comment.
The map-related changes should be incorporated into the master.
experiments/new_league.py
Outdated
| max_steps=max_steps, | ||
| render_theme=2, | ||
| ai2s=built_in_ais, | ||
| map_paths=["maps/16x16/basesWorkers16x16A.xml"], |
Collaborator
There was a problem hiding this comment.
The map-related changes should be incorporated into the master.
| torch.save(agent.state_dict(), f"models/{experiment_name}/{global_step}.pt") | ||
| wandb.save(f"models/{experiment_name}/agent.pt", base_path=f"models/{experiment_name}", policy="now") | ||
| subprocess.Popen(["python", "new_league.py", "--evals", f"models/{experiment_name}/{global_step}.pt", "--update-db", "false"]) | ||
| subprocess.Popen(["python", "new_league.py", "--evals", f"models/{experiment_name}/{global_step}.pt", "--update-db", "false", "--partial-obs", str(args.partial_obs)]) |
| trueskill_df = pd.read_csv("league.csv") | ||
| trueskill_step_df = pd.read_csv("league.csv") | ||
| trueskill_df = pd.read_csv("po_league.csv") | ||
| trueskill_step_df = pd.read_csv("po_league.csv") |
Collaborator
There was a problem hiding this comment.
We shouldn't have to worry about this anymore because the new script contains an output path for to CSVs: https://github.com/vwxyzjn/gym-microrts/blob/3d7a42f46efbd39a0b806388b8a445fbee48d00f/experiments/ppo_gridnet.py#L240.
This file contains hidden or 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
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.
This pr includes changes that support multiple maps in league evaluation and evaluation during training. This change has some code dedicated to partially observable training.
Some changes may not fit in the current system since the recent PRs.
Need review to extract the useful portion to merge into master