⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parameters.java

📁 这是用遗传编程算法来拟合曲线的一个经典程序
💻 JAVA
字号:
/*作者:徐朝*/
/*keystonexu@yahoo.com.cn*/
package kernel;
public class Parameters
{
	//这是语法树的生成参数
	public static final int GROW = 0;
	public static final int FULL = 1;
	public static final int RAMPED_HALF_AND_HALF = 2;
	public static final int FITNESS_PROPORTIONATE = 0;
	public static final int TOURNAMENT = 1;
	
	public static int populationSize =4000;
	public static int maximum_generations = 50;
	public static double best_fitness = 0.01;
	public static int number_of_fitness_cases = 10; //函数采样点	
	public static int max_depth_for_new_individuals =6; //每一个程序树的最大深度
	public static int max_depth_for_individuals_after_crossover = 10; //交叉繁殖后最大深度
	public static int max_depth_for_new_subtrees_in_Mutants = 4; //变异节点的最大深度
	public static double fitness_proportionate_reproduction_fraction = 0.1;//个体变异比率
	public static double crossover_at_any_point_fraction = 0.2; //在任何一点交叉操作的几率
	public static double crossover_at_function_point_fraction = 0.7 ;//在非叶子节点交叉操作的几率
	public static int  crossoverFraction = 80;
	public static int  fitnessProportionateReproFraction = 0;
	public static int  mutationFraction = 20;
	public static int method_of_selection = TOURNAMENT ;//选择的方法
	public static int method_of_generation = RAMPED_HALF_AND_HALF;//生成子树的方法

	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -