At 03:50 AM 2001-05-26 -0700, Paris Sinclair wrote:
>[...]
>So, what is really needed in the area of Perl AI and GA/GP is for CPAN to
>have a robust set of modules implemented in C, with implementations for
>all of the common algorithms. Sadly there are only a few things there.
>
>Then we will set up some benchmarks. ;)

It was ages ago that I did this so my memory is a bit hazy on the details,
but I once took a maze-generation algorithm that was recursive (I think it
was using recursion as the basis for backtracking) and implemented it in
Perl.  When it was done and working, I happened to also have a
non-recursive implemention in C to benchmark it against.
>From the way people talk down recursion and Perl, I expected a recursive
Perl program to run at least ten times as slow as a nonrecursive C program
that does the same thing.  The difference was "minimal" -- i.e., the Perl
program was slower, but no more than twice as slow, or else I'd remember
saying "guh! five times slower!?!" instead of merely muttering "so who said
recursion is slow?" and then going off to play Tetris.


And on that note, I disagree with the implications made on this list
("Memory is cheap; time is expensive" being a quotably short one) that AI
is necessarily always time-critical.  A time difference of, say, 4x is bad
if you're talking hours or days, but if the timescale is in single seconds
(as they typically are in the things I'm fiddling with these days), then
/I/ typically don't mind at all.  When AI is technology (i.e., you
developing something slick for everyone to use), speed is often a concern;
but when AI is science (trying to see what's possible, what algoriths even
work, etc.), execution speed often isn't so much of a limiting factor.


--
Sean M. Burke  [EMAIL PROTECTED]  http://www.spinn.net/~sburke/

Reply via email to