Giter VIP home page Giter VIP logo

automated-programming-framework's People

Contributors

gfrances avatar jsego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

automated-programming-framework's Issues

Conditional effects

Hi,

I was a bit confused by wording in the README saying that

more complicated constructs (such as forall and when) currently have to be implemented manually.

In particular, I am interested in when: what is meant by "implementing manually"? The broader context is automated programming framework, where I am trying to model an action that needs to have conditional effects.
If there is any way to get conditional effects working in that context, please suggest what one should do.

Problems when running on multiple problem instances (e.g. robotics/mgo)

Hi,

I am trying infer a generalized program for two problems simultaneously. To that end, I updated the config file to include two problem instance files. The relevant line in the config file looks like this
4 360 2 domains/karel/problem1-hoc.pddl domains/karel/problem2-hoc.pddl (the full file is here)

However, upon running, I get a parsing error

terminate called after throwing an instance of 'parser::pddl::ExpectedToken'
what(): ( expected
Aborted (core dumped)

This is confusing, since both of these problem instances individually can be parsed successfully.
In order to determine what the problem is, I looked into some of the examples in the repo that run their code on multiple problem instances. The same thing happens for some of them (robotics/mgo.txt, robotics/tidying_up_5_0.txt), but not for all (e.g., jair17/dfs_4_3.txt). I can not figure out what makes a difference, either in the config files or in the .pddl files.

Do you know what might be a problem?

Failed to find a plan for two same problems

Hi,
While experimenting with the framework, I encountered a curious issue: I created two instances of exactly the same problem. The generalized planner is able to solve instances individually, but cannot find a solution that would work for both of them.

It actually reports that there is not solution:

Expanded 0 state(s).
Reopened 0 state(s).
Evaluated 1 state(s).
Evaluations: 1
Generated 0 state(s).
Dead ends: 1 state(s).

A minimal example can be found in my clone:

Do you have an idea what is happening here and why is the search stopped immediately? Is there some problem formulation/config formulation issue?

Missing conf_file.txt

hello sir,

I want to compile this project on my machine.

But there is no conf_file.txt file available on uploaded github.

Kindly help me out.

Thank you and Regards,
Yashashree

Understanding the output of the generalized programming framework

Hi,
I would like to understand the output of the planner properly.
From what I know thus far, the actual steps of the agent can be found as the output of running main on a configuration file, whereas a program can be found in the file program.txt. They both use some numerical coding that I don't fully understand.

As an example, let's have a look at the content of program.txt for a task in which a robot starting at (1,1) has to reach (3,5), with 4 (generalized) steps:
INS-MOVE-0 X1 Y1 X1 Y2 ROW-0
GOTO-0-1-3
COND-ROBOT-AT-0-1 X1 Y5 ROW-0
GOTO-0-3-0
COND-ROBOT-AT-0-3 X3 Y5 ROW-0
INS-TURN-RIGHT-2 NORTH EAST X1 Y5 ROW-0
INS-END-4 ROW-0

I understand this program to mean

0. move
1. if robot not at (1,5) goto 3
2. turn right
3. if robot not at (3,5) goto 0
4. end
  • Every INS- prefixed command has an additional number (e.g. INS-MOVE-0). I presume this number denotes the line in the program.
  • Every COND- prefixed command has two additional numbers (e.g. COND-ROBOT-AT-0-1 X1 Y5). I concluded that the second of these two numbers (1, in this case) denotes the line of code. But what is the meaning of the first number (0, in this case)?
  • every GOTO- prefixed command has three additional numbers (e.g. GOTO-0-1-3). I concluded that the third of these numbers (3, in this case) is the line number of where the program execution should continue. But what is the meaning of the first two numbers (0 and 1)?

Is my interpretation of the program correct? And what is the role of the numbers that I do not understand yet?

For completeness: the config, domain and problem files can be found in my fork of the project: config, domain, problem

Thanks in advance for guiding me through many interesting parts of this project.

A problem with ROW-0

Hi,
Thanks for the great work with this repo!

I was experimenting a bit, but ran into an issue that I do not understand.
I created a simple domain and the problem to illustrate the issue: a robot that can move one step to the right and needs to go from (x1,y1) to (x5, y1).

My domains/test/domain.pddl file looks like this

(define (domain test-domain)
(:requirements :typing :action-costs :equality :adl)
(:types
direction - object
coordinate - integer
)
(:predicates
(robot-at ?x ?y - coordinate)
(succ ?x ?y - coordinate)
)
(:functions
(total-cost) - number
)
(:action move
:parameters (?x1 ?y1 ?x2 ?y2 - coordinate)
:precondition (and (robot-at ?x1 ?y1) (succ ?x1 ?x2) (= ?y1 ?y2))
:effect (and (robot-at ?x2 ?y2) (not (robot-at ?x1 ?y1)) (increase (total-cost) 1)))

My domains/test/problem.pddl file looks like this

(define
(problem
test_problem
)
(:domain
test-domain
)
(:objects
x1 - coordinate
x2 - coordinate
x3 - coordinate
x4 - coordinate
x5 - coordinate
y1 - coordinate
)
(:init
(robot-at x1 y1)
(succ x1 x2)
(succ x2 x3)
(succ x3 x4)
(succ x4 x5)
(= (total-cost) 0)
)
(:goal (and (robot-at x5 y1)))
(:metric minimize (total-cost))
)

Finally, my configuration file looks like this

PLPR
bin/compile
domains/test/domain.pddl
domain.pddl ins.pddl
0
5 10 1 domains/test/problem.pddl
5 10 domains/test/problem.pddl
0
0
1 1
0 0 0

After running the code, I get the following message in ins.pddl: Unknown object ROW-0

Given that ROW-0 is not an object in my problem definition, I suspected that must be instantiating possible places for goto commands. I managed to trace it down to the file TypeGround.cpp, but I don't understand what went wrong there.

This does not happen for your existing domains. Could it be that I made some mistake defining the config file? Please, let me know if I can give you any more info about the issue

Weird behavior with a disjunction in precondition

Hi,
I ran into a weird behavior when an action's precondition is specified using a disjunction. To illustrate, I created a domain where the agent can move left or right. The problem instance has three fields ( [x1, y1], [x2, y1], [x3, y1]), the agent starts from [x1,y1] and the goal is to reach [x3, y1].

When I use a domain with two separate actions defined (move-left and move-right), everything works as expected and the plan consisting of two moves to the right is created. For the reference, here are the domain, problem instance and resulting program files:
domainTwoDifferentActions.pddl.txt, problem.pddl.txt, programTwoDifferentActions.txt
(I had to add a .txt extension for github to allow uploading. Pls remove upon download)

However, I could model the same two moves by a single action move (?xA, ?xB). There, the precondition is that either ?xB is a successor of ?xA (succ(?xA ?xB) or that ?xA is a successor of ?xB (succ(?xB ?xA). In both cases, the effect should be that the agent changes its position to [?xB ?yB]. The resulting program here is confusing: it suggests first moving from [x1,y1] to [x2, y1] and then moving back from [x2. y1] to [x1,y1]. Attaching the domain file and the resulting program (the used problem instance is the same as in the modeling with two actions).
domainDisjunctionInPrecondition.pddl.txt
programDisjunctionInPrecondition.txt

For sanity check, I tested the same setup with a regular planner (Metric-ff in this case), I got the correct plan back.

For completeness, I am attaching the configuration files used to run the tests
confDisjunctionInPrecondition.txt
confTwoDifferentActions.txt

What could be the reason for this behavior? Or am I reading the resulting program in a wrong way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.