|
7 | 7 | "source": [
|
8 | 8 | "# Solving a Brax environment using EvoTorch\n",
|
9 | 9 | "\n",
|
10 |
| - "This notebook demonstrates how the Brax environment named `humanoid` can be solved using EvoTorch.\n", |
| 10 | + "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", |
11 | 11 | "\n",
|
12 | 12 | "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",
|
13 | 13 | "\n",
|
|
170 | 170 | "outputs": [],
|
171 | 171 | "source": [
|
172 | 172 | "# --- A simple linear policy ---\n",
|
173 |
| - "policy = \"Linear(obs_length, act_length)\"\n", |
| 173 | + "# policy = \"Linear(obs_length, act_length)\"\n", |
174 | 174 | "\n",
|
175 | 175 | "\n",
|
176 | 176 | "# --- A feed-forward network ---\n",
|
177 |
| - "# policy = \"Linear(obs_length, 64) >> Tanh() >> Linear(64, act_length)\"\n", |
| 177 | + "policy = \"Linear(obs_length, 64) >> Tanh() >> Linear(64, act_length)\"\n", |
178 | 178 | "\n",
|
179 | 179 | "\n",
|
180 | 180 | "# --- A feed-forward network with layer normalization ---\n",
|
|
308 | 308 | "outputs": [],
|
309 | 309 | "source": [
|
310 | 310 | "RADIUS = 2.25\n",
|
311 |
| - "MAX_SPEED = RADIUS / 6\n", |
312 |
| - "CENTER_LR = MAX_SPEED / 2\n", |
| 311 | + "MAX_SPEED = RADIUS / 15\n", |
| 312 | + "CENTER_LR = MAX_SPEED * 0.75\n", |
313 | 313 | "\n",
|
314 | 314 | "POPSIZE = 4000\n",
|
315 |
| - "NUM_GENERATIONS = 140\n", |
| 315 | + "NUM_GENERATIONS = 1000\n", |
316 | 316 | "SAVE_INTERVAL = 20\n",
|
317 | 317 | "\n",
|
318 | 318 | "# Instantiate a PGPE using the hyperparameters prepared above\n",
|
319 | 319 | "searcher = PGPE(\n",
|
320 | 320 | " problem,\n",
|
321 | 321 | " popsize=POPSIZE,\n",
|
| 322 | + " num_interactions=(POPSIZE * 1000 * 0.75),\n", |
322 | 323 | " radius_init=RADIUS,\n",
|
323 | 324 | " center_learning_rate=CENTER_LR,\n",
|
324 | 325 | " optimizer=\"clipup\",\n",
|
|
0 commit comments