DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.79k stars 1.12k forks source link

GP only supports Python language? #338

Open yxliang01 opened 5 years ago

yxliang01 commented 5 years ago

From what the docs and a quick look in the GP module look like, the GP module of DEAP only supports the Python language. E.g. compile can only instantiate it as a python function. However, I would like to perform Genetic Programming with DEAP on other languages(e.g. C), anyone can give a suggestion on how I should approach this?

Thanks

1kastner commented 5 years ago

This is not about the module, this is about programming languages can work "hand in hand". If two programming languages should exchange variables, they need to run on a common platform. Some of those are .NET, mono, or th Java Virtual Machine (JVM). There are implementations of Python out there which run on such a platform. It usually means somebody has re-implemented the whole programming language for that! After you made DEAP work on such a common platform, you also need to make your actual project run on it as well.

If you are lucky, your code also works inside Python with https://github.com/albertz/PyCParser

As a summary, making both your non-Python project and this library work in harmony will take a while and needs some serious learning process on how programming languages work on operating systems on your side.

yxliang01 commented 5 years ago

@1kastner I am afraid you misunderstood my question. My question is that "whether the genetic programming module implemented in this project supports generating code that is not Python". If no, I am looking for some suggestions of how I should approach for such purpose. This is not about how to execute code written in languages that is not Python with Python, or their inter-communications.