Initialization function - gpols_init.m

Syntax:
popu = gpols_init(popusize,maxtreedepth,symbols);

 popu Structure (population) Resulted initial population
 popusize Scalar integer Number of individuals (size of population)
 maxtreedepth Scalar integer Maximum number of tree levels (tree depth)
 symbols Cells of strings Equation symbols


This function initializes the population variable, clears and re-initializes its structure.

You should call this function at the beginning of your program. This function does NOT evaluate the random generated (initial) individuals, so after that you should call the gpols_evaluate function.

The popu is the initialized population variable.

The symbols is the list of operator and terminator strings, see symbols.

Example:

popu = gpn_init(50,gene);
popu = gpn_evaluate(popu,[1:50],X,Y,[],optv);