Class: Symbols

Symbols

new Symbols(arities)

Symbols are functions (internal nodes) or terminals (leaves). Has the arity for each symbol, the terminal symbols and the function symbols.
Parameters:
Name Type Description
arities object Dictionary with the symbol as a key and the arity of each symbol as the value
Source:

Methods

getRandomSymbol(depth, maxDepth, full) → {string}

Get a random label. The depth determines if a terminal must be chosen. If full is specified a function will be chosen until max_depth.
Parameters:
Name Type Description
depth number Current depth
maxDepth number Max allowed depth
full boolean Grow to fully to max depth
Source:
Returns:
Symbol
Type
string