{"id":16841713,"url":"https://github.com/redtachyon/ferry","last_synced_at":"2025-04-11T05:51:49.092Z","repository":{"id":130378037,"uuid":"567510694","full_name":"RedTachyon/Ferry","owner":"RedTachyon","description":"WiP gRPC Gymnasium API","archived":false,"fork":false,"pushed_at":"2023-12-30T12:00:55.000Z","size":79,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T03:51:16.328Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/RedTachyon.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-18T00:11:13.000Z","updated_at":"2023-12-22T15:15:25.000Z","dependencies_parsed_at":"2023-03-30T06:35:18.435Z","dependency_job_id":"b95ccc5d-b3ae-4315-982d-44d4a5e4b082","html_url":"https://github.com/RedTachyon/Ferry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTachyon%2FFerry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTachyon%2FFerry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTachyon%2FFerry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTachyon%2FFerry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedTachyon","download_url":"https://codeload.github.com/RedTachyon/Ferry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351410,"owners_count":21089271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-13T12:42:48.393Z","updated_at":"2025-04-11T05:51:49.061Z","avatar_url":"https://github.com/RedTachyon.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ferry\n\nNOTE: readme is temporarily outdated, but the code for the python version is fairly solid, and this approach will be continued going forward\n\nFerry is a tool that enables interacting with [Gymnasium](https://github.com/Farama-Foundation/Gymnasium) environments\nover a network connection (including locally) via memory mapped files (\"MemServer\").\n\nThe potential applications include:\n\n- Simulating the environment on a separate machine\n- Interfacing with environments built with different languages, without a dedicated Python link\n- (future) Interacting with environments running in real time\n\nThe main intent is interfacing with games built in powerful engines like Unity and Unreal.\nAdding a client or a server in the environment code will expose it for interaction with the standard\nGymnasium API.\n\nThere are two possible paradigms -- the environment runs either as a server, or as a client.\n\nClientEnv has a relatively intuitive interpretation. The server maintains an instance of the environment, \nand calls its methods according to the MemServer calls. The user (or the RL algorithm) calls the methods of `ClientEnv`, \nwhich in turn calls the MemServer methods on the server.\n\nServerEnv works the other way around. It expects that the user creates a server which implements a policy, \nand the environment lives in a client which can query that policy. When the client queries the server, it sends an observation, \nand receives the following observation.\n\n\nIn summary, in ClientEnv:\n- The underlying environment logic lives on the server\n- The `Env` instance exists in the client\n- The algorithmic logic is in the client\n\nIn ServerEnv:\n- The underlying environment logic is in the client\n- The `Env` instance exists on the server\n- The algorithmic logic is on the server\n\n\nThe `ServerEnv` implementation is inspired by ML-Agents, but we generally recommend using `ClientEnv`.\n\nTODO: profiling with fast/slow languages on the server/client\n\n## Protocol\n\nClientBackend - ServerEnv:\n- At the beginning, there's a handshake, client sends, server also sends\n- Backend starts execution, performing initial setup\n- Backend sends an initial request, the response must be a ResetArgs\n- In a loop, Backend sends current ORTTI and listens for a response. Response can be either ResetArgs or Action\n- \n\nIMPORTANT NOTE: `step` returns only after the backend reaches a new decision step and sends a new request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredtachyon%2Fferry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredtachyon%2Fferry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredtachyon%2Fferry/lists"}