flappy-bird-env


Nameflappy-bird-env JSON
Version 0.1.5 PyPI version JSON
download
home_page
SummaryFlappy Bird as a Farama Gymnasium environment.
upload_time2023-06-26 17:57:47
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT License Copyright (c) 2023 Roberto Schiavone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords flappy-bird gymnasium reinforcement-learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flappy Bird Env

<p align="center">
    <img src="https://raw.githubusercontent.com/robertoschiavone/flappy-bird-env/main/flappy-bird.gif"
        alt="flappy bird"/>
</p>

<table>
    <tbody>
        <tr>
            <td>Action Space</td>
            <td>Discrete(2)</td>
        </tr>
        <tr>
            <td>Observation Shape</td>
            <td>(800, 576, 3)</td>
        </tr>
        <tr>
            <td>Observation High</td>
            <td>255</td>
        </tr>
        <tr>
            <td>Observation Low</td>
            <td>0</td>
        </tr>
        <tr>
            <td>Import</td>
            <td>import flappy_bird_env  # noqa<br/>gymnasium.make("FlappyBird-v0")</td>
        </tr>
    </tbody>
</table>

## Description

Flappy Bird as a Farama Gymnasium environment.

### Installation

```bash
pip install flappy-bird-env
```

### Usage

1. Play it by running

```bash
python -m flappy_bird_env
```

Press `space` to flap the wings.

2. Import it to train your RL model

```python
import flappy_bird_env  # noqa
env = gymnasium.make("FlappyBird-v0")
```

The package relies on ```import``` side-effects to register the environment
name so, even though the package is never explicitly used, its import is
necessary to access the environment.

## Action Space

Flappy Bird has the action space `Discrete(2)`.

| Value | Meaning    |
|-------|------------|
| 0     | NOOP       |
| 1     | flap wings |

## Observation Space

The observation will be the RGB image that is displayed to a human player with
observation space `Box(low=0, high=255, shape=(800, 576, 3), dtype=np.uint8)`.

### Rewards

You get `+1` every time you pass a pipe, otherwise `+0.001` for each frame where you
don't collide against the top and bottom bounds, or against a pipe.

## Version History

- v0: initial version release

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "flappy-bird-env",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Roberto Schiavone <hello@robertoschiavone.io>",
    "keywords": "flappy-bird,gymnasium,reinforcement-learning",
    "author": "",
    "author_email": "Roberto Schiavone <hello@robertoschiavone.io>",
    "download_url": "https://files.pythonhosted.org/packages/d3/bd/782485820db83b47d6dc13dc61b0cfd5d2bf30535da41c394c3b62d4d407/flappy-bird-env-0.1.5.tar.gz",
    "platform": null,
    "description": "# Flappy Bird Env\n\n<p align=\"center\">\n    <img src=\"https://raw.githubusercontent.com/robertoschiavone/flappy-bird-env/main/flappy-bird.gif\"\n        alt=\"flappy bird\"/>\n</p>\n\n<table>\n    <tbody>\n        <tr>\n            <td>Action Space</td>\n            <td>Discrete(2)</td>\n        </tr>\n        <tr>\n            <td>Observation Shape</td>\n            <td>(800, 576, 3)</td>\n        </tr>\n        <tr>\n            <td>Observation High</td>\n            <td>255</td>\n        </tr>\n        <tr>\n            <td>Observation Low</td>\n            <td>0</td>\n        </tr>\n        <tr>\n            <td>Import</td>\n            <td>import flappy_bird_env  # noqa<br/>gymnasium.make(\"FlappyBird-v0\")</td>\n        </tr>\n    </tbody>\n</table>\n\n## Description\n\nFlappy Bird as a Farama Gymnasium environment.\n\n### Installation\n\n```bash\npip install flappy-bird-env\n```\n\n### Usage\n\n1. Play it by running\n\n```bash\npython -m flappy_bird_env\n```\n\nPress `space` to flap the wings.\n\n2. Import it to train your RL model\n\n```python\nimport flappy_bird_env  # noqa\nenv = gymnasium.make(\"FlappyBird-v0\")\n```\n\nThe package relies on ```import``` side-effects to register the environment\nname so, even though the package is never explicitly used, its import is\nnecessary to access the environment.\n\n## Action Space\n\nFlappy Bird has the action space `Discrete(2)`.\n\n| Value | Meaning    |\n|-------|------------|\n| 0     | NOOP       |\n| 1     | flap wings |\n\n## Observation Space\n\nThe observation will be the RGB image that is displayed to a human player with\nobservation space `Box(low=0, high=255, shape=(800, 576, 3), dtype=np.uint8)`.\n\n### Rewards\n\nYou get `+1` every time you pass a pipe, otherwise `+0.001` for each frame where you\ndon't collide against the top and bottom bounds, or against a pipe.\n\n## Version History\n\n- v0: initial version release\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Roberto Schiavone  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Flappy Bird as a Farama Gymnasium environment.",
    "version": "0.1.5",
    "project_urls": {
        "changelog": "https://github.com/robertoschiavone/flappy-bird-env/releases",
        "documentation": "https://github.com/robertoschiavone/flappy-bird-env",
        "homepage": "https://github.com/robertoschiavone/flappy-bird-env",
        "repository": "https://github.com/robertoschiavone/flappy-bird-env.git"
    },
    "split_keywords": [
        "flappy-bird",
        "gymnasium",
        "reinforcement-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e1a7a693ee67e192c13ba8eed5fdf93a0e91d9b5fa2e572c28c940ffa52805a",
                "md5": "6187754e924436da7cb8d269e42f51ac",
                "sha256": "9d59a656f0afe7af2c741a75c4c419fc706cd1ee89b463a2ce397ed12024e627"
            },
            "downloads": -1,
            "filename": "flappy_bird_env-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6187754e924436da7cb8d269e42f51ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 22076,
            "upload_time": "2023-06-26T17:57:45",
            "upload_time_iso_8601": "2023-06-26T17:57:45.003874Z",
            "url": "https://files.pythonhosted.org/packages/2e/1a/7a693ee67e192c13ba8eed5fdf93a0e91d9b5fa2e572c28c940ffa52805a/flappy_bird_env-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3bd782485820db83b47d6dc13dc61b0cfd5d2bf30535da41c394c3b62d4d407",
                "md5": "201a38fe3d5c710e22bc9d107a9500e3",
                "sha256": "6d188048882357b1c733b5f7bdee825345a4db1a7c788b272014083bb56a7fa7"
            },
            "downloads": -1,
            "filename": "flappy-bird-env-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "201a38fe3d5c710e22bc9d107a9500e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 20267,
            "upload_time": "2023-06-26T17:57:47",
            "upload_time_iso_8601": "2023-06-26T17:57:47.099302Z",
            "url": "https://files.pythonhosted.org/packages/d3/bd/782485820db83b47d6dc13dc61b0cfd5d2bf30535da41c394c3b62d4d407/flappy-bird-env-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-26 17:57:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "robertoschiavone",
    "github_project": "flappy-bird-env",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "flappy-bird-env"
}
        
Elapsed time: 0.08336s