openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.22k stars 8.58k forks source link

How to create a demonstration for Inverse Reinforcement Learning on mountain car #1813

Closed Ishira1601 closed 4 years ago

Ishira1601 commented 4 years ago

I'm testing Inverse Reinforcement Algorithms. I want to recover the reward function for the mountain car. For IRL you need demonstrations. How would I go about creating them.

christopherhesse commented 4 years ago

You can train an agent and then record demonstrations, or else setup the environment in an interactive fashion like procgen's interactive.py: https://github.com/openai/procgen/blob/master/procgen/interactive.py and then record the observations/actions of you solving the environment yourself.

Recording demonstrations should be a matter of recording the observations and actions at each step, perhaps into a python pickle file for training on later.

The interactive script I linked to has the ability to record videos, saving the full observations and actions should not be substantially different from that.