Genetic Programming in C?
Asked Answered
P

4

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.

Pee answered 11/6, 2011 at 15:56 Comment(6)
Huh? C may not be an object-oriented language, but it's perfectly possible to write object-oriented programs in C.Stormy
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.Hermitage
@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.Pee
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.Stormy
@Ben Thank you. I understood the difference. :)Pee
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, cswww.essex.ac.uk/staff/rpoli/TinyGPTripe
L
7

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.

Lavonnelaw answered 11/6, 2011 at 15:59 Comment(1)
Thank you for your suggestion Chris. I will read up about it :)Pee
F
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

Four answered 11/12, 2011 at 12:14 Comment(1)
+1. Thanks. I appreciate your opinion. Your answer is very fine. :)Pee
F
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.

Falange answered 18/6, 2011 at 22:50 Comment(1)
Thanks for your opinion, I'm still not sure how to implement the algorithm, I will consider python too. :)Pee
T
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.

Tripe answered 18/2, 2012 at 0:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.