GithubHelp home page GithubHelp logo

ssanner / rddlsim Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 37.0 171.11 MB

Automatically exported from code.google.com/p/rddlsim

License: Other

Makefile 0.26% C++ 1.27% Batchfile 0.09% Shell 3.00% Java 88.45% TeX 0.01% Lex 0.31% PDDL 6.62%

rddlsim's People

Contributors

danbryce avatar danielbdias avatar jihwan-jeong avatar karinaval avatar kingtim1 avatar kunpognr avatar liajim avatar ludygrv avatar ssanner avatar thomaskeller79 avatar tkoeppe avatar xavier-k avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rddlsim's Issues

graph.Graph.main() - Unrecognized character '.' (46)

INSTALL.txt

Run graph.Graph.main() and verify that a cleanly formatted Java window
displaying a graph appears.

When I run ./run graph.Graph I get:

WARNING: Lexer[6(12)]: Unrecognized character '.'(46) -- ignored
ERROR: Parser[6(16)]: Syntax error
Exception: at [6(16)]: Syntax error
att.grappa.GraphParserException: at [6(16)]: Syntax error
        at att.grappa.Parser.report_error(Parser.java:372)
        at java_cup.runtime.lr_parser.syntax_error(lr_parser.java:395)
        at java_cup.runtime.lr_parser.parse(lr_parser.java:594)
        at graph.gviz.DotViewer.showWindow(DotViewer.java:71)
        at graph.gviz.DotViewer.showWindow(DotViewer.java:64)
        at graph.Graph.launchViewer(Graph.java:624)
        at graph.Graph.launchViewer(Graph.java:605)
        at graph.Graph.main(Graph.java:1268)

I have graphviz version 2.38.0 installed. dot and neato are in my PATH.

Parser expects objects block in non-fluents block.

So I created my own rddl domain, which the parser finds no issues with. However, when I created a rddl instance file with non-fluents block and instance block and ran this through the parser, it kept getting a syntax error right at the start of the inner non-fluents block within the main non-fluents block. Here is the rddl instance file I am referring to,

Screen Shot 2021-03-10 at 9 48 34 AM

and here is me calling the rddl parser and the resulting error,

Screen Shot 2021-03-10 at 9 56 13 AM

So as I said, it wasn't liking the '{' proceeding the non-fluents header and gave me no clue why. Although, I noticed that almost every example of a non-fluents block that I have seen has a objects block preceding the inner non-fluents block. So on a hunch I tried adding this,

Screen Shot 2021-03-10 at 1 11 28 PM

And this seems to pass through the parser fine with no errors giving,

Screen Shot 2021-03-10 at 1 13 35 PM

I'll note, that I did try it with just an empty objects block,

objects {}; or,

objects {
};

and that didn't work.

Thus my conclusion is that for a non-fluents block, your parser specifically looks for a populated objects block inside of the non-fluents block just before the inner non-fluents block. I am assuming this is not by design because not all domains would need an objects block.

RDDL grammar BNF

Hi Scott,

Would you have a document defining RDDL's grammar in BNF?

It would help people implementing their own parser in other languages than Java if needed.

Thanks,
Florent

error using rddl.translate.RDDL2Format -> cannot translate dbn_prop.rddl to .sperseus format

diego@d:~/Documents/workspace/rddlsim-read-only$ ls files/simple-rddl/
dbn_prop.rddl
diego@d:~/Documents/workspace/rddlsim-read-only$ ls files/simple-sperseus/
diego@d:~/Documents/workspace/rddlsim-read-only$ ./run 
rddl.translate.RDDL2Format files/simple-rddl/ files/simple-sperseus/ 
spudd_sperseus
[r, q, p, r', q', p']
State vars:  {r=[[]], q=[[]], p=[[]]}
Action vars: {a=[[]]}
Observ vars: {}
Processing: r
[FLUSHING CACHES...  TIME: 1  RESULT: 0.962  CACHE: 0] Processing: q
[FLUSHING CACHES...  TIME: 1  RESULT: 0.962  CACHE: 7] Processing: p
[FLUSHING CACHES...  TIME: 0  RESULT: 0.962  CACHE: 9] Vars relevant to reward: 
[<r, []>, <q, []>, <p, []>]

Transition: <noop, p>=77
Transition: <noop, q>=59
Transition: <noop, r>=2


Action-based reward: noop=39

General reward = 39
Error processing: files/simple-rddl/dbn_prop.rddl
java.io.FileNotFoundException: /prop_dbn.inst_dbn.spudd (Permission denied)
java.io.FileNotFoundException: /prop_dbn.inst_dbn.spudd (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
    at java.io.FileWriter.<init>(FileWriter.java:46)
    at rddl.translate.RDDL2Format.export(RDDL2Format.java:132)
    at rddl.translate.RDDL2Format.main(RDDL2Format.java:910)


===

Error processing: files/simple-rddl/dbn_prop.rddl

At this point it seemed the argument parsing think I want the output in /, so I 
changed the output_dir to . 

diego@d:~/Documents/workspace/rddlsim-read-only$ ./run 
rddl.translate.RDDL2Format files/simple-rddl/ . spudd_sperseus
[r, q, p, r', q', p']
State vars:  {r=[[]], q=[[]], p=[[]]}
Action vars: {a=[[]]}
Observ vars: {}
Processing: r
[FLUSHING CACHES...  TIME: 1  RESULT: 0.962  CACHE: 0] Processing: q
[FLUSHING CACHES...  TIME: 0  RESULT: 0.962  CACHE: 7] Processing: p
[FLUSHING CACHES...  TIME: 0  RESULT: 0.962  CACHE: 9] Vars relevant to reward: 
[<r, []>, <q, []>, <p, []>]

Transition: <noop, p>=77
Transition: <noop, q>=59
Transition: <noop, r>=2


Action-based reward: noop=39

General reward = 39
Error processing: files/simple-rddl/dbn_prop.rddl
java.lang.NullPointerException
java.lang.NullPointerException
    at rddl.translate.RDDL2Format.exportSPUDDAction(RDDL2Format.java:217)
    at rddl.translate.RDDL2Format.exportSPUDD(RDDL2Format.java:195)
    at rddl.translate.RDDL2Format.export(RDDL2Format.java:139)
    at rddl.translate.RDDL2Format.main(RDDL2Format.java:910)


===

Error processing: files/simple-rddl/dbn_prop.rddl



Original issue reported on code.google.com by [email protected] on 19 Jan 2011 at 4:39

max-nondef-actions should be sanity checked

I'm new to RDDL, and as I first started with playing with it, I created something that had no actions on the one hand, but max-nondef-actions set very high on the other. I'm not sure what prompted such a silly configuration. When I added actions, I saw that rddlsim blew up --- with more than one action, it could run overnight without getting through the first generation.

It seems like what's happening is that it happily accepts max-nondef-actions > num_possible_actions. I believe there is some code that sanity checks to say if you want concurrent actions but the maximum is 1, you blew it, and if you don't want concurrent actions but the maximum is > 1, you blew it. However, I think it should also make sure that max-nondef-actions is feasible. with it set that high, it simply recursed doing the same work over and over. If I understand it correctly, it should never be greater than the number of possible actions. In addition, there is probably some value where it would be reasonable to warn that someone may be getting carried away.

Here is a trivial rddl file that demonstrates it blowing up. If I set it to 2 for the 2 actions it runs quickly, and if I set max-nondef-actions to 4, say, it runs almost as quickly but there's a brief pause on my system. At 100, as set here, it hangs.

blowup.rddl.txt

Better explanation of failing preconditions

As noted in issue 11, I've run into situations where prost will abort in the parser because it thinks that there is no applicable action. I added my own debugging to say which actions passed which preconditions, and could see when all actions failed. Then I had to add debugging to say which preconditions tripped up any given actions. But this is the sort of information that should be generally useful (and I'm sure my own one-off hacks to get that info aren't all that useful, e.g. as a pull request). For instance, to see the human-readable version of the precondition I had to recompile with certain lines changed, save to a separate file, then match them up by hand.

Anything prost can do to make such inconsistencies more explicit, rather than just raising exceptions, will be appreciated! Ideally, I'd like to see prost do the same thing as the verbose rddlsim: I've hit an error, and at the time of the error, the state variables all have the following values, and the following precondition/invariant failed.

Translate from rddl to spudd

Hi,

When I try to generate SPUDD file from RDDL. It happens to me that the process stalled at some point after print out, for example,

Exported: 'domains/spudd2011/game_of_life_inst_mdp__4.spudd'

I am not sure what happened. Is it because the instance file is too large to enumerate all different combinations that SPUDD file is hard to generate or some other reasons?

Thanks!

Bug in QUANT_EXPR.sample()

The problem is in Line 1851: // Early cutoff detection
where the short circuiting of forall and exists takes place
but the code return true/false immediately
it should also clear the substitutions (variable name subs) which is in line 
1858.
Seems to be an unwanted side effect. Did you intend it to be this way ?


Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 7:43

rddlsim blows its stack when running PROST examples standalone

I raised this in the PROST github but @thomaskeller79 suggested I post it here.

I find certain things that run OK under PROST do not run for me if I run a single rddlsim execution. If you have rddlsim and prost under a common parent, the following results in the stack depth being exceeded:

./run rddl.sim.Simulator ../prost/testbed/benchmarks/push-your-luck-2018 rddl.policy.RandomBoolPolicy push-your-luck_inst_mdp__01

Thomas suggested I check out ippc2018 in rddlsim to see if it changed the outcome, but as far as I could tell, it didn't.

The same was true for wildfire-2018 -- both of these use a trick of turning interm-fluents into explicit level enumerated values.

@thomaskeller79 thought perhaps there is a bad interaction with rddl.policy.RandomBoolPolicy?

question about grouping of operators

I had a lot of trouble trying to sort out why a fluent was being set when I felt it shouldn't be. Eventually I tried adding parens around "~exists_....[]" and that changed the behavior. I would expect that ~exists_ should map the ~ most closely around exists_ and the parens would be unnecessary.

I wanted to post a simple example to demonstrate it, and I couldn't come up with exactly the same state that would produce that particular problem. But I found a different one, which could be related, and figured I'd start with that. (Rather convoluted as I was trying to demonstrate a particular oddity, but it should demonstrate what I saw.) This is a fairly simple example, building on the "blowup" example I posted earlier. I was getting a run-time error, but surprisingly, when I commented out little by little, it was the one with the extra parens added that caused some sort of mismatch in operator types. Specifically, I get

Exception in thread "main" rddl.EvalException: Both values in object/enum comparison == (true/class java.lang.Boolean,@b/class rddl.RDDL$ENUM_VAL) must be object/enum

If I comment out the second of the two similar lines, as noted in the RDDL source, it runs fine. AFAIK the difference is that extra set of parens. Maybe I'm confused, but maybe the parser is, so I'm posting here.

test.rddl.txt

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.