[Icfp04-discuss] Ant optimizers?

Rares Ispas rares at raisoftware.ro
Thu Jun 10 22:20:06 EDT 2004


Hello,

Such an optimizer will destroy the ant for sure, the ant's memory depends  
on identical codes in different places to embedd state information, it is  
the only working memory the ant has.

So try to use the compressed ant, it will not work as well as before, if  
at all.

Rares

On Thu, 10 Jun 2004 13:56:56 -0400, Jack Diederich  
<jack at performancedrivers.com> wrote:

> Did anyone write a state optimizer?  I didn't, but I just banged
> one out (50 lines of python, I'm sure someone could write a one-liner
> in perl).  If two lines are the same, anyone that goes to one could
> go to the other instead.  These two are interchangeable:
>
> line 10:  Sense Ahead 10 15 Food
> ..
> line 99:  Sense Ahead 10 15 Food
>
> So any place w/ a target of 99 could have a target of 10 instead
>
> On *nix, to find the _minimum_ number of duplicate states,
>> sort -u name.ant | wc -l
>
> But once you do that substitution, some more lines are likely identical.
> Rinse and repeat.
>
> The sample ant goes from 400 states down to 160.
> The fatest ant I've seen (phANTomas-2.ant) goes from 8671 lines down
> to 949,  11% of it's original size.
>
> Oops, I just checked dunkosmiloolump-1.ant and it reduces by zero,
> so at least one team wrote an ant optimizer (either post optimizer
> or built into their generator).
>
> -Jack
>
>
>
> _______________________________________________
> Icfp04-discuss mailing list
> Icfp04-discuss at lists.seas.upenn.edu
> http://lists.seas.upenn.edu/mailman/listinfo/icfp04-discuss



-- 

Regards,
Rares Ispas
RAI Software SRL, Bucharest, Romania
mail: rares at raisoftware.ro
office: +40 21 312 64 59
cell: +40 722 475 870
site: www.raisoftware.ro


More information about the Icfp04-discuss mailing list