-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compatibility with web book and viz #4
Conversation
The changes introduced since the fork have removed some globals from the export, so that the visualization doesn't work anymore. Here those are restored, and the new functions that were added are scoped elsewhere, to keep things clean. I also pinned the dependencies to versions that do not require patching. However, one problem remains: the satisfia mdp constructor returns an object that doesn't have all the fields that a world and an mdp usually have in the webppl world. I tried returning somerthing like `_.assign({ new fields }, original_object)`, but when I do that computations fail (In computing `V` the library complains that an element of a vector is negative). We should find out why that is, and return a proper object from `VerySimpleGW`. Right now I went around it by returning also the original `world`, so that the `draw` functions knows what to paint.
@v1ta111 please can you also take a look here? My intention was to make things easy: now you clone, run But there's always the possibility that it messes up with your setup. |
Oh, I forgot: is this repo supposed to show the gridworld also outside the browser somehow, with Node.js opening a OS window etc? From the deps in the precious Let me know if I missed it |
i don't see a need for that right now. main purpose is really to have a light-weight playful intro to our concepts on the web. |
i'll try to devote some time on this but i agree your workaround is ok for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running npm install
in my existing installation gives
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Use your platform's native DOMException instead
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
added 52 packages, removed 498 packages, changed 31 packages, and audited 196 packages in 25s
9 packages are looking for funding
run `npm fund` for details
6 vulnerabilities (5 moderate, 1 critical)
which seems fine for now.
Then doing ./run.sh examples/runVerySimpleGW.wppl -- --gw GW3 --verbose
also looks fine.
Will look at the code next...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't see any issues, so let's merge
The changes introduced since the fork have removed some globals from the export, so that the visualization doesn't work anymore.
Here those are restored, and the new functions that were added are scoped elsewhere, to keep things clean.
I also pinned the dependencies to versions that do not require patching.
However, one problem remains: the satisfia mdp constructor returns an object that doesn't have all the fields that a world and an mdp usually have in the webppl world.
I tried returning somerthing like
_.assign({ new fields }, original_object)
, but when I do that computations fail (In computingV
the library complains that an element of a vector is negative).We should find out why that is, and return a proper object from
VerySimpleGW
. Right now I went around it by returning also the originalworld
, so that thedraw
functions knows what to paint.