6

I want to create an algorithm using genetic programming, based on symbolic regression.

I read some articles about that, some examples written on java or c++.

Maybe is more difficult because it isn't OOP, but is it possible to develop genetic programming in C?

What do you suggest to me to start programming? Any books/articles/examples to read? I tried googling about that, but I didn't find anything interesting..

Thank you, cheers.

Alberto Solano
  • 7,972
  • 3
  • 38
  • 61
  • 4
    Huh? C may not be an object-oriented language, but it's perfectly possible to write object-oriented programs in C. – Ben Voigt Jun 11 '11 at 16:00
  • 2
    I don't know a lot of thing in genetic algorithmic, but you can do everything in C, including OOP, though it may be a bit harder. I still recommend you to use a higher level language to have a more abstracted representation of your problem. – Jaffa Jun 11 '11 at 16:02
  • @Ben Yes, I wrote "Maybe is more difficult because it isn't OOP", because C is not an OOP language. @Geoffroy Thank you, I consider this opportunity, but C is the language I know better than others programming languages, like Java. – Alberto Solano Jun 11 '11 at 16:10
  • 2
    This term "OOP language" is confusing. The language is not object-oriented, but if you use it to write a program that is object-oriented, it's an OOP, and wouldn't the language used be an "OOP language"? Anyway, genetic programming doesn't rely on any of the OO fundamentals, such as polymorhpism or encapsulation, so it really isn't any more difficult to write in C. – Ben Voigt Jun 11 '11 at 16:17
  • @Ben Thank you. I understood the difference. :) – Alberto Solano Jun 11 '11 at 21:20
  • 3
    John R. Koza's original TinyGP was written in C, you could probably find it if you ask google nicely or just convert the java code to C, http://cswww.essex.ac.uk/staff/rpoli/TinyGP/ –  Aug 22 '11 at 10:45

4 Answers4

6

I've used GAUL in the past, and I'm fairly certain it's written to work with C. It did the job for me.

Chris Eberle
  • 47,994
  • 12
  • 82
  • 119
2

What do you suggest to me to start programming?

If you're starting to program I highly recommend a modern language that comes with a rich set of libraries and is more forgiving to beginner's mistakes.

Free environments are available for most languages, personally I'd suggest C# (using either the free MS stuff or Mono) or Java (using Eclipse).

Groovy or Python are good choices, too.

You most definitely won't start with C, that is assuming you're not constrained by some particular environment your solution has to run on that only supports C.

Just my 2c ;-)

Cheers, Jay

Jay
  • 6,572
  • 3
  • 37
  • 65
1

It's definitely possible to implement genetic algorithm with C. If you just wanna focus on the algorithm experiments without the machine details and have not yet known C, then I recommend python.

Timothy
  • 4,467
  • 5
  • 28
  • 51
0

TinyGP was originally written in C so yes, it is possible to implement genetic programming with C. For genetic programming I would recommend the Fiueld Guide to Genetic Programming since its freely available and has a lot of references. It is very practically-oriented but not as thorough as other texts.