Metadata-Version: 2.4
Name: neat-tnp
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Requires-Dist: numpy>=1.20
Requires-Dist: matplotlib>=3.5
Requires-Dist: networkx>=2.6
Requires-Dist: scikit-image>=0.19
Requires-Dist: gdal>=3.9.3
Requires-Dist: jupyterlab ; extra == 'dev'
Requires-Dist: ipykernel ; extra == 'dev'
Requires-Dist: ipympl ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: networkx ; extra == 'dev'
Requires-Dist: scikit-image ; extra == 'dev'
Provides-Extra: dev
License-File: LICENSE
Summary: Track Network Planning using NEAT-based Evolution of Graphs
Keywords: optimization,genetic-algorithm,NEAT,graph-evolution,network-planning
Author-email: Leon Thomm <thomm@jpl.nasa.gov>, Ethan Schaler <ethan.schaler@jpl.nasa.gov>
License-Expression: Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# NEAT-TNP: Track Network Planning using NEAT-based Evolution of Graphs

This repository contains

* A generalization of the [NEAT genetic algorithm](https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies) that synthesizes its core mechanism of evolving graphs, without knowledge about neural networks (`neat_core.py`)
* A re-implementation of the original NEAT use case on top of the generalized algorithm (`neat.py`)
* A new use case of heuristically finding spatial networks, applied to the track planning of a lunar cargo transport system (`neat_tnp.py`)
* A high-performance implementation of the TNP use case, written in Rust

A set of minimal examples can be found in `examples.ipynb`.

## Installation

```
pip install neat_tnp
```

Or to build the wheel from sources, run:

```
docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin build --release -i python3.12 -o /io/dist
```

## Development

```bash
pip install .[dev]
```

Now you should be able to run the notebooks. Project structure:

```
├── __init__.py
├── neat_tnp
│   ├── neat_py_tnp.py          # reference TNP implementation
│   ├── neat_py_core.py
│   ├── neat_py_neat.py         # re-implementation of original NEAT
│   ├── neat_rs_tnp.py          # high-performance TNP implementation
│   ├── plotting.py             # utilities
│   ├── config_utils.py
│   ├── dem_utils.py
│   └── neat_py_tnp_eval.py     
├── crates                  # Rust crates for neat_rs_tnp.py
│   ├── neat_rs_core
│   └── neat_rs_tnp_rs
├── examples.ipynb          # canonical examples
├── pyproject.toml          # dependencies and package definition
└── README.md               # this file
```

