Browse Source

more acceptable demo

Bastien Sevajol 8 years ago
parent
commit
9e3f3969a8
2 changed files with 6 additions and 2 deletions
  1. 1 1
      config.py
  2. 5 1
      intelligine/synergy/object/ant/Ant.py

+ 1 - 1
config.py View File

@@ -70,7 +70,7 @@ config = {
70 70
             'cant_put_still': 5
71 71
         },
72 72
         'put': {
73
-            'max_objects_at_same_position': 1,
73
+            'max_objects_at_same_position': 5,
74 74
             'max_put_fail_count': 20
75 75
         }
76 76
     },

+ 5 - 1
intelligine/synergy/object/ant/Ant.py View File

@@ -6,6 +6,7 @@ from intelligine.cst import CARRYING, TRANSPORTER, ATTACKER, COL_TRANSPORTER, CO
6 6
 from intelligine.synergy.object.Food import Food
7 7
 from intelligine.simulation.object.molecule.MovementMoleculeGland import MovementMoleculeGland
8 8
 from intelligine.simulation.object.brain.AntBrain import AntBrain
9
+import random
9 10
 
10 11
 
11 12
 class Ant(Bug):
@@ -23,7 +24,10 @@ class Ant(Bug):
23 24
                                                            COL_FIGHTER])
24 25
         self._carried = None
25 26
         #  TODO: Comme pour lorsque une action put est faite, lancer un algo de choix de la mission a suivre.
26
-        self._brain.switch_to_mode(MODE_EXPLO)
27
+        if random.choice([0, 1]):
28
+            self._brain.switch_to_mode(MODE_EXPLO)
29
+        else:
30
+            self._brain.switch_to_mode(MODE_NURSE)
27 31
         context.metas.list.add(TYPE, self.get_id(), TYPE_ANT)
28 32
         self._put_fail_count = 0
29 33