Genetic Algorithms and Computer Chess

16 décembre 2016

If you’re into computer chess and genetic algorithms like me, this paper is definitely worth reading!


Ruzzle : mise à jour (2)

7 décembre 2016

ruzzle-7-dec-2016

Ce soir, dans le cadre du petit défi (tous mes articles concernant le Ruzzle sont ici) que j’avais relevé il y a de ça belle lurette, j’ai dépassé le cap des 630 millions de grilles générées à l’aide de mon algorithme génétique Freewill sans avoir encore pu dépasser la marque de la meilleure grille de ruzzle (comportant 1634 mots) établie par Didier Müller.  J’ai trouvé plusieurs fois des transpositions des 2 meilleures grilles que lui-même avait trouvé mais je n’ai jamais pu faire mieux!

La recherche de cette meilleure grille va tout de même se poursuivre jusqu’à ce que j’aie terminé la première version de Freewill mais à moindre vitesse!  Il est temps que je me réapproprie quelques CPUs de mon ordinateur!


Deep Learning : votre propre cerveau artificiel avec Python

6 décembre 2016

Une très intéressante et éducative conférence sur le deep learning et Python avec Nicolas Audebert (@nshaud sur Twitter).

 


Freewill in progress (4)

3 octobre 2016

I’m done working on the 8-queens problem.  But while I was at it, I though I’d try something a little bit harder to solve.

30-queens(Click on image to enlarge)

Eight queens is fun. Ten queens is better.  But 30 queens is even better!


Freewill and Ruzzle

8 août 2016

Muller Record

(Click to enlarge)

Freewill already shows very good results!

My heart just stopped when I read the last results on the Transcript!  I had done it!  1634, my goal, had been achieved [1]!  I had broken Didier Müller’ record!  The maximum number of French words a ruzzle grid could contain was 1634!

The joy didn’t last long! I quickly realized that I had only equaled Müller’s record (see his results here), finding just another transposition of the 2 grids he had found.

But it’s promising!  The same iteration also found a grid with 1625 words in it, which is still better than Müller’s second best!  I’m currently setting up parallel workers to run 5 genetic algorithms at the same time. And this time, I’ll be looking for grids with more than 1634 words!

I want to break that record!

[1] Note: for those who are wondering what I am talking about, I explain that ruzzle quest here (in French).

Save

Save

Save

Save


Genetic Algorithms Introduction

7 août 2016

Interested in genetic algorithms?  Here’s a quick-and-short list of some of the best free material out there to get you started.

If you ever get serious about genetic algorithms, I recommend you buy Goldberg’s book Genetic Algorithms in Search, Optimization , and Machine Learning.

Save

Save


Freewill in progress (2)

3 août 2016

Freewill Selection Policies(Click to enlarge)

What’s up?

As you can see, Freewill now supports 17 different selection policies.  At this point, all of them are coded but only half of them have been tested.

The 11 available termination policies are coded, half of them tested.

So far, only 2 mutation policies are available.  Both of them are coded and tested. I will probably need a few extras for TSP type of problems as well as numerically parametrized problems (e.g. De Jong functions with a domain for each variable).  I’ll probably add 3-4 other ones specific to the problem that started all this adventure!

Only one immigration policy (no immigration!) is available and it will stay that way for a long time.  I’ll wait until I am hyper confident that this framework is rock solid before introducing parallelism and exchange of individuals between « islands » (i.e. simulations).  This one is a faaaaaaar away!

Six crossover policies are available as of now .  This area will require some (minor I think at first glance) changes for the TSP type of problems : not quite decided on the approach I will take to solve this.  Since crossover is often very problem/chromosome specific, I’ll probably delay those change until the end, once I have all examples coded and ready to be tested to have a better idea of what is needed.  But I will definitely add a few (3-4) crossover policies tailored for the Ruzzle problem.

I have solved the discrepancy (see here and here) between my results and the TSPLIB ones regarding the tour length of the Burma14 problem.  Will probably add a lot bigger TSP problem to see how the framework can handle an extremely huge search space! Oh!  And I need to clean up all the crap I added/modified while looking for the problem of « distance difference » : 2 classes were butchered in the process!

I need to add a few « crash test dummy » classes to test all those different selection policies (and crossover) in a simpler and more efficient manner!  Or I should kick myself in the %*&#$!@ and code the « bits » example classes…

I will soon work on a customizable display of statistics.  All that’s needed is already there, it’s just a matter of gluing everything together!

Once I’m done with the 8 queens problems, I’ll attack the numerically parametrized problems.  Will probably have 2-3 examples (from De Jong functions) as well as the INSANE Griewank function.

The classes used for randomly choosing the next parent chromosomes as well as scaling/ranking can be optimized.  But since they just work great since day 1, I’ll keep that for the very end.  But I know they can be a lot faster than what they are right now.

I also plan on having a very basic export mechanism so I can dump all those ruzzle chromosomes in a MySQL database to be able to do some reporting and study the various policies and their effects.

I started adding comments to the classes, mostly to keep references, maintain a todo list per class and add some notes for myself to quickly remember why things work that way!

I’ll probably have an image by tomorrow that will run simulations for the ruzzle problem full-time. I wanna beat that record!

 

Save

Save

Save

Save