4

I am looking for an open source GP implementation in objective-c. I found some C++ implementation which I can embed in my obj-c project but I was wondering if there's a native obj-c implementation of GP out there.

Thanks

Rup
  • 33,765
  • 9
  • 83
  • 112
Abbas
  • 3,228
  • 1
  • 23
  • 27
  • Even if there is an obj-c implementation youre definitely better of sticking with the C++ version because its likely to be considerably faster. – twerdster Nov 02 '10 at 17:32
  • @kubi - A long while back I wrote a few Genetic Algorithm (father of GP) demos in C++ to solve travelling salesman programs and the shear number of generations that you have to go through means that any small performance lags build up and become significant hits. Perhaps Abbas' problem at hand is simple and only requires a reasonable solution or has very few children in which case this discussion is moot. – twerdster Nov 02 '10 at 18:18
  • 1
    I was more asking why you thought C++ was considerably faster. Did you start with Obj-C code and move to C++ for performance reasons with your GA? – kubi Nov 02 '10 at 20:29
  • I don't think it would be faster but if there are good C++ solutions, use them. Don't waste time finding an obj-c solution just because it's obj-c. – Sulthan Nov 01 '11 at 16:59
  • I published an article about a simple genetic algorithm written in Objective-C here: http://ijoshsmith.com/2012/04/08/simple-genetic-algorithm-in-objective-c/ Josh – Josh Smith Apr 09 '12 at 18:11

1 Answers1

3

I would recommend what the people have said in the comments,

Try to find a robust C++ implementation, if you want, you can then use Objective-C++ (basically an Objective-C file with a .mm extension instead of .m) to use this files in your project.

Some popular GP libraries in C++ are :

http://www.cs.ucl.ac.uk/staff/ucacbbl/ftp/weinbenner/gp.html (C++ Library)

http://gaul.sourceforge.net/ (C/C++ Library

I was also able to find a genetic programming example in Objective-C that you could look:

http://www.macfanatic.net/blog/2008/12/02/genetic-algorithms/ (Objective-C example project)

PS: If you're really interested in Scientific Programming under Mac OS X, you should definitely take a look at Cocoa For Scientists, there's always the option of DIY...

Goles
  • 11,599
  • 22
  • 79
  • 140