Documentation:Deploy HOWTO

From Beagle

Contents

What is BeagleDeploy ?

When preparing investigation about a given evolutionary algorithm, we often needs to try severals combinations of evolutionary parameters settings. The amount of combinations drives to a tedious and error prone job, editing hundred times hundred files. Any modifications could be a nigthmare to apply. Any beginner computer scientist will say "Automate !". Well... Automate !

BeagleDeploy is a program, written in C++, that generates configurations files for OpenBeagle programs, from a main template file. The evolutionary parameters must be specified as register entries, that is not a so strong assumption. This way, manipulating thousands configurations files is an easy job.


Where I can use it ?

Currently, only Unix plateforms are supported, it was tested only under a Linux 2.6 system. Windows support will be soon available. Successfull or not, usage report on a new plateform (Older Linux, other Unixes) will be greatly appreciated.


Where I can get it ?

Currently, it is available as a source distribution from CVS, module name "deploy". See http://sourceforge.net/cvs/?group_id=91196 for details on how to access to the Open BEAGLE's CVS on sourceforge.net.


How I install it ?

You need a plateform that supports the GNU autotools.

  • go to the Bonsai directory
  • ./bootstrap
  • ./configure --prefix=[installation directory] CXXFLAGS='-O2'
  • make
  • make install (depending of the installation directory, as root user)
  • go to the BeagleDeploy directory
  • ./bootstrap
  • ./configure --prefix=[installation directory] CXXFLAGS='-O2'
  • make
  • make install (depending of the installation directory, as root user)

How I use it ?

You need, of course, to install it before usage, eventually setting the PATH environment variable to be able to invocate here from everywhere.

BeagleDeploy must invocated at this : BeagleDeploy foo.conf

Where foo.conf is a configuration file for BeagleDeploy. Let's have a look to such a file.

experiment(
        # -------------------------------
        # --- Config files generation ---
        # -------------------------------
        name = "beagle.conf"
        basedir = "/usr/devert/test"        
        config.list.file = "/usr/devert/configs.lst"

        # ------------------------------------
        # --- Evolutionary algo definition ---
        # ------------------------------------
        algo=
'<Evolver>
<BootStrapSet>
  <IfThenElseOp parameter="ms.restart.file" value="">
    <PositiveOpSet>
      <InitOp/>
      <PluginEvalOp/>
      <StatsCalcFitnessMultiObjOp/>
    </PositiveOpSet>
    <NegativeOpSet>
      <MilestoneReadOp/>
    </NegativeOpSet>
  </IfThenElseOp>
  <TermMaxEvalsOp/>
  <MilestoneWriteOp/>
</BootStrapSet>
<MainLoopSet>
  <GenerationalOp>
    <PluginEvalOp>
      <MutationChangeOp>
        <SelectTournamentOp/>
      </MutationChangeOp>
    </PluginEvalOp>

    <PluginEvalOp>
      <MutationGrowOp>
        <SelectTournamentOp/>
      </MutationGrowOp>
    </PluginEvalOp>

    <PluginEvalOp>
      <MutationGrowBackOp>
        <SelectTournamentOp/>
      </MutationGrowBackOp>
    </PluginEvalOp>

    <PluginEvalOp>
      <MutationSplitOp>
        <SelectTournamentOp/>
      </MutationSplitOp>
    </PluginEvalOp>

    <PluginEvalOp>
      <MutationPermutOp>
        <SelectTournamentOp/>
      </MutationPermutOp>
    </PluginEvalOp>

    <SelectTournamentOp/>

  </GenerationalOp>

  <MigrationRandomRingOp/>
  <StatsCalcFitnessMultiObjOp/>
  <TermMaxEvalsOp/>
  <ParetoFrontCalculateOp/>
  <MilestoneWriteOp/>
</MainLoopSet>
</Evolver>'






        # ---------------------------
        # --- The parameters sets ---
        # ---------------------------
        common(
                gu.try.limit = 4
                gu.maxplansize = 32
                gu.parcimony.pressure = true               
                ec.term.maxevals = 25000
                ec.hof.vivasize = 1
                ec.hof.demesize = 0
        )



        # --- Tournament size ---
        setting(id = "tsize"
                set(label = "2" ec.sel.tournsize = 2)
                set(label = "5" ec.sel.tournsize = 5)
                set(label = "8" ec.sel.tournsize = 8)
        )



        # --- Population size --
        setting(id = "pop"
                set(label = "50"   ec.pop.size = 50)
                set(label = "200"  ec.pop.size = 200)
                set(label = "500"  ec.pop.size = 500)
                set(label = "1000" ec.pop.size = 1000)
        )



        # --- Mutations probas settings ---
        setting(id = "mutset"
                set(label = "A"
                        ec.repro.prob        = 0.5
                        gu.mutchange.indpb   = 0.10
                        gu.mutsplit.indpb    = 0.100
                        gu.mutpermut.indpb   = 0.100
                        gu.mutgrow.indpb     = 0.100
                        gu.mutgrowback.indpb = 0.100
                )
                set(label = "B"
                        ec.repro.prob        = 0.5
                        gu.mutchange.indpb   = 0.20
                        gu.mutsplit.indpb    = 0.075
                        gu.mutpermut.indpb   = 0.075
                        gu.mutgrow.indpb     = 0.075
                        gu.mutgrowback.indpb = 0.075
                )
                set(label = "C"
                        ec.repro.prob        = 0.5
                        gu.mutchange.indpb   = 0.30
                        gu.mutsplit.indpb    = 0.050
                        gu.mutpermut.indpb   = 0.050
                        gu.mutgrow.indpb     = 0.050
                        gu.mutgrowback.indpb = 0.050
                )
        )
)
  • All the files and directories must be specified as !!!ABSOLUTE, NOT RELATIVE!!!
  • name value is the name used for each Beagle configuration file. If not specified, it's

beagle.conf

  • basedir value is the directory where the configuration files will be generated
  • algo value is the description of the evolutionary algorithm in the OpenBeagle way.
  • listfile value is the file where the path of each generated Beagle configurations files will be printed, one line per file. If not specified, no file is generated.
  • common value contains all the registers entries that will be shared by all the generated files.
  • setting value contains a set of set values. The id value identify this setting.
  • A set value is a set of Beagle register entries. The label value identify this set.

BeagleDeploy will build a directory hiearchy under the 'basedir' directory. This hierarchy depth is equal to the number of the 'setting' values defined. The leaves of the hiearchy is Beagle configuration file named 'name', with registers entries taken from a set of each setting. All the combination are produced. In the example provided before, the list of the generated file will be

/usr/devert/test/tsize2/pop50/mutsetA/beagle.conf
/usr/devert/test/tsize2/pop50/mutsetB/beagle.conf
/usr/devert/test/tsize2/pop50/mutsetC/beagle.conf
/usr/devert/test/tsize2/pop200/mutsetA/beagle.conf
/usr/devert/test/tsize2/pop200/mutsetB/beagle.conf
/usr/devert/test/tsize2/pop200/mutsetC/beagle.conf
/usr/devert/test/tsize2/pop500/mutsetA/beagle.conf
/usr/devert/test/tsize2/pop500/mutsetB/beagle.conf
/usr/devert/test/tsize2/pop500/mutsetC/beagle.conf
/usr/devert/test/tsize2/pop1000/mutsetA/beagle.conf
/usr/devert/test/tsize2/pop1000/mutsetB/beagle.conf
/usr/devert/test/tsize2/pop1000/mutsetC/beagle.conf
/usr/devert/test/tsize5/pop50/mutsetA/beagle.conf
/usr/devert/test/tsize5/pop50/mutsetB/beagle.conf
/usr/devert/test/tsize5/pop50/mutsetC/beagle.conf
/usr/devert/test/tsize5/pop200/mutsetA/beagle.conf
/usr/devert/test/tsize5/pop200/mutsetB/beagle.conf
/usr/devert/test/tsize5/pop200/mutsetC/beagle.conf
/usr/devert/test/tsize5/pop500/mutsetA/beagle.conf
/usr/devert/test/tsize5/pop500/mutsetB/beagle.conf
/usr/devert/test/tsize5/pop500/mutsetC/beagle.conf
/usr/devert/test/tsize5/pop1000/mutsetA/beagle.conf
/usr/devert/test/tsize5/pop1000/mutsetB/beagle.conf
/usr/devert/test/tsize5/pop1000/mutsetC/beagle.conf
/usr/devert/test/tsize8/pop50/mutsetA/beagle.conf
/usr/devert/test/tsize8/pop50/mutsetB/beagle.conf
/usr/devert/test/tsize8/pop50/mutsetC/beagle.conf
/usr/devert/test/tsize8/pop200/mutsetA/beagle.conf
/usr/devert/test/tsize8/pop200/mutsetB/beagle.conf
/usr/devert/test/tsize8/pop200/mutsetC/beagle.conf
/usr/devert/test/tsize8/pop500/mutsetA/beagle.conf
/usr/devert/test/tsize8/pop500/mutsetB/beagle.conf
/usr/devert/test/tsize8/pop500/mutsetC/beagle.conf
/usr/devert/test/tsize8/pop1000/mutsetA/beagle.conf
/usr/devert/test/tsize8/pop1000/mutsetB/beagle.conf
/usr/devert/test/tsize8/pop1000/mutsetC/beagle.conf

As we can see, the directories names are generated from the label of the sets and the id of the settings. That's way too fancy labels and ids could be error prone.


Some configurations files elements

  • Comments begins with # and ends with end of the line
  • Floating point numbers in scientific notation are supported, sorry :(
  • String litterals could be done both with we " and ', like this :
    'Zorglub says "Eviv Bulgroz"'
    or
"Vador says 'All your bases belong to us'"
This way you can reduce the use of escape sequence like \' or \"
  • Escape sequence in string litterals are allowed :
    • \n
    • \"
    • \'
    • \\


How I can participate to the project ?

  1. By giving constructive advices and suggestions.
  2. By giving usage reports under any operating system.
  3. By improving this documentation.

BeagleDeploy and this page is from Alexandre Devert, contact : devert[at]lri.fr