AMD Schola v2 Tutorial: Training AI Agents in UE5 (AMD & Nvidia Compatible)

Dive into the next generation of reinforcement learning in Unreal Engine 5 with this comprehensive guide to AMD Schola v2. You'll learn how to seamlessly bridge UE5 with Python frameworks to build, train, and deploy dynamic AI agents fully supported on both AMD and Nvidia hardware.

Dedicated Servers vs Peer To Peer - CTCservers

Understanding Schola v2’s Flexible Inference Architecture

AMD and Nvidia

What is AMD Schola?

At its core, AMD Schola is a powerful, open-source plugin for Unreal Engine 5 that acts as a bridge between your 3D environment and advanced artificial intelligence. Specifically, it connects Unreal Engine to popular Python-based reinforcement learning (RL) frameworks, such as Stable Baselines 3 and Ray RLlib. Instead of having to build complex machine learning pipelines from scratch inside the engine, Schola lets you use industry-standard Python tools to train your AI, and then easily plug those trained "brains" directly into your Unreal projects.

The main goal of this toolkit is to help developers create intelligent characters that actually learn from their experiences, rather than just following rigid, pre-programmed rules. Whether you want to build smarter NPCs for a video game, create realistic robotic simulations, or explore dynamic procedural behaviors, Schola provides the foundation. The AI agents learn by taking actions, observing the results, and adjusting their behavior over time, which results in much more natural and reactive gameplay.

One of the most important things to know about AMD Schola and a very common misconception is that you do not need an AMD graphics card to use it. Even though it is developed and introduced by AMD, the tool is completely hardware-agnostic, meaning it runs perfectly fine on Nvidia GPUs as well. It is a free, deeply flexible tool built to make next-generation machine learning accessible to the entire Unreal Engine community, regardless of what hardware is sitting in their computer.

What’s New in AMD Schola v2?

AMD Schola v2 represents a massive leap forward for AI development in Unreal Engine. This update focuses heavily on giving developers unprecedented control, flexibility, and realism when training machine learning models. Here is a deep dive into the standout features of this release:

1. A Modular, "Plug-and-Play" Inference Architecture

Older machine learning setups often force you to hardcode your AI's decision-making directly into the character's behavior. AMD Schola v2 introduces a highly flexible architecture that completely decouples the "brain" of your AI from its "body." This modular design allows you to mix and match different components without ever having to rewrite your core agent logic.
The system is broken down into three key pillars:
  • The Agent Interface (The Body): This defines how your AI interacts with the Unreal Engine world specifically, how it takes actions and gathers observations.
    • UInferenceComponent: A flexible component you can drop onto any existing Unreal Actor to instantly give it AI capabilities.
    • AInferencePawn: A ready-to-use, standalone pawn tailored specifically for AI agents.
    • AInferenceController: Implements the classic AI controller pattern for managing complex, multi-layered behaviors.
  • The Policy Interface (The Brain): This acts as the decision-making backend, turning the agent's observations into actionable commands. You can easily swap these out depending on your workflow:
    • UNNEPolicy: Leverages Unreal Engine’s Native Neural Network Engine for high-performance ONNX model inference.
    • UBlueprintPolicy: Perfect for prototyping, allowing you to build custom decision-making logic entirely using Unreal's visual Blueprints.
    • Extensible Design: You can also easily plug in custom policy implementations or entirely new inference providers as needed.
  • Stepper Objects (The Heartbeat): These control the timing and execution of your AI, coordinating how often agents "think" compared to the game's frame rate.
    • SimpleStepper: A straightforward, synchronous approach where the game waits for the AI to make a decision.
    • PipelinedStepper: A high-performance option that overlaps the AI's inference calculations with the game's physics simulation, resulting in massively improved throughput.
    • Custom Steppers: You have the freedom to build bespoke execution patterns for highly specialized performance needs.

2. Native Minari Dataset Support for Imitation Learning

Sometimes the best way to train an AI isn't through random trial and error, but by showing it how a human does it. AMD Schola v2 introduces out-of-the-box support for the Minari dataset format, which has become the industry standard for offline reinforcement learning and imitation learning. Minari acts as a unified library for storing and loading trajectory data (like recorded human gameplay). This makes it incredibly easy to record human demonstrations in Unreal Engine, package them neatly, and share those datasets across different research communities or development teams to give your AI a massive head start.

3. Dynamic Agent Management (Mid-Episode Spawning)

One of the most requested and powerful improvements in v2 is the ability to handle dynamic populations of agents. In previous versions of Schola (and many other RL frameworks), you were locked into a static number of agents per training episode. If an agent was destroyed, the simulation would break. Now, Schola v2 seamlessly handles agents spawning and despawning on the fly.
This unlocks the ability to train AI in highly realistic, complex game scenarios:
  • Battle Royale & Survival Games: Agents can be eliminated, destroyed, and removed from the active training pool without interrupting the rest of the episode.
  • Population Simulations: You can naturally spawn new agents based on specific environmental triggers, economy systems, or game events (like an RTS unit producing a new squad).
  • Dynamic Team Composition: Add or remove AI teammates on the fly based on the player's choices.
  • Procedural Generation: As a player moves through a procedurally generated world, you can dynamically create and activate new AI agents just-in-time.
Managing this is incredibly simple: just mark an agent as "terminated" when its health reaches zero, or tell it to start reporting observations the moment it spawns into the world. It bridges the gap between rigid lab environments and actual, dynamic gameplay.

4. Enhanced command-line interface

Command line training: now redesigned for effortless flow.
BASH
# Stable Baselines 3
schola sb3 train ppo ...

# Ray RLlib
schola rllib train ppo ...

# Utilities
schola compile-proto
schola build-docs
The new CLI, built with "cyclopts," delivers a significantly enhanced developer experience with clearer, more informative error messages, seamless auto-completion support, and a clean, consistent interface across multiple "RL" frameworks making workflows faster, smoother, and more intuitive.

5. Massive Improvements for Unreal Engine Blueprints

If you prefer visual scripting over writing C++, AMD Schola v2 has made the Blueprint workflow significantly more powerful and user-friendly. In previous versions, defining complex AI parameters often required diving into code, but v2 brings the full power of reinforcement learning directly into the Blueprint editor.
  • Instanced Struct-Based Objects: This is a major under-the-hood optimization. Schola v2 now fully supports Instanced Structs for defining all "points" and "spaces" (which are how you define what your AI can see and do). This means you get much better performance and memory management without sacrificing the ease of visual scripting.
  • Full Blueprint Support for Spaces and Points: You no longer need to rely on C++ to define the boundaries of your AI's world. Whether you are setting up continuous observation spaces (like the exact distance to an enemy) or discrete action spaces (like pressing jump or crouch), you can handle it all purely within Blueprints.
  • Enhanced Blueprint Utilities: The toolkit now includes a broader suite of utility nodes designed specifically to help you manipulate, read, and write to these spaces seamlessly within your event graphs.
  • 6. Seamless Support for Modern RL Frameworks

    The world of machine learning moves incredibly fast, and older plugins often force you to use outdated, deprecated Python libraries. AMD Schola v2 has been completely updated to integrate seamlessly with the modern reinforcement learning ecosystem, ensuring your Unreal Engine project can talk to the absolute latest AI tools.
    This update includes out-of-the-box compatibility with the heavy hitters of the RL world:
  • Gymnasium (1.1+): The modern standard API for reinforcement learning environments. Schola fully supports the newest Gymnasium API, ensuring your Unreal environments are perfectly formatted for standard Python training loops.
  • Ray RLlib (New API Stack): If you are building complex, multi-agent scenarios or need to scale your training across massive distributed clusters, Ray RLlib is the go-to tool. Schola v2 is fully compatible with RLlib's newest API stack, unlocking access to their most cutting-edge features and algorithms.
  • Stable-Baselines3 (2.x): Known for its reliable and easy-to-use implementations of popular algorithms (like PPO and SAC), Schola v2 has been updated to work flawlessly with the newest release of SB3.
  • By supporting these latest versions, Schola v2 ensures you aren't just getting bug fixes; you are getting the fastest training speeds, the most advanced algorithms, and the highest security standards available in the current machine learning landscape.

    Getting started with AMD Schola v2

    Prerequisites

    • Unreal® Engine 5.5+ (tested with 5.5 - 5.6)
    • Python® 3.10 - 3.12
    • Visual Studio® 2022 with MSVC v143 build tools (Windows®)

    Installation

    1. Clone or download AMD Schola v2 from the official repository.
    2. Copy the plugin into your project’s /Plugins folder.
    3. Install the required Python package to enable full functionality and integration.
    BASH
    pip install -e <path to Schola>/Resources/python[all]

    4. Enable the plugin within your Unreal Engine project to activate its features and seamlessly integrate it into your development workflow.

    Compatibility

    AMD Schola Version Unreal Engine Version Python Version Status
    2.0.x 5.5 - 5.6 3.9 - 3.12 ✅ Current
    1.3 5.5 - 5.6 3.9 - 3.11 Legacy
    1.2 5.5 3.9 - 3.11 Legacy

    Discover CTCservers Dedicated Server Locations

    CTCservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.

    Limited Time
    Special Offers
    Server upgrades & more.
    UK Region London
    15%
    OFF
    Asia Pacific Tokyo
    10%
    OFF