Skip to content
Merged

Moma #66

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
dd3fbdd
first commit
pollockDeVis Oct 10, 2025
063d1f2
created adapter for platypus and c borg
pollockDeVis Oct 10, 2025
d0ef7fb
working code on mmborg on hpc
pollockDeVis Oct 13, 2025
adaa26c
working but getting one solution
pollockDeVis Oct 14, 2025
9c4dff8
worked with multiple solutions. Need to test hypervolume
pollockDeVis Oct 14, 2025
70b3e7a
worked with this change
pollockDeVis Oct 14, 2025
60ebc62
need to test the analyser code again after this change. Need to remov…
pollockDeVis Oct 14, 2025
25fff2e
cleaned up version of analyzer. tested with 50k with hpc
pollockDeVis Oct 14, 2025
5c70ec6
cleaned up code with comments
pollockDeVis Oct 16, 2025
cdd30ad
runtime files saved in the folders
pollockDeVis Oct 16, 2025
3156b9a
processing and conversion of runtime files
pollockDeVis Oct 16, 2025
6a4e53f
updated with mm, msborg and epsnsgaii. Tested and all 3 works
pollockDeVis Oct 20, 2025
c055de8
added job array script and script to process borg archives
pollockDeVis Oct 20, 2025
a18a637
minor changes in the naming of the files
pollockDeVis Oct 20, 2025
9480955
reevaluating the policies. Need to extract variables and test
pollockDeVis Oct 23, 2025
d22da02
finalized the script for reevaluation
pollockDeVis Oct 23, 2025
0f17c3d
added feature importance module
pollockDeVis Oct 23, 2025
e29b76f
updated with ternary and choropleth
pollockDeVis Oct 23, 2025
978f170
minor tweaks on the visualization code. Need to move it to visualizer…
pollockDeVis Oct 24, 2025
a630826
moved plots code to visualizer
pollockDeVis Oct 24, 2025
04cb6c7
minor updates on the visualizer code
pollockDeVis Oct 28, 2025
5b0c49d
updated saving of plots to svgs
pollockDeVis Nov 3, 2025
9f00f86
Added R10 region classification
pollockDeVis Nov 6, 2025
3f309dc
minor updates on the tradeoff visualizer plot
pollockDeVis Nov 13, 2025
c23746a
added r5 regions
pollockDeVis Dec 11, 2025
5afa06d
minor update on the model.py for regional aggregation
pollockDeVis Dec 12, 2025
d9c9601
updated r5 regions
pollockDeVis Dec 14, 2025
03293ea
testing moma implementation. Next step try running locally and in the…
pollockDeVis Dec 25, 2025
54ce5ca
borg giving error for mismatch of objectives
pollockDeVis Jan 16, 2026
0cf7674
fixed the adapter code to allow n number of objectives. Works now
pollockDeVis Jan 16, 2026
874ea18
added analysis for fourth paper
pollockDeVis Jan 20, 2026
76e741c
updated cpc calculation in the wrapper; updated config for opt runs
pollockDeVis Jan 21, 2026
144bf50
updated simulation of the IAM with optimized weights
pollockDeVis Jan 22, 2026
d274d78
additional analysis of borg runs from 4 and 5 islands
pollockDeVis Jan 22, 2026
895d2ea
added code for single agent opt - testing PN solution
pollockDeVis Jan 22, 2026
2d50367
Added new viz. Need to move them later
pollockDeVis Jan 29, 2026
ecbac06
new viz for the fourth paper
pollockDeVis Feb 3, 2026
6f0f095
coarser pareto sort. Next simulate for 5 policies
pollockDeVis Feb 4, 2026
be0bca0
PN reeval and tests
pollockDeVis Feb 9, 2026
981849f
added viz code and new justice diagram
pollockDeVis Feb 18, 2026
d0cff08
updated with svg for justice diagram
pollockDeVis Feb 18, 2026
d4e9b8d
updated the svg that works
pollockDeVis Feb 18, 2026
bf42794
new vizualizations of tradeoff
pollockDeVis Feb 27, 2026
fb88d16
added scatter plot viz. Need to put it in the viz module
pollockDeVis Mar 2, 2026
4e49537
updated directories for the borg adapter and bord c connectors. Renam…
pollockDeVis Mar 19, 2026
7a72e6e
updated git ignore
pollockDeVis Mar 19, 2026
1908ee9
updated run_optimization - works on hpc
pollockDeVis Mar 19, 2026
5d39492
added citation file
pollockDeVis Mar 19, 2026
0290c8c
updated run_optimizer with new single agent opt code. updated hpc run
pollockDeVis Mar 19, 2026
ee0d8ba
updated the hpc run and shell script for single agent verifications
pollockDeVis Mar 19, 2026
9f6986f
updated gitignore
pollockDeVis Mar 20, 2026
bb41b22
updated run optimization
pollockDeVis Mar 20, 2026
7f5710e
updated example code
pollockDeVis Mar 20, 2026
4509dea
bump version to 1.0.0
pollockDeVis Mar 20, 2026
4688c52
Merge branch 'main' into moma
pollockDeVis Mar 20, 2026
c261384
updated pytest and pyproject toml file
pollockDeVis Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ name: JUSTICE Unit Tests

on:
push:
branches:
- main
branches: [main]
pull_request:
branches:
- main
branches: [main]

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
lfs: true # Enable Git LFS support
lfs: true

- name: Set up Python 3.9
uses: actions/setup-python@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $GITHUB_ENV
python -m pip install --upgrade pip
python -m pip install "poetry==2.3.2"
poetry --version

- name: Install dependencies
run: |
poetry install
poetry config virtualenvs.in-project true
poetry install --no-interaction --no-ansi

- name: Run Pytest
env:
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,13 @@ limitarian_analysis.py
paper_data_figures_generator.ipynb
paper_data_figures_generator_codeocean.ipynb
reproducing_data_and_plots.py
figs/*
ml_importance_plots/*
figs/*
solvers/moea/*.so
solvers/moea/*.dylib
solvers/moea/borgMOEA.py
third_paper_visualizations.ipynb
fourth_paper_analysis.ipynb
# tests/verification_data/*
#Mac
.DS_Store
Expand Down
28 changes: 28 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: JUSTICE Integrated Assessment Modelling Framework
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Palok
family-names: Biswas
email: p.biswas.nl@gmail.com
affiliation: Delft University of Technology
orcid: 'https://orcid.org/0000-0003-3830-7203'
identifiers:
- type: doi
value: 10.5281/zenodo.15145121
description: Zenodo
repository-code: 'https://github.com/pollockDeVis/JUSTICE'
keywords:
- integrated assessment model
- climate-economy
- deep uncertainty
- normative uncertainty
license: BSD-3-Clause
version: 0.2.0

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CITATION.cff still lists version: 0.2.0 while pyproject.toml bumps the project to 1.0.0. This inconsistency can confuse downstream citation tooling and users. Update the citation metadata version (and release date/DOI if applicable) to match the package version.

Suggested change
version: 0.2.0
version: 1.0.0

Copilot uses AI. Check for mistakes.
date-released: '2025-06-23'
177 changes: 92 additions & 85 deletions JUSTICE_example_run.ipynb

Large diffs are not rendered by default.

48 changes: 20 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

![GitHub Actions build status](https://github.com/pollockDeVis/JUSTICE/actions/workflows/pytest.yml/badge.svg?event=push)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15145122.svg)](https://doi.org/10.5281/zenodo.15145122)

<p align="center">
<img title="JUSTICE Logo" alt="JUSTICE Logo" src="/docs/diagrams/JUSTICE LOGO.svg" width="400"/>
</p>
Expand All @@ -12,7 +13,9 @@ JUSTICE is designed to explore the influence on distributive justice outcomes du

### JUSTICE Overview

<img title="JUSTICE Framework" alt="Flowchart of JUSTICE" src="/docs/diagrams/JUSTICE Flowchart.jpeg">
<p align="center">
<img title="JUSTICE Framework" alt="JUSTICE Framework" src="docs/diagrams/JUSTICE.svg" width="600"/>
</p>

### Documentation

Expand All @@ -25,34 +28,23 @@ JUSTICE is developed by the [HIPPO Lab](https://www.tudelft.nl/ai/hippo-lab) at
<img src="docs/diagrams/tudelft_logo_dark.png" alt="TU Delft Logo" width="200" style="margin-left: 20px;"/>
</p>

# Citation

### Installation
Create and activate a virtual environment and install as a package using

```
pip install .
```

### Running JUSTICE MOMARL

#### Training

JUSTICE-MOMARL can train multi-agent and multi-objective policies and currently support optimising for two objectives. JUSTICE-MOMARL converts the multi-objective training into a single objective by generating various policies with different weight combinations that weight each objective. The entire training process generates **100 different weight combinations** and trains each policy by linearising and normalising the reward and using **Multi Agent Proximal Policy Optimization (MAPPO)** as the reinforcement learning algorithm.
To cite this code, please use the information in [CITATION.cff](CITATION.cff) and the following bibtex entry:

Instead of training all the 100 weights together, we divide the training into batches and train a subset of weight combinations in each batch. For example, in order to train the first 10 uniform weight combnations, balancing the global economic output and inverse global temperature reward functions, run the following:

```bash
python train.py --start_uniform_weight 0 --end_uniform_weight 10 --env-config.rewards "global_economic_output" "inverse_global_temperature" --seed=<Seed> --base_save_path="Path where results are saved"
```

You can view the additional argument to modify the JUSTICE modules and the RL hyperparameters by looking at the `Args` and `EnvConfig` dataclasses in `rl/args.py`.

This script will save the checkpoints, pickled configs and multi-objective vectorised returns for trained policies for each weight combination in the base_save_path provided.

#### Evaluation
Once models have been trained for different weight combinations and the checkpoints for each of them are saved, you can run the evaluation for one specific weight combination and for one evaluation seed by running:

```bash
python eval.py --checkpoint_path="Absolute path to the checkpoint for policy" --seed=0 --output_path="Directory where evaluation results are saved""
@inproceedings{ijcai2025p1064,
title = {Exploring Equity of Climate Policies Using Multi-Agent Multi-Objective Reinforcement Learning},
author = {Biswas, Palok and Osika, Zuzanna and Tamassia, Isidoro and Whorra, Adit and Zatarain-Salazar, Jazmin and Kwakkel, Jan and Oliehoek, Frans A. and Murukannaiah, Pradeep K.},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {9573--9581},
year = {2025},
month = {8},
note = {AI and Social Good},
doi = {10.24963/ijcai.2025/1064},
url = {https://doi.org/10.24963/ijcai.2025/1064},
}
```
The evaluation script will run the MOMARL policy in the JUSTICE simulation and save the evolution of various economic and climate metrics over time where the Emission Control Rate and Savings Rates are set by the trained policy in each time step.
Loading
Loading