HumanCompatibleAI / overcooked_ai

A benchmark environment for fully cooperative human-AI performance.
https://arxiv.org/abs/1910.05789
MIT License
707 stars 148 forks source link

harl merge fix #55

Closed mesutyang97 closed 4 years ago

mesutyang97 commented 4 years ago

Minor fixes to ensure that this module will function correctly, when used by human_aware_rl

  1. configure recipe if necessary when generating layout
  2. default motion planner (mp) initialization after mdp generation. This was a hard one to identify and fix. The issue during the harl merge update is that when mlam_params contain counter_goals that is not empty, it will crash the MotionPlanner when we load saved mp from pickles. A lot of approches have been tried to fix this. The other way to address it would be to add default ingradients (like ('onion', 'onion', 'onion')) to the __new__ method of the Recipe class. That method was outlined in 25b848eb47a6b7dd50f75d10bf3608decb8fe9a9 and that is a standalone fix as well. Happy to proceed with either way.
codecov[bot] commented 4 years ago

Codecov Report

Merging #55 into master will increase coverage by 1.28%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   80.76%   82.04%   +1.28%     
==========================================
  Files          10       10              
  Lines        3077     3030      -47     
==========================================
+ Hits         2485     2486       +1     
+ Misses        592      544      -48     
Flag Coverage Δ
#no-planners 82.04% <ø> (+1.28%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
overcooked_ai_py/mdp/layout_generator.py 82.40% <0.00%> (+0.05%) :arrow_up:
overcooked_ai_py/mdp/overcooked_env.py 69.28% <0.00%> (+0.23%) :arrow_up:
overcooked_ai_py/planning/planners.py 85.84% <0.00%> (+0.35%) :arrow_up:
overcooked_ai_py/agents/benchmarking.py 66.29% <0.00%> (+12.78%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b0d6997...d1450ca. Read the comment docs.

nathan-miller23 commented 4 years ago

I am confused as to why a lot of the MotionPlanner updates that are currently in the master branch are not in this PR. For example, the MotionPlanner class has staticmethods like from_pickle_or_compute that are missing

mesutyang97 commented 4 years ago

The MotionPlanner updates are all there, including from_pickle_or_comput (see the planners.py on harl_merge_fix here)

This update pulled from the most updated master (the 1.0.4 release), and only made very small adjustments.

You should be able to see that all the diffs here