Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

ГА / ГА / danilov_bachelor

.pdf
Скачиваний:
19
Добавлен:
26.04.2015
Размер:
1.11 Mб
Скачать

62

 

return

new

Randomizer < TreeAutomata < Action > >() {

 

public

TreeAutomata < Action >

randomize ( int length ) {

 

}

return new TreeAutomata < Action >( length , predicates , actions );

 

 

 

 

}

};

 

 

 

 

 

 

 

/**

 

 

 

 

*

Creates

utils for statictics and

control of evolution .

*

 

 

 

 

*

@return

Utils .

 

*/

 

 

 

 

protected

Utils < TreeAutomata < Action >> createUtils ()

{

return

new

Utils < TreeAutomata < Action > >()

{

 

public

void copy ( TreeAutomata < Action >

src ,

TreeAutomata < Action > dst ) {

}

dst . copyFrom ( src );

 

 

 

 

 

 

public double diff ( TreeAutomata < Action > c1 , TreeAutomata < Action > c2 ) { return 0;

}

public TreeAutomata < Action > allocate ( int length ) {

return new TreeAutomata < Action >( length , predicates , actions );

}

};

}

/**

* Mutation rate . */

private static final double MUTATION_RATE = 0.02;

/**

* Automatons ’ predicates count . */

private int predicates ;

/**

* Allowed automatons ’ output actions . */

private Action [] actions ;

}

Соседние файлы в папке ГА