agentmodels / agentmodels.org Goto Github PK
View Code? Open in Web Editor NEWModeling agents with probabilistic programs
Home Page: http://agentmodels.org
Modeling agents with probabilistic programs
Home Page: http://agentmodels.org
Currently, when users try to run such boxes, they result in an error (returnify
). We could avoid having such boxes at all, or make it impossible to run them.
When I started looking through the code boxes, I found that viz.print failed everywhere with the error message "viz.print is not a function". Looks like it was renamed to viz.auto (and it looks like it works and produces sensible results when I substitute it in), see: probmods/webppl-viz@a2f58c4
Once we're done with frequent edits to the web book.
i've gone through the TODOs for the reasoning-about-agents chapter. the inference examples here are quite simple and explained in detail in the text. (feel free to add a graph of the posterior to these examples if it seems useful).
we need use src/mdpAgent.wppl
for the gridworld examples.
we can also use the helpers for the Restaurant Choice problem that i've added to newGridworld.wppl
.
finally, there's the POMDP example where we use beliefAgent.wppl
. i've added a couple of additional examples to the TODOs. these could be done in separate codeboxes or the same one -- whatever seems best.
That is, once the trampolineRunner PR is merged
todos for graphs:
The current codebox compares the inferred utility for arm 0 (chocolate) for the optimal and possibly greedy models. We want a graph like the one for Procrastinate that plots both of these on one axis (with title, legend and so on). The x-axis is "time horizon" and the y axis is "Posterior Expectation for Utility of Arm0 (chocolate)". if that doesn't fit, then just say "Posterior Expectation for Utility of Arm0".
The second codebox for Myopic agent on bandits compares the scaling of the optimal and myopic agent. The codebox uses range(9) but range(11) or even range(12) should not take too long. Generate the data for those ranges and make a figure that plots these as curves. The y-axis is "Runtime in seconds" and the x-axis is "Total # of Bandit Trials ("totalTime")".
I tried inlineDisqussions. This library has the disadvantage that it uses absolute positioning for the comment locations, so when our content expands (due to webppl results) the locations become inaccurate.
When trying to update webppl with sudo sh ./scripts/update-webppl
, all of the npm install
commands work, but when it gets to grunt compile:../webppl-timeit:../webppl-dp:../webppl-viz:../webppl-gridworld
, I get the error
Warning: Task "compile:../webppl-timeit:../webppl-dp:../webppl-viz:../webppl-gridworld" not found. Use --force to continue.
Aborted due to warnings.
Googling suggests that the fix is to edit a gruntfile, but I can't find one in the place I would expect.
the update is taking an extremely long time for each (longer than before). on my local jekyll serve, after update, i get "hasProperties" not found. this function is in src/gridworld.wppl. it seems that it's order has been changed in the minified js. so maybe something is going wrong with minification?
uglifyjs is deprecated. Use uglify-js instead.
write a shell script that turns codeboxes into .wppl scripts. we'd need a way of labelling codeboxes so that the corresponding scripts have sensible names. something like:
in chapter X:
<!-- codeboxLabel:example1 -->
~~~~
foo();
~~~~
this would become a script named chapterX_example1.wppl
.
@stuhlmueller
When running the codeboxes from the command line, referencing print
throws an error. Owain traced it to print
being defined in the editor, which was really surprising to me. Installing and --require webppl-editor
ing doesn't seem to work. Anything you suggest to try instead?
Perhaps we just shouldn't use print
in the codeboxes?
For example, makeDonut
, and makeHike
should be something like makeDonutWorld
and makeHikeWorld
.
looks like viz.print still has the old problem. error message is:
k is not a function
multiple codeboxes are behaving badly
arguments to GridWorld.draw should be (world, trajectory), where world can be POMDP and trajectory can include actions (which will be ignored).
A number of the codeboxes in the latter section of chapter 5c (http://agentmodels.org/chapters/5c-joint-inference.html) fail with the error:
makeRestaurantUtilityMDP is not defined
_.all is not a function
Can you please set up these domains for HTTPS (valid certificates)?
I'm setting up my site using default GitHub pages, which only supports HTTPS. My resources don't load if there are invalid or missing certificates.
general points:
bandit graph locations:
(btw. some of these graphs are almost the same)
Stand-alone graphs:
is it possible to re-compile webppl-gridworld and not all the other stuff (esp. webppl itself)? the aim is to make it fast to recompile if you only made a change to webppl-gridworld
You can see that b'
depends on a by the equation immediately above Figure 1 which includes a
.
After pulling the latest version of agentmodels.org, when I run sudo sh ./scripts/update-webppl
, I get the following error message which stops the update:
Warning: Command failed: browserify -t [./src/bundle.js --require ../webppl-timeit --require ../webppl-dp --require ../webppl-viz --require ../webppl-gridworld] -g brfs src/browser.js -o bundle/webppl.js
Error: Line 479: Unexpected token < (/Users/danielfilan/Documents/fhi_internship/agentmodels.org/node_modules/webppl-viz/src/index.js) while parsing file: /Users/danielfilan/Documents/fhi_internship/agentmodels.org/node_modules/webppl-viz/src/index.js
at Stream.end (/Users/danielfilan/Documents/fhi_internship/agentmodels.org/node_modules/webppl/node_modules/brfs/index.js:39:32)
at _end (/Users/danielfilan/Documents/fhi_internship/agentmodels.org/node_modules/webppl/node_modules/through/index.js:61:9)
at Stream.stream.end (/Users/danielfilan/Documents/fhi_internship/agentmodels.org/node_modules/webppl/node_modules/through/index.js:70:5)
at DestroyableTransform.onend (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:545:10)
at DestroyableTransform.g (events.js:260:16)
at emitNone (events.js:72:20)
at DestroyableTransform.emit (events.js:166:7)
at endReadableNT (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:960:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
Use --force to continue.
Aborted due to warnings.
I'm not sure what the problem is: line 479 of node_modules/webppl-viz/src/index.js
looks unremarkable to me.
Example:
[Body]
Past work on IRL [1] has shown that...
[Bottom of page]
References:
1. Ng and Russell, Algorithms for...
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.