Skip to content

Commit

Permalink
fix bug: random seed should less than 2**32-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixvillas committed Sep 25, 2022
1 parent eb2439a commit 5c5b50b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def qmix_learning(
assert args.save_model_freq % args.target_update_freq == 0
last_test_t, num_test = -args.test_freq - 1, 0
if args.seed == None:
time.sleep(3)
args.seed = int(''.join(reversed(datetime.datetime.now().strftime("%m%d%H%M%S"))))
args.seed = int(''.join(reversed(datetime.datetime.now().strftime("%d%H%M%S"))))
np.random.seed(args.seed)
torch.manual_seed(args.seed)
# Initialize Env
Expand Down

0 comments on commit 5c5b50b

Please sign in to comment.