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

Add preprocessor: EAS (Enhanced Action Splitter) #138

Merged
merged 4 commits into from
Feb 20, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions planutils/packages/eas/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

if ! (dpkg-query -s pypy3-dev &>/dev/null)
then
if [ "$UID" -ne 0 ]
then
echo "installation requires root access"
exec sudo "$0" "$@"
exit $?
fi
apt update
apt install -y pypy3-dev
fi

git clone https://github.com/melahi/enhanced-action-splitter.git
cd enhanced-action-splitter
pypy3 -m pip install setuptools --upgrade
pypy3 -m pip install -r requirements.txt
mv split.py split
mv merge_plan.py merge_plan
6 changes: 6 additions & 0 deletions planutils/packages/eas/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Enhanced Action Splitter (EAS)",
"description": "Enhanced Action Splitter (EAS) efficiently splits PDDL action schemas into smaller actions suitable for grounding. This is particularly helpful when the number of grounded actions for action schemas becomes too large for grounding-based planners to handle, effectively enabling them to solve problems they otherwise couldn't.",
"install-size": "920K",
"dependencies": []
}
18 changes: 18 additions & 0 deletions planutils/packages/eas/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash


if [[ "$1" == "" || "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]]
then
echo
echo "eas [help|<command>]"
echo
echo "<command> can be:"
echo " split: Produces the split version of the problem instance."
echo " merge_plan: Merges the plan for the split instance to construct a solution for the original problem"
echo
echo "To get specific help for <command>:"
echo "eas <command> -h"
echo
else
$(dirname "$0")/enhanced-action-splitter/"$1" ${@:2}
fi
3 changes: 3 additions & 0 deletions planutils/packages/eas/uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

rm -rf enhanced-action-splitter/
Loading