Repository: projectmesa/mesa
Pull request #136 (2015-07-04 17:07:19)

Continuous Space
Adding in continuous space, and a Boids-style flocking model to test and demonstrate.


Patch:
diff --git a/HISTORY.rst b/HISTORY.rst
index d46e9fe7..3993f642 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -8,16 +8,12 @@ Next release
 
 * (Add changes here)
 
-0.6.1 (2015-06-27)
-++++++++++++++++++
-
-* Bug Fix: Order of operations reversed: agent is removed first and then it is placed.
-* Improvement: License was updates from MIT to Apache 2.0.
-
 0.6.0 (2015-06-21)
 ++++++++++++++++++
 
-* Improvment: Add modular server feature, which breaks up a model into a .py file and a .js file. This breaks backwards compatibility.
+**Features and Improvements**
+
+* Add modular server feature, which breaks up a model into a .py file and a .js file. This breaks backwards compatibility.
 
 Pre 0.6.0
 ++++++++++++++++++
diff --git a/LICENSE.md b/LICENSE.md
index 906c1bbf..5b4524fe 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,13 +1,21 @@
-Copyright 2015 Core Mesa Team
+The MIT License (MIT)
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
+Copyright (c) 2015 Core Mesa Team
 
-    http://www.apache.org/licenses/LICENSE-2.0
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/examples/Flockers/Flocker_Server.py b/examples/Flockers/Flocker_Server.py
new file mode 100644
index 00000000..48cda36a
--- /dev/null
+++ b/examples/Flockers/Flocker_Server.py
@@ -0,0 +1,11 @@
+from flockers import BoidModel
+from mesa.visualization.ModularVisualization import ModularServer
+from SimpleContinuousModule import SimpleCanvas
+
+
+def boid_draw(agent):
+    return {"Shape": "circle", "r": 2, "Filled": "true", "Color": "Red"}
+boid_canvas = SimpleCanvas(boid_draw, 500, 500)
+server = ModularServer(BoidModel, [boid_canvas], "Boids",
+    100, 100, 100, 5, 10, 2)
+server.launch()
diff --git a/examples/Flockers/SimpleContinuousModule.py b/examples/Flockers/SimpleContinuousModule.py
new file mode 100644
index 00000000..e9a7ae6a
--- /dev/null
+++ b/examples/Flockers/SimpleContinuousModule.py
@@ -0,0 +1,31 @@
+from mesa.visualization.ModularVisualization import VisualizationElement
+
+
+class SimpleCanvas(VisualizationElement):
+    local_includes = ["simple_continuous_canvas.js"]
+    portrayal_method = None
+    canvas_height = 500
+    canvas_width = 500
+
+    def __init__(self, portrayal_method, canvas_height=500, canvas_width=500):
+        '''
+        Instantiate a new SimpleCanvas
+        '''
+        self.portrayal_method = portrayal_method
+        self.canvas_height = canvas_height
+        self.canvas_width = canvas_width
+        new_element = ("new Simple_Continuous_Module({}, {})"
+            .format(self.canvas_width, self.canvas_height))
+        self.js_code = "elements.push(" + new_element + ");"
+
+    def render(self, model):
+        space_state = []
+        for obj in model.schedule.agents:
+            portrayal = self.portrayal_method(obj)
+            x, y = obj.pos
+            x = (x - model.space.x_min) / (model.space.x_max - model.space.x_min)
+            y = (y - model.space.y_min) / (model.space.y_max - model.space.y_min)
+            portrayal["x"] = x
+            portrayal["y"] = y
+            space_state.append(portrayal)
+        return space_state
diff --git a/examples/Flockers/flockers.py b/examples/Flockers/flockers.py
new file mode 100644
index 00000000..45447281
--- /dev/null
+++ b/examples/Flockers/flockers.py
@@ -0,0 +1,149 @@
+'''
+Flockers
+=============================================================
+A Mesa implementation of Craig Reynolds's Boids flocker model.
+Uses numpy arrays to represent vectors.
+'''
+
+
+import numpy as np
+import random
+
+from mesa import Model, Agent
+from mesa.space import ContinuousSpace
+from mesa.time import RandomActivation
+
+
+class Boid(Agent):
+    '''
+    A Boid-style flocker agent.
+
+    The agent follows three behaviors to flock:
+        - Cohesion: steering towards neighboring agents.
+        - Separation: avoiding getting too close to any other agent.
+        - Alignment: try to fly in the same direction as the neighbors.
+
+    Boids have a vision that defines the radius in which they look for their
+    neighbors to flock with. Their speed (a scalar) and heading (a unit vector)
+    define their movement. Separation is their desired minimum distance from
+    any other Boid.
+    '''
+    def __init__(self, unique_id, pos, speed=5, heading=None,
+            vision=5, separation=1):
+        '''
+        Create a new Boid flocker agent.
+
+        Args:
+            unique_id: Unique agent identifyer.
+            pos: Starting position
+            speed: Distance to move per step.
+            heading: numpy vector for the Boid's direction of movement.
+            vision: Radius to look around for nearby Boids.
+            separation: Minimum distance to maintain from other Boids.
+        '''
+        self.unique_id = unique_id
+        self.pos = pos
+        self.speed = speed
+        if heading is not None:
+            self.heading = heading
+        else:
+            self.heading = np.random.random(2)
+            self.heading /= np.linalg.norm(self.heading)
+        self.vision = vision
+        self.separation = separation
+
+    def cohere(self, neighbors):
+        '''
+        Return the vector toward the center of mass of the local neighbors.
+        '''
+        center = np.array([0.0, 0.0])
+        for neighbor in neighbors:
+            center += np.array(neighbor.pos)
+        return center / len(neighbors)
+
+    def separate(self, neighbors):
+        '''
+        Return a vector away from any neighbors closer than separation dist.
+        '''
+        my_pos = np.array(self.pos)
+        sep_vector = np.array([0, 0])
+        for neighbor in neighbors:
+            their_pos = np.array(neighbor.pos)
+            dist = np.linalg.norm(my_pos - their_pos)
+            if dist < self.separation:
+                sep_vector -= their_pos - my_pos
+        return sep_vector
+
+    def match_heading(self, neighbors):
+        '''
+        Return a vector of the neighbors' average heading.
+        '''
+        mean_heading = np.array([0, 0])
+        for neighbor in neighbors:
+            mean_heading += neighbor.heading
+        return mean_heading / len(neighbors)
+
+    def step(self, model):
+        '''
+        Get the Boid's neighbors, compute the new vector, and move accordingly.
+        '''
+        x, y = self.pos
+        neighbors = model.space.get_neighbors(x, y, self.vision, False)
+        if len(neighbors) > 0:
+            cohere_vector = self.cohere(neighbors)
+            separate_vector = self.separate(neighbors)
+            match_heading_vector = self.match_heading(neighbors)
+            self.heading += (cohere_vector + separate_vector
+                + match_heading_vector)
+            self.heading /= np.linalg.norm(self.heading)
+        new_pos = np.array(self.pos) + self.heading * self.speed
+        new_x, new_y = new_pos
+        model.space.move_agent(self, (new_x, new_y))
+
+
+class BoidModel(Model):
+    '''
+    Flocker model class. Handles agent creation, placement and scheduling.
+    '''
+    N = 100
+    width = 100
+    height = 100
+
+    def __init__(self, N, width, height, speed, vision, separation):
+        '''
+        Create a new Flockers model.
+
+        Args:
+            N: Number of Boids
+            width, height: Size of the space.
+            speed: How fast should the Boids move.
+            vision: How far around should each Boid look for its neighbors
+            separtion: What's the minimum distance each Boid will attempt to
+                       keep from any other
+        '''
+        self.N = N
+        self.vision = vision
+        self.speed = speed
+        self.separation = separation
+        self.schedule = RandomActivation(self)
+        self.space = ContinuousSpace(width, height, True,
+            grid_width=10, grid_height=10)
+        self.make_agents()
+        self.running = True
+
+    def make_agents(self):
+        '''
+        Create N agents, with random positions and starting headings.
+        '''
+        for i in range(self.N):
+            x = random.random() * self.space.x_max
+            y = random.random() * self.space.y_max
+            pos = (x, y)
+            heading = np.random.random(2) * 2 - np.array((1, 1))
+            heading /= np.linalg.norm(heading)
+            boid = Boid(i, pos, self.speed, heading, self.vision, self.separation)
+            self.space.place_agent(boid, pos)
+            self.schedule.add(boid)
+
+    def step(self):
+        self.schedule.step()
diff --git a/examples/Flockers/simple_continuous_canvas.js b/examples/Flockers/simple_continuous_canvas.js
new file mode 100644
index 00000000..0bd818f4
--- /dev/null
+++ b/examples/Flockers/simple_continuous_canvas.js
@@ -0,0 +1,83 @@
+var ContinuousVisualization = function(height, width, context) {
+	var height = height;
+	var width = width;
+	var context = context;
+
+	this.draw = function(objects) {
+		for (var i in objects) {
+			var p = objects[i];
+			if (p.Shape == "rect")
+				this.drawRectange(p.x, p.y, p.w, p.h, p.Color, p.Filled);
+			if (p.Shape == "circle")
+				this.drawCircle(p.x, p.y, p.r, p.Color, p.Filled);
+		};
+
+	};
+
+	this.drawCircle = function(x, y, radius, color, fill) {
+		var cx = x * width;
+		var cy = y * height;
+		var r = radius;
+
+		context.beginPath();
+		context.arc(cx, cy, r, 0, Math.PI * 2, false);
+		context.closePath();
+
+		context.strokeStyle = color;
+		context.stroke();
+
+		if (fill) {
+			context.fillStyle = color;
+			context.fill();
+		}
+
+	};
+
+	this.drawRectange = function(x, y, w, h, color, fill) {
+		context.beginPath();
+		var dx = w * width;
+		var dy = h * height;
+
+		// Keep the drawing centered:
+		var x0 = (x*width) - 0.5*dx;
+		var y0 = (y*height) - 0.5*dy;
+
+		context.strokeStyle = color;
+		context.fillStyle = color;
+		if (fill)
+			context.fillRect(x0, y0, dx, dy);
+		else
+			context.strokeRect(x0, y0, dx, dy);
+	};
+
+	this.resetCanvas = function() {
+		context.clearRect(0, 0, height, width);
+		context.beginPath();
+	};
+};
+
+var Simple_Continuous_Module = function(canvas_width, canvas_height) {
+	// Create the element
+	// ------------------
+
+	// Create the tag:
+	var canvas_tag = "<canvas width='" + canvas_width + "' height='" + canvas_height + "' ";
+	canvas_tag += "style='border:1px dotted'></canvas>";
+	// Append it to body:
+	var canvas = $(canvas_tag)[0];
+	$("body").append(canvas);
+
+	// Create the context and the drawing controller:
+	var context = canvas.getContext("2d");
+	var canvasDraw = new ContinuousVisualization(canvas_width, canvas_height, context);
+
+	this.render = function(data) {
+		canvasDraw.resetCanvas();
+		canvasDraw.draw(data);
+	};
+
+	this.reset = function() {
+		canvasDraw.resetCanvas();
+	};
+
+};
\ No newline at end of file
diff --git a/mesa/space.py b/mesa/space.py
index 3aeca0c7..750c6f98 100644
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -15,6 +15,7 @@ MultiGrid: extension to Grid where each cell is a set of objects.
 
 import itertools
 import random
+import math
 
 
 RANDOM = -1
@@ -86,7 +87,6 @@ class Grid(object):
         self.torus = torus
 
         self.grid = []
-        self.empties = []
 
         for y in range(self.height):
             row = []
@@ -268,6 +268,7 @@ class SingleGrid(Grid):
     '''
     Grid where each cell contains exactly at most one object.
     '''
+    empties = []
 
     def __init__(self, height, width, torus):
         '''
@@ -386,3 +387,169 @@ class MultiGrid(Grid):
         '''
         for a in self.grid[y][x]:
             target_list.append(a)
+
+
+class ContinuousSpace(object):
+    '''
+    Continuous space where each agent can have an arbitrary position.
+
+    Assumes that all agents are point objects, and have a pos property storing
+    their position as an (x, y) tuple. This class uses a MultiGrid internally
+    to store agent objects, to speed up neighborhood lookups.
+    '''
+
+    _grid = None
+
+    def __init__(self, x_max, y_max, torus, x_min=0, y_min=0,
+                 grid_width=100, grid_height=100):
+        '''
+        Create a new continuous space.
+
+        Args:
+            x_max, y_max: Maximum x and y coordinates for the space.
+            torus: Boolean for whether the edges loop around.
+            x_min, y_min: (default 0) If provided, set the minimum x and y
+                          coordinates for the space. Below them, values loop to
+                          the other edge (if torus=True) or raise an exception.
+            grid_width, _height: (default 100) Determine the size of the
+                                 internal storage grid. More cells will slow
+                                 down movement, but speed up neighbor lookup.
+                                 Probably only fiddle with this if one or the
+                                 other is impacting your model's performance.
+        '''
+        self.x_min = x_min
+        self.x_max = x_max
+        self.width = x_max - x_min
+        self.y_min = y_min
+        self.y_max = y_max
+        self.height = y_max - y_min
+        self.torus = torus
+
+        self.cell_width = (self.x_max - self.x_min) / grid_width
+        self.cell_height = (self.y_max - self.y_min) / grid_height
+
+        self._grid = MultiGrid(grid_height, grid_width, torus)
+
+    def place_agent(self, agent, pos):
+        '''
+        Place a new agent in the space.
+
+        Args:
+            agent: Agent object to place.
+            pos: Coordinate tuple for where to place the agent.
+        '''
+        pos = self.torus_adj(pos)
+        self._place_agent(pos, agent)
+        agent.pos = pos
+
+    def move_agent(self, agent, pos):
+        '''
+        Move an agent from its current position to a new position.
+
+        Args:
+            agent: The agent object to move.
+            pos: Coordinate tuple to move the agent to.
+        '''
+        pos = self.torus_adj(pos)
+        self._remove_agent(agent.pos, agent)
+        self._place_agent(pos, agent)
+        agent.pos = pos
+
+    def _place_agent(self, pos, agent):
+        '''
+        Place an agent at a given point, and update the internal grid.
+        '''
+        cell = self._point_to_cell(pos)
+        self._grid._place_agent(cell, agent)
+
+    def _remove_agent(self, pos, agent):
+        '''
+        Remove an agent at a given point, and update the internal grid.
+        '''
+        cell = self._point_to_cell(pos)
+        self._grid._remove_agent(cell, agent)
+
+    def get_neighbors(self, x, y, radius, include_center=True):
+        '''
+        Get all objects within a certain radius.
+
+        Args:
+            x, y: Coordinates to center the search at.
+            radius: Get all the objects within this distance of the center.
+            include_center: If True, include an object at the *exact* provided
+                            coordinates. i.e. if you are searching for the
+                            neighbors of a given agent, True will include that
+                            agent in the results.
+        '''
+        # Get candidate objects
+        scale = max(self.cell_width, self.cell_height)
+        cell_radius = math.ceil(radius / scale)
+        cell_x, cell_y = self._point_to_cell((x, y))
+        possible_objs = self._grid.get_neighbors(cell_x, cell_y,
+                                              True, True, cell_radius)
+        neighbors = []
+        # Iterate over candidates and check actual distance.
+        for obj in possible_objs:
+            dist = self.get_distance((x, y), obj.pos)
+            if dist <= radius and (include_center or dist > 0):
+                neighbors.append(obj)
+        return neighbors
+
+    def get_distance(self, pos_1, pos_2):
+        '''
+        Get the distance between two point, accounting for toroidal space.
+
+        Args:
+            pos_1, pos_2: Coordinate tuples for both points.
+        '''
+        x1, y1 = pos_1
+        x2, y2 = pos_2
+        if not self.torus:
+            dx = x1 - x2
+            dy = y1 - y2
+        else:
+            d_x = abs(x1 - x2)
+            d_y = abs(y1 - y2)
+            dx = min(d_x, self.width - d_x)
+            dy = min(d_y, self.height - d_y)
+        return math.sqrt(dx ** 2 + dy ** 2)
+
+    def torus_adj(self, pos):
+        '''
+        Adjust coordinates to handle torus looping.
+
+        If the coordinate is out-of-bounds and the space is toroidal, return
+        the corresponding point within the space. If the space is not toroidal,
+        raise an exception.
+
+        Args:
+            pos: Coordinate tuple to convert.
+        '''
+        if not self.out_of_bounds(pos):
+            return pos
+        elif not self.torus:
+            raise Exception("Point out of bounds, and space non-toroidal.")
+        else:
+            x = self.x_min + ((pos[0] - self.x_min) % self.width)
+            y = self.y_min + ((pos[1] - self.y_min) % self.height)
+            return (x, y)
+
+    def _point_to_cell(self, pos):
+        '''
+        Get the cell coordinates that a given x,y point falls in.
+        '''
+        if self.out_of_bounds(pos):
+            raise Exception("Point out of bounds.")
+
+        x, y = pos
+        cell_x = math.floor((x - self.x_min) / self.cell_width)
+        cell_y = math.floor((y - self.y_min) / self.cell_height)
+        return (cell_x, cell_y)
+
+    def out_of_bounds(self, pos):
+        '''
+        Check if a point is out of bounds.
+        '''
+        x, y = pos
+        return (x < self.x_min or x > self.x_max
+            or y < self.y_min or y > self.y_max)
diff --git a/setup.py b/setup.py
index 51895d6f..6f7729d5 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ description = """
 
 setup(
     name='Mesa',
-    version='0.6.1',
+    version='0.6.0',
     description=description,
     author='Project Mesa Team',
     author_email='projectmesa@googlegroups.com',
@@ -35,7 +35,7 @@ setup(
     include_package_data=True,
     install_requires=requires,
     keywords='agent based modeling model ABM simulation multi-agent',
-    license='Apache 2.0',
+    license='MIT',
     zip_safe=False,
     classifiers=[
         'Topic :: Scientific/Engineering',


Test patch:
diff --git a/examples/Flockers/.ipynb_checkpoints/Flocker Test-checkpoint.ipynb b/examples/Flockers/.ipynb_checkpoints/Flocker Test-checkpoint.ipynb
new file mode 100644
index 00000000..1fe55391
--- /dev/null
+++ b/examples/Flockers/.ipynb_checkpoints/Flocker Test-checkpoint.ipynb
@@ -0,0 +1,113 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "from flockers import *\n",
+    "import numpy as np\n",
+    "import matplotlib.pyplot as plt\n",
+    "%matplotlib inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "def draw_boids(model):\n",
+    "    x_vals = []\n",
+    "    y_vals = []\n",
+    "    for boid in model.schedule.agents:\n",
+    "        x, y = boid.pos\n",
+    "        x_vals.append(x)\n",
+    "        y_vals.append(y)\n",
+    "    fig = plt.figure(figsize=(10,10))\n",
+    "    ax = fig.add_subplot(111)\n",
+    "    ax.scatter(x_vals, y_vals)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "model = BoidModel(100, 100, 100, speed=5, vision=5, separation=1)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "for i in range(50):\n",
+    "    model.step()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlwAAAJPCAYAAACpXgqFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3W+snNd9H/jvT1LMUnEVmQwg+Y9iB22MxEbqVt1N04Kt\nuGtLVI3WirCA0wAu1LTJInAXN1rSrSUnqPUi68Zuy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tf9Nkv+ntXYhSarqF5P8xTh3u7Xde9Vn7g7NK7MMMUvx7kyGJ+65sjr9\n1EeT/I2qelFVfWeS70ry8f1u3wj8v0m+q6peVVUvyqRo76MDt2lhVVUl+bkkT7TW3rvhoY8muW96\n/74kv7T5WJLW2jtaa7e11r4zk4Llf9ta+5tx/naktfZ0ki9U1aunu96Q5PEkvxzn71o+m+T7q+rg\n9H38hkwmbjh3u7Pde9Vn7g7MM7Ps+zpcVfX5TBZMvTjd9RuttbdOH3tHJmOk38hk6OexfW3cSFTV\nX03y3kxm7fxca+0fDtykhVVVR5L8uySfynp374OZvDEeSfIdSZ5M8ubW2leHaONYVNUdSU601t5U\nVYfi/O1IVb0ukwkHL0ryH5P8cCbvXefvGqrq72cSEi4n+USSH0nyJ+PcbamqPpzkjiTfnkm91j9I\n8pFsc7585j7fFufvnZl8Xswls1j4FACgs6FnKQIALD2BCwCgM4ELAKAzgQsAoDOBCwCgM4ELAKAz\ngQsAoDOBCwCgs/8fICoqGcqtXKgAAAAASUVORK5CYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x108938a58>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "draw_boids(model)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.4.2"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/examples/Flockers/Flocker Test.ipynb b/examples/Flockers/Flocker Test.ipynb
new file mode 100644
index 00000000..1fe55391
--- /dev/null
+++ b/examples/Flockers/Flocker Test.ipynb
@@ -0,0 +1,113 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "from flockers import *\n",
+    "import numpy as np\n",
+    "import matplotlib.pyplot as plt\n",
+    "%matplotlib inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "def draw_boids(model):\n",
+    "    x_vals = []\n",
+    "    y_vals = []\n",
+    "    for boid in model.schedule.agents:\n",
+    "        x, y = boid.pos\n",
+    "        x_vals.append(x)\n",
+    "        y_vals.append(y)\n",
+    "    fig = plt.figure(figsize=(10,10))\n",
+    "    ax = fig.add_subplot(111)\n",
+    "    ax.scatter(x_vals, y_vals)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "model = BoidModel(100, 100, 100, speed=5, vision=5, separation=1)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "for i in range(50):\n",
+    "    model.step()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlwAAAJPCAYAAACpXgqFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3W+snNd9H/jvT1LMUnEVmQwg+Y9iB22MxEbqVt1N04Kt\nuGtLVI3WirCA0wAu1LTJInAXN1rSrSUnqPUi68ZuyPVqF4bRJnaJoPZWTaPYKdwV2TRMs9ggzsZx\n7Ur22img1rIhuiHtMHEU1TbPvpih7tXVveS9d+bcZ56ZzwcYaJ5n5rlz9PDOne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yqRo76MDt2lhVVUl+bkkT7TW3rvhoY8muW96\n/74kv7T5WJLW2jtaa7e11r4zk4Llf9ta+5tx/naktfZ0ki9U1aunu96Q5PEkvxzn71o+m+T7q+rg\n9H38hkwmbjh3u7Pde9Vn7g7MM7Ps+zpcVfX5TBZMvTjd9RuttbdOH3tHJmOk38hk6OexfW3cSFTV\nX03y3kxm7fxca+0fDtykhVVVR5L8uySfynp374OZvDEeSfIdSZ5M8ubW2leHaONYVNUdSU601t5U\nVYfi/O1IVb0ukwkHL0ryH5P8cCbvXefvGqrq72cSEi4n+USSH0nyJ+PcbamqPpzkjiTfnkm91j9I\n8pFsc7585j7fFufvnZl8Xswls1j4FACgs6FnKQIALD2BCwCgM4ELAKAzgQsAoDOBCwCgM4ELAKAz\ngQsAoDOBCwCgs/8fICoqGcqtXKgAAAAASUVORK5CYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x108938a58>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "draw_boids(model)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.4.2"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tests/test_space.py b/tests/test_space.py
new file mode 100644
index 00000000..080b2e29
--- /dev/null
+++ b/tests/test_space.py
@@ -0,0 +1,102 @@
+import unittest
+
+from mesa.space import ContinuousSpace
+from test_grid import MockAgent
+
+TEST_AGENTS = [(-20, -20), (-20, -20.05), (65, 18)]
+
+
+class TestSpaceToroidal(unittest.TestCase):
+    '''
+    Testing a toroidal continuous space.
+    '''
+
+    def setUp(self):
+        '''
+        Create a test space and populate with Mock Agents.
+        '''
+        self.space = ContinuousSpace(70, 20, True, -30, -30, 100, 100)
+        self.agents = []
+        for i, pos in enumerate(TEST_AGENTS):
+            a = MockAgent(i, None)
+            self.agents.append(a)
+            self.space.place_agent(a, pos)
+
+    def test_agent_positions(self):
+        '''
+        Ensure that the agents are all placed properly.
+        '''
+        for i, pos in enumerate(TEST_AGENTS):
+            a = self.agents[i]
+            assert a.pos == pos
+
+    def test_distance_calculations(self):
+        '''
+        Test toroidal distance calculations.
+        '''
+        pos_1 = (-30, -30)
+        pos_2 = (70, 20)
+        assert self.space.get_distance(pos_1, pos_2) == 0
+
+        pos_3 = (-30, -20)
+        assert self.space.get_distance(pos_1, pos_3) == 10
+
+    def test_neighborhood_retrieval(self):
+        '''
+        Test neighborhood retrieval
+        '''
+        neighbors_1 = self.space.get_neighbors(-20, -20, 1)
+        assert len(neighbors_1) == 2
+
+        neighbors_2 = self.space.get_neighbors(40, -10, 10)
+        assert len(neighbors_2) == 0
+
+        neighbors_3 = self.space.get_neighbors(-30, -30, 10)
+        assert len(neighbors_3) == 1
+
+
+class TestSpaceNonToroidal(unittest.TestCase):
+    '''
+    Testing a toroidal continuous space.
+    '''
+
+    def setUp(self):
+        '''
+        Create a test space and populate with Mock Agents.
+        '''
+        self.space = ContinuousSpace(70, 20, False, -30, -30, 100, 100)
+        self.agents = []
+        for i, pos in enumerate(TEST_AGENTS):
+            a = MockAgent(i, None)
+            self.agents.append(a)
+            self.space.place_agent(a, pos)
+
+    def test_agent_positions(self):
+        '''
+        Ensure that the agents are all placed properly.
+        '''
+        for i, pos in enumerate(TEST_AGENTS):
+            a = self.agents[i]
+            assert a.pos == pos
+
+    def test_distance_calculations(self):
+        '''
+        Test toroidal distance calculations.
+        '''
+
+        pos_2 = (70, 20)
+        pos_3 = (-30, -20)
+        assert self.space.get_distance(pos_2, pos_3) == 107.70329614269008
+
+    def test_neighborhood_retrieval(self):
+        '''
+        Test neighborhood retrieval
+        '''
+        neighbors_1 = self.space.get_neighbors(-20, -20, 1)
+        assert len(neighbors_1) == 2
+
+        neighbors_2 = self.space.get_neighbors(40, -10, 10)
+        assert len(neighbors_2) == 0
+
+        neighbors_3 = self.space.get_neighbors(-30, -30, 10)
+        assert len(neighbors_3) == 0