NovelGym: A Flexible Ecosystem for Hybrid Planning and Learning Agents Designed for Open Worlds

Shivam Goel, Yichen Wei, Panagiotis Lymperopoulos, Klara Chura, Matthias Scheutz, Jivko SinapovarXiv 2024

TL;DR

NovelGym is a flexible, modular gridworld ecosystem designed to benchmark how AI agents recognize and adapt to unexpected changes—termed "novelties"—in open-world environments. By seamlessly bridging the gap between reinforcement learning (RL) and symbolic planning, it provides researchers with a standardized testbed and rigorous metrics to evaluate agent adaptability.

What Problem Does This Paper Address?

Traditional AI agents excel in "closed worlds" where all rules, objects, and task concepts are predefined. However, when deployed in the real world, autonomous systems encounter an "open world" filled with sudden, unpredictable changes. A delivery robot might find its usual path blocked by a new type of fence, or a cooking robot might have to deal with a modified appliance interface.

Evaluating an agent's ability to handle these "novelties" is notoriously difficult for three reasons:

  1. Novelty is agent-relative: A change in environment layout might completely disrupt an agent relying on a coordinate grid map, while an agent using LiDAR sensors might remain completely unaffected.
  2. Architectural diversity: Different researchers design novelty-aware agents using vastly different paradigms (e.g., pure RL vs. symbolic planning).
  3. Lack of flexible benchmarks: Existing simulation platforms do not easily allow researchers to dynamically inject novelties or seamlessly integrate hybrid planning and learning mechanisms.

NovelGym addresses these challenges by providing a highly configurable environment where researchers can easily introduce environmental transformations and evaluate diverse agent architectures under identical conditions.

Methods

NovelGym is built on top of PettingZoo and OpenAI Gym, utilizing a highly decoupled, modular architecture. The system is split into two primary components: the Environment (which handles the game engine, entity properties, and novelty injection) and the Agent Training Architecture.

Figure 3: System design of the NovelGym ecosystem. Blue highlights the environment modules, and purple highlights the agent modules.

To accommodate different decision-making paradigms, NovelGym features several specialized wrappers:

  • Single Agent Wrapper: Converts multi-agent environments into a single-agent interface, allowing a primary agent to act while automating environmental actors. It also customizes observation spaces, supporting both high-dimensional image views and LiDAR-like vector representations.
Figure 2: Illustration of the sensor representation of the agent in the environment. (Left) shows a LiDAR representation. (Right) shows an image based local view representation.
  • Neurosymbolic Wrapper: Maintains a knowledge base using the Planning Domain Definition Language (PDDL). It automatically generates PDDL files from the environment configuration, passes them to an internal planner (like MetricFF) to execute symbolic plans, and triggers novelty recovery routines when actions fail.
  • Reward Shaping Wrapper: Automatically translates symbolic plans into intermediate subgoals and shapes rewards to guide RL agents through complex, multi-step tasks.

The authors also introduce a standardized evaluation protocol that tracks agent performance across four distinct phases: initial training, novelty injection, adaptation, and post-adaptation evaluation. This protocol measures five distinct metrics, including Novelty Impact (the immediate performance drop) and Time to Adapt (the number of steps required to recover performance).

Datasets

Instead of static datasets, the paper introduces a dynamic benchmark task within NovelGym called the Pogostick Task. Inspired by Minecraft, this complex crafting task requires an agent to navigate a gridworld, break blocks to harvest resources (like platinum and diamond), interact and trade with NPC traders, and use a crafting table to build intermediate items before finally crafting a pogostick.

To test agent resilience, the authors implemented a suite of 12 environmental transformations (novelties), categorized by their impact on the agent:

  • Detrimental: Hinders the agent's current policy (e.g., making trees unbreakable unless a novel "axe" tool is selected first, or setting the crafting table on fire, requiring the agent to locate a water bucket).
  • Beneficial: Offers shortcuts to the goal (e.g., placing a chest filled with all the necessary crafting ingredients directly into the world).
  • Nuisance: Changes the environment without affecting the core task (e.g., making traders move around randomly).

Key Insights and Ideas

  • Hybrid Architectures Learn Faster: When a novelty is introduced, pure RL agents often have to relearn large portions of their policy from scratch. In contrast, hybrid neurosymbolic agents (like the paper's RapidLearn implementation) use symbolic planning to isolate exactly where a plan failed. They then instantiate a targeted RL problem to learn how to bypass that specific failure point, drastically reducing adaptation time.
  • Curiosity Can Be Counterproductive: Integrating an Intrinsic Curiosity Module (ICM) helps agents explore and adapt to some novelties, but it can actually degrade performance in highly hazardous scenarios (such as the "Fire" novelty), where random exploration leads to repeated penalties.
  • Standardized Baselines are Essential: Because beneficial novelties don't cause plan failures, hybrid agents simply ignore them and proceed with their original plan. Pure RL agents, driven by exploration, readily exploit them. This highlights how different architectures perceive "novelty" differently, validating NovelGym's goal of providing agent-agnostic evaluation metrics.

Key Results

The authors benchmarked four agent types: two hybrid planning+learning models (RapidLearn with and without ICM) and two pure RL models (Transfer RL with and without ICM).

  • Speed of Adaptation ($T_{\text{adapt}}$): In the "Axe" novelty scenario, the hybrid RapidLearn agents adapted significantly faster, requiring roughly 68,000 to 71,000 timesteps to achieve a 100% success rate. The pure Transfer RL agents lagged behind, taking between 114,000 and 169,000 timesteps.
  • Severity of Novelty: The "Fire" novelty proved to be the most difficult challenge across the board. All agents experienced a total drop in success rate to 0% upon injection, and even the best hybrid agent required over 252,000 timesteps of adaptation to recover.

Limitations and Future Work

While NovelGym provides a powerful framework for open-world evaluation, it is currently limited to 2D gridworld environments. While excellent for logic, planning, and discrete state spaces, it lacks the continuous physical and visual complexities of real-world robotics.

Moving forward, the authors plan to extend NovelGym by introducing procedural and automatic generation of novelties to create infinitely varying environments. They also aim to expand the platform's multi-agent capabilities to support deeper collaborative and competitive learning paradigms, alongside human-in-the-loop learning, allowing agents to adapt to novelties by observing human demonstrations.

Summary updated

BibTeX
@misc{goel2024novelgym,
  author = {Shivam Goel and Yichen Wei and Panagiotis Lymperopoulos and Klara Chura and Matthias Scheutz and Jivko Sinapov},
  title = {{NovelGym: A Flexible Ecosystem for Hybrid Planning and Learning Agents Designed for Open Worlds}},
  year = {2024},
  eprint = {2401.03546},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.03546},
}
Figure