-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Rice-N, C-Rice-N, Fishery, Cournot competition and a parameter sh…
…aring runner (#161) * most of the changes * most of the changes * more stuff * Add cournot game * test optimal policy * Add more cournot configs, fixes and first draft of the fishery environment * fix cournot test * fix cournot test and config * fix fishery tests * improvements: cournot optimum v nash optimum, fishery configs * fishery eval checkpoint * nplayer * n player fixes, n player cournot * add rice environment * checkpoint: parity between pax rice and ai4coop rice * Add 5 regions rice configuration * add a rice_n regression * rice consistency checkpoint * fully vectorized rice environment * checkpoint * checkpoint * fix fishery * cleanup * more refactoring * fixes * Add pytest regression * checkpoint * refactor watchers file and fix some types and unused imports * more experiments plus rice refactor * tests failing * reformat version file * exclude version file * fix exclude statement * exclude version file in github action * fix * fix * another attempt --------- Co-authored-by: alexandrasouly <[email protected]>
- Loading branch information
1 parent
7936b16
commit 9d3fa62
Showing
119 changed files
with
21,547 additions
and
494 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# .github/workflows/app.yaml | ||
name: PyTest | ||
on: | ||
on: | ||
pull_request: | ||
branches: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
@@ -16,6 +16,7 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- uses: pre-commit/[email protected] | ||
- name: Ensure latest pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.formatting.provider": "black" | ||
} |
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,13 +1,17 @@ | ||
## Environments | ||
|
||
Pax includes many environments specified by `env_id`. These are `infinite_matrix_game`, `iterated_matrix_game` and `coin_game`. Independetly you can specify your enviroment type as either a meta environment (with an inner/ outer loop) by `env_type`, the options supported are `sequential` or `meta`. | ||
Pax includes many environments specified by `env_id`. These are `infinite_matrix_game`, `iterated_matrix_game` and `coin_game`. Independently you can specify your environment type as either a meta environment (with an inner/ outer loop) by `env_type`, the options supported are `sequential` or `meta`. | ||
|
||
These are specified in the config files in `pax/configs/{env_id}/EXPERIMENT.yaml`. | ||
|
||
| Environment ID | Environment Type | Description | | ||
| ----------- | ----------- | ----------- | | ||
|`iterated_matrix_game`| `sequential` | An iterated matrix game with a predetermined number of timesteps per episode with a discount factor $\gamma$ | | ||
|`iterated_matrix_game` | `meta` | A meta game over the iterated matrix game with an outer agent (player 1) and an inner agent (player 2). The inner updates every episode, while the the outer agent updates every meta-episode | | ||
|`infinite_matrix_game` | `meta`| An infinite matrix game that calculates exact returns given a payoff and discount factor $\gamma$ | | ||
|coin_game | `sequential` | A sequential series of episode of the coin game between two players. Each player updates at the end of an episode| | ||
|coin_game | `meta` | A meta learning version of the coin game with an outer agent (player 1) and an inner agent (player 2). The inner updates every episode, while the the outer agent updates every meta-episode| | ||
| Environment ID | Environment Type | Description | | ||
|------------------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `iterated_matrix_game` | `sequential` | An iterated matrix game with a predetermined number of timesteps per episode with a discount factor $\gamma$ | | ||
| `iterated_matrix_game` | `meta` | A meta game over the iterated matrix game with an outer agent (player 1) and an inner agent (player 2). The inner updates every episode, while the the outer agent updates every meta-episode | | ||
| `infinite_matrix_game` | `meta` | An infinite matrix game that calculates exact returns given a payoff and discount factor $\gamma$ | | ||
| coin_game | `sequential` | A sequential series of episode of the coin game between two players. Each player updates at the end of an episode | | ||
| coin_game | `meta` | A meta learning version of the coin game with an outer agent (player 1) and an inner agent (player 2). The inner updates every episode, while the the outer agent updates every meta-episode | | ||
| cournot | `sequential`/`meta` | A one-shot version of a [Cournot competition](https://en.wikipedia.org/wiki/Cournot_competition) | | ||
| fishery | `sequential`/`meta` | A dynamic resource harvesting game as specified in Perman et al. | | ||
| Rice-N | `sequential`/`meta` | A re-implementation of the Integrated Assessment Model introduced by [Zhang et al.](https://papers.ssrn.com/abstract=4189735) available with either the original 27 regions or a new calibration of only 5 regions | | ||
| C-Rice-N | `sequential`/`meta` | An extension of Rice-N with a simple climate club mechanism | |
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
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
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.