Note: This is work-in-progress. Current version: 0.1
This repository contains the source files of GOA, a privacy preserving distributed multi-agent planning system. GOA has two execution modes: distributed and centralized.
-
install Go if you haven't already. (See: https://golang.org/doc/install.)
-
clone the repository:
mkdir -p $GOPATH/src/github.com/schultet/ \ && cd $GOPATH/src/github.com/schultet \ && git clone https://github.com/schultet/goa.git
-
install the required go packages:
cd $GOPATH/src/github.com/schultet/goa/pkg/ go get [-u]
-
install the required python modules using pip3:
pip3 install -r requirements.txt
To solve a distributed multi-agent planning problem, execute the following steps:
-
compile the problem description files (factored MA-PDDL) into the required json format
./translate.sh <src-folder> <trg-folder>
-
run the planner with search.sh, either specifying all configuration options:
./search.sh \ -t <path/of/task/files/> \ --search "<search-options>" \ --heuristic [ff|add|addbf|blind|gc] \ [--threaded --macros]
or using predefined configuration profiles:
./search.sh \ -t <folder-of-task-files> \ -c <configuration-profile> \ [--threaded --macros]
Note: configuration profiles are defined in scripts/configs.py
Example:
./search.sh -t ./experiments/taxi01/ \ --search '"myconfig -s dmt-gus -h ff -l 100 -c 1.41"' \ --heuristic ff \ --threaded
To run the planner in a distributed fashion, run the following commands in different terminals/shells (one for each agent):
-
Compile the MA-PDDL factors into a local task file for each agent. This is a distributed process in which all planning agents participate. E.g.:
# Agent 0: python3 ./translate/translate.py \ benchmarks/factored/productionsite/2-4-2-1/domain-0.pddl \ benchmarks/factored/productionsite/2-4-2-1/problem-0.pddl \ --agent-url tcp://127.0.0.1:3035 \ --agent-url tcp://127.0.0.1:3036 \ --agent-id 0 \ --output test/0.json \ --json
# Agent 1 (different terminal): python3 ./translate/translate.py \ benchmarks/factored/productionsite/2-4-2-1/domain-1.pddl \ benchmarks/factored/productionsite/2-4-2-1/problem-1.pddl \ --agent-url tcp://127.0.0.1:3035 \ --agent-url tcp://127.0.0.1:3036 \ --agent-id 1 \ --output test/1.json \ --json
-
Run the planner using the compiled task-files (.json):
# Agent 0: go run cmd/distributed/main.go \ --problem test/0.json \ --agent "0 127.0.0.1 3035" \ --agent "1 127.0.0.1 3036" \ -s "mafs -s mafs-g -h ff -l 1" \ --heuristic "ff" \ --planlimit 1
# Agent 1 (different terminal): go run cmd/distributed/main.go \ --problem test/1.json \ --agent "0 127.0.0.1 3035" \ --agent "1 127.0.0.1 3036" \ -s "mafs -s mafs-g -h ff -l 1" \ --heuristic "ff" \ --planlimit 1
To use our environment, you can build and run a GOA image:
-
Build the docker image:
docker build -t goa .
-
Run the container:
docker run -d -t --name my_goa goa
-
Execute planner commands, e.g.:
# Translate MA-PDDL files docker exec -it my_goa /bin/bash translate.sh <path/to/pddl/> <path/to/compiled/task> # Search for a plan docker exec -it my_goa /bin/bash search.sh -t <path/to/compiled/task> -c mafs
Note: you can also use the Docker image to plan in a distributed fashion. In
this case, you need to docker run
two GOA containers, each representing a
single agent. In this case, you have to map host-container ports accordingly,
such that one agent uses port 3035 and the other port 3036 (as an example).
go test -v <package>
or
go test ./pkg/...
- Tim Schulte schultet@informatik.uni-freiburg.de