Crates.io | rusty-bird |
lib.rs | rusty-bird |
version | 0.2.0 |
source | src |
created_at | 2021-06-08 13:49:07.287261 |
updated_at | 2021-06-14 22:56:44.420086 |
description | Rusty bird is a simple flappy bird implementation that can be controlled by external applications via TCP. So the user is able to plug a reinforcement learning agent to it and play the game. |
homepage | |
repository | https://github.com/mawilms/rusty-bird |
max_upload_size | |
id | 407819 |
size | 134,995 |
Another Flappy Bird clone? :duck: Rusty bird is more than a Flappy Bird clone. Rusty bird was programmed to make your entry into reinforcement learning as easy as possible. With the help of Rusty Bird you can train your own independent agent to play the game.
Want to build an agent classically in Python? Maybe something more exotic like Haskell or Elixir? No problem. Rusty Bird uses a TCP stream that you can simply connect to and get the state and current score of the game.
You should definitely try Elixir! :eyes:
Rust bird is a CLI application which starts the flappy bird game. Currently the only thing you need is the executable and Rust installed.
For precompiled versions:
You can start the game with rusty-bird start
.
To run the app from source:
Clone the repo and execute the crate with cargo run -- start
or build your own executable with cargo build
The state is send as a JSON struct. It contains the y-position
of the Player, the score
and the distance of the first three pipe obstacles and the player.
This is how the schema is looking:
{
"player": <player y-position>,
"score": <int>,
"pipes": [
[
[<lower x distance>, <lower y distance>],
[<upper x distance>, <upper y distance>]
],
[
[<lower x distance>, <lower y distance>],
[<upper x distance>, <upper y distance>]
],
[
[<lower x distance>, <lower y distance>],
[<upper x distance>, <upper y distance>]
]
]
}
This is example data:
{
"player": 103.79996,
"score": 0,
"pipes": [
[
[168.0, 267.20004],
[168.0, -182.79996]
],
[
[418.0, 98.20004],
[418.0, -351.79996]
],
[
[668.0, 111.20004],
[668.0, -338.79996]
]
]
}
Definitely! This project is a great learning experience for me. There are already a few features planned to make the development for your agents easier. Since I'm not a data scientist, I need your help! :blush:
Rusty Bird is release under the GNU GPLv3