-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstant.java
More file actions
43 lines (37 loc) · 1005 Bytes
/
Copy pathConstant.java
File metadata and controls
43 lines (37 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package NEAT;
/**
* Constant enumerations we're using so they're located in one single location.
* @author Chance Simmons and Brandon Townsend
* @version 9 May 2019
*/
public enum Constant {
DISJOINT_COEFF (1),
WEIGHT_COEFF (.5),
COMPAT_THRESH(0.3),
STALENESS_THRESH(15),
CULL_THRESH(.5),
// Next five are the individual chances for a mutation to occur.
ADD_NODE_MUT(.01),
ADD_LINK_MUT(.05),
WEIGHT_MUT(.8),
ENABLE_MUT(.3),
REENABLE_MUT(.3),
// Chance that a mutation will happen at all.
MUT_THRESH(.25);
/** The value of this constant */
private final double value;
/**
* Constructor for the constant
* @param value the value for the constant
*/
Constant(double value){
this.value = value;
}
/**
* Returns the value of this constant
* @return the value of the constant
*/
public double getValue(){
return this.value;
}
}