RL-OptS
Reinforcement Learning of Optimal Search strategies
This library builds the necessary tools needed to study, replicate and develop reinforcement learning agents for target search problems, as well as a benchmark baselines with which to compare. This library is based in two different publications:
-
“Optimal foraging strategies can be learned” by G. Muñoz-Gil, A. López-Incera, L. J. Fiderer and H. J. Briegel. Here we developed agents able to learn how to forage efficiently in environments with multiple targets.
-
“Learning to reset in target search problems” by G. Muñoz-Gil, H. J. Briegel and M. Caraglio. Here we extended the agents to be able to reset to the origin, a feature that has revolutionize target search problems in the last years.
Installation
You can access all these tools installing the python package rl_opts
via Pypi:
pip install rl-opts
You can also opt for cloning the source repository and executing the following on the parent folder you just cloned the repo:
pip install -e rl_opts
This will install both the library and the necessary packages.
Tutorials
We have prepared a series of tutorials to guide you through the most important functionalities of the package. You can find them in the Tutorials folder of the Github repository or in the Tutorials tab of our webpage, with notebooks that will help you navigate the package as well as reproducing the results of our paper via minimal examples. In particular, we have three tutorials:
- Reinforcement learning : shows how to train a RL agent based on Projective Simulation agents to search targets in randomly distributed environments as the ones considered in our paper.
- Learning to reset in target search problems : shows how to train a RL agent similar to the previous, but with the ability to reset to the origin, an action that is learned along its spatial dynamics.
- Imitation learning : shows how to train a RL agent to imitate the policy of an expert equipped with a pre-trained policy. The latter is based on the benchmark strategies common in the literature.
- Benchmarks : shows how launch various benchmark strategies with which to compare the trained RL agents.
Cite
We kindly ask you to cite our paper if any of the previous material was useful for your work:
@article{munoz2024optimal,
title={Optimal foraging strategies can be learned},
author={Mu{\~n}oz-Gil, Gorka and L{\'o}pez-Incera, Andrea and Fiderer, Lukas J and Briegel, Hans J},
journal={New Journal of Physics},
volume={26},
number={1},
pages={013010},
year={2024},
publisher={IOP Publishing}
}
Metadata
Release files for rl-opts 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rl_opts-0.2.0.tar.gz | 42.8 kB | Without provenance | Details for rl_opts-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rl_opts-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rl_opts-0.2.0-py3-none-any.whl |
Total release size: 91.3 kB
Release files / rl_opts-0.2.0.tar.gz
| Download URL | rl_opts-0.2.0.tar.gz |
|---|---|
| Size | 42.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
830d59f75111dc0e9716c10309a5259fd317c68da73b84feb8f4deea4b218c91
|
|
BLAKE2b-256 checksum How to use checksums |
25269058c14e3b74cdbfa406ec2e3575d3eecf6dac92ef4aef3c923b5af1bfbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / rl_opts-0.2.0-py3-none-any.whl
| Download URL | rl_opts-0.2.0-py3-none-any.whl |
|---|---|
| Size | 48.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24a0e2ebdbd109d698352f8b3f551532da72ae5ed661d9101dcba733538fc9e1
|
|
BLAKE2b-256 checksum How to use checksums |
a32af98f293ff187b495546252cd67888d5d2abaee886b87c18b679c85d535fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for rl-opts 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.