diff --git a/images/general_learning_agent.jpg b/images/general_learning_agent.jpg new file mode 100644 index 000000000..a8153bef8 Binary files /dev/null and b/images/general_learning_agent.jpg differ diff --git a/vacuum_world.ipynb b/vacuum_world.ipynb index 34bcd2d5b..59950566b 100644 --- a/vacuum_world.ipynb +++ b/vacuum_world.ipynb @@ -30,7 +30,8 @@ "* Simple Reflex Agent Program\n", "* Model-Based Reflex Agent Program\n", "* Goal-Based Agent Program\n", - "* Utility-Based Agent Program" + "* Utility-Based Agent Program\n", + "* Learning Agent" ] }, { @@ -212,13 +213,15 @@ "outputs": [], "source": [ "table = {((loc_A, 'Clean'),): 'Right',\n", - " ((loc_A, 'Dirty'),): 'Suck',\n", - " ((loc_B, 'Clean'),): 'Left',\n", - " ((loc_B, 'Dirty'),): 'Suck',\n", - " ((loc_A, 'Clean'), (loc_A, 'Clean')): 'Right',\n", - " ((loc_A, 'Clean'), (loc_A, 'Dirty')): 'Suck',\n", - " ((loc_A, 'Clean'), (loc_A, 'Clean'), (loc_A, 'Clean')): 'Right',\n", - " ((loc_A, 'Clean'), (loc_A, 'Clean'), (loc_A, 'Dirty')): 'Suck',\n", + " ((loc_A, 'Dirty'),): 'Suck',\n", + " ((loc_B, 'Clean'),): 'Left',\n", + " ((loc_B, 'Dirty'),): 'Suck',\n", + " ((loc_A, 'Dirty'), (loc_A, 'Clean')): 'Right',\n", + " ((loc_A, 'Clean'), (loc_B, 'Dirty')): 'Suck',\n", + " ((loc_B, 'Clean'), (loc_A, 'Dirty')): 'Suck',\n", + " ((loc_B, 'Dirty'), (loc_B, 'Clean')): 'Left',\n", + " ((loc_A, 'Dirty'), (loc_A, 'Clean'), (loc_B, 'Dirty')): 'Suck',\n", + " ((loc_B, 'Dirty'), (loc_B, 'Clean'), (loc_A, 'Dirty')): 'Suck'\n", " }" ] }, @@ -516,6 +519,20 @@ "**Figure 2.14** of the book shows a model-based, utility-based agent:\n", "" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## LEARNING AGENT\n", + "\n", + "Learning allows the agent to operate in initially unknown environments and to become more competent than its initial knowledge alone might allow. Here, we will breifly introduce the main ideas of learning agents. \n", + "\n", + "A learning agent can be divided into four conceptual components. The **learning element** is responsible for making improvements. It uses the feedback from the **critic** on how the agent is doing and determines how the performance element should be modified to do better in the future. The **performance element** is responsible for selecting external actions for the agent: it takes in percepts and decides on actions. The critic tells the learning element how well the agent is doing with respect to a fixed performance standard. It is necesaary because the percepts themselves provide no indication of the agent's success. The last component of the learning agent is the **problem generator**. It is responsible for suggesting actions that will lead to new and informative experiences. \n", + "\n", + "**Figure 2.15** of the book sums up the components and their working: \n", + "" + ] } ], "metadata": {