## ← 10ps-04 Function Generalization Solution

• 1 Follower
• 18 Lines

Homework 5 2 Function Generalization ANSWER.mp4

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=41pY_meCH5w" data-team="udacity"></div> ``` 2 Languages

Showing Revision 1 created 11/28/2012 by Amara Bot.

1. To work out the answer, let's look at the individual features for each of the states.
2. For this state up here, the values for F1, F2, and F3 would be 2, 1, and 1.
3. That is, the distance from the agent to the goal is 2,
4. the distance to the closest bad guy is 1, and the distance of the bad guy to the goal is 1.
5. Now this state here also has values 2, 1, and 1.
6. That would be indistinguishable under either functions F or G.
7. This state here has values 2, 1, and 3.
8. The 2 and the 1 are the same, so that would be indistinguishable under F,
9. but would be different under G.
10. And this state has values 2, 3, and 1, and the 2 and 3 are different than 2 and 1,
11. so that would be different under either F or G.
12. Now the question which is a more useful function--
13. the answer is G is more useful, because G can actually distinguish between these 2 states.
14. In this state the agent is surround by bad guys, so that's a bad situation.
15. In this state the agent has a clear path to the goal, so that's a good situation.
16. You'd want a function that says that those two are different
17. rather than one that says they're the same.
18. G says they are different whereas F says they're the same.