From 6f6f7f59f0b7aeb86fe16566c1a6d19f330dcd33 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 12 Aug 2015 20:35:52 +0200 Subject: improve(?) runaway: nonsplitkillable cells are less dangerous --- strategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strategy.py b/strategy.py index 4f93343..0cba570 100644 --- a/strategy.py +++ b/strategy.py @@ -23,7 +23,7 @@ class Strategy: relpos = ((cell.pos[0]-c.player.center[0]),(cell.pos[1]-c.player.center[1])) dist = math.sqrt(relpos[0]**2+relpos[1]**2) - if (not cell.is_virus and dist < 500+2*cell.size and cell.mass > 1.25 * my_smallest) or (cell.is_virus and dist < my_largest and cell.mass < my_largest): + if (not cell.is_virus and dist < ((500+2*cell.size) if cell.mass > 1.25*my_smallest*2 else (300+cell.size)) and cell.mass > 1.25 * my_smallest) or (cell.is_virus and dist < my_largest and cell.mass < my_largest): angle = math.atan2(relpos[1],relpos[0]) corridor_halfwidth = math.asin(cell.size / dist) forbidden_intervals += canonicalize_angle_interval((angle-corridor_halfwidth, angle+corridor_halfwidth)) -- cgit v1.2.3