How csc301-2026-f/20-amd-schola works
Schola is an Unreal Engine toolkit for defining agent environments, exchanging observations and actions with Python reinforcement-learning frameworks, and running trained policies in games. The principal loop runs from Unreal environment and agent definitions through Gym/gRPC communication to Python training or evaluation, then returns actions to advance the environment. Separate branches support in-game inference and imitation-data collection. README and tree establish these product capabilities; sampled implementation detail is limited, so the graph omits unverified internal call links.
Main entry points: env.py Gym Environment API · EnvironmentInterface.h Environment Interfaces · AgentInterface.h Agent Interface · gRPCGymConnector.cpp gRPC Connectors
Components 24
Unreal Environments
- Environment Interfaces
Source/ScholaTraining/Public/Environment/EnvironmentInterface.h - Agent Interface
Source/Schola/Public/Agent/AgentInterface.h - Sensors and Actuators
Source/ScholaInteractors/Public - Spaces and Points
Source/Schola/Public/Spaces - Gym Connector
Source/ScholaTraining/Public/GymConnectors/IGymConnector.h
Protocol Layer
- gRPC Connectors
Source/ScholaProtobuf/Private/GymConnectors/gRPC/gRPCGymConnector.cpp - Protocol Schemas
Proto/State.proto - Protobuf Conversion
Source/ScholaProtobuf/Private/ProtobufUtils/ProtobufSerializer.cpp
Python RL
- Gym Environment API
Resources/python/schola/gym/env.py - Python Protocols
Resources/python/schola/core/protocols/base_protocol.py - SB3 Integration
Resources/python/schola/sb3/env.py - RLlib Integration
Resources/python/schola/rllib/env.py - Training Commands
Resources/python/schola/scripts/sb3/train/train.py - Minari Collection
Resources/python/schola/minari/datacollector.py
In-Game Inference
- Policy Interface
Source/Schola/Public/Policies/PolicyInterface.h - NNE Policy
Source/ScholaNNE/Public/Policies/NNEPolicy.h - Inference Stepper
Source/ScholaInferenceUtils/Public/Steppers/PipelinedStepper.h - StateTree NPCs
Source/ScholaStateTree/Public/Environment/StateTreeTrainingEnvironment.h
Imitation Learning
- Imitation Environment
Source/ScholaImitation/Public/Environment/ImitationPlayerController.h - Imitation Connector
Source/ScholaProtobuf/Private/ImitationConnectors/gRPC/gRPCImitationConnector.cpp - Imitation Protocol
Resources/python/schola/core/protocols/protobuf/grpc_protocol.py
Other components
- Environment Author
- Unreal Game
- Demonstrator
Connections 25
- Environment Author → Environment Interfaces: defines
- Environment Interfaces → Agent Interface: hosts
- Agent Interface → Sensors and Actuators: observes and acts
- Environment Interfaces → Spaces and Points: defines spaces
- Gym Connector → Environment Interfaces: exposes
- Gym Connector → gRPC Connectors: dispatches
- gRPC Connectors → Protobuf Conversion: converts messages
- Protobuf Conversion → Protocol Schemas: encodes
- gRPC Connectors → Python Protocols: exchanges state
- Python Protocols → Gym Environment API: serves environment API
- Gym Environment API → SB3 Integration: adapts environment
- Gym Environment API → RLlib Integration: adapts environment
- Training Commands → SB3 Integration: trains with
- Training Commands → RLlib Integration: trains with
- SB3 Integration → Gym Environment API: steps environment
- RLlib Integration → Gym Environment API: steps environment
- Gym Environment API → Minari Collection: provides episode data
- Agent Interface → Policy Interface: receives actions
- Inference Stepper → Agent Interface: collects observations
- Inference Stepper → Policy Interface: dispatches inference
- NNE Policy → Policy Interface: implements
- StateTree NPCs → Inference Stepper: steps inference
- Demonstrator → Imitation Environment: provides demonstrations
- Imitation Environment → Imitation Connector: supplies imitation state
- Imitation Connector → Imitation Protocol: exchanges data