Skip to content

captain-project/captain3preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAPTAIN v.3.0 – Preview

Conservation Area Prioritization Through Artificial INtelligence

Status License

What is CAPTAIN?

CAPTAIN is a reinforcement learning system for optimizing conservation and restoration strategies in space and time.

Key Features in v.3

⚙️ Engineered for Scale: Complete rewrite for high performance. Full GPU support and optimized sparse matrix operations allow for analysis at larger scales and finer resolutions.

🌱 Dynamic Environment Scenarios: Advanced support for time-evolving scenarios, incorporating climate change projections and dynamic implementation costs.

🧩 Modular & Customizable: A flexible architecture allowing for highly tailored conservation policies and seamless integration of custom spatial data.

🎯 Multi-objective Optimization: Full support to quantify synergies and trade-offs between competing conservation and restoration targets.

⚠️ Notice

This repository contains a preview of CAPTAIN v.3.

  • Status: This is an active beta. The core simulation engine and training loops are functional, but the API and internal architecture are subject to change.
  • Development: Primary development occurs in a private repository. This public mirror is provided for demonstration, testing, and early-access feedback.
  • Support: Please report bugs via GitHub Issues, but note that feature requests may be prioritized based on our internal development roadmap.

Installation

1. Install uv

uv is a high-performance Python package manager that ensures consistent environments across Windows, macOS, and Linux.

  • macOS / Linux:

    curl -LsSf [https://astral.sh/uv/install.sh](https://astral.sh/uv/install.sh) | sh
  • Windows (PowerShell):

    powershell -ExecutionPolicy ByPass -c "irm [https://astral.sh/uv/install.ps1](https://astral.sh/uv/install.ps1) | iex"

2. Set up the Environment

Once uv is installed, clone the repository and sync the dependencies. This will automatically create a virtual environment (.venv) and install the correct version of PyTorch.

# Clone and enter the repository
git clone https://github.com/captain-project/captain3preview
cd captain3preview

# Sync dependencies and create virtual environment
uv sync

🛠️ Troubleshooting - Windows-Specific Setup

If you are on Windows, you may need to perform two quick steps to ensure uv and Python work correctly:

Enable Long Paths: Windows has a default 260-character limit for file paths. High-performance libraries like PyTorch often exceed this.

Run PowerShell as Administrator and execute:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

Execution Policy: If PowerShell blocks the uv command, run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Examples

Working example scripts are in the examples folder

Example data can be downloaded here. A pre-trained model is available here.

Project Structure

captain3preview/
├── captain/            # Main package
│   ├── agents/         # Policy network, feature extraction, rewards
│   ├── algorithms/     # Evolution strategies trainer, episode runner
│   ├── data/           # SpatialData, ExtinctionRisk classes
│   ├── environment/    # BioEnv simulation engine
│   └── utils/          # Utilities, data loading
└── examples/           # Usage examples

Citation

If you use CAPTAIN v.3, please cite:

@software{captain_3_2026,
  title = {CAPTAIN v.3 beta: Conservation Area Prioritization Through Artificial INtelligence},
  year = {2026},
  url = {https://github.com/captain-project/}
}

@article{silvestro2022improving,
  title={Improving biodiversity protection through artificial intelligence},
  author={Silvestro, Daniele and Goria, Stefano and Sterner, Thomas and Antonelli, Alexandre},
  journal={Nature sustainability},
  volume={5},
  number={5},
  pages={415--424},
  year={2022},
  publisher={Nature Publishing Group UK London}
}

@article{silvestro2025using,
  title={Using artificial intelligence to optimize ecological restoration for climate and biodiversity},
  author={Silvestro, Daniele and Goria, Stefano and Rau, E-ping and Ferreira de Lima, Renato Augusto and Groom, Ben and Jacobsson, Piotr and Sterner, Thomas and Antonelli, Alexandre},
  journal={bioRxiv},
  pages={2025--01},
  year={2025},
}

License

This project is licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International, see full license for detail.

For commercial licensing inquiries or permission to deviate from these terms, please contact the development team.

About

Preview of CAPTAIN v.3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages