Introduction
Reinforcement learning (RL) agents typically start as a "blank slate" (tabula rasa), requiring millions of interactions to learn basic movements and complex strategies from scratch. This sample inefficiency is a major bottleneck in applying RL to complex domains. While the "Options Framework" allows for temporally extended actions, learning these options usually requires extensive environment exploration. Furthermore, searching for programmatic policies—policies expressed as code—is difficult because the "syntax space" is redundant; many syntactically different programs behave identically, leading to inefficient search effort.
Methods
InnateCoder addresses these challenges by bridging high-level human knowledge, encoded in Large Language Models (LLMs), with low-level agent control. The framework follows a multi-stage pipeline to provide agents with "innate skills" before training begins:
- Zero-Shot Option Generation: The system queries a foundation model (e.g., GPT-4o or Llama 3.1) with a natural language task description and a Domain-Specific Language (DSL) grammar.
- Program Decomposition: LLM-generated candidate programs are broken down into sub-trees, which serve as potential "options" or sub-routines.
- Behavioral Filtering: To manage the large volume of snippets, InnateCoder executes them in sample states to create "action signatures." It retains only one representative for each unique behavior, eliminating redundancy.
- Inducing a Semantic Space: These filtered options define a new search space. Instead of mutating random code tokens, the system searches by replacing sub-programs with these pre-vetted "innate" options.
- Stochastic Hill Climbing (SHC): A local search algorithm navigates this semantic space to find the optimal combination of options that maximizes rewards.
Datasets and Evaluation
The framework was evaluated on two primary benchmarks:
- MicroRTS: A competitive real-time strategy game. Testing was conducted on maps of varying sizes, including NoWhereToRun (9x8), BWDistantResources (32x32), and BloodBath (64x64).
- Karel the Robot: A classic program synthesis benchmark involving tasks like Maze navigation, CleanHouse, and Harvester.
Key Insights
- LLMs as "Innate" Knowledge Bases: LLMs possess "common sense" logic about human-centric tasks (e.g., resource harvesting). InnateCoder distills this into executable code before the first frame of simulation.
- Semantic vs. Syntax Search: By searching in a space defined by behaviors (options) rather than characters (syntax), the agent avoids evaluating behaviorally identical programs that lead to search dead-ends.
- Massive Scaling: InnateCoder successfully utilized up to 30,000 options, demonstrating that a vast library of "innate" skills can be effectively managed with behavioral filtering and semantic search.
Results
InnateCoder achieved state-of-the-art performance in both environments. In MicroRTS, it outperformed previous competition winners (such as COAC and Mayari) and standard baselines. Notably, the "FM" baseline—which uses raw LLM output directly as a policy—performed poorly, confirming that the extraction and search process is the critical "secret sauce."
In the Karel benchmark, InnateCoder reached maximum rewards significantly faster than baselines that learned options from scratch or searched the syntax space directly. The system proved robust across both closed-source (GPT-4o) and open-source (Llama 3.1) models.
Limitations and Future Work
Current limitations include a reliance on discrete action spaces for behavioral filtering and the quality of the provided DSL. Future work could involve adapting these methods to continuous controls for robotics and developing neuro-symbolic hybrids where neural networks learn to invoke programmatic options as high-level functions.
Summary updated