Mimir is a C++20 planning library with Python bindings for grounded and lifted classical planning.
Focus on the intersection of planning and learning - search algorithms, parallel data processing, and knowledge representation languages.
- Supports a rich fragment of PDDL in both the grounded and lifted planning setup - strips, typing, negative-preconditions, disjunctive-preconditions, equality, existential-preconditions, universal-preconditions, conditional-effects, derived-predicates, action-costs.
- Fully written in C++ - no intermediate files.
- Provides Python bindings that even allow you to write heuristics for AStar search directly in Python.
- Provides a generic graph library that supports forward and backward traversal of edges with adapters to use the powerful Boost BGL library.
- Uses the zero-copy serialization library Cista for efficient parallel data generation.
Mimir is available on pypi.
pip install pymimir
import pymimir as mm
parser = mm.PDDLParser("domain.pddl", "problem.pddl")
aag = mm.LiftedApplicableActionGenerator(parser.get_problem(), parser.get_pddl_factories())
brfs = mm.BrFSAlgorithm(aag)
status, plan = brfs.find_solution()
Mimir depends on the following set of libraries:
- Loki for parsing PDDL files,
- Boost header-only libraries (Fusion, Spirit x3, Container, BGL),
- Cista for zero-copy serialization,
- Nauty and Traces for graph isomorphism testing,
- GoogleBenchmark for automated performance benchmarking, and
- GoogleTest for unit testing.
Run the following sequence of commands to download, configure, build, and install all dependencies:
- Configure the dependencies CMake project with the desired installation path:
cmake -S dependencies -B dependencies/build -DCMAKE_INSTALL_PREFIX=dependencies/installs
- Download, build, and install all dependencies:
cmake --build dependencies/build -j$(nproc)
Run the following sequence of commands to configure, build, and install Mimir:
- Configure Mimir in the build directory
build/
with theCMakePrefixPath
pointing to the installation directory of the dependencies:
cmake -S . -B build -DCMAKE_PREFIX_PATH=${PWD}/dependencies/installs
- Build Mimir in the build directory:
cmake --build build -j$(nproc)
- (Optional) Install Mimir from the build directory to the desired installation
prefix
directory:
cmake --install build --prefix=<path/to/installation-directory>
#include <mimir/mimir.hpp>
const auto parser = PDDLParser("domain.pddl", "problem.pddl")
const auto aag = std::make_shared<LiftedApplicableActionGenerator>(parser.get_problem(), parser.get_pddl_factories())
const auto brfs = BrFSAlgorithm(aag)
const auto [status, plan] = brfs.find_solution()
We developed Mimir in Visual Studio Code. We recommend installing the C/C++
and CMake Tools
extensions by Microsoft. To get maximum IDE support, you should set the following Cmake: Configure Args
in the CMake Tools
extension settings under Workspace
:
-DCMAKE_PREFIX_PATH=${workspaceFolder}/dependencies/installs
After running CMake: Configure
in Visual Studio Code (ctrl + shift + p), you should see all include paths being correctly resolved.
Alternatively, you can create the file .vscode/settings.json
with the content:
{
"cmake.configureArgs": [ "-DCMAKE_PREFIX_PATH=${workspaceFolder}/dependencies/installs" ]
}