Introducing the PDDL-ish Parser: A Rust Library for Parsing PDDL-like Inputs

Introducing the PDDL-ish Parser: A Rust Library for Parsing PDDL-like Inputs
Introducing the PDDL-ish Parser: A Rust library for parsing PDDL-like inputs particularly tailored for handling PDDL-like inputs that may be generated by autoregressive language models such as ChatGPT.

We are excited to announce the open sourcing of our new Rust library, the PDDL-ish Parser. This library is designed to parse a relaxed version of the Planning Domain Definition Language (PDDL), a language commonly used in artificial intelligence to express planning problems. The PDDL-ish Parser is particularly tailored for handling PDDL-like inputs that may be generated by autoregressive language models such as ChatGPT.

What is PDDL and Why is it Important in AI Planning?

Before diving deeper into the specifics of our library, let's explore what PDDL is and its significance in the field of AI planning.

PDDL: The Backbone of AI Planning

  • Definition: PDDL stands for Planning Domain Definition Language. It was developed as a standardized language to express planning problems and domain models in AI. Essentially, it provides a formal way to describe what actions are possible in a given context and what their effects are.
  • Components: A typical PDDL description includes a definition of objects, states, actions, and the goals of the planning problem.
  • Evolution: Since its introduction, PDDL has evolved through various versions, each adding new features and capabilities to handle more complex planning scenarios.

The Role of PDDL in AI Planning

  • Standardization: PDDL has become the de facto standard for expressing planning problems in AI. This standardization has facilitated the sharing and comparison of planning algorithms and problems across the research community.
  • Complex Problem Solving: It allows AI systems to plan sequences of actions to achieve a goal, considering various constraints and objectives. This is crucial in fields like robotics, logistics, autonomous systems, and more.
  • Research and Development: PDDL has played a pivotal role in advancing research in AI planning. It provides a common language for developing and testing new planning algorithms.

Key Features of the PDDL-ish Parser

The PDDL-ish Parser comes with several key features:

Flexibility: It can parse non-standard PDDL files, providing a level of flexibility not often found in other parsers.
Extraction: It can extract domains, objects, and actions from PDDL-like structured text, making it easier to understand and manipulate the planning problem.
Error Handling: It provides context for parsing failures, which can be invaluable for debugging and improving the parser.
Support for PDDL Constructs: It supports common PDDL constructs, but with leniency in syntax, making it more user-friendly.

Installation and Usage

To install the PDDL-ish Parser, you can use cargo add command:
cargo add pddl-ish-parser

Or add the following to your Cargo.toml file:
pddl-ish-parser = "0.0.4"

Make sure to check what's the latest version in

Here is a basic example of how to use the PDDL-ish Parser:

use pddl_ish_parser::parser::problem_parser::parse_problem;

fn main() {
    let input = r#"(define (problem your-problem)

    match parse_problem(input) {
        Ok((_, problem)) => println!("{:?}", problem),
        Err(e) => eprintln!("Error parsing problem: {:?}", e),

    let domain_input = r#"(define (domain your-domain)

    match parse_domain_types(domain_input) {
        Ok((_, domain_types)) => println!("Parsed domain types: {:?}", domain_types),
        Err(e) => eprintln!("Error parsing domain types: {:?}", e),

Open Source and the Shinkai Initiative

By open sourcing the PDDL-ish Parser under the Shinkai Initiative, we aim to contribute to the growing community of AI and Rust developers. We believe that collaboration and open-source principles are key to advancing technology and innovation.

Open sourcing this project allows for:

  • Community Contribution: Developers can contribute to the project, helping to improve its features and performance.
  • Transparency: Users can review the source code to understand how the parser works and ensure it meets their needs.
  • Adaptability: The community can adapt and extend the parser for various use cases.

Join Us

We invite you to join us in this exciting journey. Your contributions, whether they be in the form of code, feedback, or ideas, are most welcome. Together, we can build a robust and versatile tool that serves the needs of the AI and Rust development communities.

For more information and to contribute, visit our GitHub repository: PDDL-ish Parser on GitHub.

We look forward to your participation and contributions!

Nico Arqueros

Nico Arqueros

crypto builder (code, research and product) working on @shinkai_network by @dcspark_io