GPdotNET
GPdotNET – project
GPdotNET Blog posts
- Function optimization with Genetic Algorithm by using GPdotNET
- Implementation of Traveling Salesman Problem with GPdotNET
- How to optimize analityc function in GPdotNET
- Golden Ratio and GPdotNET v2 User Interface
- GPdotNET v2.0 Feature Complete Milestone Reached
- GPdotNET v2.0 announcements
- Optimization new feature in GPdotNET v2.0
- GPdotNET v2.0 is comming
- GPdotNET v2.0 first look
- GPdotNETv2.0 for Linux now is on code.google.com
- GPdotNET Session at KulenDayz 2012
- Skrgic Selection in GPdotNET - 20.Okt.2011
- Yet another scientific work based on GPdotNET - 27. Sep. 2011
- How to add custom function in GPdotNET - 12. Jun. 2011
- GPdotNET v1.0 released - 9. Jun. 2010
- GPdotNET Beta2 released - 4. Jun. 2010
- Fixed memory problem with GPdotNET beta - 16. May. 2010
- GPdotNET on .NET 4.0 Client Profile - 13.May.2010.
- The New version of GPdotNET is coming soon - 10. Jan. 2010
- Modelling with GPdotNET Tutorial - 25. November.2009
- GPdotNET Quick Tour - 05.November. 2009
GPdotNET is open source project, published on http://gpdotnet.codeplex.com
GPdotNET is artificial intelligence tool for applying Genetic Programming and Genetic Algorithm in modeling, forecasting and optimization of various engineering problems. It is .NET (Mono) application written in C# which can run both on Windows and Lunux OS as well as OSs which support Mono.
1. Program description
GPdotNET is artificial intelligence tool for applying Genetic Programming and Genetic Algorithm in modeling and optimization of various engineering problems. It is .NET (Mono) application written in C# programming language which can run on both Windows and Linux based OS. Project started in 2006 within postgraduate project for modeling and optimization with evolutionary algorithms. As open source project, GPdotNET is first published on November 5 2009 on codeplex.com. GPdotNET is very easy to use. Even if you have no deep knowledge of GP and GA, you can apply those methods in finding solution. The project can be used in modeling any kind of engineering process, which can be described with discrete data, as well as in education during teaching students about evolutionary methods, mainly GP and GA. The project is licensed under GNU Library General Public License (LGPL). For information about license and other kind of copyright please see http://gpdotnet.codeplex.com/license.
The project is hosted at http://gpdotnet.codeplex.com for Windows users, as well as http://code.google.com/p/gpdotnet for Linux users. Main place for all news, documentation and code changes is my blog site at http://bhrnjica.wordpress.com/gpdotnet.
If you have never heard about GP and GA, recommendation for getting basic information about GP is http://en.wikipedia.org/wiki/Genetic_programming. The wiki page also contains some links to other web sites about GP. For GA there is wiki page which contains a basic information about GA at this link http://en.wikipedia.org/wiki/Genetic_algorithm.
GPdotNET v2.0 supports the following types of modeling and optimizations (see picture below):
- Model for Discrete Data – modeling with/or without prediction of discrete data by using Symbolic Regression modeling with GP
- Model&Opt. for Discrete Data - modeling with/or without prediction of discrete data by using Symbolic Regression with GP and Optimizing calculated GPdotNET model by using GA
- Model for Time Series - Time Series modeling and prediction data by using Symbolic Regression with GP
- Optimization of Analytic Function - optimization of analytic defined function by using GA
2. Cross OS and Cross platform software
One of the main requirement for GPdotNET v2.0 is ability to run on multiple OS, by using .NET and Mono framework. So GPdotNET v2 can run on all OS where Mono is implemented. During the implementation every piece of code is tested against Mono. When code is not compatible with Mono, it was replaced with the code available in Mono. I can say that the whole implementation is done using Visual Studio and MonoDevelop, working on Windows and Fedora 17. I didn’t have much time to test GPdotNET on OS other that Windows 7 and Fedora 1, so every bug report would be appreciated.
3. Modeling Tool based on Symbolic regression
GPdotNET is developed primary for modeling discrete data e.g. experimental observation from which we need to build a model. GPdotNET support almost unlimited number of input variables (up to 2000) and one output variable. It supports live simulation during program run. All GP and GA parameters can be customized. User also can choose between more than 40 arithmetic functions to be included in model.
4. Optimization of GPModels
GPdotNET v2 can run optimization of calculated GP Model. Optimization is very important for any engineering system.You can perform optimization after you perform modelling and got result. In fact you can run optimization and modeling as much as you want with only one constrains: You cannot run Optimization and Modelling at the same time.
5. Optimization of analytically defined function
GPdotNET v2 now supports optimization of any analytically defined function. You can defined function in Tree expression designed, define constrains and perform optimization.
6. Info tab in Model
When you start with modelling and/or optimization a new Info Tab is created as well. Info tab contains rich edit control in which you can paste or load any rich text content from text to picture. On this way, you can attach textual information of you model.
7. New text based file format *.gpa
GPdotNET V1.0 supported binary file format, and for large population size the file size was also big. On the other hand, with text file format you have possibility to modify file outside the GPdotNET. For example you can see whole population chromosomes, and see other data you are interesting in. You can also perform some manual modification if you like, by modifying training or testing data as well as parameters. In general manual modification file is not recommended.
8. Support for Excel and CSV export
Exporting in GPdotNET v2 is based on openXML file format, but there is some compatibility issue in Mono, so you cannot use Excel exporting in Mono. While you ruinning GPdotNET v2 on Mono you can export data in CSV file format. This is only one feature which is not running in both Mono and .NET.
9. New Look& Feel
Unlike previous version, GPdotNET v2 has new simplified GUI with only one big toolbar containing all available options, by removing all unnecessary options. Commands are split in to 4 major groups: Model, Modelling, Export and Common. It is very simple and gives you all options directly on the screen. Run, Stop and Optimize commands are shifted to main toolbar, in order to give use ability to stop or run programs from any tab page, not only from run page.
10. System requirenments:
- For running GPdotNET application
a.) OS - Windows XP SP2 or newer, other OSs which support Mono
b.).NET Framework 4.0 Client Profile, or Mono 2.8
- For development of GPdotNET
a) Visual Studio 2010 (expr, pro, ult), .NET Framework 4.0, MonoDevelop



















It seems to work fine, except that when I press “START”, I always get the error message: “Greska u formiranju modela experimentalnih podataka”
Can you help?
thanks!
Scott Gordon
Thanks for interesting in my project.
The error is about your experimental data. Maybe, your training data set and testing data set are not the same dimensions. Can you provide me with more information about error, or you can send me your experimental data to see whats wrong.
Thanks.
Thanks for responding so quickly. I get the same error with your SRsample data. Perhaps I am doing something wrong? I am running the .exe version. I first click the new icon. Then I go under the “data” tab and click “load training data”. I choose your SRsample_training.csv file. Then I click “load test”, and choose your SRsample_test.csv file. Then I move to the Run tab and click “start”. I then get the error message.
You probably didnt install ParallelFX CTP June 2008, library for parallel programming with .NET.
You can find it on MS site or you can download dll from here
http://cid-8b11bbbf3f0ed903.skydrive.live.com/browse.aspx/Public/ParallelFxJuneCTPDll?uc=2&isFromRichUpload=1
In source code of http://gpdotnet.codeplex.com you can also find subversion with Visual Studio 2010 Beta 2 or RC project. Try to compile and run.
Thanks, I’ll try those. The MS site does not distribute parallelFX ctp june 2008 any more, so I’ll have to try your link, or compile under the VS 2010 beta or RC.
Your copy of the dll wouldn’t install using Regsvr32. Am trying the beta VS.
Just put System.Threading.dll in to folder of gpdotnet.exe.
I tried that, same error.
Then you need some other components. Which version of .NET Framework is installed on your machine?
GPdotNET only support .NET 3.5 SP1. So if you have older version of the .NET probably this cause the error.
Yes, I have 3.5 SP1. So now I’m trying to compile using the _src folders. I can open the .sln file, but when I try to build it can’t find the System.Threading.dll. Which folder in the project should I put it in so the compiler can find it? Thanks again.
Here is compiled version with parallelfx. Just download and run. If you have .NET 3.5 with Sp1 it should work corectly.
http://cid-8b11bbbf3f0ed903.skydrive.live.com/self.aspx/Public/GPdotNETBin/GPdotNETWithPArallelFX.zip
You’re a genius… that one works! I am going to enjoy playing with it. Thank you very much for spending the time helping me out.
Quick update… although the program is running now, it starts consuming a lot of memory and quickly freezes – must be stopped from the task manager. I’ve reduced lots of the parameters (pop size, tree depth, etc) and it doesn’t seem to make a difference. Also tried it on two different machines. During 2nd or 3rd gen it has frozen. If I change to “single core” in settings, it freezes during 1st gen.
I didn’t experience that problem. For about 100 training point and population size 500 with about 10 tree depth level, evolution completes below second. Naturally during the runs of algorithm consuming more memory cause the population contains bigger chromosomes but not to freeze the program.
I just tried it in our university’s advanced lab with 64-bit machines, and it froze the same as it does on my two 32-bit machines. Have you tried it on a variety of workstations? thanks.
hello everybody.I just want to thanks developer. GPDOTNET is a really useful application good job.
but in final step of using app I always have problem when I’m exporting results to excel. the formula doesn’t work!
any idea?
for example this one:
(((((((R5+(R1*((R1*X1)+R4)))/R1)+(((((((R4/X3)+(R4*X2))*R5)-(((R1+((R5/R5)+(X1+X1)))+(R2+X3))+((R4/R5)+(R4*X2))))+(R3+(X3*R5)))/R3)+((R6*X3)+((R5*X1)+(((X1+R6)*((((X2*X2)+(X1-X3))+(R6/R3))+(R6+R1)))+(R6+(R6/(((R5*R1)+(X1-R5))+(R5/R5)))))))))*X1)+((R6+R6)/R4))/(((((((((R3+(R6+R4))+R6)*((((R5*R4)+(R3/X1))+((R4+R1)+(R2-X3)))+R2))+(R6/R3))+(X1+((X1*((R6+R1)+X1))+(R6+R1))))/(R3+R1))+((R5*((((R5*R4)+(R3/X1))+(R4+(R2-X3)))+R2))+((R1+R6)/((R1*R4)+(R1+R6)))))/R1)+((R1+X3)*((R1/R4)+X2))))+((((((((R4/X3)+(R4*X2))*R5)-(((R1+((((R1+R5)*(R3*X1))/((R3*R6)+(X3+X1)))+(((R6+X3)+(R2/X2))+X1)))+(R2+X3))+((R4/R5)+(R4*X2))))+(((R5*X1)+(((X1+X1)*(((((R1+R4)*(R5+R2))+((R6*R3)-(R1+R5)))+(R6/R3))+(R6+R1)))+(R6+(R1/((((X1+R1)*(R6+R2))+((R2*R3)-(R1+R5)))+(R5/R5))))))+(X3*R6)))/R3)+((R6*X3)+((X1*R3)+(R6+R1))))+(((((R3+R3)*((((R5*R4)+(R3/X3))+((X1+R1)+(R2-X3)))+R2))+(((((R4+(R6+R4))+R1)*((((R5*R5)+(R3/X1))+((R4+R1)+(R2-X3)))+R2))+((((((R4/X3)+(R4*X2))*R5)-(((R1+(R5+R2))+(R2+X3))+((R4/R6)+(R4*X2))))+(R3+(X3*R6)))/X1))+(((((R3+(R6+R4))+R6)*((((R5*R4)+(R3/X1))+((R4+R1)+(R2-X3)))+R2))+(R6/(((((R4+R3)*R3)-((R5+R6)+(X3+R1)))+(R3+(X3*R1)))/R3)))+(R3+((X1*((R6+R1)+X1))+(R6+R1))))))+((((R4+(R6+R4))+R6)*((((R5*R4)+(R4/X1))+((R4+R1)+(R2-X3)))+R2))+(((((((R3+(R6+R4))+R6)*((((R5*R4)+(R3/X1))+((R4+R1)+(R2-X3)))+R2))+(R6/((((R2*R3)-(R6+R1))+(R3+(X3*R1)))/X3)))+(R5+((X1*((R6+R1)+X1))+(R6+R1))))/((R1*((R1*X1)+R3))+R1))/((R6*R3)+(X2+R6)))))/(((R6+(R1*((R1*X1)+R3)))*R2)+(R6/R4)))))
Thank u
Thank you for interes in GPdotNET.
Yes, you are right,it is very often happend that, and it is not problem with GPdotNET. There is solution about it trying to copy and paste formula directly in to excel in the fist row of Y column, then manually paste in other rows.
The process of exporting formula from GPdotNET in to Excel is simply paste operation, and sometimes excell does not accept the formula.
Hi ! Thanks for the article ! it’s very good , but i have а several questions :
What’s the difference between data model and time series ?
How does work prediction ?What does it predicts ?+)
Why fitness function error is increase?
Thanks for the questions. They are very common.
1) With Data model you can build mathematical model of discretized data, like experimental research with 2 or more input variable, and one and only one output.
2) Time series is stochastic process in time like weather forecast, stock exchange and so on. The data depends only of time and previous data.
When you got the result, you can export model in to Excel, and test model by other values as well as make prediction of model. But you can also load data for testing in to GPdotNET, and compare GP model with real value.
3) The fitness is normalized, so if the value is zero that is the worse result, and if the value is 1000 this is the correct solution (this is specific programming model), whatever it is maximum or minimum type of solution finding.
I am glad if you got the right answers.
Regards
Bahrudin Hrnjica
Hello,
I’m using it but actually I found out some problems; sometimes, when I repeat more time the same experiment (whitout close and re-open the application) the time consuming is high. The real problem is on my simple quartic function: it’s quite far to approssimate it. I can’t understand the reason; I tried other GP framework without changing any params; most of all are able, quiackly, to get very close to x^4 + X^3 + X^2 + X.
Start to guess I’m doing wrong something. Any suggestion?
thanks
Thank you for using GPdotNET,
I am not so sure about solution of your problem, but generally such a problem sould be solved relatively quickly.
Maybe some sugestions:
1. Did you try to run model without constants
2. Check for parameters of tree dept it would not be too big (maybe about 7)
3. Check functions set, right choose of function set will increase quality of gp solution.
regards
Why I can’t copy or cut any cell in gpdotnet after it finishs.
In Export menu, there are options which you can export all data to excel with GP model as well.
Thank you very much. But why I can’t export R or Ygp column? and what should I do if excel formula is too large? I going to plan to write article about exporting the GPdotNET results in to excel. So stay tuneed.
During export, GPdotNET gives you opportunity to copy and paste formula directly in to excel, if something went wrong. So it never be the case that you can not export data as well as formula in to excel.
Very cool project!
Here’s another that you might want to check out if you’re looking for additional algorithms/representations/etc.(unfortunately there’s no GUI yet, but everything seems to be working fine at the console) …
I’ve forked ECJ to C# .NET 4.0. The package includes everything from the original ECJ Java project, including all of the working samples.
I also wrote 500 unit tests to verify many aspects of the conversion. But many more tests are needed. In particular, the distributed computation aspects are not fully tested. That’s because I plan on converting from ECJ’s simple use of sockets to a more robust strategy using WCF and WF. I’ll also be reworking the framework to utilize TPL (Task Parallel Library). Of course, none of that is particularly relevant if you just want to lift some algorithms out of it.
Anyway, you can download the initial conversion here:
http://branecloud.codeplex.com
I am also in the process of converting several other frameworks from Java to .NET that relate to “synthetic intelligence” research (when I can find the time).
Ben
PS: ECJ is a very powerful and flexible framework for Evolutionary Computation in Java. But there are a lot of cool .NET features that could make it even better for those of us who prefer C#.
http://cs.gmu.edu/~eclab/projects/ecj/
Cool, thank you for sharing this information. Seems that your project is interesting too. Unfortunately, my every day job is different than GPdotNET which I develop in free time.
If you think I can help dont hesitate to contact me on mail published in About secton of my blog.
Regards
hello i am a beginner with this package and i cant load training test to gpdotnet because i cant open guidance picture in this page can you send me a correct file format or example file? i need it very and i don’t have time please help me))))))):
my problem was solved
:)
Hey! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done a extraordinary job!
Hi Bahrudin, I need some urgent help in WPF.
I am looking for PlacementAdapter and ParentAdapter classes examples.
My task is to create custom panel based canvas that will interact in design time (possible using PlacementAdapter and ParentAdapter abstract classes) and handle size/position of standard controls like TextBox or Label when such a control become child of the custom panel.
Any help is welcome in advance.
Hello, I downloaded source (v2beta) but opening in VS2010 says two missing projects, gpNetLib and gpWpfTreeDrawerLib. Where do I get these from?
Thanks
hi, thanks for interesting in GPdotNET. That are old projects, just delete them.
Regards
Thanks for your quick reply!
I downloaded the source from here
http://gpdotnet.codeplex.com/SourceControl/changeset/view/69709
And get folders GPdotNetv2b2, GPDotNet, BuildProcessTemplates and file GPdotNet.sln
I opened the GPdotNet.sln in VS2010 and cancel the TFS request.
If I delete the two projects then I get 10 errors – missing references in files including GP_TS_Panel, TreeExpression & GPdotNetApp
Sorry for inconvenience,
please open GPdotNETv2b2 folder
and open GPdotNET_CP.sln file within the folder.
The root solution file is for previous version but several project are deleted.
That worked. Many thanks for your help and for sharing your code, keep up the great work
Steve
:)
The final version is coming in few weeks. So stay tuned.
Hello,
Compliment for the excellent work!! Really nice!
I’ve a question/problem.
I’ve try the GPdotNET v2.0 to model a simple time series.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
The software can find very fast solutions but none of them are correct. On the prediction tab the R is 19. Am I missing something?
Thanks a lot for your work
Claudio
…Just an update.
The formulas are correct, just the field “Ygp” in the prediction tab has a wrong calculated value.
Please run my simple test case, to see it.
Claudio
Hi Claudio,
thank you for your bug report,
I have just reproduced your bug.
It will be fixed in the next probably Beta 3 version.
Note that there are still some minor bugs, which I need to fix, before I released version 2.
Regards
Bahrudin
That’s really cool!!!
I’ve also notice that the Export Gp result ->Excel/Calc , sometimes produced invalid formulas , in the formula there are reference to un-used cells.
Thanks again
Claudio
Ill take a look for this report too. It might be a bug too.
Thank you very much. You saved me a lot of time.
Feel free to drop here any strange behavior you recognize.
PS: I have already fixed your previous bug report :)
Best regards
Bahrudin
Ok…if you asked for ;-)
Click on New -> selected any GP Model -> click Run.
->UnHandled exception
Maybe an old fashion “Try and catch” around, and a nice msgbox. ;-)
Claudio
Claudio,
please take a look for Beta 3 recently uploaded version. IT contains fix for all your bug report. :)
regards
Hello Bahrudin
Everything looks perfect… ;-) Thanks a lot!
I have a request/wish.
Would it be possible to use the formula output as input on the next iteration?
To improve accuracy I normally use the formula in excel and
compute the value and use it as an additional input. I normally do this
2 o 3 times. Would be nice to have it fully automated, maybe a checkbox to control such behaviors.
What do you think?
Claudio
You want multiple output variables which can depend to one of the previous output variable. Maybe in the next next version but for now it is impossible.
Hello
Thank you for GPdotNET.
How can I convert data of excel 2007 to gpa or another for software?
Probably you asked for information how can you discrete data import in to GPdotNET, to define Training data, you will find answer in this post http://bhrnjica.net/2009/11/05/gpdotnet-quick-tour/ . Please see Chapter Data Format, BUT in V2 DECIMAL SEPARATOR IS POINT, NOT COMMA.
Pingback: GPdotNET na www.codeplex.com « Bahrudin Hrnjica Web Page
Pingback: GPdotNET alat za genetsko programiranje - Blog o C++ i C#
Pingback: GPdotNET v2.0 Beta 1 is published on codeplex.cm - C# & .NET technologies - developers.de
Pingback: GPdotNET v2 release date is Nov, 04. 2012. « Bahrudin Hrnjica Blog
Pingback: Function optimization with Genetic Algorithm by using GPdotNET | Bahrudin Hrnjica Blog