Demonstrations#
We have recorded demonstrations from Mechanical Turk and put them in a separate repository.
Demonstration Format#
Each demonstration is saved as a JSON file. The root object generated by core/record.js
contains the following fields:
taskName
(string)utterance
(string)reward
(number): Reward as defined by the taskrawReward
(number): 1 if succeeded and -1 if failedstates
: a list of state objectsOne state is recorded for the initial state
Two states are recorded for each event, one before the event resolves and one after the event resolves
Each state object has the following fields:
time
(number): Time elapsed since the episode startedaction
: An action-specific object (not present for the initial state) with the following common keys:type
(string)timing
(number): theeventPhase
property of the JS event object. This is 1 before the event resolves (capturing state) and 3 after the event resolves (bubbling state).
dom
: The DOM info as generated bygetDOMInfo()
The event target will have a special key
recordingTarget
set totrue
.
Recording Your Own Demonstrations#
Start the recording server:
# Create an output directory mkdir out/ python -m miniwob.record out/
Append
?record=true
to the URL of the task you want to record. For example, for theclick-test
task, go tofile:///path/to/miniwob-plusplus/html/miniwob/click-test.html?record=true
(Note: For recent versions of Chrome, you might have to retype the whole URL instead of just appending
?record=true
.)To view the results, open
viewer/viewer.html
while the recording server is running. The URL should be likefile:///path/to/miniwob-plusplus/html/viewer/viewer.html