diff --git a/agents.ipynb b/agents.ipynb index 968c8cdc9..6c547ee6c 100644 --- a/agents.ipynb +++ b/agents.ipynb @@ -17,7 +17,6 @@ "cell_type": "code", "execution_count": 1, "metadata": { - "collapsed": false, "scrolled": true }, "outputs": [], @@ -44,9 +43,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -83,9 +80,7 @@ { "cell_type": "code", "execution_count": 3, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "class Food(Thing):\n", @@ -156,9 +151,7 @@ { "cell_type": "code", "execution_count": 4, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [], "source": [ "class BlindDog(Agent):\n", @@ -195,15 +188,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Lets now run our simulation by creating a park with some food, water, and our dog." + "Let's now run our simulation by creating a park with some food, water, and our dog." ] }, { "cell_type": "code", "execution_count": 5, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -235,15 +226,13 @@ "source": [ "Notice that the dog moved from location 1 to 4, over 4 steps, and ate food at location 5 in the 5th step.\n", "\n", - "Lets continue this simulation for 5 more steps." + "Let's continue this simulation for 5 more steps." ] }, { "cell_type": "code", "execution_count": 6, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -263,15 +252,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Perfect! Note how the simulation stopped after the dog drank the water - exhausting all the food and water ends our simulation, as we had defined before. Lets add some more water and see if our dog can reach it." + "Perfect! Note how the simulation stopped after the dog drank the water - exhausting all the food and water ends our simulation, as we had defined before. Let's add some more water and see if our dog can reach it." ] }, { "cell_type": "code", "execution_count": 7, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -298,7 +285,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This is how to implement an agent, its program, and environment. However, this was a very simple case. Lets 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. Let's try a 2-Dimentional environment now with multiple agents.\n", "\n", "\n", "# 2D Environment #\n", @@ -349,8 +336,8 @@ " return dead_agents or no_edibles\n", "\n", "class BlindDog(Agent):\n", - " location = [0,1]# change location to a 2d value\n", - " direction = Direction(\"down\")# variable to store the direction our dog is facing\n", + " location = [0,1] # change location to a 2d value\n", + " direction = Direction(\"down\") # variable to store the direction our dog is facing\n", " \n", " def movedown(self):\n", " self.location[1] += 1\n", @@ -381,15 +368,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now lets test this new park with our same dog, food and water" + "Now let's test this new park with our same dog, food and water" ] }, { "cell_type": "code", "execution_count": 9, - "metadata": { - "collapsed": false - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -436,7 +421,7 @@ "\n", "# PROGRAM - EnergeticBlindDog #\n", "\n", - "Lets 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 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", "\n", "