19 Jan 2010 @ 12:36 AM 

Over the past 2 weeks I’ve been putting time in creating a general purpose Genetic Algorithm (GA) library in C#. It provides the scaffolding for any GA based functionality. Although it’s not fully finished yet, it is now available under the GPL licence at SourceForge.

What does it provide and can it do ATM?

  • An abstract Individual class that can be inherited from to make your own individual type, with it’s own mutation, crossover, initialization and fitness functions and genotype.
  • A population class, which is basically a List<IndividualType>, which enables you to do the actual GA evolution. The evolution is done on a background thread, and events keep you up to date by reporting every time a generation has evolved, a new fittest individual is found, or the evolution is complete due to reaching the maximum amount of generations, reaching the stagnation limit or being cancelled. For the evolution you can choose between rank based selection, truncated rank based selection, and roulette wheel selection. You can also set properties like the mutation ratio, and elitism percentage.

What still needs to be finished/added?

  • The library contains a IslandGroup class, allowing you to do simultaneous evolution on multiple ‘islands’. This class still needs to be finished though.
  • The Population class contains a method for tournament based selection, but the code is not complete yet.
  • The performance of the library could probably be improved.
  • A lot of other neat things could be added, like multiple reproduction methods and varying genotype size support.

This is a class diagram of the library as it is at the moment.

Class diagram of GALib by Jeroen De Dauw

I’m going to release the TSP implementation I made with this lib on-line in a similar fashion, after the interface is fully finished. Also, once the library itself is finished, I’m going to create an article explaining how it works and should be used, and put it both on The Code Project and my wiki :)

Resources

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 19 Jan 2010 @ 12:44 AM

EmailPermalinkComments (0)
Tags
 21 Dec 2009 @ 11:57 PM 

Over the last few days, I’ve done some work on .Net download library, the successor to my FileDownloader class. I started working on this project about half a year ago, and had quite some difficulties picking up the thread again after GSoC 2009, since I was in the middle of rewriting the code I was simultaneously translating from MyDownloader, mainly with the handling of the worker threads. The core work has been completed now, meaning that you can use the lib to download files, and track their progress. This is still in experimental stage though, and the pause and resume functionality has not yet been adapted to my new worker implementation.

In any case, the first release, which will be 0.1, is in sight now. This release will cover the basic functionality promised by the library; segmented downloads in the background that you can pause and resume, and can track the progress of (percentage, speed, downloaded bytes, remaining bytes, remaining time, elapsed time). After this, I’m planning to do some big rewrites of things that come from MyDownloader I’m not really happy with. This will mainly be making the whole library more OOP and event based. Only after that I’ll start on the other things I originally scheduled, such as prioritizing downloads and bandwidth limitations. By that time, .Net fw 4.0 will probably be released, and it’s a good possibility I’ll start using post .Net 2.0 technologies then, mainly things found in the Task Parallel Library.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 21 Dec 2009 @ 11:57 PM

EmailPermalinkComments (3)
Tags
 04 Sep 2009 @ 2:55 PM 

While working on .Net download library, I realized I still didn’t know how to fire events from the background threads onto the main thread (meaning the thread that started the download by calling Start). I posted query on how to do this in vb.net on several forums, and got some helpful responses at MSDN. Apparently, the thing I’ve been searching for is called the Event-based Asynchronous Pattern, which is a general pattern for asynchronous operation’s with events. I have done some familiarization with it by doing the entire walk-through, and I also started implementing it into the Download class. I’ll probably commit my current code this weekend, hopefully with working cross thread events :)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 04 Sep 2009 @ 02:55 PM

EmailPermalinkComments (0)
Tags
 27 Aug 2009 @ 7:45 PM 

Today I again did some work on my .Net download library project. I added some stuff to the main class, Download, and also created the base of the DownloadManager class. This class will allow you to work with multiple downloads at once, by putting them in a list, and providing a variety of methods and properties that enable you to gather info or work with all or selections of the downloads.

I’m getting close to actually be able to start debugging the code, something which can take up quite some time with so much untested code.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 27 Aug 2009 @ 07:45 PM

EmailPermalinkComments (0)
Tags
 26 Aug 2009 @ 6:04 PM 

Today did quite some work on .Net download library, the successor to my current FileDownloader class.

I started off with finishing the protocol provider code (see revision 4), and then went on adding a lot of the still missing stuff to the Download class (see revision 5), which now counts almost 800 lines of code. Most changes I made are pretty much C# to VB.Net translation from MyDownloader, one of the projects I’m basing this library upon. Doing this translating also comes with the challenges of leaving out code that’s not needed (for example a hook system for protocol providers), holding into account all the name changes I’ve made, and at some points revising the logic layout of the code, since I don’t agree with the original design. I also had some great fun with working with SyncLock statements and interfaces.

Although the project is still far from a first release, the basic structure is taking form, and I’m beginning to see where and how future features will need to be added :)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 28 Aug 2009 @ 04:12 PM

EmailPermalinkComments (1)
Tags
 21 Aug 2009 @ 2:37 AM 

Now the Google Summer of Code coding period has finished, I can divide my attention between multiple projects again. Since I’ve been doing PHP and JavaScript only for over 2 months now, I’m starting off with taking a PHP-break. This means I won’t do any development of mayor new features for Maps or Semantic Maps, and definitely won’t work on any other PHP project. Of course I’ll still ensure bugs get fixed for my mapping extensions, and help people out with code when needed, but that’s about it. So basically I’m closing my Zend Studio, which has become one of my most used applications in the last months, and starting my Visual Studio again. Now I think of it, this is really awkward. I used to start my VS practically every time I booted my computer for over a year, and then only opened it a handful of times in a 2 month period.

So, what am I going to work on now? One of my last projects before I started GSoC was a VB.Net background file downloader, of which I released an article on The Code Project, and later on created a C# version. I got quite some positive feedback on this project by people, although it was initially created with the sole purpose of helping that needed a simple downloader someone out, to improve my own skills, and to demonstrate how to create a simple to implement downloader. I’m now continuing this project, by rewriting it from scratch, to both add some mayor new features, and mess around with some multi-threading stuff I’ve been wanting to try out for months now.

The mayor new features that will be added are simultaneous downloads (the current classes only support one download at a time), segmented downloads (woot!), download priorities and bandwidth limitation options. This will require a nice OOP approach, with some more advanced multi-threading. I’m basing part of my code on MyDownloader, an extremely nice C# downloader, which has quite some more functionality then what I’m doing. It’s more extensive then required for most people though, and not all that easy to implement. I also don’t really agree with some naming choices, and it lacks both code docs for devs that want to modify it, and devs that want to implement it. So clearly, I’ll put a lot of effort in keeping the new project as small and to-the-point as possible, and pay attention to easy of implementation, and usability. Another obvious difference is that this project is in VB.Net and not C#.Net. This has more advantages then disadvantages IMHO. If the project is compiled to a .dll or is used in a multi-project solution, it simply doesn’t matter what language it uses. A lot of casual programmers don’t know how to handle either, and the majority of these uses VB.Net, and not C#. And the ones that do know C# are more likely to know VB.Net then the other way around.

I’ve created a project on SourceForge to host the code, and be able to commit to the project’s SVN. Since the project now contains multiple classes, I renamed it to .Net DownloadLib.

After that project I’m planing to put some real effort into my mapping extension for MediaWiki again, and possibly to have a look at Python and Ruby. When school starts again, somewhere half way through September, some new project opportunities will probably arise for me, but I guess I’ll see that then. I’m also looking forward to ‘learning to program’ at school, which is destined to give me some great laughs. Luckily for me I’ll have to learn C++ at university, so I won’t be totally bored with it. I hope they don’t drive the low-level aspects of the language to far, since that’s pretty useless in today’s world IMHO.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 21 Aug 2009 @ 05:29 AM

EmailPermalinkComments (0)
Tags
 21 May 2009 @ 11:47 PM 

I’ve just released a new version of BN+ framework. It features a variety of new classes since version 2.0.2 plus some bug fixes and stability improvements. Also some classes have been added the the class library or control library repositories on BN+ Discussions, and a few of them now have detailed articles on The Code Project. Here you have an outtake from the release notes:

New classes
* BugSubmitter: A dialog that enables user to submit variouse types of bugs with build in validation. Sends it’s info to a webservice.
* PasswordDialog: Password editting dialog with optional authentication and live validation .
* SimpleLoginDialog: A simple login dialog that prompts for a password.
* FileDownloader: A class for downloading files in the background that supports info about their progress, the total progress, cancellation, pausing, and resuming. The downloads will run on a separate thread so you don’t have to worry about multihreading yourself.

Revised classes
* CryptoProvider: Now allows you to pass more advanced settings for AES and offers easier to use methods for RSA, DES and TrippleDES.
* CryptoStr: Has been rewritten to work with the new CryptoProvider and is now easier to use.
* Updater: A bug in the version compare algorithm has been fixed
* BruteForceAttacker: New version included (BN+ Framework 2.0.2 contained an unstable alpha build of this version)

* …

Further development
* The CyrptoProvider class will be rewritten from scratch and be made abstract, and serve as a base for separate DES, TDES, RSA and AES CryptoProviders.
* BruteForceAttacker will be made more modular and work on multiple threads.
* FileDownloader will get support for multiple downloads at the same time and segmented downloads.

I’d also like to thank everyone who helped with this project by providing bug reports, suggestions, contributions, or by simply using it!

If you are interested and consider to use this framework, please review the official topic and framework documentation.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Posted By: Jeroen De Dauw
Last Edit: 21 May 2009 @ 11:47 PM

EmailPermalinkComments (0)
Tags

 Last 50 Posts
 Back
Change Theme...
  • Users » 1293
  • Posts/Pages » 169
  • Comments » 119
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.