{"id":21978614,"url":"https://github.com/wcaarls/grl","last_synced_at":"2025-04-28T18:08:47.660Z","repository":{"id":25869682,"uuid":"29309729","full_name":"wcaarls/grl","owner":"wcaarls","description":"Generic Reinforcement Learning Library","archived":false,"fork":false,"pushed_at":"2024-12-04T19:49:34.000Z","size":14920,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T18:08:41.024Z","etag":null,"topics":["c-plus-plus","declarative-config","python-gui","reinforcement-learning","visualization","yaml-configuration"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wcaarls.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":"2015-01-15T17:45:32.000Z","updated_at":"2024-12-04T19:49:40.000Z","dependencies_parsed_at":"2024-04-18T20:33:41.739Z","dependency_job_id":"e383dccf-cbdc-453d-bc9a-35baf39f5756","html_url":"https://github.com/wcaarls/grl","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/wcaarls%2Fgrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcaarls%2Fgrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcaarls%2Fgrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wcaarls%2Fgrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wcaarls","download_url":"https://codeload.github.com/wcaarls/grl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251362152,"owners_count":21577403,"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":["c-plus-plus","declarative-config","python-gui","reinforcement-learning","visualization","yaml-configuration"],"created_at":"2024-11-29T16:25:06.312Z","updated_at":"2025-04-28T18:08:47.641Z","avatar_url":"https://github.com/wcaarls.png","language":"C++","readme":"# grl\n[![Build # Status](https://github.com/wcaarls/grl/workflows/CMake/badge.svg)](https://github.com/wcaarls/grl/actions?query=workflow%3ACMake)\n\nGeneric Reinforcement Learning Library\n\nCopyright 2015-2022 Wouter Caarls\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n# Introduction\n\nGRL is a C++ reinforcement learning library that aims to easily allow\nevaluating different algorithms through a declarative configuration\ninterface.\n\n![Configurator](/doc/grl.png)\n\n# Installation\n\n## Ubuntu 22.04\n```\nsudo apt install git cmake g++ libeigen3-dev libpython3-dev python3-distutils libz-dev\ngit clone https://github.com/wcaarls/grl.git\n```\n\n### For the visualization, additionally install\n```\nsudo apt-get install libgl1-mesa-dev freeglut3-dev\n```\n\n### For the configurator, additionally install\n```\nsudo apt-get install python3-yaml python3-tk\n```\n\n### For the tensorflow addon, additionall install\n```\nsudo apt-get install libprotobuf-dev protobuf-compiler\n\n# Tensorflow C API 2.8.0\nwget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.8.0.tar.gz\nsudo tar zxvf libtensorflow-gpu-linux-x86_64-2.8.0.tar.gz -C /usr/local\n\n# CUDA Toolkit 11.7\nwget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin\nsudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600\nsudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub\nsudo add-apt-repository \"deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /\"\nsudo apt-get update\nsudo apt-get install cuda\n\n### cuDNN 8.2.1\nwget https://anaconda.org/anaconda/cudnn/8.2.1/download/linux-64/cudnn-8.2.1-cuda11.3_0.tar.bz2\nsudo tar -jxvf cudnn-8.2.1-cuda11.3_0.tar.bz2 -C /usr/local --wildcards \"lib/*\"\n```\n\nThen edit `~/.bashrc` to include the following, and open a new terminal\n```\nexport PATH=$PATH:/usr/local/cuda-11/bin\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/cuda-11/lib64\n```\n\nInstall Tensorflow 2 for Python\n\n```\nsudo -H python3 -m pip install tensorflow\n```\n\nIf there are errors relating to Python loading\n`libtensorflow_framework.so.2`, it is because it comes with its own version,\nand it finds the version from the C API. Workaround:\n```\nsudo apt-get install patchelf\nsudo patchelf --replace-needed libtensorflow_framework.so.2 libtensorflow_framework.so.2.8.0 /usr/local/lib/libtensorflow.so.2.8.0\nsudo rm /usr/local/lib/libtensorflow_framework.so /usr/local/lib/libtensorflow_framework.so.2\n```\n\n# Setup\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n# Running\n\nTo directly perform an experiment, run\n\n```\n./grld ../cfg/pendulum/sarsa_tc.yaml\n```\n\nTo start the configurator instead, run\n\n```\ncd ../bin\n./grlc ../cfg/pendulum/sarsa_tc.yaml\n```\n\n# Visualizations\n\nGRL comes with standard visualizations for value functions,\npolicies, and the integrated environments (e.g. pendulum\nswing-up, cart-pole swing-up, compass walker)\n\n![Visualizations](/doc/grl2.png)\n\n# Further reading\n\nSee [grl.pdf](/doc/grl.pdf)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwcaarls%2Fgrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwcaarls%2Fgrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwcaarls%2Fgrl/lists"}