microsoft / TextWorld

​TextWorld is a sandbox learning environment for the training and evaluation of reinforcement learning (RL) agents on text-based games.
Other
1.23k stars 188 forks source link

Make sure previous extra infos are carried over when command is not valid #207

Closed MarcCote closed 4 years ago

MarcCote commented 4 years ago

This PR makes sure the all requested extra information coming from the tw-extra-info ... command (only for games generated with TextWorld) are copied over from the previous step, when user/agent provides an invalid command (i.e. a command that doesn't cause Inform7 to display the extra infos).

Thanks to @bryonkucharski for reporting this issue.

codecov-io commented 4 years ago

Codecov Report

Merging #207 into master will increase coverage by 0.1%. The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #207     +/-   ##
=========================================
+ Coverage   80.78%   80.88%   +0.1%     
=========================================
  Files          53       53             
  Lines        6691     6696      +5     
=========================================
+ Hits         5405     5416     +11     
+ Misses       1286     1280      -6
Impacted Files Coverage Δ
textworld/envs/wrappers/tw_inform7.py 98.36% <95.45%> (-0.52%) :arrow_down:
textworld/render/serve.py 48% <0%> (+0.66%) :arrow_up:
textworld/envs/wrappers/viewer.py 80.48% <0%> (+14.63%) :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 8a6cba1...010aed6. Read the comment docs.