Skip to content

Commit

Permalink
Update the hyperparameters for the brax example (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
engintoklu authored Jun 14, 2024
1 parent a9d434a commit 4729c87
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/notebooks/Brax_Experiments_with_PGPE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Solving a Brax environment using EvoTorch\n",
"\n",
"This notebook demonstrates how the Brax environment named `humanoid` can be solved using EvoTorch.\n",
"This notebook demonstrates how the Brax environment named `humanoid` can be solved using EvoTorch. The hyperparameters here are tuned for brax version 0.10.5.\n",
"\n",
"EvoTorch provides `VecGymNE`, a neuroevolution problem type that focuses on solving vectorized environments. If GPU is available, `VecGymNE` can utilize it to boost performance. In this notebook, we use `VecGymNE` to solve the `humanoid` task.\n",
"\n",
Expand Down Expand Up @@ -170,11 +170,11 @@
"outputs": [],
"source": [
"# --- A simple linear policy ---\n",
"policy = \"Linear(obs_length, act_length)\"\n",
"# policy = \"Linear(obs_length, act_length)\"\n",
"\n",
"\n",
"# --- A feed-forward network ---\n",
"# policy = \"Linear(obs_length, 64) >> Tanh() >> Linear(64, act_length)\"\n",
"policy = \"Linear(obs_length, 64) >> Tanh() >> Linear(64, act_length)\"\n",
"\n",
"\n",
"# --- A feed-forward network with layer normalization ---\n",
Expand Down Expand Up @@ -308,17 +308,18 @@
"outputs": [],
"source": [
"RADIUS = 2.25\n",
"MAX_SPEED = RADIUS / 6\n",
"CENTER_LR = MAX_SPEED / 2\n",
"MAX_SPEED = RADIUS / 15\n",
"CENTER_LR = MAX_SPEED * 0.75\n",
"\n",
"POPSIZE = 4000\n",
"NUM_GENERATIONS = 140\n",
"NUM_GENERATIONS = 1000\n",
"SAVE_INTERVAL = 20\n",
"\n",
"# Instantiate a PGPE using the hyperparameters prepared above\n",
"searcher = PGPE(\n",
" problem,\n",
" popsize=POPSIZE,\n",
" num_interactions=(POPSIZE * 1000 * 0.75),\n",
" radius_init=RADIUS,\n",
" center_learning_rate=CENTER_LR,\n",
" optimizer=\"clipup\",\n",
Expand Down

0 comments on commit 4729c87

Please sign in to comment.