Table of Contents
Fetching ...

Searching for Programmatic Policies in Semantic Spaces

Rubens O. Moraes, Levi H. S. Lelis

TL;DR

The paper targets the inefficiency of syntax-based local search in programmatic policy synthesis by introducing Library-Induced Semantic Spaces (LISS), which replace syntactic neighbors with semantically distinct programs drawn from a learned library. It formalizes the problem within MDPs and DSL-based policy representations, and defines a beta-proper semantic-space notion to quantify neighbor diversity. Empirically, LISS proves more sample-efficient (lower $p_\beta$ and faster policy improvement) in MicroRTS, and often yields policies that outperform recent competition winners, including DRL baselines, on unseen maps. The work suggests that integrating semantic-aware neighborhood generation and continual library expansion can substantially improve search-guided synthesis of interpretable, transferable programmatic policies.

Abstract

Syntax-guided synthesis is commonly used to generate programs encoding policies. In this approach, the set of programs, that can be written in a domain-specific language defines the search space, and an algorithm searches within this space for programs that encode strong policies. In this paper, we propose an alternative method for synthesizing programmatic policies, where we search within an approximation of the language's semantic space. We hypothesized that searching in semantic spaces is more sample-efficient compared to syntax-based spaces. Our rationale is that the search is more efficient if the algorithm evaluates different agent behaviors as it searches through the space, a feature often missing in syntax-based spaces. This is because small changes in the syntax of a program often do not result in different agent behaviors. We define semantic spaces by learning a library of programs that present different agent behaviors. Then, we approximate the semantic space by defining a neighborhood function for local search algorithms, where we replace parts of the current candidate program with programs from the library. We evaluated our hypothesis in a real-time strategy game called MicroRTS. Empirical results support our hypothesis that searching in semantic spaces can be more sample-efficient than searching in syntax-based spaces.

Searching for Programmatic Policies in Semantic Spaces

TL;DR

The paper targets the inefficiency of syntax-based local search in programmatic policy synthesis by introducing Library-Induced Semantic Spaces (LISS), which replace syntactic neighbors with semantically distinct programs drawn from a learned library. It formalizes the problem within MDPs and DSL-based policy representations, and defines a beta-proper semantic-space notion to quantify neighbor diversity. Empirically, LISS proves more sample-efficient (lower and faster policy improvement) in MicroRTS, and often yields policies that outperform recent competition winners, including DRL baselines, on unseen maps. The work suggests that integrating semantic-aware neighborhood generation and continual library expansion can substantially improve search-guided synthesis of interpretable, transferable programmatic policies.

Abstract

Syntax-guided synthesis is commonly used to generate programs encoding policies. In this approach, the set of programs, that can be written in a domain-specific language defines the search space, and an algorithm searches within this space for programs that encode strong policies. In this paper, we propose an alternative method for synthesizing programmatic policies, where we search within an approximation of the language's semantic space. We hypothesized that searching in semantic spaces is more sample-efficient compared to syntax-based spaces. Our rationale is that the search is more efficient if the algorithm evaluates different agent behaviors as it searches through the space, a feature often missing in syntax-based spaces. This is because small changes in the syntax of a program often do not result in different agent behaviors. We define semantic spaces by learning a library of programs that present different agent behaviors. Then, we approximate the semantic space by defining a neighborhood function for local search algorithms, where we replace parts of the current candidate program with programs from the library. We evaluated our hypothesis in a real-time strategy game called MicroRTS. Empirical results support our hypothesis that searching in semantic spaces can be more sample-efficient than searching in syntax-based spaces.
Paper Structure (18 sections, 1 equation, 2 figures, 1 table, 1 algorithm)

This paper contains 18 sections, 1 equation, 2 figures, 1 table, 1 algorithm.

Figures (2)

  • Figure 1: Abstract syntax tree for program "if $b_1$ then $c_1$" and the grammar defining the DSL.
  • Figure 2: Results of each learning algorithm on six MicroRTS maps using 2L as the learning algorithm and Stochastic Hill Climbing as the search algorithm. These curves represent the winning rate of each algorithm compared to their opponents using the same amount of games.

Theorems & Definitions (2)

  • Definition 1: Search Space
  • Definition 2: $\beta$-proper