# Find the Rogue with AOE

You are playing World of Warcraft which is well known an old MMORPG game. You are in arena where you play against another player. You are a mage and the opponent is a rogue which can hide while moving until a spell hits on him. (so it is 1v1, Rogue VS Mage)

Rogue is a stubborn player and he just wants to take the game as long as possible, so your main task is to find him first!

The arena has a square shape (20x20 unit), and your AOE (area of effect) spell has a radius of X. You can cast your AOE spell every 5 seconds, no other spell has such a behaviour, and every second you and rogue can move at most 1 unit away from their current locations. Rogue can always see you and move accordingly not to be spotted.

What should be the minimum radius of your AOE spell to guarantee to find the rogue at the end?

• Can they only move in orthogonal directions (i.e. up/down/left/right) or can they move diagonally too (or even completely freely)? Commented Feb 18, 2019 at 13:28
• @AHKieran good question, for simplicity, you may assume they move on a grid board, so only orthogonals.
– Oray
Commented Feb 18, 2019 at 15:12
• @Brandon_J what do you mean?
– Oray
Commented Feb 18, 2019 at 15:14
• Are they moving simultaneously or in turns? Commented Feb 18, 2019 at 15:37
• as the board is a grid, is the AOE a true circle or a "discrete" circle? Commented Feb 18, 2019 at 15:38

The best answer I could find is to

walk a zigzag pattern down the middle of the square. At each corner of the zigzag, fire off the AOE spell, and then move $$\varepsilon$$ to the right while using the rest of the 5 movement to go up or down, as in this diagram.

Since the maximum distance the mage gets from the line horizontally through the middle of the square (called $$\delta$$), will be less than 2.5, the part of the circle that the rogue can most easily cross will be at the edge of the square. The rogue will have two turns to go across it, because of the zigzag, so this part of the circle needs to be $$10+2\varepsilon$$ wide.

Therefore, the radius of the AOE spell needs to be $$\sqrt{(10-\delta)^2+(5+\varepsilon)^2}$$, with $$\delta = \frac{\sqrt{25-ε^2}}{2}$$

So the radius is $$\sqrt{{\left(10-\frac{\sqrt{25-ε^2}}{2}\right)}^2+\left(5+\varepsilon\right)^2}$$, with $$0 < \varepsilon < 5$$

The AOE radius approaches 9.014 m as $$\varepsilon$$ approaches 0.

To be guaranteed to catch the rogue, your AOE radius needs to be

$$\sqrt{\left( 10 \, \text{m} \right)^2 + \left( 2.5 \, \text{m} + \frac{\varepsilon}{2} \right)^2}$$ with $$\varepsilon > 0$$.

Then you will find him by

starting on the left side at middle height, such that your AOE does not leave a space left from you.

While there is still room right from your AOE repeat:

• Fire AOE spell
• Move to the right by $$\varepsilon$$ within the next 5 seconds

• good answer, and it really guarantees to find the rogue.
– Oray
Commented Feb 19, 2019 at 7:17