ssanner / rddlsim Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/rddlsim
License: Other
Automatically exported from code.google.com/p/rddlsim
License: Other
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.
It would be great to be able to apply POMCP solving for POMDPs. I feel that the implementation is a little forgotten.
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,
and here is me calling the rddl parser and the resulting error,
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,
And this seems to pass through the parser fine with no errors giving,
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.
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
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
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.
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.
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!
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
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
?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.