[clean-list] Artificial Intelligence in Clean

fzuurbie@inter.nl.net fzuurbie@inter.nl.net
Wed, 14 May 2003 07:26:15 UT


This is a multi-part message in MIME format.

--_----------=_105289717511272
Content-Disposition: inline
Content-Length: 2006
Content-Transfer-Encoding: binary
Content-Type: text/plain

Alex Soares wrote:
> 1 - Is there anyone that used Clean for Neural
> Network, Genetic Programming, Fuzzy Logic, heuristic
> search, expert systems or other areas of Artificial
> Intelligence?

I have Simulated Annealing running, neatly divided in the optimization engine and the specific function to be optimized. The optimization engine contains an extra feature: you can call different state perturbation functions, stochastically depending on the 'temperature' and state properties. As a simple example, in the travelling salesman problem this lets you use wild path changes at high temperatures and gradually shift to very local and greedy path improvements as the temperature drops.

I also have a version of Simulated Annealing running for continuous variables, but without the extra feature. I translated that from the 'Numerical Recipes in Fortran' book.
 
> 2 - How efficient are these programs compared with
> equivalent implementations in C or other languages
> (Haskell, OCaml, etc.)?

I have no evidence on that. I never tried implementations in other languages. But the algorithms do not contain constructs with an inherent slow down, such as lists where arrays would be more appropriate.

> Are there source codes available?

Sure, let me know and I'll find some time to gather the modules involved.
 
> 3 - Is Clean (like others lazy, strongly typed
> languages) inappropriate for this task?

My experience is that Clean is appropriate: bugs are not so common and changes are fairly easy to make. I had some difficulties getting some functions past the uniqueness type checker though. And some functions initially built up heap where I expected them to release garbage. Such problems can keep you staring at the screen for a while.

So if your goal is just to get AI-algorithms runnning, no matter what, watch out: programming in Clean can be very rewarding from an intellectual point of view but it takes a lot of perseverance at times.

Regards Erik Zuurbier


--_----------=_105289717511272--