-
Notifications
You must be signed in to change notification settings - Fork 24
Parameters
Parameters provide a method for users to define how MABE will operate. Parameters control things like how long MABE will run, how large a population will be, what kinds of genomes and brains will be used along with literally hundreds of other options. The simplest way to change a parameter, is to just change the parameter in a settings file.
If you run MABE with the '-s' command line option, MABE will generate settings files.
./MABE -s
If any files settings are being loaded (see -f option below), or if any parameters are defined on the command line, then the new settings files will incorporate values from the loaded files and command line.
The "-f" option tells MABE to load settings files.
./MABE -f settings.cfg settings_organism.cfg settings_world.cfg
If you looks at the contents of a settings file (settings.cfg for example) you will see something like this:
% GLOBAL: mode = run # (string) mode to run MABE in [run,test] outputDirectory = ./ # (string) where files will be written popSize = 250 # (int) number of genomes in the population etc...
Each line contains either a "%" followed by category name or the name of a parameter. Everything after a "#" is a comment. Generally, comments will contain the type of the parameter and a short description of what the parameter does. Comments are ignored by MABE.
a little more on "%"... a "%" in a config file sets a cateroy name. Until the next "%" and parameters read from the file will have the category name and a "-" prepended. This means that popSize in code above is really GLOBAL-popSize.
If you just wanted to set some parameters, you could create a settings file like this:
% GLOBAL-mode = run GLOBAL-outputDirectory = ./ GLOBAL-popSize = 1000 ARCHIVIST-outputMethod = default ARCHIVIST_DEFAULT-realtimeFilesInterval = 25 BRAIN-brainType = Wire BRAIN_WIRE-decayDuration = 3
We find some users do not like working with MABE created config files because they tend to include a lot of parameters that they are not interested in. One option is to change the relevant parameters defaults in code and recompile. While this will technically work, you run into two problems: You need to remember to reimplement these alterations if you receive updated code, and another user could use your code but not realize that you had changed the defaults. A better solution is to leave everything default and create a config file with only the parameters you are interested in changed.
Any Parameter in a .cfg file can also be set on the command line by using the -p option followed by the parameter name and value. The parameter popSize appears like this in settings.cfg:
% GLOBAL popSize = 250
If you wanted to set popSize on the command line you would run:
./MABE -p GLOBAL-popSize 500
After -p, you can list any number of parameters in any order.
./MABE -p GLOBAL-popSize 500 GLOBAL-randomSeed 102 GLOBAL-updates 5000 BRAIN-brainType Markov
Parameters set on the command line override parameters set in .cfg files... which override default settings (values that MABE defines in the code).
ParametersTable is a data structure with is used to store and manage parameters. Parameters links are used to interface with ParametersTables.
Click here for more on using ParametersLinks in code
Click here for a detailed description of ParametersTables
home
welcome
MABE Parameter Widget
Installation and quick start
license
citations
release notes
developer contributions
consistency testing
Using MABE
Using Settings Files
Output Files
Creating Graphs with python
MABE framework
Defining Update
Brains
Markov Brain
Neuron Gate
Wire Brain
Human Brain
ConstantValues Brain
CGP Brain
Genetic Programing Brain
Artificial Neural Networks
Brains Structure and Connectome
Genomes
Circular Genome
Multi Genome
Genome Handlers
Genome Value Conversions
Organisms
Groups
Archivists
popFileColumns
Optimizers
Lexicase Optimizer
Worlds
Berry World
ComplexiPhi World
MultiThreadTemplate World
Utilities
DataMap
Parameters
Parameters Name Space
Adding Parameters to Code
ParametersTable
MTree
sequence function
Population Loading
PythonTools
MBuild
MGraph
MQ
findRelatedness
generatePhylogeny
Information Theory Tools
Brain States and Life Times
TimeSeries
Entropy Functions
Smearing
Fragmentation
State to State
Brain Infomation Tools
ProcessingTools