{"id":30152229,"url":"https://github.com/gpuopen-librariesandsdks/scholaexamples","last_synced_at":"2025-08-11T11:14:25.216Z","repository":{"id":305715357,"uuid":"926529911","full_name":"GPUOpen-LibrariesAndSDKs/ScholaExamples","owner":"GPUOpen-LibrariesAndSDKs","description":"Schola Examples is an Unreal Engine project containing sample environments developed with the Schola plugin for Unreal Engine. Schola provides tools to help developers create environments, define agents, and connect to python-based Reinforcement Learning frameworks such as OpenAI Gym, RLlib or Stable Baselines 3.","archived":false,"fork":false,"pushed_at":"2025-07-21T15:41:19.000Z","size":170,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-21T17:49:12.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gpuopen.com/schola/","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/GPUOpen-LibrariesAndSDKs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-03T12:23:35.000Z","updated_at":"2025-07-21T15:41:05.000Z","dependencies_parsed_at":"2025-07-21T17:49:16.174Z","dependency_job_id":"0a9bda02-1e73-4292-99b4-d02e6ceb903c","html_url":"https://github.com/GPUOpen-LibrariesAndSDKs/ScholaExamples","commit_stats":null,"previous_names":["gpuopen-librariesandsdks/scholaexamples"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/GPUOpen-LibrariesAndSDKs/ScholaExamples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FScholaExamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FScholaExamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FScholaExamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FScholaExamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPUOpen-LibrariesAndSDKs","download_url":"https://codeload.github.com/GPUOpen-LibrariesAndSDKs/ScholaExamples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FScholaExamples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269873221,"owners_count":24489007,"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","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-11T11:14:23.282Z","updated_at":"2025-08-11T11:14:25.191Z","avatar_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScholaExamples: Example Environments Built Using Schola\r\n\r\nThis project contains Example Environments for Schola. These can be used as a resource to see how to structure environments built with Schola or reused to train similar agents\r\n\r\n## Getting Started\r\n\r\n### Install Unreal Engine\r\n\r\nRelease 1.0 of this this project is designed for Unreal Engine 5.4 which is available for [Download](https://www.unrealengine.com/en-US/download) and is tested on 5.4.3 and 5.4.4. Release 1.1 supports Unreal Engine 5.5 (It is not compatible with Unreal Engine 5.4).\r\n\r\n### Install Visual Studio\r\n\r\nVisual Studio 2022 is available for download from [Microsoft](https://visualstudio.microsoft.com/vs/). Additionally, details (and an additional plugin) for setting up Visual Studio with Unreal Engine are available in the [UE Docs](https://docs.unrealengine.com/4.26/en-US/ProductionPipelines/DevelopmentSetup/VisualStudioSetup/).\r\n\r\n\u003e **Note**  \r\n\u003e Only MSVC v143 Build Tools should be selected during install including other build tools will cause linking errors. Specifically, use `MSVC14.X` where `X\u003e34` from Visual Studio 2022, and `Windows 10.0.22621.0 SDK` to avoid linking errors\r\n\r\n### Install Visual Studio Code (Optional)\r\nAs Visual Studio is not supported on Linux, we recommend installing Visual Studio Code following the official guide for [Setting Up Visual Studio Code for Unreal Engine](https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-code-for-unreal-engine).\r\n\r\n### Install standalone Python package\r\nThis installs the ScholaExamples environments as a standalone package\r\n```bash\r\npip install schola-examples\r\n```\r\n\r\n## Usage\r\n\r\n### Direct Environment Import\r\n\r\n```python\r\n# OpenAI Gymnasium environments\r\nfrom schola_examples.gym import BallShooter, BallShooterVec \r\n# Both environments are subclasses of gymnasium.vector.VectorEnv\r\nenv = BallShooter()  # Single environment instance for sequential training\r\nenv = BallShooterVec(headless_mode=True)  # Vectorized environment for parallel training\r\n\r\n# Stable-Baselines3 environments \r\nfrom schola_examples.sb3 import BallShooter, BallShooterVec\r\n# Both environments are subclasses of stable_baselines3.common.vec_env.VecEnv\r\nenv = BallShooter()  # Single environment instance\r\nenv = BallShooterVec(headless_mode=True)  # Vectorized environment for parallel training\r\n\r\n# RLlib environments\r\nfrom schola_examples.ray import BallShooter, BallShooterVec\r\n# Both environments are subclasses of ray.rllib.env.base_env.BaseEnv\r\nenv = BallShooter()  # Single environment instance \r\nenv = BallShooterVec(headless_mode=True)  # Vectorized environment for parallel training\r\n```\r\n\r\n### Using Gymnasium Factory\r\n\r\n```python\r\nimport schola_examples\r\nimport gymnasium\r\n\r\n# Creates a vectorized environment of class gymnasium.vector.VectorEnv using Gymnasium's make_vec factory\r\nenv = gymnasium.make_vec(\"Schola/Basic-v0\")\r\n```\r\n\r\n### Using RLlib Registry\r\n\r\n```python\r\nimport schola_examples\r\nfrom ray.rllib.algorithms import ppo\r\n\r\n# Creates environment of class ray.rllib.env.base_env.BaseEnv from RLlib's built-in registry\r\nalgo = ppo.PPO(env=\"Basic-V0\")\r\n```\r\n\r\n## Contributing\r\n\r\n## Contibuting Examples\r\n\r\nWhen adding new examples to ScholaExamples please follow the below naming scheme for your files and folders.\r\n\r\n```\r\nContent/\r\n└── Examples/\r\n    ├── ExampleOne/\r\n    |   ├── Maps/\r\n    |   |   ├── ExampleOneInference.umap\r\n    |   |   ├── ExampleOneTrain.umap\r\n    |   |   └── ExampleOneVecTrain.umap\r\n    |   ├── Blueprints/\r\n    |   |   ├── ExampleOneEnvironment.uasset\r\n    |   |   ├── ExampleOneTrainer.uasset\r\n    |   |   ├── CustomActuator.uasset\r\n    |   |   ├── CustomObserver.uasset\r\n    |   |   └── ExampleOneAgent.uasset\r\n    |   └── Models/\r\n    |       └── ExampleOneOnnx.uasset\r\n    └── ExampleTwo/\r\n        └── Blueprints/\r\n            ├── FirstAgentNameAgent.uasset\r\n            ├── FirstAgentTrainer.uasset\r\n            └── SecondAgentNameAgent.uasset\r\n```\r\n\r\n### Rules\r\n\r\n1. All umap files go under the Maps folder\r\n2. All code and blueprints goes under the blueprints folder. Prefer blueprints for implementing examples.\r\n3. For Each Example add one map that runs inference, using the trained model, one map that trains a single environment at a time, and one map that trains multiple copies of the environment.\r\n4. If the example is single agent the environment should be named after the name of the example (e.g. `3DBallAgent.uasset`), for multiagent environments use the name of the agents (e.g. `RunnerAgent.uasset` and `TaggerAgent.uasset`) instead of the example for Trainers and Agents.\r\n5. Models should be saved as the name of the example followed by `Onnx` and be stored in the Models folder.\r\n\r\n### Unreal Coding Style\r\n\r\nAll unreal code with be styled following the Unreal Style Guide in the [Unreal Documentation](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/CodingStandard/).\r\n\r\nOne potential auto-formatter is the [Clang Formatter](https://github.com/TensorWorks/UE-Clang-Format) which has visual studio support.\r\n\r\n#### Comments\r\n\r\nComments are based on doxygen /** style to match closely with javadoc (which Unreal uses) but support handy visual studio features such as comment previews.\r\nTo enable autogenerated doxygen stubs go to Tools -\u003e Options -\u003e Text Editor -\u003e C/C++ -\u003e Code Style -\u003e General and change the option from XML to Doxygen (/**).\r\nThis will enable autogeneration of stubs with ctrl + /, or whenever you type /\\*\\* in visual studio.\r\n\r\n### Automated Testing\r\n\r\nTesting is implemented through pytests in Schola in `Resources/python/tests`. These tests build a fresh copy of both this project and Schola before running unit tests on Python + Unreal. This tests whether all examples run with each framework and are functional based on the API.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fscholaexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpuopen-librariesandsdks%2Fscholaexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fscholaexamples/lists"}