{"id":21150734,"url":"https://github.com/reubenjohn/distributed-tf-keras-rl","last_synced_at":"2026-05-03T10:37:31.910Z","repository":{"id":72663644,"uuid":"196301680","full_name":"reubenjohn/Distributed-TF-Keras-RL","owner":"reubenjohn","description":"Demonstration of distributed Tensorflow Reinforcement Learning with Keras","archived":false,"fork":false,"pushed_at":"2022-04-13T19:47:23.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T01:02:56.464Z","etag":null,"topics":["distributed-computing","keras","keras-tensorflow","machine-learning","python","reinforcement-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reubenjohn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T01:56:29.000Z","updated_at":"2022-03-09T19:18:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd224769-f01a-4b5f-8c26-2e364554f845","html_url":"https://github.com/reubenjohn/Distributed-TF-Keras-RL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reubenjohn/Distributed-TF-Keras-RL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubenjohn%2FDistributed-TF-Keras-RL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubenjohn%2FDistributed-TF-Keras-RL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubenjohn%2FDistributed-TF-Keras-RL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubenjohn%2FDistributed-TF-Keras-RL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reubenjohn","download_url":"https://codeload.github.com/reubenjohn/Distributed-TF-Keras-RL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubenjohn%2FDistributed-TF-Keras-RL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32566444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":["distributed-computing","keras","keras-tensorflow","machine-learning","python","reinforcement-learning","tensorflow"],"created_at":"2024-11-20T10:06:45.804Z","updated_at":"2026-05-03T10:37:31.893Z","avatar_url":"https://github.com/reubenjohn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distributed-TF-Keras-RL\nAn simple working example of distributed reinforcement learning with Keras backed by tensorflow using the Dataset api, multiprocessing and more!\n\nIn a nutshell\n---\nWe bring up a cluster of processes:  \n**6 Explorers**: Applies the learned model to explore the environment and collect data to learn from.  \n**1 Learner**: Improves the model by learning from the collected data.\n\nUsage\n---\nLaunch two horse.py with task_index arguments 0 and 1 respectively, and similarly two rider.py.\nLaunch them in separate windows for a better demonstration.\n  \n    python3.5 -m distributed_horse_rider.start horse 0 # In window 1\n    python3.5 -m distributed_horse_rider.start horse 1 # In window 2\n    python3.5 -m distributed_horse_rider.start rider 0 # In window 3\n    python3.5 -m distributed_horse_rider.start rider 1 # In window 4\n\nOr, for more convenience, `python3.5 -m distributed_horse_rider.launch multiwindow` (`multiwindow` is optional).\n\nUnder the ~~hood~~ analogies\n---\n - The `whip` is shared by all drivers and horses =\u003e Shared FIFO queue of capacity 16.\n - Each whipping of a particular intensity =\u003e An integer that is enqueued by a driver\n - `flick_intensity` =\u003e TF placeholder\n - `flick_whip` =\u003e TF op to enqueue the flick_intensity\n - `feel_whip` =\u003e TF op to dequeue the flick_intensity\n - `steps_taken` =\u003e TF variable shared by all horses and riders storing total steps taken by all horses\n - `take_step` =\u003e TF op to add the dequeued flick_intensity to the shared `steps_taken` variable\n - `measure_distance` =\u003e Just a TF op representing half the number of steps taken\n\n![distributed_horse_rider Architecture](https://image.ibb.co/nQkHvz/distributed_horse_rider_architecture.png)\n\nFeeling adventurous? Play with it!\n---\nWith just a little bit of tweaking,\nyou can play with the number of horses and drivers,\nremove the input statements to benchmark the performance (spoiler I found it pretty impressive for a master-slave based IPC!),\ngo full distributed - running it beyond your localhost and across multiple machine on the same LAN,\nor... whatever else is in these days. Enjoy!\n\nTroubleshooting\n---\nDue to the simplicity of this demo, there isn't any graceful shutdown, you just kill the processes when you're done.\nMake sure to kill these processes. You'll be unable to launch this project until the previous launches have been shut down.\n\nPlease [post issues](https://github.com/Project-MANAS/distributed_horse_rider/issues) if you face any!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenjohn%2Fdistributed-tf-keras-rl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubenjohn%2Fdistributed-tf-keras-rl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenjohn%2Fdistributed-tf-keras-rl/lists"}