-
Notifications
You must be signed in to change notification settings - Fork 24
Parameters Name Space
MABEs parameters support name space. Name space provides a way to have different versions of the same parameter. Various parts of MABE make use of name space and the documentation for those parts will define how they use name space. In addition to allowing for different versions of a parameter, name spaces provide an inheritance methodology (see Name Space Inheritance below).
For the moment, lets consider this example... We are using MABE to study a predator/prey relationship. We have a world which takes two groups. A group of wolves and a group of sheep. Now lets assume that we want the population size of the wolf group to be 10 and the population size of the sheep group to be 100. We can use name space.
In a config file where ever we want to set a value in the sheep name space we would open the name space and set the parameters and then close the name space.
%GLOBAL initPop = 150 + sheep:: initPop = 100 - # sheep:: + wolf:: initPop = 10 - # wolf::
Alternatively we could create the following config file
% GLOBAL-initPop = 150 + sheep:: GLOBAL-initPop = 100 - # sheep:: + wolf:: GLOBAL-initPop = 10 - # wolf::
Lastly, you could create a settings file like this:
% GLOBAL-initPop = 150 sheep::GLOBAL-initPop = 100 wolf::GLOBAL-initPop = 10
All three of these files would define the same parameters:
GLOBAL-initPop = 150
sheep::GLOBAL-initPop = 100
wolf::GLOBAL-initPop = 10
Name space works with the "-p" option:
./MABE -p GLOBAL-initPop 150 sheep::GLOBAL-initPop 100 wolf::GLOBAL-initPop 10
If a parameter is requested with a name space and it can not be found, MABE will start a search for that parameter. The search will be conducted based on name space. Name spaces end in '::', but they can also contain '::' internally. If a parameter was searched for in the name space sheep::big:: and it was not found, MABE would search next in sheep:: and lastly in root::
root:: indicates the top level, and since everything is a child of "root::" we leave it off. When you see "root::" (in a config file for example) it denotes that MABE should use the top level version of the parameter.
if these parameters were set:
GLOBAL-initPop = 45
sheep::GLOBAL-initPop = 20
sheep::big::GLOBAL-initPop = 10
then:
sheep::big::GLOBAL-initPop would be 10
sheep::small::GLOBAL-initPop would be 20 (inherited from sheep::)
wolf::bitey::small::GLOBAL-initPop would be 45 (inherited from root::)
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