{"id":22707152,"url":"https://github.com/cair/flashrl","last_synced_at":"2026-03-07T20:01:39.345Z","repository":{"id":52882217,"uuid":"100338911","full_name":"cair/FlashRL","owner":"cair","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-06T13:41:56.000Z","size":25116,"stargazers_count":28,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-09T21:19:48.737Z","etag":null,"topics":["ai","artificial-intelligence","cpp","deep-learning","deep-reinforcement-learning","game","machine-learning","neural-networks","per-arne","python","reinforcement-learning","reinforcement-learning-environments","tree-search"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cair.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-15T04:33:12.000Z","updated_at":"2025-08-13T06:46:00.000Z","dependencies_parsed_at":"2022-08-23T05:00:31.390Z","dependency_job_id":null,"html_url":"https://github.com/cair/FlashRL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cair/FlashRL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2FFlashRL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2FFlashRL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2FFlashRL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2FFlashRL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cair","download_url":"https://codeload.github.com/cair/FlashRL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cair%2FFlashRL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30229585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","cpp","deep-learning","deep-reinforcement-learning","game","machine-learning","neural-networks","per-arne","python","reinforcement-learning","reinforcement-learning-environments","tree-search"],"created_at":"2024-12-10T10:11:37.855Z","updated_at":"2026-03-07T20:01:39.327Z","avatar_url":"https://github.com/cair.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlashRL - Flash Platform for Reinforcement Learning\n\nFor the updated version of FlashRL, go to [this link](https://github.com/cair/rl).\n\n# TODO List\n* Fix pyVNC issue. Currently pyVNC fails to start a VNC server for the game to run on. We need to solve this issue in order to run our games in headless mode.\n* Begin developing custom environments.\n* Begin developing Docker containers for our code to run in. Preferably, create a Dockerfile that can be used to run custom environments without the need for the local machine to have all the dependencies installed.\n\n# Prerequisites\n* Ubuntu 18.04 (Our most recent testing of 20.04 proves that it does not work.)\n* Python 3.x.x (Python 3.6.8 is tested)\n* gnash\n* xvfb\n\n# Installation\nFor our testing, we have been working in a python virtual environment.\n```bash\nsudo apt-get install xvfb\nsudo apt-get install gnash\nsudo apt-get install vnc4server\n# I would reccomend doing the next steps inside a virtual environment.\npip install git+https://github.com/cair/pyVNC\npip install git+https://github.com/JDaniel41/FlashRL\n```\n\n# Deploy new environment\nDevelopers are able to import custom environments through ```project/contrib/environments/```\n\nA typical custom implementation looks like this:\n```python\n- project\n    - __init__.py\n    - main.py\n    - contrib\n        - environments\n            - env_name\n                - __init__.py\n                - dataset.p\n                - model.h5\n                - env.swf\n\n```\nin the following section, we demonstrate how to implement the flash game Mujaffa as an environment for FlashRL.\n\n## Mujaffa-1.6\n### Prerequisites\n* SWF Game File\n* Python 3x\n* Keras\n\n###\n*  Create directory structure ```mkdir -p contrib/environments/mujaffa-v1.6```\n*  Create Configuration file:  \n```python\necho \"define = {\n    \"swf\": \"mujaffa.swf\",\n    \"model\": \"model.h5\",\n    \"dataset\": \"dataset.p\",\n    \"scenes\": [],\n    \"state_space\": (84, 84, 3)\n}\" \u003e contrib/environments/mujaffa-v1.6/__init__.py\n```\n\n* Add swf \"mujaffa.swf\" to ```contrib/environments/mujaffa-v1.6/```\n* Create file ```main.py in project root``` with following template\n\n```\nfrom FlashRL import Game\n\ndef on_frame(state, type, vnc):\n    # vnc.send_key(\"a\") # Sends the key \"a\"\n    # vnc.send_mouse(\"Left\", (200, 200)) # Left Clicks at x=200, y=200\n    # vnc.send_mouse(\"Right\", (200, 200)) # Right Clicks at x=200, y=200\n    pass\n\ng = Game(\"mujaffa-v1.6\", fps=10, frame_callback=on_frame, grayscale=True, normalized=True)\n```\n\n\n# Licence\nCopyright 2017/2018 Per-Arne Andersen\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcair%2Fflashrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcair%2Fflashrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcair%2Fflashrl/lists"}