summaryrefslogtreecommitdiff
path: root/docs/closest_apple.tex
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2012-08-02 23:45:14 +1000
committerPeter Ward <peteraward@gmail.com>2012-08-02 23:45:14 +1000
commit9aedbb911e1596f30229469a53e56cf5c1056c97 (patch)
tree87f77458dd70c3d4232689b6d02d9fdf41a26804 /docs/closest_apple.tex
parent6f2055925874e2c948e5672f3ad734b54b862032 (diff)
more sections
Diffstat (limited to 'docs/closest_apple.tex')
-rw-r--r--docs/closest_apple.tex13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/closest_apple.tex b/docs/closest_apple.tex
new file mode 100644
index 0000000..36b7382
--- /dev/null
+++ b/docs/closest_apple.tex
@@ -0,0 +1,13 @@
+\section{Closest apple}
+
+One interesting bot we can write is one which always moves towards the closest
+apple. Both the idea and the coding are a little tricky, but see if you can
+handle it. In order to find the closest apple, we actually want to know
+the \emph{shortest path} to the apple, and when we know that, the first step in
+that path is the direction we need to move in.
+
+To find the shortest path, we need to use an algorithm called
+\emph{breadth first search} (BFS).
+% TODO: description of the algorithm
+
+\pythonfile{closest_apple.py}