Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygo-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Biluo Shen
ygo-agent
Commits
63e558fb
Commit
63e558fb
authored
May 10, 2024
by
sbl1996@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust random seed
parent
38c7748d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
scripts/cleanba.py
scripts/cleanba.py
+3
-3
No files found.
scripts/cleanba.py
View file @
63e558fb
...
...
@@ -252,7 +252,7 @@ def rollout(
if
eval_mode
!=
'bot'
:
eval_params
=
params_queue
.
get
()
local_seed
=
args
.
seed
+
device_thread_id
local_seed
=
args
.
seed
+
device_thread_id
*
100
np
.
random
.
seed
(
local_seed
)
envs
=
make_env
(
...
...
@@ -266,7 +266,7 @@ def rollout(
eval_envs
=
make_env
(
args
,
local_seed
,
local_seed
+
10000
,
args
.
local_eval_episodes
,
args
.
local_eval_episodes
//
4
,
mode
=
eval_mode
,
eval
=
True
)
eval_envs
=
RecordEpisodeStatistics
(
eval_envs
)
...
...
@@ -573,7 +573,7 @@ if __name__ == "__main__":
args
.
ckpt_dir
,
save_fn
,
n_saved
=
2
)
# seeding
seed_offset
=
args
.
local_rank
*
1000
0
seed_offset
=
args
.
local_rank
*
1000
args
.
seed
+=
seed_offset
random
.
seed
(
args
.
seed
)
init_key
=
jax
.
random
.
PRNGKey
(
args
.
seed
-
seed_offset
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment