Spectra/README.md

86 lines
2.5 KiB
Markdown
Raw Normal View History

2017-12-29 03:05:17 -05:00
# Spectra
2017-12-29 03:08:54 -05:00
2017-12-29 03:11:50 -05:00
Spectra is a general purpose planning system. It extends STRIPS-style planning by allowing arbitray first-order formulae for state descriptions and background knowledge rather than just predicates. This allows, for instance, handling domains with infinite or unbounded objects elegantly (among other things).
2017-12-29 03:21:34 -05:00
[Overview Presentation (pdf)](https://drive.google.com/open?id=1RHulFDgASACBkjvl-8ZEidj50NbGmKPu)
2017-12-29 03:11:50 -05:00
2017-12-29 03:52:08 -05:00
* Drawbacks of propositional planning (current planning systems):
2017-12-29 03:11:50 -05:00
* **Expressivity**: Cannot express arbitrary constraints. *“At every step make sure that no two blocks on the table have same color”*
* **Domain Size**: Scaling to large domains of arbitrary sizes poses difficulty.
2023-10-27 11:03:45 -04:00
## Installation
First, we need to make sure ShadowProver is installed.
```bash
git clone --recursive https://github.com/RAIRLab/ShadowProver.git
```
```bash
cd ShadowProver
mvn package
mvn install
```
Now, we can clone the Spectra repository.
```bash
git clone --recursive https://github.com/RAIRLab/Spectra.git
```
Similarly build and install the java project
```bash
cd Spectra
mvn package
mvn install
```
Now you should be able to run Spectra:
```bash
./run_spectra.sh [problem_file_path]
```
2017-12-29 03:52:55 -05:00
## Spectra's Architecture ##
2017-12-29 03:21:34 -05:00
2017-12-29 03:22:24 -05:00
![spectra-arch.png](https://bitbucket.org/repo/Mjq4bX/images/2495888298-spectra-arch.png)
2017-12-29 03:11:50 -05:00
2017-12-29 03:52:55 -05:00
## Example Input File ##
2017-12-29 03:11:50 -05:00
![examples.png](https://bitbucket.org/repo/Mjq4bX/images/3136509575-examples.png)
2017-12-29 03:40:04 -05:00
2017-12-29 03:44:28 -05:00
2017-12-29 03:52:55 -05:00
## Scaling Up ##
2017-12-29 03:11:50 -05:00
Two approaches:
1. **Procedural Attachments**: Special purpose procedural code that can bypass strict formal reasoning.
2. *μ*-**methods**: Written in denotational proof language. Preserves soundness by letting us write down commonly used patterns of reasoning (a bit unwieldy integration now than the first approach)
2017-12-29 03:08:54 -05:00
```clojure
;; (removeFrom ?x ?y) => "Remove ?x from ?y"
;; (placeInside ?x ?y) ==> "Place ?x inside ?y"
(define-method planMethod [?b ?c ?d]
{:goal [(In ?b ?c) (In ?c ?d)]
:while [(In ?b ?d) (Empty ?c)
(< (size ?c) (size ?d))
(< (size ?b) (size ?c))]
:actions [(removeFrom ?b ?d) (placeInside ?b ?c) (placeInside ?c ?d)]})
2017-12-29 03:25:16 -05:00
```
2017-12-29 03:08:54 -05:00
Roughly, a method has conditions that the goal and background + start state should satisfy. If the conditions are satisfied, a plan template is generated (note the variables).
The planner then verifies if the plan template works, if so it outputs the plan.
2017-12-29 03:40:04 -05:00
2017-12-29 03:53:33 -05:00
## Spectra on a Seriated Cup Challenge ##
2017-12-29 03:40:04 -05:00
2017-12-29 03:44:28 -05:00
![download-3.gif](https://bitbucket.org/repo/Mjq4bX/images/794008054-download-3.gif)