HumanCompatibleAI / overcooked-demo

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

named parameters in up.sh; saving trajectories; trajectories replay #29

Open bmielnicki opened 3 years ago

bmielnicki commented 3 years ago
  1. Added usage of named parameters to up.sh. They can be used everything that was specified by env variables (that are no longer used), also trajectories and agents directories.
  2. Pass to docker-compose all env variables by .env file. This prevents any naming collisions with other applications.
  3. Trajectory and agent directories are now passed as volumes so all changes there (like saving trajectory) are now kept between sessions.
  4. Added saving trajectories to trajectory directory. It uses OvercookedEnv so there is no code duplication between overcooked-demo and overcooked_ai code. Checkbox in index.html is added so user can choose if trajectory should be saved. save_trajectory
  5. Small changes in OvercookedPsiturk to work with changes in OvercookedGame.

I plan to add additional stuff into this branch (like replaying trajectories from trajectory directory), but changes above seems to be mergable into master now.

mesutyang97 commented 3 years ago

@bmielnicki just one more question, is this supposed to work with the trajectory visualization PR?

bmielnicki commented 3 years ago

@bmielnicki just one more question, is this supposed to work with the trajectory visualization PR?

Currently, there is no integration between this PR and https://github.com/HumanCompatibleAI/overcooked_ai/pull/38 except they use the same trajectory format. I plan to get them both working together - when the player picks the trajectory file to visualize he will be able to see both the replay and the chart.

bmielnicki commented 3 years ago

Additional changes are pushed:

  1. Creating trajectory with selected filename (with use of template values for layout name or timestamp)
  2. Replay of trajectories
    • based OvercookedTrajectoryReplay on the legacy branch
    • currently, it is not an object as I've had problems with changing context when putting all variables and functions into class (this changes context from object to window easily)
    • Timesteps per render number is used for controlling how many timesteps should be between consecutive renders (with high Timesteps per second variable whole code is slowing down if we want to render every state). replay

Next step:

As before - this change is ready to be merged after getting feedback.

bmielnicki commented 3 years ago

Extension of this PR is https://github.com/HumanCompatibleAI/overcooked-demo/pull/30 It is separate PR because it requires review of https://github.com/HumanCompatibleAI/overcooked_ai/pull/38 and I don't want to prevent merge of previous changes because of that.