Answers.Body: <p>It depends on the domain you are in.</p>
  <p>Inverse RL (IRL) would be most advantageous in domains in which:</p>
  <ol>
  <li><strong>It's hard to specify the reward by hand</strong>: for example, it would be hard to hand-specify a reward for &quot;safe driving&quot;, and</li>
  <li><strong>Demonstrations from experts are available</strong>: one could find &quot;safe drivers&quot; and collect some of their data, and then use IRL to obtain a more nuanced reward than what we could hand-specify.</li>
  </ol>
  <p>That being said, IRL can't provably recover the true reward function (<a href="https://www.aaai.org/Papers/AAAI/2008/AAAI08-227.pdf" rel="nofollow noreferrer">many reward functions will always be consistent with the observed data</a>), and it tends to be very computationally intensive. This is why it's not used very often in practice.</p>
  <p>If it's easy to specify the reward (e.g. &quot;win at chess&quot;), hand-specifying it is the simplest way to go about it.</p>
  <p>See this <a href="https://ai.stackexchange.com/questions/12264/how-do-we-define-the-reward-function-for-an-environment">related question</a> about ways to hand-design reward functions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-11T23:54:40.097Z
Answers.LastActivityDate: 2022-08-12T06:37:21.467Z
Answers.LastEditDate: 2022-08-12T06:37:21.467Z
Answers.UserDisplayName: mdc
Body: <p>I'm working on a reinforcement learning project where I only have demonstrations (i.e. set of states and actions). During my research on how handle the reward signal, I noticed that research papers often design their reward functions, based on heuristics and human/expert knowledge. Meanwhile, when I read papers on Inverse RL, they claim that such approach can be used in applications where designing the reward function is not trivial, although this approach is not common. I'm not experienced in the field, but I'm wondering how one can decide whether to go for designing the reward function or using IRL, instead?</p>
  
Tags: <reinforcement-learning><reward-functions><reward-design><inverse-rl>
Title: Reward design or Inverse reinforcement learning?
UserDisplayName: Eman.suradi
ThreadText: # Reward design or Inverse reinforcement learning?
  
  (Asked by: username_0 on 2022-08-11)
  
  I'm working on a reinforcement learning project where I only have demonstrations (i.e. set of states and actions). During my research on how handle the reward signal, I noticed that research papers often design their reward functions, based on heuristics and human/expert knowledge. Meanwhile, when I read papers on Inverse RL, they claim that such approach can be used in applications where designing the reward function is not trivial, although this approach is not common. I'm not experienced in the field, but I'm wondering how one can decide whether to go for designing the reward function or using IRL, instead?
  
  **Tags:** reinforcement-learning, reward-functions, reward-design, inverse-rl
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-08-11. Score: 3 | Accepted answer
  
  It depends on the domain you are in.
  
  Inverse RL (IRL) would be most advantageous in domains in which:
  
  1. **It's hard to specify the reward by hand**: for example, it would be hard to hand-specify a reward for "safe driving", and
  2. **Demonstrations from experts are available**: one could find "safe drivers" and collect some of their data, and then use IRL to obtain a more nuanced reward than what we could hand-specify.
  
  That being said, IRL can't provably recover the true reward function ([many reward functions will always be consistent with the observed data](https://www.aaai.org/Papers/AAAI/2008/AAAI08-227.pdf)), and it tends to be very computationally intensive. This is why it's not used very often in practice.
  
  If it's easy to specify the reward (e.g. "win at chess"), hand-specifying it is the simplest way to go about it.
  
  See this [related question](https://ai.stackexchange.com/questions/12264/how-do-we-define-the-reward-function-for-an-environment) about ways to hand-design reward functions.
  
  
  ---
  
  