HumanCompatibleAI / overcooked-demo

Web application where humans can play Overcooked with AI agents.
55 stars 25 forks source link

Adds Trajectory Replay Functionality #1

Closed decodyng closed 4 years ago

decodyng commented 4 years ago

This PR adds support for visually replaying trajectories saved out according to the structure shown here.

It follows the pattern of demo.ejs to create a separate page on the demo site, /replay, from which you can replay trajectories.

Currently the trajectory to be read in is hardcoded in js/overcooked-replay.js; a desired future feature improvement is to allow taking in an arbitrary trajectory file, but that requires me to first figure out more about how JavaScript file readers work.

To build the replay page, run npm run build-replay, and then navigate to localhost:8766/replay.

decodyng commented 4 years ago

Update: Arbitrary trajectory file inputs are now working and code for that has been pushed to the branch

markkho commented 4 years ago

Wow this is slick! Thanks for putting this together - it's definitely much more user friendly than the psiturk version. LGTM

decodyng commented 4 years ago

@rohinmshah Fixed, other than a few cases of my not knowing the correct indentation protocols, and one case of a Chesterton's If Statement

decodyng commented 4 years ago

Ugh, yeah, that sounds both annoying to see and likely fairly annoying to fix, unless there exists some scripts that just do some kind of tab/space standardization