17 novembre 2017
After a rather very long break, I just restarted working on Freewill. I always like to step away from a project for a while : it helps you spot problems in your code or design whenever you have those « what the f*uck is this code doing? » moments! I had a few of those and this will make the code much cleaner hopefully! Besides, one very bad design decision I made early on will be corrected!
I am also currently adding (as you can see) more and more examples.
Expect Freewill by Xmas!
P.S. And expect it to be 100% Squeak compatible as well! ;)
16 décembre 2016
If you’re into computer chess and genetic algorithms like me, this paper is definitely worth reading!
22 novembre 2016
Not much new code was done since the last update. But since I usually like to put my projects aside for a while just to have those « WTF-was-I-thinking » moments looking back at my own code, I took some time to scribble a skeleton of a FAQ and design a logo.
So coding of Freewill restarts today… with a fresh look at my code!
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.
(Click on image to enlarge)
Eight queens is fun. Ten queens is better. But 30 queens is even better!
2 octobre 2016
(Click on image to enlarge)
After a break from Freewill (I like to put projects aside for a while, it gives me another perspective on my own code!), I just came back to it yesterday. I had a few WTF moments (it’s usually a good indication that your code is not clear!), renamed some methods with imprecise names, cleaned up some of Ruzzle’s crumbs that were sprinkled everywhere, refactored code here and there, looked at what Code Critics came up with and corrected some of the issues, ran a few tests and finally got fed up by performance issues.
I got rid of the SharedRandom number generator that was previously used in Freewill. This resulted in a huge speedup! From what I measured, the Random class is 2.1 times faster than the SharedRandom one! This change alone brought a performance boost of 31-48% ! I also cached the cumulative weights for the Roulette Wheel selection policy which gave me a 14% speedup! There are still a few things I want to optimize here and there and my estimates tell me I could get another 15-45% speedup.
I’ll start adding tests to cover all policies (creation, selection, crossover, mutation, termination) to make sure the next changes don’t break anything. This will also give me reproduceable tests against which I’ll get more precise statistics to measure performance. I will also start working on another example, most likely the 8 queens problem.
To Do List Until Next Update
- 8 queens problem
- Policies Tests
- Speed up Roulette Wheel selection
- Start to add class/method comments
- Code 2-3 more termination policies
- Think about Freewill’ community (Google group? Mailing List? Repository? etc.)
8 août 2016
(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 ! 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!
 Note: for those who are wondering what I am talking about, I explain that ruzzle quest here (in French).
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.