File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed
Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ subdirectory. The directories 3ops/2pddl and 4ops/2pddl contain
44programs that translate the generator's output to PDDL. The random
55instances can then be generated by running the script
66
7- ./blocksworld <ops> <num>
7+ ./blocksworld <ops> <num> <seed>
88
9- which takes as input the number of operators (either 3 or 4) and blocks
10- in the problem to be generated. This is currently maximal 200 due to
11- the random state generator. To increase that, edit the Makefile in
12- bwstates.1 and increase SIZE.
9+ which takes as input the number of operators (either 3 or 4), blocks
10+ in the problem to be generated, and a random seed for reproducibility.
11+ The number of blocks is currently limited to 200 due to the random state generator.
12+ To increase that, edit the Makefile in bwstates.1 and increase SIZE.
1313
1414## Blocksworld-3ops
1515
Original file line number Diff line number Diff line change @@ -4,14 +4,15 @@ set -euo pipefail
44
55OPS=$1 # Either 3 or 4.
66BLOCKS=$2
7+ SEED=$3
78
89# Get full directory name of the script (https://stackoverflow.com/a/246128).
910SCRIPT_DIR=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
1011
1112BS=${SCRIPT_DIR} /bwstates.1/bwstates
1213TR=${SCRIPT_DIR} /${OPS} ops/2pddl/2pddl
1314
14- ${BS} -s 2 -n ${BLOCKS} > STATES
15+ ${BS} -s 2 -n ${BLOCKS} -r ${SEED} > STATES
1516${TR} -d STATES -n ${BLOCKS}
1617
1718rm STATES
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ You also need to make sure that the shell script is executable via:
1515
1616 chmod +x matching-bw-generator.sh
1717
18- Then to generate a matching-bw problem with base name "bname" and size
19- "n" you can call:
18+ Then to generate a matching-bw problem with base name "bname", size
19+ "n", and random seed "s" you can call:
2020
21- ./matching-bw-generator.sh bname n
21+ ./matching-bw-generator.sh bname n s
2222
2323This will create two files: bname-typed.pddl and bname-untyped.pddl
2424
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ set -euo pipefail
66
77cd " $( dirname " $0 " ) "
88
9- ./../bwstates.1/bwstates -n $2 > temp.blocks || true
10- ./../bwstates.1/bwstates -n $2 >> temp.blocks || true
9+ ./../bwstates.1/bwstates -n $2 -r $3 > temp.blocks || true
10+ ./../bwstates.1/bwstates -n $2 -r $3 >> temp.blocks || true
1111
1212./2pddl-typed -d temp.blocks -n $2 > $1 -typed.pddl
1313./2pddl-untyped -d temp.blocks -n $2 > $1 -untyped.pddl
You can’t perform that action at this time.
0 commit comments