[Icfp04-discuss] Martial Arts Question

Rolf learr at rogers.com
Fri Jun 4 23:29:50 EDT 2004


hmaon at bumba.net wrote:

>The specification indicates in one place that 
>
>"|If an ant ever finds itself adjacent to 5 (or 6) ants of the other
>species, it dies"
>
>However, in the formal simulator code given the only grid places that
>are checked for dying ants are those that are adjacent to a grid place
>that an ant has just moved.  What this means is that there could be a
>configuration of ants that is not moving, and an ant of the other
>species could wander into, be surrounded by five enemy ants, and not
>die, because his place is never checked:
>
>   . . . . . . . 
>    . . . . . . .
>   . . . x x . .
>    . . x . x . .
>   . . . . x . .
>    . . o . . . .
>
>    where o is moving northeast.  
>
>    Thus o would find himself surrounded by five ants of the other
>    species and live.  This is a contradiction.  Please disambiguate.
>  
>

Check section 2.9 again.... check_for_surrounded_ants first checks the 
center cell, then the surrounding.

Rolf


More information about the Icfp04-discuss mailing list