diff --git a/vacuum_world.ipynb b/vacuum_world.ipynb
index 92f5b90d9..34bcd2d5b 100644
--- a/vacuum_world.ipynb
+++ b/vacuum_world.ipynb
@@ -4,11 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# The Vacuum World \n",
+ "# THE VACUUM WORLD \n",
"\n",
- "In this notebook, we will be discussing about **the structure of agents** through an example of the **vacuum agent**. The job of AI is to design an **agent program** that implements the agent function: the mapping from percepts to actions. We assume this program will run on some sort of computing device with physical sensors and actuators: we call this the **architecture**: \n",
+ "In this notebook, we will be discussing **the structure of agents** through an example of the **vacuum agent**. The job of AI is to design an **agent program** that implements the agent function: the mapping from percepts to actions. We assume this program will run on some sort of computing device with physical sensors and actuators: we call this the **architecture**:\n",
"\n",
- " agent = architecture + program "
+ "
agent = architecture + program
"
]
},
{
@@ -22,15 +22,31 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Agent Programs\n",
+ "## CONTENTS\n",
"\n",
- "An agent program takes the current percept as input from the sensors and return an action to the actuators. There is a difference between an agent program and an agent function: an agent program takes the current percept as input whereas an agent function takes the entire percept history. \n",
- "The agent program takes just the current percept as input because nothing more is available from the environment; if the agent's actions need to depend on the entire percept sequence, the agent will have to remember the percept. \n",
+ "* Agent\n",
+ "* Random Agent Program\n",
+ "* Table-Driven Agent Program\n",
+ "* Simple Reflex Agent Program\n",
+ "* Model-Based Reflex Agent Program\n",
+ "* Goal-Based Agent Program\n",
+ "* Utility-Based Agent Program"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## AGENT PROGRAMS\n",
+ "\n",
+ "An agent program takes the current percept as input from the sensors and returns an action to the actuators. There is a difference between an agent program and an agent function: an agent program takes the current percept as input whereas an agent function takes the entire percept history.\n",
+ "\n",
+ "The agent program takes just the current percept as input because nothing more is available from the environment; if the agent's actions depend on the entire percept sequence, the agent will have to remember the percept.\n",
"\n",
"We'll discuss the following agent programs here with the help of the vacuum world example:\n",
"\n",
"* Random Agent Program\n",
- "* Table Driven Agent Program\n",
+ "* Table-Driven Agent Program\n",
"* Simple Reflex Agent Program\n",
"* Model-Based Reflex Agent Program\n",
"* Goal-Based Agent Program\n",
@@ -43,7 +59,7 @@
"source": [
"## Random Agent Program\n",
"\n",
- "A random agent program, as the name suggests, choses an action at random, without taking into account the percepts. \n",
+ "A random agent program, as the name suggests, chooses an action at random, without taking into account the percepts. \n",
"Here, we will demonstrate a random vacuum agent for a trivial vacuum environment, that is, the two-state environment."
]
},
@@ -56,25 +72,9 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 1,
"metadata": {},
- "outputs": [
- {
- "ename": "FileNotFoundError",
- "evalue": "[Errno 2] No such file or directory: '/home/apurv/aima-python/aima-data/orings.csv'",
- "output_type": "error",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0magents\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mnotebook\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpsource\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;32m~/aima-python/notebook.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mgames\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mTicTacToe\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0malphabeta_player\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrandom_player\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mFig52Extended\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minfinity\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mlogic\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mparse_definite_clause\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstandardize_variables\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munify\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msubst\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mlearning\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mDataSet\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mIPython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdisplay\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mHTML\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdisplay\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mcollections\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mCounter\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdefaultdict\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m~/aima-python/learning.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1105\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1106\u001b[0m orings = DataSet(name='orings', target='Distressed',\n\u001b[0;32m-> 1107\u001b[0;31m attrnames=\"Rings Distressed Temp Pressure Flightnum\")\n\u001b[0m\u001b[1;32m 1108\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1109\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m~/aima-python/learning.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, examples, attrs, attrnames, target, inputs, values, distance, name, source, exclude)\u001b[0m\n\u001b[1;32m 96\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexamples\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparse_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexamples\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 97\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mexamples\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 98\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexamples\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mparse_csv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mopen_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m'.csv'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 99\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 100\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexamples\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mexamples\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;32m~/aima-python/utils.py\u001b[0m in \u001b[0;36mopen_data\u001b[0;34m(name, mode)\u001b[0m\n\u001b[1;32m 414\u001b[0m \u001b[0maima_file\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maima_root\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'aima-data'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 415\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 416\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maima_file\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 417\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 418\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/apurv/aima-python/aima-data/orings.csv'"
- ]
- }
- ],
+ "outputs": [],
"source": [
"from agents import *\n",
"from notebook import psource"
@@ -89,34 +89,34 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
- "%psource TrivialVacuumEnvironment"
+ "psource(TrivialVacuumEnvironment)"
]
},
{
"cell_type": "code",
- "execution_count": 119,
+ "execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "State of the Environment: {(1, 0): 'Clean', (0, 0): 'Dirty'}.\n"
+ "State of the Environment: {(0, 0): 'Dirty', (1, 0): 'Clean'}.\n"
]
}
],
"source": [
- "# These are the two locations for the two-state environment.\n",
+ "# These are the two locations for the two-state environment\n",
"loc_A, loc_B = (0, 0), (1, 0)\n",
"\n",
- "# Initialise the two-state environment.\n",
+ "# Initialize the two-state environment\n",
"trivial_vacuum_env = TrivialVacuumEnvironment()\n",
"\n",
- "# Check the intial state of the environment.\n",
+ "# Check the intial state of the environment\n",
"print(\"State of the Environment: {}.\".format(trivial_vacuum_env.status))"
]
},
@@ -124,18 +124,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Let's create our agent now. This agent will chose any of the actions from 'Right', 'Left', 'Suck' and 'NoOp' (No Operation) randomly. "
+ "Let's create our agent now. This agent will choose any of the actions from 'Right', 'Left', 'Suck' and 'NoOp' (No Operation) randomly."
]
},
{
"cell_type": "code",
- "execution_count": 120,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 4,
+ "metadata": {},
"outputs": [],
"source": [
- "# Create the random agent.\n",
+ "# Create the random agent\n",
"random_agent = Agent(program=RandomAgentProgram(['Right', 'Left', 'Suck', 'NoOp']))"
]
},
@@ -148,7 +146,7 @@
},
{
"cell_type": "code",
- "execution_count": 121,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -160,7 +158,7 @@
}
],
"source": [
- "# Add agent to the environment.\n",
+ "# Add agent to the environment\n",
"trivial_vacuum_env.add_thing(random_agent)\n",
"\n",
"print(\"RandomVacuumAgent is located at {}.\".format(random_agent.location))"
@@ -175,23 +173,23 @@
},
{
"cell_type": "code",
- "execution_count": 122,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "State of the Environment: {(1, 0): 'Clean', (0, 0): 'Dirty'}.\n",
+ "State of the Environment: {(0, 0): 'Dirty', (1, 0): 'Clean'}.\n",
"RandomVacuumAgent is located at (0, 0).\n"
]
}
],
"source": [
- "# Running the environment.\n",
+ "# Running the environment\n",
"trivial_vacuum_env.step()\n",
"\n",
- "# Check the current state of the environment.\n",
+ "# Check the current state of the environment\n",
"print(\"State of the Environment: {}.\".format(trivial_vacuum_env.status))\n",
"\n",
"print(\"RandomVacuumAgent is located at {}.\".format(random_agent.location))"
@@ -201,18 +199,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Table Driven Agent Program\n",
+ "## TABLE-DRIVEN AGENT PROGRAM\n",
"\n",
- "A table driven agent program keeps track of the percept sequence and then uses it to index into a table of actions to decide what to do. The table represents eplicitly the agent function that the agent program embodies. \n",
+ "A table-driven agent program keeps track of the percept sequence and then uses it to index into a table of actions to decide what to do. The table represents explicitly the agent function that the agent program embodies. \n",
"In the two-state vacuum world, the table would consist of all the possible states of the agent."
]
},
{
"cell_type": "code",
- "execution_count": 123,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 7,
+ "metadata": {},
"outputs": [],
"source": [
"table = {((loc_A, 'Clean'),): 'Right',\n",
@@ -230,18 +226,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "We will now create a table driven agent program for our two-state environment."
+ "We will now create a table-driven agent program for our two-state environment."
]
},
{
"cell_type": "code",
- "execution_count": 124,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 8,
+ "metadata": {},
"outputs": [],
"source": [
- "# Create a table driven agent.\n",
+ "# Create a table-driven agent\n",
"table_driven_agent = Agent(program=TableDrivenAgentProgram(table=table))"
]
},
@@ -249,15 +243,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Since we are using the same environment, let us remove the previously added random agent from the environment to avoid confusion."
+ "Since we are using the same environment, let's remove the previously added random agent from the environment to avoid confusion."
]
},
{
"cell_type": "code",
- "execution_count": 125,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 9,
+ "metadata": {},
"outputs": [],
"source": [
"trivial_vacuum_env.delete_thing(random_agent)"
@@ -265,7 +257,7 @@
},
{
"cell_type": "code",
- "execution_count": 126,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -277,7 +269,7 @@
}
],
"source": [
- "# Add the table driven agent to the environment\n",
+ "# Add the table-driven agent to the environment\n",
"trivial_vacuum_env.add_thing(table_driven_agent)\n",
"\n",
"print(\"TableDrivenVacuumAgent is located at {}.\".format(table_driven_agent.location))"
@@ -285,23 +277,23 @@
},
{
"cell_type": "code",
- "execution_count": 127,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "State of the Environment: {(1, 0): 'Clean', (0, 0): 'Clean'}.\n",
+ "State of the Environment: {(0, 0): 'Clean', (1, 0): 'Clean'}.\n",
"TableDrivenVacuumAgent is located at (0, 0).\n"
]
}
],
"source": [
- "# Run the environment.\n",
+ "# Run the environment\n",
"trivial_vacuum_env.step()\n",
"\n",
- "# Check the current state of the environment.\n",
+ "# Check the current state of the environment\n",
"print(\"State of the Environment: {}.\".format(trivial_vacuum_env.status))\n",
"\n",
"print(\"TableDrivenVacuumAgent is located at {}.\".format(table_driven_agent.location))"
@@ -311,9 +303,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Simple Reflex Agent Program\n",
+ "## SIMPLE REFLEX AGENT PROGRAM\n",
"\n",
- "A simple reflex agent program selects actions on the basis of the current percept, ignoring the rest of the percept history. These agents work on a **condition-action rule** (also called **situation-action rule**, **production** or **if-then rule**), which tell the agent the action to trigger when a particular situtation is encountered. \n",
+ "A simple reflex agent program selects actions on the basis of the *current* percept, ignoring the rest of the percept history. These agents work on a **condition-action rule** (also called **situation-action rule**, **production** or **if-then rule**), which tells the agent the action to trigger when a particular situtation is encountered. \n",
"\n",
"The schematic diagram shown in **Figure 2.9** of the book will make this more clear:\n",
"\n",
@@ -329,13 +321,11 @@
},
{
"cell_type": "code",
- "execution_count": 131,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 12,
+ "metadata": {},
"outputs": [],
"source": [
- "# Delete the previously added table driven agent.\n",
+ "# Delete the previously added table-driven agent\n",
"trivial_vacuum_env.delete_thing(table_driven_agent)"
]
},
@@ -348,26 +338,24 @@
},
{
"cell_type": "code",
- "execution_count": 134,
- "metadata": {
- "collapsed": true
- },
+ "execution_count": 13,
+ "metadata": {},
"outputs": [],
"source": [
- "# TODO: Implement these functions for two-dimensional environment.\n",
- "# Interpret-input function for the two-state environment.\n",
+ "# TODO: Implement these functions for two-dimensional environment\n",
+ "# Interpret-input function for the two-state environment\n",
"def interpret_input(percept):\n",
" pass\n",
"\n",
"rules = None\n",
"\n",
- "# Rule-match function for the two-state environment.\n",
+ "# Rule-match function for the two-state environment\n",
"def rule_match(state, rule):\n",
" for rule in rules:\n",
" if rule.matches(state):\n",
" return rule \n",
" \n",
- "# Create a simple reflex agent the two-state environment.\n",
+ "# Create a simple reflex agent the two-state environment\n",
"simple_reflex_agent = ReflexVacuumAgent()"
]
},
@@ -380,14 +368,14 @@
},
{
"cell_type": "code",
- "execution_count": 135,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "SimpleReflexVacuumAgent is located at (0, 0).\n"
+ "SimpleReflexVacuumAgent is located at (1, 0).\n"
]
}
],
@@ -399,23 +387,23 @@
},
{
"cell_type": "code",
- "execution_count": 137,
+ "execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "State of the Environment: {(1, 0): 'Clean', (0, 0): 'Clean'}.\n",
+ "State of the Environment: {(0, 0): 'Clean', (1, 0): 'Clean'}.\n",
"SimpleReflexVacuumAgent is located at (0, 0).\n"
]
}
],
"source": [
- "# Run the environment.\n",
+ "# Run the environment\n",
"trivial_vacuum_env.step()\n",
"\n",
- "# Check the current state of the environment.\n",
+ "# Check the current state of the environment\n",
"print(\"State of the Environment: {}.\".format(trivial_vacuum_env.status))\n",
"\n",
"print(\"SimpleReflexVacuumAgent is located at {}.\".format(simple_reflex_agent.location))"
@@ -425,11 +413,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Model-Based Reflex Agent Program\n",
+ "## MODEL-BASED REFLEX AGENT PROGRAM\n",
"\n",
- "A model-based reflex agent maintains some sort of internal state that depends on the percept history and thereby reflects at least some of the unobserved aspects of the current state. In additon to this, it also requires a model of the world, that is, knowledge about \"how the world works\". \n",
+ "A model-based reflex agent maintains some sort of **internal state** that depends on the percept history and thereby reflects at least some of the unobserved aspects of the current state. In additon to this, it also requires a **model** of the world, that is, knowledge about \"how the world works\".\n",
"\n",
- "The schematic diagram shown in figure 2.11 of the book will make this more clear:\n",
+ "The schematic diagram shown in **Figure 2.11** of the book will make this more clear:\n",
"
"
]
},
@@ -442,22 +430,11 @@
},
{
"cell_type": "code",
- "execution_count": 139,
+ "execution_count": 16,
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "list.remove(x): x not in list\n",
- " in Environment delete_thing\n",
- " Thing to be removed: at (0, 0)\n",
- " from list: []\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "# Delete the previously added simple reflex agent.\n",
+ "# Delete the previously added simple reflex agent\n",
"trivial_vacuum_env.delete_thing(simple_reflex_agent)"
]
},
@@ -470,7 +447,7 @@
},
{
"cell_type": "code",
- "execution_count": 140,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -482,14 +459,14 @@
}
],
"source": [
- "# TODO: Implement this function for the two-dimensional environment.\n",
+ "# TODO: Implement this function for the two-dimensional environment\n",
"def update_state(state, action, percept, model):\n",
" pass\n",
"\n",
- "# Create a model-based reflex agent.\n",
+ "# Create a model-based reflex agent\n",
"model_based_reflex_agent = ModelBasedVacuumAgent()\n",
"\n",
- "# Add the agent to the environment.\n",
+ "# Add the agent to the environment\n",
"trivial_vacuum_env.add_thing(model_based_reflex_agent)\n",
"\n",
"print(\"ModelBasedVacuumAgent is located at {}.\".format(model_based_reflex_agent.location))"
@@ -497,23 +474,23 @@
},
{
"cell_type": "code",
- "execution_count": 143,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "State of the Environment: {(1, 0): 'Clean', (0, 0): 'Clean'}.\n",
+ "State of the Environment: {(0, 0): 'Clean', (1, 0): 'Clean'}.\n",
"ModelBasedVacuumAgent is located at (1, 0).\n"
]
}
],
"source": [
- "# Run the environment.\n",
+ "# Run the environment\n",
"trivial_vacuum_env.step()\n",
"\n",
- "# Check the current state of the environment.\n",
+ "# Check the current state of the environment\n",
"print(\"State of the Environment: {}.\".format(trivial_vacuum_env.status))\n",
"\n",
"print(\"ModelBasedVacuumAgent is located at {}.\".format(model_based_reflex_agent.location))"
@@ -523,19 +500,21 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Goal-Based Agent Program \n",
+ "## GOAL-BASED AGENT PROGRAM\n",
"\n",
- "A goal-based agent needs some sort of goal information that describes situations that are desirable, apart from the current state description. \n",
- "Figure 2.13 of the book shows a model-based, goal-based agent: \n",
+ "A goal-based agent needs some sort of **goal** information that describes situations that are desirable, apart from the current state description.\n",
+ "\n",
+ "**Figure 2.13** of the book shows a model-based, goal-based agent:\n",
"
\n",
"\n",
- "Search (Chapters 3 to 5) and Planning (Chapters 10 to 11) are the subfields of AI devoted to finding action sequences that achieve the agent's goals.\n",
+ "**Search** (Chapters 3 to 5) and **Planning** (Chapters 10 to 11) are the subfields of AI devoted to finding action sequences that achieve the agent's goals.\n",
+ "\n",
+ "## UTILITY-BASED AGENT PROGRAM\n",
"\n",
- "## Utility-Based Agent Program\n",
+ "A utility-based agent maximizes its **utility** using the agent's **utility function**, which is essentially an internalization of the agent's performance measure.\n",
"\n",
- "A utility-based agent maximizes its utility using the agent's utility function, which is essentially an internalization of the agent's performance measure. \n",
- "Figure 2.14 of the book shows a model-based, utility-based agent:\n",
- "
\n"
+ "**Figure 2.14** of the book shows a model-based, utility-based agent:\n",
+ "
"
]
}
],
@@ -555,7 +534,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.5.2"
+ "version": "3.6.3"
}
},
"nbformat": 4,