|
|
@@ -588,7 +588,7 @@ class Grid(BaseClass):
|
|
|
k_aggressive_build = 8000
|
|
|
k_aggressive_build_for_defense = -6000
|
|
|
k_aggressive_build_tension = -1000
|
|
|
- k_first_rounds = 5000 # on décourage le build lors des premiers rounds, il bloque l'avancée
|
|
|
+ k_first_rounds = 8000 # on décourage le build lors des premiers rounds, il bloque l'avancée
|
|
|
|
|
|
k0_recyclers_owned = k_recyclers_owned * len(self.owned_recyclers())
|
|
|
|
|
|
@@ -775,12 +775,9 @@ class Grid(BaseClass):
|
|
|
c = self.cells[pos]
|
|
|
|
|
|
if (c.owned and any(not self.cells[n].owned for n in self.neighbors(*pos))) or \
|
|
|
- (not c.owned and any(self.cells[n].owned for n in self.neighbors(*pos))):
|
|
|
+ (not c.owned and any(self.cells[n].owned for n in self.neighbors(*pos))):
|
|
|
move_area.append(pos)
|
|
|
|
|
|
- if contig.start == (0, 0):
|
|
|
- log(move_area)
|
|
|
-
|
|
|
# list destinations
|
|
|
for pos in move_area:
|
|
|
c = self.cells[pos]
|
|
|
@@ -833,8 +830,8 @@ class Grid(BaseClass):
|
|
|
candidate = MoveOrderCandidate(order, unit, destination)
|
|
|
q.put(priority, candidate)
|
|
|
|
|
|
- for priority, candidate in sorted(q.items, key=lambda x: x[0])[:18]:
|
|
|
- log(f"{candidate.unit.pos} -> {candidate.order.pos}, p:{priority}, a:{candidate.order.amount}")
|
|
|
+ # for priority, candidate in sorted(q.items, key=lambda x: x[0])[:18]:
|
|
|
+ # log(f"{candidate.unit.pos} -> {candidate.order.pos}, p:{priority}, a:{candidate.order.amount}")
|
|
|
|
|
|
# affect orders
|
|
|
while q:
|
|
|
@@ -911,7 +908,7 @@ grid = Grid.create()
|
|
|
|
|
|
while True:
|
|
|
grid.update()
|
|
|
-
|
|
|
+ log(f"round {grid.round}")
|
|
|
# for contig in grid.contigs:
|
|
|
# log(contig)
|
|
|
# grid.print(lambda x: f"{grid.threat(x):02d}")
|