Red Bayesiana


Brief explanation of the EDA source code

 

Intelligent Systems Group

 

Computer Engineering Faculty, University of the Basque Country


Last revision, March 2003

©2003 ISG group


The Intelligent Systems Group of the University of the Basque Country has developed theoretically many of the concepts of the Estimation of Distribution Algorithms (EDAs), and has been developing a program which implements all these EDAs and some more appeared in the literature. Our program implements currently the following EDAs:

  • Discrete domains: UMDA, BSC, PBIL, MIMIC, TREE, EBNABIC, EBNAPC, EBNAK2+pen...
  • Continuous domains: UMDAc, MIMICc, EGNA, EMNA...

Our group distributes the source code of EDA free of charge to the scientific community, provided that you asks it us directly by email. This page gives an overview as well as a brief explanation of the source code to aid at future researchers to develop their own EDAs and to contribute to improve our program.

Overview | Explanation in English | Explanation in Spanish | Web page of the ISG group | Email us about comments/more information/bugs


Explanation in English

All the program is compressed in the file EDA_discreto.tar.gz or EDA.zip. It is written in standard C++, and it can be compiled directly using Visual Studio under Windows, although we mainly use it under Solaris and compile it with GNU gcc. A Makefile file is included for compiling easier the whole EDA package.

The source code files included in the distribution are described as follows:

  • EDA.cc: the main file of the package, including the main function, the reading of the parameters, and the initialization of the main variables.
  • Solution.cc: definition of the main structures and classes of the whole program such as the definition of the population, choising the appropriated learning... This is the part of the program that coordinates the evolution of solutions among generations.
  • BayesianNetwork.cc: implementation of all the learning algoritms (the main part of the EDAs).
  • Population.cc: implementation of the population and its main functions.
  • Individual.cc: implementation of the individuals class.
  • Problem.cc: definition of the problem that EDAs have to optimize or find a best solution for.
  • Parallel.cc: file that is only used when willing to apply parallelism techniques to EDAs. Currently it is under progress, although the main structures in order to use threads are currently available. However, there are significant differences among different operating systems.
  • Timer.cc: set of functions for a satisfactory control of execution and finalization times.
  • Getopt.cc, Cache.cc, Chi.cc, Set.cc: other auxiliary files.

In order to apply EDAs to any particular problem, simply the file Problem.cc has to be modified since it contains the specification of the problem. Other example Problem_*.cc files are also distributed for substituting the Problem.cc file and try EDAs with other types of problems. The file Problem.cc defines the size of individuals as well as the number of values that each variable can take, and also the fitness function which measures the fitness of each individual (we call it Metric). The rest is "simply" all the different discrete EDAs as described in our book in more detail.

To start with, execute only

EDA

and you will have on the screen the whole list of parameters and options accepted by the program. For instance, a typical execution, with UMDA, would be started in the following way:

EDA -l0 -o out.dat

which would leave the results in the file out.dat, although these will also appear on the screen.

Overview | Explanation in English | Explanation in Spanish | Web page of the ISG group | Email us about comments/more information/bugs

Explanation in Spanish

Todo el programa está comprimido en el fichero EDA_discreto.tar.gz o EDA.zip . Está hecho con C++ standard, y debería compilar incluso con Visual Studio, pero nosotros lo utilizamos con Solaris y lo compilamos con GNU gcc. Se incluye un fichero Makefile para compilar todo el paquete.

Los ficheros que contienen el código fuente se describen a continuación:

  • EDA.cc: fichero principal de todo el programa, incluyendo la función main, la lectura de parámetros, y la inicialización de variables.
  • Solution.cc: definición de las estructuras y clases principales para definir una solución al problema, tales comola definición de la población, la elección del aprendizaje elegido... Esta es la parte del programa que coordina la evolución de las soluciones generación tras generación.
  • BayesianNetwork.cc: implementación de los algoritmos de aprendizaje (parte principal de los EDAs).
  • Population.cc: implementación de la clase población y sus funciones principales.
  • Individual.cc: implementación de la clase individuo.
  • Problem.cc: definición del problema a optimizar con los EDAs.
  • Parallel.cc: fichero que se utiliza para aplicar técnicas de paralelismo en los EDAs. Actualmente está en desarrollo, aunque las estructuras principales para utilizar threads están disponibles. Sin embargo, existen diferencias importantes entre los diferentes sistemas operativos.
  • Timer.cc: conjunto de funciones para control de tiempos de ejecución y de finalización.
  • Getopt.cc, Cache.cc, Chi.cc, Set.cc: otros ficheros auxiliares.

Para poder utilizarlo con cualquier problema, simplemente se debe de cambiar el fichero Problem.cc ya que es el que contiene la especificación. Se adjuntan otros ejemplos de definiciones de problemas en ficheros Problem_*.cc que pueden utilizarse para sustituir el fichero original Problem.cc y aplicar los EDAs a otro tipo de problemas. En el fichero Problem.cc se definen las inicializaciones, el tamaño de los individuos junto con los valores que puede coger por cada variable, y la función objetivo o de fitness (le llamamos Metric). El resto es "simplemente" toda la batería de algoritmos discretos que tenemos implementados y que están explicados en nuestro libro con detalle. Ejecuten simplemente

EDA

y les aparecerá la lista de parámetros. Una ejecución típica, con UMDA, se lanzaría de la siguiente manera:

EDA -l0 -o out.dat

que dejaría los resultados en el fichero out.dat, aunque también aparecen los mensajes en pantalla.

Overview | Explanation in English | Explanation in Spanish | Web page of the ISG group | Email us about comments/more information/bugs


The last version of the source code can be accessed on our lab's machine sisx08 at /disco2/programak , although it is NOT accessible outside our Faculty.
Endika Bengoetxea <endika@si.ehu.es>