Giter Site home page Giter Site logo

pierre-cortambert / gym_fishing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boettiger-lab/gym_fishing

0.0 0.0 0.0 16.04 MB

:snake: An OpenAI Gym to benchmark AI Reinforcement Learning algorithms in fisheries-related control problems

License: MIT License

Python 95.62% Makefile 4.00% Shell 0.37%

gym_fishing's Introduction

Install & Train PyPI Version PyPI - Downloads Project Status: WIP โ€“ Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

This repository provides OpenAI-gym class definitions for the classic fisheries management problem. See Creating your own Gym Environments for details on how a new gym environment is defined.

Installation

Install the latest release from pypi:

pip install gym_fishing

Or install the current dev version by cloning this repo and running:

python setup.py sdist bdist_wheel
pip install -e .

Environments

So far, we have:

A simple fishing model defined in a continuous state space of fish biomass, with:

  • fishing-v0: A discrete action space with logistic growth, n_actions (default 100), and quota = action / n_actions * K.
  • fishing-v1 A continuous action space, action = quota.
  • fishing-v2: A growth model that contains a tipping point. Uses continuous action space. Set the tipping point parameter, C
  • fishing-v4: Includes parameter uncertainty.

Model parameters can be configured for each gym, including the choice of r, K, sigma (process noise). Note that the reward will depend on these parameters, making comparison between models more difficult. For simple models it is possible to rescale the reward by the known optimal strategy, given the parameters. Because this approach does not generalize to more complex models where the solution is not known, it is not implemented here.

Examples

Known Solutions

MSY, Schaefer 1954: Asymptotic optimal solution

Theory

The optimal dynamic management solution for the stochastic fisheries model is a "constant escapement" policy, as proven by Reed 1979. For small noise, this corresponds to the same 'bang-bang' solution for the determinstic model, proven by Clark 1973. Ignoring discounting, the long-term harvest under the constant escapement solution corresponds to the Maximum Sustainable Yield, or MSY, which is the optimal 'constant mortality' solution (i.e. under the constraint of having to harvest a fixed fraction F of the stock each year), as demonstrated independently by Schaefer 1954 and Gordon 1954.

For a given $f(x)$, The biomass at MSY can trivially be solved for by maximizing the growth function $X_{t+1} = f(X_t)$. Discretizing the state space, the dynamic optimal harvest can easily be found by stochastic dynamic programming.

Here, we seek to compare the performance of modern RL methods, which make no a-priori assumptions about the stock recruitment function, to this known optimal solution (given the underlying population dynamics).

gym_fishing's People

Contributors

gdb avatar cboettig avatar jietang avatar pzhokhov avatar jonasschneider avatar tlbtlbtlb avatar zuoxingdong avatar joschu avatar christopherhesse avatar rafaelcosman avatar nottombrown avatar mlap avatar iaroslav-ai avatar ppaquette avatar siemanko avatar olegklimov avatar tristandeleu avatar shelhamer avatar nc25 avatar catherio avatar abhinavsagar avatar wojzaremba avatar gwern avatar machinaut avatar tambetm avatar jkcooper2 avatar hartikainen avatar colinmorris avatar instance01 avatar glennpow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.