EASEA v0.6b compiler

Pierre COLLET Pierre.Collet at Polytechnique.fr
Tue Jun 19 21:32:30 EDT 2001


Hello everybody,

I have been working for the past two years on a language specifically
designed to easily specify evolutionary algorithms.
A compiler comes along with the language that takes .ez files as input, to
produce pure C++ with calls to existing evolutionary libraries.
Two libraries are supported, one of which is GALib, hence my mail to this
list.

With this concept, the end-user only needs to program his fitness function
in C, as well as his specific mutation and crossover functions and EASEA
does the rest, that is: building C++ classes around the defined genome and
getting everything together to create a complete GALib or EO C++ source
file, ready to be compiled by a C++ compiler (I appended a onemax written in
EASEA at the end of this mail for reference).

EASEA Millennium Edition v0.6b was just released, and even though it is
still a prototype, it proved to be stable enough for me to send a mail on
this list.
Up to now, a parallel version of EASEA-GALib (with MPI) has been used to
optimise airfoil shapes (with FORTRAN fitness functions), and the standard
EASEA-GALib compiler is currently being used for several real-world
applications. The EASEA language is taught with success in six French
universities, and several research papers were published, which used EASEA
as an implementation language for the research projects.

EASEA can be used in several ways: the programmer can exclusively use EASEA
to write his project, or he can use EASEA as a primer, allowing him to very
rapidly write a first version of his C++ program using GALib or EO that he
can refine and tune later on directly in C++.
Finally, as EASEA can generate C++ code for EO or GALib out of the same .ez
file, it makes sense to compare both libraries on the same evolutionary
algorithm. Moreover, a .ez file can be seen as an independent way to
describe an EA. One can also take benefit of the fact that it is
recompilable on any environment to use it for comparison and exchange
purposes (EASEA runs indifferently under Windows or UNIX).

The EASEA language and compiler is now at the point where it needs feedback
from many users to evolve towards an optimal language (a meta-evolution ?
:-). Therefore, EASEA is available on the
http://sourceforge.net/projects/easea/ repository, and two mailing lists
were created a couple of days ago so that users can share their experience
with the language, like you share your experience on GALib on this mailing
list.

The first one (http://lists.sourceforge.net/lists/listinfo/easea-help)
should obviously be used whenever help is required, while the second one
(http://lists.sourceforge.net/lists/listinfo/easea-dev-issues) is dedicated
to discussions on missing features, future developments, ...

I would very much like to hear from you on those mailing lists so that you
could tell me which features you are missing most, whether you had
difficulties with installing the software, ...

Well, I need you all to guide me towards the good direction.

I append at the end of this mail an example of a onemax coded with EASEA, so
that you can have a feeling for what the language looks like.

If you download the EASEA compiler, you will be able to compile this basic
example (provided with EASEA) with the "easea onemax -galib -v" command.

Looking forward to hearing from you on the mailing lists,

Tell me what you think...

Thanks for your patience,

Pierre COLLET

___________________________________________________________________________

                   Pierre COLLET  --  DREAM European Project
          Centre de Mathematiques Appliquees -- Ecole Polytechnique
                       91128 Palaiseau cedex -- FRANCE
               Tel. +33 (0)3 85.57.16.46 / +33 (0)1 69.33.46.19
                URL: http://www.cmap.polytechnique.fr/~collet/

____________________________________________________________________________

                         EVOLUTION ARTIFICIELLE 2001
            5th International Conference on Evolutionary Algorithms
                   October 29-31 2001 - Le Creusot - France
                        Submission date may 11th 2001
                 URL: http://www.cmap.polytechnique.fr/~ea01
____________________________________________________________________________

            Having headaches writing your evolutionary algorithms ?

                               Take it EASEA

                     http://www-rocq.inria.fr/EASEA/
____________________________________________________________________________

/*_________________________________________________________

    onemax.ez

    EASEA implementation of the ONEMAX problem

    Pierre COLLET (Pierre.Collet at Polytechnique.Fr)

    17/01/01
__________________________________________________________*/

\User declarations :
#define SIZE 10
float pMutPerGene=0.1;

inline void swap(bool& a, bool& b)
  {bool c=a; a=b; b=c;}
\end

\User classes :
GenomeClass { bool x[SIZE]; }
\end

\GenomeClass::initialiser : // "initializer" is also accepted
  for (int i=0;i<SIZE;i++) Genome.x[i]=tossCoin(.5)?1:0;
\end

\GenomeClass::crossover :
  int CrossoverPosition=random(0,SIZE);

  for(int i=0;i<CrossoverPosition+1;i++)
    swap(child1.x[i],child2.x[i]);
\end

\GenomeClass::mutator : // Must return the number of mutations
  int NbMut=0;
  for (int i=0;i<SIZE;i++)
    if (tossCoin(pMutPerGene)){
       NbMut++;
       Genome.x[i]=Genome.x[i]?0:1;
    }
  return NbMut;
\end

\GenomeClass::evaluator : // Returns the score
  int Score=0;
  for (int i=0; i<SIZE;i++)
    Score+=(int)Genome.x[i];
  return Score;
\end

\Default run parameters :        // Please let the parameters appear in this
order
  Number of generations : 15     // NB_GEN
  Mutation probability : 1       // MUT_PROB
  Crossover probability : 1      // XOVER_PROB
  Population size : 30           // POP_SIZE
  Selection operator : Tournament // RouletteWheel, Deterministic, Ranking,
Random
  Offspring population size : 12 // 40%
  Replacement strategy : plus    // Comma, SteadyState, Generational
  Discarding operator : Worst    // Best, Tournament, Parent, Random
  Evaluator goal : Maximise      // Minimise
  Elitism : On                   // Off
\end





More information about the galib mailing list