From 5d617ed918d9fe98a0155dea87dd402ec66fb84e Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 12 Aug 2015 17:50:20 +0200 Subject: fix old runaway corridor size (was twice as large as needed) --- strategy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strategy.py b/strategy.py index 961a4e1..a1937e2 100644 --- a/strategy.py +++ b/strategy.py @@ -25,8 +25,8 @@ class Strategy: 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): angle = math.atan2(relpos[1],relpos[0]) - corridor_width = 2 * math.asin(cell.size / dist) - forbidden_intervals += canonicalize_angle_interval((angle-corridor_width, angle+corridor_width)) + corridor_halfwidth = math.asin(cell.size / dist) + forbidden_intervals += canonicalize_angle_interval((angle-corridor_halfwidth, angle+corridor_halfwidth)) runaway = True # wall avoidance -- cgit v1.2.1