{"id":19223586,"url":"https://github.com/vowpalwabbit/reinforcement_learning","last_synced_at":"2025-05-16T10:06:43.432Z","repository":{"id":37795821,"uuid":"151465233","full_name":"VowpalWabbit/reinforcement_learning","owner":"VowpalWabbit","description":"Interaction-side integration library for Reinforcement Learning loops: Predict, Log, [Learn,] Update","archived":false,"fork":false,"pushed_at":"2024-11-04T21:08:14.000Z","size":16460,"stargazers_count":75,"open_issues_count":68,"forks_count":40,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-16T10:06:41.657Z","etag":null,"topics":["cpp","machine-learning","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"C++","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/VowpalWabbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-10-03T19:02:54.000Z","updated_at":"2025-03-21T16:07:47.000Z","dependencies_parsed_at":"2023-10-24T21:26:28.861Z","dependency_job_id":"1ffec1e8-8613-4249-815a-fed1b9e1b9cf","html_url":"https://github.com/VowpalWabbit/reinforcement_learning","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VowpalWabbit%2Freinforcement_learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VowpalWabbit%2Freinforcement_learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VowpalWabbit%2Freinforcement_learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VowpalWabbit%2Freinforcement_learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VowpalWabbit","download_url":"https://codeload.github.com/VowpalWabbit/reinforcement_learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"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":["cpp","machine-learning","reinforcement-learning"],"created_at":"2024-11-09T15:08:52.205Z","updated_at":"2025-05-16T10:06:43.405Z","avatar_url":"https://github.com/VowpalWabbit.png","language":"C++","readme":"[![Linux Build Status)](https://img.shields.io/azure-devops/build/vowpalwabbit/3934113c-9e2b-4dbc-8972-72ab9b9b4342/23/master?label=Linux%20build\u0026logo=Azure%20Devops)](https://dev.azure.com/vowpalwabbit/Vowpal%20Wabbit/_build?definitionId=31)\n[![MacOS Build Status](https://img.shields.io/azure-devops/build/vowpalwabbit/3934113c-9e2b-4dbc-8972-72ab9b9b4342/22/master?label=MacOS%20build\u0026logo=Azure%20Devops)](https://dev.azure.com/vowpalwabbit/Vowpal%20Wabbit/_build?definitionId=32)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/57p7o5v34onsqma2/branch/master?svg=true)](https://ci.appveyor.com/project/JohnLangford/reinforcement-learning/branch/master)\n[![Integration with latest VW](https://github.com/VowpalWabbit/reinforcement_learning/actions/workflows/daily_integration.yml/badge.svg?event=schedule)](https://github.com/VowpalWabbit/reinforcement_learning/actions/workflows/daily_integration.yml)\n\n# RL Client Library\nInteraction-side integration library for Reinforcement Learning loops: Predict, Log, [Learn,] Update\n\n## Compiling the library\n### Getting the source code\n```sh\ngit clone --recursive https://github.com/VowpalWabbit/reinforcement_learning.git\ncd reinforcement_learning\n```\n\n### Building with Vcpkg + CMake Presets\n#### Requirements\n* CMake 3.20+\n* Ninja\n\n#### Commands\n```sh\ncmake --preset=vcpkg-release\ncmake --build --preset=vcpkg-release\n```\n\n## Alternative system-specific build instructions\n### Ubuntu\n#### Dependencies\nInstall the dependencies for this project with the following commands. We recommend the use of [vcpkg](https://github.com/microsoft/vcpkg) for installing `cpprestsdk` and `flatbuffers`.\n```sh\nsudo apt-get install libboost-all-dev libssl-dev\nvcpkg install cpprestsdk flatbuffers\n```\n\n#### Configure + Build\nWhen configuring a CMake project using vcpkg dependencies, we must provide the full path to the `vcpkg.cmake` toolchain file.\n```sh\n# Configure\ncmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=\u003c/path/to/vcpkg\u003e/scripts/buildsystems/vcpkg.cmake\n\n# Build\ncmake --build build -j `nproc`\n\n# Test\ncmake --build build --target rltest -j `nproc`\ncmake --build build --target test\n```\n\n### MacOS\n#### Dependencies\nMacOS dependencies can be managed through homebrew.\n```sh\nbrew install cpprestsdk flatbuffers openssl\n```\n\n#### Configure +  Build\nIn order to build using homebrew dependencies, you must invoke cmake this way:\n```sh\ncmake -S . -B build -DOPENSSL_ROOT_DIR=`brew --prefix openssl` -DOPENSSL_LIBRARIES=`brew --prefix openssl`/lib\ncmake --build build --target all -j 4\n```\n\n### Windows\n#### Dependencies\nDependencies on Windows should be managed using [vcpkg](https://github.com/microsoft/vcpkg).\n```cmd\nvcpkg install --triplet x64-windows zlib boost-system boost-program-options boost-test boost-align boost-foreach boost-math boost-uuid cpprestsdk flatbuffers openssl\n```\n\nIf needed, add the flatbuffers executables to your PATH: `\u003cvcpkg_root\u003e\\installed\\x64-windows\\tools\\flatbuffers`\n\n#### Configure + Build in Visual Studio\nOpen the project directory in Visual Studio. Building the library can be easily done in the GUI.\n- Edit CMake command line settings with `Project \u003e CMake Settings for \u003cproject name\u003e`\n- Run CMake configuration with `Project \u003e Configure Cache`. Use `Project \u003e Delete Cache and Reconfigure` to force a full reconfiguration starting from a clean working directory.\n- Compile with `Build \u003e Build All`\n- Run tests with `Test \u003e Run CTests for \u003cproject name\u003e`\n\nThis procedure has been verified to work well in Visual Studio 2022.\n\n#### Configure with command line + Build in Visual Studio\nAlternatively, CMake configuration can be done in the command line.\n```cmd\ncmake -S . -B build  -DCMAKE_TOOLCHAIN_FILE=\u003cvcpkg_root\u003e\\scripts\\buildsystems\\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -A x64 -G \"Visual Studio 16 2019\"\nrem Generates a solution you can open and use in Visual Studio\n.\\build\\reinforcement_learning.sln\n```\n\nSet VcpkgIntegration environment variable to `vcpkg.targets` file on your machine. Example:\n```\nVcpkgIntegration=c:\\s\\vcpkg\\scripts\\buildsystems\\msbuild\\vcpkg.targets\n```\n\nOpen `reinforcement_learning.sln` in Visual Studio. Build Release or Debug x64 configuration.\n\n## Troubleshooting\n### OpenSSL on MacOS\nIf you get an error similar to the following on MacOS when running `cmake ..`, then you may be able to fix it by supplying the OpenSSL path to CMake.\n```\nMake Error at /usr/local/Cellar/cmake/3.14.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):\n  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the\n  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)\nCall Stack (most recent call first):\n  /usr/local/Cellar/cmake/3.14.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)\n  /usr/local/Cellar/cmake/3.14.4/share/cmake/Modules/FindOpenSSL.cmake:413 (find_package_handle_standard_args)\n  /usr/local/Cellar/cmake/3.14.4/share/cmake/Modules/CMakeFindDependencyMacro.cmake:48 (find_package)\n  /usr/local/lib/cpprestsdk/cpprestsdk-config.cmake:11 (find_dependency)\n  CMakeLists.txt:9 (find_package)\n```\n\nThis can be fixed by invoking CMake similar to the following:\n```bash\ncmake -DOPENSSL_ROOT_DIR=`brew --prefix openssl` -DOPENSSL_LIBRARIES=`brew --prefix openssl`/lib ..\n```\n\n### System cpprestsdk on Linux\nInstalling cpprestsdk on Ubuntu18.04 using apt-get may result in cmake failing with:\n```\nCMake Error at CMakeLists.txt:9 (find_package):\n  By not providing \"Findcpprestsdk.cmake\" in CMAKE_MODULE_PATH this project\n  has asked CMake to find a package configuration file provided by\n  \"cpprestsdk\", but CMake did not find one.\n\n  Could not find a package configuration file provided by \"cpprestsdk\" with\n  any of the following names:\n\n    cpprestsdkConfig.cmake\n    cpprestsdk-config.cmake\n\n  Add the installation prefix of \"cpprestsdk\" to CMAKE_PREFIX_PATH or set\n  \"cpprestsdk_DIR\" to a directory containing one of the above files.  If\n  \"cpprestsdk\" provides a separate development package or SDK, be sure it has\n  been installed.\n```\n\nThe workaround is to specify where to search\n```\ncmake .. -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowpalwabbit%2Freinforcement_learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvowpalwabbit%2Freinforcement_learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvowpalwabbit%2Freinforcement_learning/lists"}