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

Temporal planner does not take into account action-costs when planning #1

Open
balisujohn opened this issue Jun 13, 2018 · 4 comments

Comments

@balisujohn
Copy link

balisujohn commented Jun 13, 2018

Is this a property of the planning algorithm, or is there a setting I'm missing?

UPDATE:

It seems to be the case that the planners provided reject PDDL instances where the metric is set to total-cost or a linear combination of total-cost and total-time. Are there any workarounds that can be used to include minimizing action-costs in the planning process without too much difficulty.

Thanks,

John

@wisdompoet
Copy link
Member

Hi John,

Typically the aim of temporal planning is to minimize makespan/duration, what is it you want to do with action costs? Find temporal plans that minimize cost or just keep track of the total cost of a given temporal plan? (the latter would be easy of course)

Which planner are you using? In the TP planner (compileTempo) we use a modified version of Fast Downward to solve the translated problem, and since the classical planner needs access to action durations, our workaround is to represent action durations as action costs (which the planner already reads). In this case we would need to rewrite Fast Downward to allow for both action costs and durations, which would be a bit of work.

In contrast, the TPSHE planner translates directly to PDDL, and in principle it should be easy to allow action costs, but running an optimal planner on the translated problem might not scale very well.

Anders

@balisujohn
Copy link
Author

Hi Anders,

Thanks for responding! We are trying to minimize a linear combination of total-cost and total-time. Our goal is to have certain agents prioritized for certain tasks, and to balance this prioritization against the total duration.

I compiled to TPSHE with the metric set to:
(:metric minimize (+(total-time total-cost)))
and got the error:
what(): TOTAL-TIME expected

So I modified the universal parser to always set the metric to (:metric minimize (+(total-time total-cost))) in the output and ignore the metric input and modified the PDDL parser in fd_copy to accept the modified metric. Now both TPSHE('she') and tempo('tempo-2') run successfully, but TPSHE compilation doesn't preserve temporal constraints (at start/at end) and tempo-2 as expected ignores action costs.

I'm happy to make some modifications myself; do you have any pointers as to what files I'd need to modify in the search function/heuristic to make the temporal planner account for action-costs?

Thanks,

John

@wisdompoet
Copy link
Member

We have a version of TPSHE that encodes the makespan using action costs, but again, we wouldn't be able to represent both makespan and separate action costs. Unfortunately I don't think there's an easy workaround.

We would be interested in implemented action costs, but the research assistant that was working on the project finished his contract just last week, and I don't have anyone that would be able to implement the code in the near future.

Off the top of my head, the best solution would be to modify Fast Downward such that actions include both duration and action costs (perhaps this already exists as part of Temporal Fast Downward or similar). I don't know how well commented our own modification of Fast Downward is, but you can run a diff on our code and a clean copy of Fast Downward to find out which our changes are.

Anders

@balisujohn
Copy link
Author

Hi Anders,
Thanks for the information, I'll give it a try.

Best,
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants