Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62f7d67

Browse files
mkhalid1norvig
authored andcommitted
Changes in texts (aimacode#959)
Added a few new sentences, modified the sentence structure at a few places, and corrected some grammatical errors.
1 parent 3a83335 commit 62f7d67

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

agents.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
},
135135
"source": [
136136
"# PROGRAM - BlindDog #\n",
137-
"Now that we have a <b>Park</b> Class, we need to implement a <b>program</b> module for our dog. A program controls how the dog acts upon it's environment. Our program will be very simple, and is shown in the table below.\n",
137+
"Now that we have a <b>Park</b> Class, we need to implement a <b>program</b> module for our dog. A program controls how the dog acts in it's environment; it will be very simple, and it's functionality is illustrated in the table below.\n",
138138
"<table>\n",
139139
" <tr>\n",
140140
" <td><b>Percept:</b> </td>\n",
@@ -167,13 +167,13 @@
167167
" self.location += 1\n",
168168
" \n",
169169
" def eat(self, thing):\n",
170-
" '''returns True upon success or False otherwise'''\n",
170+
" '''returns True for success and False otherwise'''\n",
171171
" if isinstance(thing, Food):\n",
172172
" return True\n",
173173
" return False\n",
174174
" \n",
175175
" def drink(self, thing):\n",
176-
" ''' returns True upon success or False otherwise'''\n",
176+
" ''' returns True for success and False otherwise'''\n",
177177
" if isinstance(thing, Water):\n",
178178
" return True\n",
179179
" return False\n",
@@ -289,7 +289,7 @@
289289
"cell_type": "markdown",
290290
"metadata": {},
291291
"source": [
292-
"This is how to implement an agent, its program, and environment. However, this was a very simple case. Let's try a 2-Dimentional environment now with multiple agents.\n",
292+
"This is how to implement an agent, its program, and environment. However, this was a very simple case. Lets now try a 2-Dimensional environment with multiple agents.\n",
293293
"\n",
294294
"\n",
295295
"# 2D Environment #\n",
@@ -347,13 +347,13 @@
347347
" self.location[1] += 1\n",
348348
" \n",
349349
" def eat(self, thing):\n",
350-
" '''returns True upon success or False otherwise'''\n",
350+
" '''returns True for success and False otherwise'''\n",
351351
" if isinstance(thing, Food):\n",
352352
" return True\n",
353353
" return False\n",
354354
" \n",
355355
" def drink(self, thing):\n",
356-
" ''' returns True upon success or False otherwise'''\n",
356+
" ''' returns True for success and False otherwise'''\n",
357357
" if isinstance(thing, Water):\n",
358358
" return True\n",
359359
" return False\n",
@@ -421,11 +421,11 @@
421421
"cell_type": "markdown",
422422
"metadata": {},
423423
"source": [
424-
"This works, but our blind dog doesn't make any use of the 2 dimensional space available to him. Let's make our dog more energetic so that he turns and moves forward, instead of always moving down. We'll also need to make appropriate changes to our environment to be able to handle this extra motion.\n",
424+
"This works, but our blind dog doesn't make any use of the 2 dimensional space available to him. Lets make our dog more energetic so that instead of always moving down, he turns and moves forward as well. To be able to handle this extra motion, we'll need to make appropriate changes to our environment.\n",
425425
"\n",
426426
"# PROGRAM - EnergeticBlindDog #\n",
427427
"\n",
428-
"Let's make our dog turn or move forwards at random - except when he's at the edge of our park - in which case we make him change his direction explicitly by turning to avoid trying to leave the park. Our dog is blind, however, so he wouldn't know which way to turn - he'd just have to try arbitrarily.\n",
428+
"Let's make our dog turn or move forward at random - except when he's at the edge of our park - in which case we make him change his direction explicitly by turning to avoid trying to leave the park. Our dog is blind, however, so he wouldn't know which way to turn - he'd just have to try arbitrarily.\n",
429429
"\n",
430430
"<table>\n",
431431
" <tr>\n",
@@ -491,13 +491,13 @@
491491
" self.direction = self.direction + d\n",
492492
" \n",
493493
" def eat(self, thing):\n",
494-
" '''returns True upon success or False otherwise'''\n",
494+
" '''returns True for success and False otherwise'''\n",
495495
" if isinstance(thing, Food):\n",
496496
" return True\n",
497497
" return False\n",
498498
" \n",
499499
" def drink(self, thing):\n",
500-
" ''' returns True upon success or False otherwise'''\n",
500+
" ''' returns True f success and False otherwise'''\n",
501501
" if isinstance(thing, Water):\n",
502502
" return True\n",
503503
" return False\n",

0 commit comments

Comments
 (0)