Month: March 2009

Article, Genetic Algorithms, News, Philosophy, Science

Considerations regarding Karl Popper’s philosophy of science and Evolutionary Algorithms

There is a portuguese version of this post here.

I am a big fan of the Karl Popper’s philosophy of science, so I decided to write something about what I find interesting in his philosophy, especially in relation to rational criticism, to talk later a little bit of what I think about this in relation to Evolutionary Algorithms (EAs).

karlpopper

Popper, in his book “In Search of a Better World” (the original title is “Auf der Suche nach einer besseren Welt“), cites the importance of rational criticism in science and combat the dogmatism of belief in the scientific authority. For me, this idea, despite intrinsic in the thoughts of many philosophers, was not so clearly exposed as Popper did, the clarity with how Popper gives us the insight about how the science grows and improves through rational criticism is remarkable, and I’ll try to summarize here what he tried to explain for almost whole life.

(more…)

Genetic Algorithms, Pyevolve, Python

Pyevolve on Sony PSP ! (genetic algorithms on PSP)

Sony PSP can be more interesting than funny sometimes. Few people know about the potential of the PSP port of Stackless Python 2.5.2. This great port of python was done by Carlos E. and you can find more information about the progress of the port on his blog.

Well, I’ve tested the Pyevolve GA framework on the Stackless Python for PSP and for my surprise, it worked without changing one single line of code on the framework due the fact of Pyevolve has been written in pure Python (except the platform specific issue like the Interactive Mode, but this issue is automaticly disabled on unsupported platforms).

So now, we have Genetic Algorithms on PSP.

Follow some screenshots (click to enlarge):

psp2psp1

The GA running on the PSP screenshot is the minimization of the Sphere function.

Here is the steps to install Pyevolve on PSP:

PSP Stackless Python Installation

1) First, create a directory called “python” on your PSP under the “/PSP/GAME” and the directory structure “/python/site-packages/” on the root of your memory stick (this last directory will be used to put Pyevolve later).
2) Copy the EBOOT.PBP and the python.zip files to this created directory;

Pyevolve Installation

3) Download the Pyevolve source and copy the directory called “pyevolve” to the created directory “/python/site-packages/”, the final directory structure will be: “/python/site-packages/pyevolve”

Ready ! Now you can import Pyevolve modules inside scripts on your PSP, of course you can’t use the graphical plotting tool or some DB Adapters of Pyevolve, but the GA Core it’s working very well.

Here is some basic usage of PSP Stackless Python port. I’ve used the psp2d module to show the information on screen. When I got more time, I’ll port the visualization of the TSP problem to use the psp2d, it will be nice to see Traveling Salesperson Problem running with real-time visualization on PSP =)

Related Links

Google Code Project of PSP Stackless Python

Genetic Algorithms, Pyevolve, Python

Pyevolve: the effect of Linear Scaling

There’s an interesting graph in Pyevolve which is a heat-like graph of the population raw and fitness scores. In this graph you can note the effect of Linear Scaling over the scores, the raw scores graph is in left and the fitness scaled scores is in the right, this plot uses the Gaussian interpolation method.

linear

This graph feature is very interesting to study the effects of selections and scaling schemes and even to see the propagation of best individuals on the population while evolving, I think this graph should be more explored.