HyperNEATUtil { public static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, List<String> outputNames){ int processWidth = Parameters.parameters.integerParameter("HNProcessWidth"); int processDepth = Parameters.parameters.integerParameter("HNProcessDepth"); return getSubstrateConnectivity(numInputSubstrates, processWidth, processDepth, outputNames, Parameters.parameters.booleanParameter("extraHNLinks")); }  static void clearHyperNEATVisualizations(); static void resetSubstrates(); static List<DrawingPanel> drawSubstrates(ArrayList<Node> nodes); static DrawingPanel drawSubstrate(Substrate s, ArrayList<Node> nodes, int nodeIndexStart); static DrawingPanel drawSubstrate(DrawingPanel dp, Substrate s, ArrayList<Node> nodes, int nodeIndexStart); static HyperNEATTask getHyperNEATTask(); static Color regularVisualization(double activation); static List<DrawingPanel> drawWeight(TWEANNGenotype genotype, HyperNEATTask hnt); static int numBiasOutputsNeeded(); static int indexFirstBiasOutput(HyperNEATTask hnt); static int totalPossibleLinks(HyperNEATTask hnt); static List<Substrate> getSubstrateInformation(int inputWidth, int inputHeight, int numInputSubstrates, List<Triple<String, Integer, Integer>> output); static List<Substrate> getSubstrateInformation(int inputWidth, int inputHeight, int numInputSubstrates, int processWidth, int processDepth, List<Triple<String, Integer, Integer>> output); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, List<String> outputNames); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, List<String> outputNames, boolean connectInputsToOutputs); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, int processWidth, int processDepth, List<String> outputNames); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, int processWidth, int processDepth, List<String> outputNames, boolean connectInputsToOutputs); static int numCPPNOutputs(); static int numCPPNInputs(); static int numCPPNInputs(HyperNEATTask task); final static int LINK_WINDOW_SPACING; final static int SUBS_GRID_SIZE; final static int WEIGHT_GRID_SIZE; }
@Test public void testGetSubstrateConnectivityHyperNEAT(){ List<String> outputNames = new ArrayList<String>(); outputNames.add("o1"); outputNames.add("o2"); outputNames.add("o3"); List<Triple<String,String,Boolean>> test = HyperNEATUtil.getSubstrateConnectivity(3, 2, 3, outputNames, false); assertEquals(test.get(0), new Triple<String, String, Boolean>("Input(0)", "process(0,0)", Boolean.TRUE)); int index = 0; for(int i = 0; i < 2; i++){ for(int j = 0; j < 3; j++){ assertEquals(test.get(index++), new Triple<String, String, Boolean>("Input("+ j +")", "process(" + i + ",0)", Boolean.TRUE)); } } for(int i = 0; i < 2; i++){ for(int j = 0; j < 2; j++){ for(int k = 0; k < 2; k++){ assertEquals(test.get(index++), new Triple<String, String, Boolean>("process("+ j + "," + i +")", "process(" + k + ","+ (i+1) + ")", Boolean.TRUE)); } } } for(int i = 0; i < 2; i++){ for(int j = 0; j < 3; j++){ assertEquals(test.get(index++), new Triple<String, String, Boolean>("process(" + i + ",2)", "o" + (j+1), Boolean.FALSE)); } } }