Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IPC 2018 domains #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ The following International Planning Competitions are completely covered unless
1. [IPC 2008](ipc-2008) (11 domains, 41 variants), *deterministic track*
1. [IPC 2011](ipc-2011) (19 domains, 54 variants), *deterministic track*
1. [IPC 2014](ipc-2014) (23 domains, 66 variants), *deterministic track*
1. [IPC 2018](ipc-2018) (22 domains, 33 variants), *deterministic track*
50 changes: 50 additions & 0 deletions ipc-2018/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 9th International Planning Competition, 2018

## Domains

| domain | track |
|--------|-------|
| [agricola](sequential/opt/agricola) | sequential, optimal |
| [agricola](sequential/sat/agricola) | sequential, satisficing |
| [airport-temporal-strips](temporal/airport-temporal-strips) | temporal, satisficing |
| [caldera](sequential/opt/caldera) | sequential, optimal |
| [caldera](sequential/sat/caldera) | sequential, satisficing |
| [caldera-split](sequential/opt/caldera-split) | sequential, optimal |
| [caldera-split](sequential/sat/caldera-split) | sequential, satisficing |
| [Cushing](temporal/Cushing) | temporal, satisficing |
| [data-network](sequential/opt/data-network) | sequential, optimal |
| [data-network](sequential/sat/data-network) | sequential, satisficing |
| [flashfill](sequential/sat/flashfill) | sequential, satisficing |
| [Floortile](temporal/Floortile) | temporal, satisficing |
| [Mapanalyser](temporal/Mapanalyser) | temporal, satisficing |
| [nurikabe](sequential/opt/nurikabe) | sequential, optimal |
| [nurikabe](sequential/sat/nurikabe) | sequential, satisficing |
| [organic-synthesis](sequential/opt/organic-synthesis) | sequential, optimal |
| [organic-synthesis](sequential/sat/organic-synthesis) | sequential, satisficing |
| [organic-synthesis-split](sequential/opt/organic-synthesis-split) | sequential, optimal |
| [organic-synthesis-split](sequential/sat/organic-synthesis-split) | sequential, satisficing |
| [Parking](temporal/Parking) | temporal, satisficing |
| [petri-net-alignment](sequential/opt/petri-net-alignment) | sequential, optimal |
| [quantum_circuit](temporal/quantum_circuit) | temporal, satisficing |
| [road-traffic-accident](temporal/road-traffic-accident) | temporal, satisficing |
| [settlers](sequential/opt/settlers) | sequential, optimal |
| [settlers](sequential/sat/settlers) | sequential, satisficing |
| [snake](sequential/opt/snake) | sequential, optimal |
| [snake](sequential/sat/snake) | sequential, satisficing |
| [sokoban](temporal/sokoban) | temporal, satisficing |
| [spider](sequential/opt/spider) | sequential, optimal |
| [spider](sequential/sat/spider) | sequential, satisficing |
| [termes](sequential/opt/termes) | sequential, optimal |
| [termes](sequential/sat/termes) | sequential, satisficing |
| [trucks-time-strips](temporal/trucks-time-strips) | temporal, satisficing |

## Sources

* [official website of the 2018 IPC][1]
* [archive with benchmark instances for sequential domains][2]
* [archive with benchmark instances for temporal domains][3]


[1]:https://ipc2018.bitbucket.io/
[2]:https://bitbucket.org/ipc2018-classical/domains/src/default/
[3]:https://bitbucket.org/ipc2018-temporal/domains/src/master/
60 changes: 60 additions & 0 deletions ipc-2018/sequential/benchmarks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env python

import json
import os

BENCHMARKS_DIR = os.path.dirname(os.path.abspath(__file__))

with open(os.path.join(BENCHMARKS_DIR, "bounds.json")) as f:
BOUNDS = json.load(f)

with open(os.path.join(BENCHMARKS_DIR, "cost_bounds.json")) as f:
COST_BOUNDS = json.load(f)

class Benchmark(object):
def __init__(self, root_path, domain, problem, cost_bound=None):
self.domain = domain
self.problem = problem

domain_dir = os.path.join(BENCHMARKS_DIR, root_path, domain)
self.domain_path = os.path.join(domain_dir, "domain.pddl")
if not os.path.exists(self.domain_path):
self.domain_path = os.path.join(domain_dir, "domain-{}".format(problem))
assert os.path.exists(self.domain_path)
self.problem_path = os.path.join(domain_dir, problem)
assert os.path.exists(self.problem_path)

bounds = BOUNDS.get(os.path.relpath(self.problem_path, BENCHMARKS_DIR), (0, float("inf")))
self.optimal_plan_cost_lower_bound, self.optimal_plan_cost_upper_bound = bounds
self.cost_bound = cost_bound
assert not self.cost_bound or self.cost_bound >= self.optimal_plan_cost_upper_bound

def get_instances_of_domain(root_path, domain):
instances = []
for _, _, files in os.walk(os.path.join(BENCHMARKS_DIR, root_path, domain)):
for name in files:
if "domain" not in name:
instances.append(Benchmark(root_path, domain, name))
return instances

def get_instances_of_path(root_path):
instances = []
for _, dirs, _ in os.walk(os.path.join(BENCHMARKS_DIR, root_path)):
for domain in dirs:
instances += get_instances_of_domain(root_path, domain)
return instances

def get_cost_bounded_instances():
instances = []
for path, cost_bound in COST_BOUNDS:
root_path, domain, problem = path.split("/")
instances.append(Benchmark(root_path, domain, problem, cost_bound))
return instances

IPC_2018_OPTIMAL_SUITE = get_instances_of_path("opt")

IPC_2018_SATISFICING_SUITE = get_instances_of_path("sat")

IPC_2018_AGILE_SUITE = IPC_2018_SATISFICING_SUITE

IPC_2018_COST_BOUNDED_SUITE = get_cost_bounded_instances()
Loading