forked from PufferAI/PufferLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
174 changed files
with
7,481 additions
and
1,108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: install | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: test ${{ matrix.py }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
py: | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
steps: | ||
- name: Setup python for test ${{ matrix.py }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- uses: actions/checkout@v3 | ||
- name: Upgrade pip | ||
run: python -m pip install -U pip | ||
- name: Install pufferlib | ||
run: pip3 install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
global-include *.pyx | ||
global-include *.pxd | ||
global-include *.h | ||
global-include *.py | ||
recursive-include pufferlib/resources * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,53 @@ | ||
[base] | ||
package = ocean | ||
env_name = puffer_go | ||
policy_name = Policy | ||
policy_name = Go | ||
rnn_name = Recurrent | ||
|
||
[env] | ||
num_envs = 512 | ||
num_envs = 2048 | ||
reward_move_pass = -0.47713279724121094 | ||
reward_move_valid = 0 | ||
reward_move_invalid = -0.47179355621337893 | ||
reward_opponent_capture = -0.5240603446960449 | ||
reward_player_capture = 0.22175729274749756 | ||
grid_size = 7 | ||
|
||
[train] | ||
total_timesteps = 150_000_000 | ||
total_timesteps = 2_000_000_000 | ||
checkpoint_interval = 50 | ||
num_envs = 2 | ||
num_workers = 2 | ||
env_batch_size =1 | ||
batch_size = 131072 | ||
update_epochs = 4 | ||
minibatch_size = 32768 | ||
batch_size = 524288 | ||
update_epochs = 1 | ||
minibatch_size = 131072 | ||
bptt_horizon = 16 | ||
learning_rate = 0.002 | ||
learning_rate = 0.0015 | ||
ent_coef = 0.013460194258584548 | ||
gae_lambda = 0.90 | ||
gamma = 0.95 | ||
max_grad_norm = 0.8140400052070618 | ||
vf_coef = 0.48416485817685223 | ||
anneal_lr = False | ||
device = cuda | ||
device = cpu | ||
|
||
[sweep.parameters.env.parameters.reward_move_invalid] | ||
distribution = uniform | ||
min = -1.0 | ||
max = 0.0 | ||
|
||
[sweep.parameters.env.parameters.reward_move_pass] | ||
distribution = uniform | ||
min = -1.0 | ||
max = 0.0 | ||
|
||
[sweep.parameters.env.parameters.reward_player_capture] | ||
distribution = uniform | ||
min = 0.0 | ||
max = 1.0 | ||
|
||
[sweep.parameters.env.parameters.reward_opponent_capture] | ||
distribution = uniform | ||
min = -1.0 | ||
max = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[base] | ||
package = ocean | ||
env_name = puffer_pysquared | ||
policy_name = Policy | ||
rnn_name = Recurrent | ||
|
||
[env] | ||
num_envs = 1 | ||
|
||
[train] | ||
total_timesteps = 40_000_000 | ||
checkpoint_interval = 50 | ||
num_envs = 12288 | ||
num_workers = 12 | ||
env_batch_size = 4096 | ||
batch_size = 131072 | ||
update_epochs = 1 | ||
minibatch_size = 8192 | ||
learning_rate = 0.0017 | ||
anneal_lr = False | ||
device = cuda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[base] | ||
package = ocean | ||
env_name = trash_pickup puffer_trash_pickup | ||
policy_name = TrashPickup | ||
rnn_name = Recurrent | ||
|
||
[env] | ||
num_envs = 1024 # Recommended: 4096 (recommended start value) / num_agents | ||
grid_size = 10 | ||
num_agents = 4 | ||
num_trash = 20 | ||
num_bins = 1 | ||
max_steps = 150 | ||
report_interval = 32 | ||
agent_sight_range = 5 # only used with 2D local crop obs space | ||
|
||
[train] | ||
total_timesteps = 100_000_000 | ||
checkpoint_interval = 200 | ||
num_envs = 2 | ||
num_workers = 2 | ||
env_batch_size = 1 | ||
batch_size = 131072 | ||
update_epochs = 1 | ||
minibatch_size = 16384 | ||
bptt_horizon = 8 | ||
anneal_lr = False | ||
device = cuda | ||
learning_rate=0.001 | ||
gamma = 0.95 | ||
gae_lambda = 0.85 | ||
vf_ceof = 0.4 | ||
clip_coef = 0.1 | ||
vf_clip_coef = 0.1 | ||
ent_coef = 0.01 | ||
|
||
[sweep.metric] | ||
goal = maximize | ||
name = environment/episode_return | ||
|
||
[sweep.parameters.train.parameters.learning_rate] | ||
distribution = log_uniform_values | ||
min = 0.000001 | ||
max = 0.01 | ||
|
||
[sweep.parameters.train.parameters.gamma] | ||
distribution = uniform | ||
min = 0 | ||
max = 1 | ||
|
||
[sweep.parameters.train.parameters.gae_lambda] | ||
distribution = uniform | ||
min = 0 | ||
max = 1 | ||
|
||
[sweep.parameters.train.parameters.update_epochs] | ||
distribution = int_uniform | ||
min = 1 | ||
max = 4 | ||
|
||
[sweep.parameters.train.parameters.ent_coef] | ||
distribution = log_uniform_values | ||
min = 1e-5 | ||
max = 1e-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.