-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rice-N, C-Rice-N, Fishery, Cournot competition and a parameter sharing runner #161
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
36b8bad
most of the changes
alexandrasouly b514182
most of the changes
alexandrasouly 49de145
more stuff
alexandrasouly 4d35b76
Add cournot game
chrismatix 0c33a70
test optimal policy
chrismatix 62fdd08
Add more cournot configs, fixes and first draft of the fishery enviro…
chrismatix 2149c25
fix cournot test
chrismatix 597b62c
fix cournot test and config
chrismatix cdc61dd
fix fishery tests
chrismatix 1fada97
improvements: cournot optimum v nash optimum, fishery configs
chrismatix 4becf93
fishery eval checkpoint
chrismatix 649e89b
nplayer
alexandrasouly e218372
n player fixes, n player cournot
chrismatix a2cbf6b
add rice environment
chrismatix 5992996
checkpoint: parity between pax rice and ai4coop rice
chrismatix 3ee9e77
Add 5 regions rice configuration
chrismatix f5f740d
add a rice_n regression
chrismatix 25796de
rice consistency checkpoint
chrismatix 4280c3e
fully vectorized rice environment
chrismatix 137e3dd
checkpoint
chrismatix 94c234b
checkpoint
chrismatix cac097b
fix fishery
chrismatix cab9ee3
cleanup
chrismatix 51f1215
more refactoring
chrismatix 43253fc
fixes
chrismatix d0dbb54
Add pytest regression
chrismatix 8726257
checkpoint
chrismatix 1827582
refactor watchers file and fix some types and unused imports
chrismatix ea63d5c
more experiments plus rice refactor
chrismatix a8a817c
tests failing
chrismatix fdb19fe
reformat version file
chrismatix d5ba4d9
exclude version file
chrismatix c07bf1c
fix exclude statement
chrismatix 7bde020
exclude version file in github action
chrismatix 18e92b0
fix
chrismatix 46e47bb
fix
chrismatix 2c0e007
another attempt
chrismatix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow for continuous action spaces