[GRASS-SVN] r56405 - grass-addons/grass7/raster/r.agent/libagent

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 25 01:46:16 PDT 2013


Author: mic
Date: 2013-05-25 01:46:16 -0700 (Sat, 25 May 2013)
New Revision: 56405

Modified:
   grass-addons/grass7/raster/r.agent/libagent/ant.py
Log:
edit comments

Modified: grass-addons/grass7/raster/r.agent/libagent/ant.py
===================================================================
--- grass-addons/grass7/raster/r.agent/libagent/ant.py	2013-05-25 08:46:00 UTC (rev 56404)
+++ grass-addons/grass7/raster/r.agent/libagent/ant.py	2013-05-25 08:46:16 UTC (rev 56405)
@@ -82,6 +82,7 @@
         and finally choosing a next step by smell and random.
         """
         positions = self.world.getneighbourpositions(self.position)
+        # check if we found a goal node, else pick a next step from the list
         if not self.evaluate(positions):
             self.nextstep = self.decide(positions)
 
@@ -119,10 +120,11 @@
         """
         # we are all only getting older..
         if self.age() == False:
+            # exit if we died in the meantime..
             return False
         # past this point we must have decided yet where to go to next..
         if self.nextstep[0] == None:
-            # so we decide it now if it is not clear yet
+            # so we'll have to decide it now if it was not clear yet
             self.choose()
             self.penalty += self.nextstep[3] + \
                                 self.world.getpenalty(self.nextstep)



More information about the grass-commit mailing list