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

Skip to content

Changes in texts #959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions agents.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
},
"source": [
"# PROGRAM - BlindDog #\n",
"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",
"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",
"<table>\n",
" <tr>\n",
" <td><b>Percept:</b> </td>\n",
Expand Down Expand Up @@ -167,13 +167,13 @@
" self.location += 1\n",
" \n",
" def eat(self, thing):\n",
" '''returns True upon success or False otherwise'''\n",
" '''returns True for success and False otherwise'''\n",
" if isinstance(thing, Food):\n",
" return True\n",
" return False\n",
" \n",
" def drink(self, thing):\n",
" ''' returns True upon success or False otherwise'''\n",
" ''' returns True for success and False otherwise'''\n",
" if isinstance(thing, Water):\n",
" return True\n",
" return False\n",
Expand Down Expand Up @@ -289,7 +289,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"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",
"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",
"\n",
"\n",
"# 2D Environment #\n",
Expand Down Expand Up @@ -347,13 +347,13 @@
" self.location[1] += 1\n",
" \n",
" def eat(self, thing):\n",
" '''returns True upon success or False otherwise'''\n",
" '''returns True for success and False otherwise'''\n",
" if isinstance(thing, Food):\n",
" return True\n",
" return False\n",
" \n",
" def drink(self, thing):\n",
" ''' returns True upon success or False otherwise'''\n",
" ''' returns True for success and False otherwise'''\n",
" if isinstance(thing, Water):\n",
" return True\n",
" return False\n",
Expand Down Expand Up @@ -421,11 +421,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"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",
"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",
"\n",
"# PROGRAM - EnergeticBlindDog #\n",
"\n",
"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",
"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",
"\n",
"<table>\n",
" <tr>\n",
Expand Down Expand Up @@ -491,13 +491,13 @@
" self.direction = self.direction + d\n",
" \n",
" def eat(self, thing):\n",
" '''returns True upon success or False otherwise'''\n",
" '''returns True for success and False otherwise'''\n",
" if isinstance(thing, Food):\n",
" return True\n",
" return False\n",
" \n",
" def drink(self, thing):\n",
" ''' returns True upon success or False otherwise'''\n",
" ''' returns True f success and False otherwise'''\n",
" if isinstance(thing, Water):\n",
" return True\n",
" return False\n",
Expand Down