Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ def update_parameters(self, new_params):
"redis/contributors": wandb.Table(columns=["name", "steps"], data=self.contributors.most_common())},
commit=False
)
self._plot_ratings()
if self.gamemodes[0] != '1v0':
self._plot_ratings()
tot_contributors = self.redis.hgetall(CONTRIBUTORS)
tot_contributors = Counter({name: int(count) for name, count in tot_contributors.items()})
tot_contributors += self.contributors
Expand Down
4 changes: 4 additions & 0 deletions rocket_learn/rollout_generator/redis/redis_rollout_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def __init__(self, redis: Redis, name: str, match: Match,
def _get_opponent_ids(self, n_new, n_old, pretrained_choice):
# Get qualities
gamemode = f"{(n_new + n_old) // 2}v{(n_new + n_old) // 2}"
gamemode = '1v0' if gamemode == '0v0' else gamemode
latest_id = self.redis.get(LATEST_RATING_ID).decode("utf-8")
latest_key = f"{latest_id}-stochastic"
if n_old == 0:
Expand Down Expand Up @@ -254,6 +255,9 @@ def run(self): # Mimics Thread

if self.dynamic_gm:
blue, orange = self.select_gamemode()
elif self.match.agents == 1:
blue = 1
orange = 0
else:
blue = orange = self.match.agents // 2
self.set_team_size(blue, orange)
Expand Down