Skip to content

Commit

Permalink
added no race training
Browse files Browse the repository at this point in the history
  • Loading branch information
kywch committed May 9, 2024
1 parent 5b934e7 commit e69f29b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
ENV_CONFIG = pufferlib.namespace(
**{
"map_force_generation": False,
"maps_path": "maps/train/", # TODO: use separate maps for eval
"maps_path": "maps/eval/",
"map_size": 128,
"num_maps": 256,
"max_episode_length": 1024,
"num_agents": 128,
"num_agents_per_team": 8,
"death_fog_tick": 256,
"num_npcs": 256,
"resilient_population": 0,
"spawn_immunity": 20,
}
Expand All @@ -59,6 +57,7 @@ def env_creator(*args, **kwargs): # dummy args
config = environment.MiniGameConfig(ENV_CONFIG)
else:
config = environment.FullGameConfig(ENV_CONFIG)
config.set("TERRAIN_FLIP_SEED", True)
config.set("GAME_PACKS", [(GAME_CLS[game], 1)])

env = nmmo.Env(config)
Expand Down
2 changes: 2 additions & 0 deletions reinforcement_learning/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ def make_env_creator(
game_packs = [(EasyKingoftheHill, 1)]
elif train_flag == "sw_only":
game_packs = [(Sandwich, 1)]
elif train_flag == "no_race":
game_packs = [(TeamBattle, 1), (EasyKingoftheHill, 1), (Sandwich, 1)]
elif train_flag == "tb_ammo":
game_packs = [(TeamBattle, 5), (AmmoTraining, 1)]
else:
Expand Down

0 comments on commit e69f29b

Please sign in to comment.