
When I was a student I built genetic algorithms in C and Java. I know
that building them in Haskell would be easy, with some little and very
descriptive code, but I have no experience with Haskell's performance.
It would be easy to tweak the algorithm and that's were you should
make you first attempts towards a faster implementation, but the
difficult part may be memory consumption, strict and lazy evaluation
strategies, etc (see
http://users.aber.ac.uk/afc/stricthaskell.html#seq).
On Fri, May 13, 2011 at 3:43 AM, Karol Samborski
Thank you for your answer. I'll try it and then put some code for comments ;)
Best regards, Karol Samborski
2011/5/12 AJ Sherbondy
: Karol, I don't know if you have looked at this module on Hackage or whether it will even help you, but there is an evolution algorithm the individual functions of which might be useful to you and is described as follows: AI.SimpleEA
A framework for simple evolutionary algorithms. Provided with a function for evaluating a genome's fitness, a function for probabilistic selection among a pool of genomes, and recombination and mutation operators, runEA will run an EA that lazily produces an infinite list of generations.
AI.SimpleEA.Utils contains utilitify functions that makes it easier to write the genetic operators.
ajsher
On Thu, May 12, 2011 at 10:24 AM, Karol Samborski
wrote: Hi all,
I'm a student and I got recently a task to do (and I want to do it in haskell). I have to implement "genetic algorithm for knapsack problem" and it would be nice if it will be fast. So my question is: what haskell datatypes, modules etc. should I use for this algorithm to achieve this goal? I mean fast as compared to implementation in imperative languages like C.
Any advices ?
Best regards, Karol Samborski
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- AJ Sherbondy
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- Federico Mastellone Computer Science Engineer - ITBA ".. there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." Tony Hoare, 1980 ACM Turing Award Lecture.