dollabs / pamela

Probabalistic Advanced Modeling and Execution Learning Architecture
Apache License 2.0
233 stars 13 forks source link

Pamela does not recognize :observable #73

Closed pmdoll closed 7 years ago

pmdoll commented 7 years ago
prakash@pablo ~/p/b/p/demo-nov-2016-pamela> pwd
/Users/prakash/projects/bitbucket/pamela/demo-nov-2016-pamela
prakash@pablo ~/p/b/p/demo-nov-2016-pamela> pamela -i biased-coin.pamela -o biased-coin.1000-flips -f json -t "(coin.flip-sequence)" htn
17-03-08 23:31:06 pablo ERROR [pamela.cli:288] - unable to parse: [#object[java.io.File 0x253f8e97 "/Users/prakash/projects/bitbucket/pamela/demo-nov-2016-pamela/biased-coin.pamela"]]
error: Keyword argument to pclass constructor :observable is not a field in the pclass coin
dcerys commented 7 years ago

There are 2 problems with this: 1) the pamela file is malformed wrt the :fields declaration 2) the flip pmethod contains a choose embedded within another choose. Embedded forms like this (also sequence and parallel) aren't (yet) supported for HTN generation.

Regarding the :fields, the code currently includes the following: :fields {:observed-face (face-up :observable true :initial :head)} This should be something like the following (I'll leave it as an exercise to the reader on getting the initial mode to be :head): :fields {:observed-face {:initial (face-up) :observable true}}

dcerys commented 7 years ago

the pamela file is malformed wrt the :fields declaration (It's been corrected)