TorusPredPreyTask extends NoisyLonerTask<T> implements TUGTask, NetworkTask, HyperNEATTask { public final void addObjective(GridTorusObjective<T> o, ArrayList<ArrayList<GridTorusObjective<T>>> list, int pop) { addObjective(o,list,true, pop); } TorusPredPreyTask();  TorusPredPreyTask(boolean preyEvolve);  TorusPredPreyTask(boolean preyEvolve, boolean competitive); abstract TorusPredPreyController[] getPredAgents(Genotype<T> individual); abstract TorusPredPreyController[] getPreyAgents(Genotype<T> individual); final void addObjective(GridTorusObjective<T> o, ArrayList<ArrayList<GridTorusObjective<T>>> list, int pop); final void addObjective(GridTorusObjective<T> o, ArrayList<ArrayList<GridTorusObjective<T>>> list, boolean affectsSelection, int pop); @Override /** * A method that evaluates a single genotype Provides fitness for that * genotype based on the game time as well as other scores * * @param individual * genotype being evaluated * @param num * number of current evaluation * @return A Pair of double arrays containing the fitness and other scores */ Pair<double[], double[]> oneEval(Genotype<T> individual, int num); TorusPredPreyGame runEval(TorusPredPreyController[] predAgents, TorusPredPreyController[] preyAgents); @Override int numObjectives(); @Override int numOtherScores(); @Override double[] startingGoals(); @Override double[] minScores(); @Override String[] sensorLabels(); @Override String[] outputLabels(); static String[] outputLabels(boolean forPredators); @Override double getTimeStamp(); static TorusPredPreyController[] getStaticControllers(boolean isPred, int num); static void getEvolvedControllers(TorusPredPreyController[] container, Genotype<T> g, boolean isPred); static void getEvolvedControllers(TorusPredPreyController[] container, Genotype<T> g, boolean isPred, int startIndex, int numCopies); static void getEvolvedControllers(TorusPredPreyController[] container, Genotype<T>[] genotypes, boolean isPred); static void getEvolvedControllers(TorusPredPreyController[] container, Genotype<T>[] genotypes, boolean isPred, int startIndex); void addAllObjectives(); void addAllObjectives(int pop); void addAllObjectives(int pop, boolean isPreyPop); @Override List<Substrate> getSubstrateInformation(); @Override List<Triple<String, String, Boolean>> getSubstrateConnectivity(); double[] getSubstrateInputs(List<Substrate> subs); @Override int numCPPNInputs(); @Override double[] filterCPPNInputs(double[] fullInputs); static final String[] ALL_ACTIONS; static final String[] MOVEMENT_ACTIONS; static final int HYPERNEAT_OUTPUT_SUBSTRATE_DIMENSION; public TorusPredPreyController[] evolved; static boolean preyEvolve; final boolean competitive; public ArrayList<ArrayList<GridTorusObjective<T>>> objectives; public ArrayList<ArrayList<GridTorusObjective<T>>> otherScores; }
@SuppressWarnings({ "hiding", "rawtypes", "unchecked" }) @Test public <T extends Network> void testAddObjective(){ ArrayList<ArrayList<GridTorusObjective<T>>> objectives = new ArrayList<ArrayList<GridTorusObjective<T>>>(); ArrayList<ArrayList<GridTorusObjective<T>>> otherScores = new ArrayList<ArrayList<GridTorusObjective<T>>>(); objectives.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); MMNEAT.task = new TorusEvolvedPredatorsVsStaticPreyTask(); homoPred = (TorusEvolvedPredatorsVsStaticPreyTask)MMNEAT.task; assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.size(), 1); assertEquals(otherScores.get(0).size(), 0); assertEquals(otherScores.size(), 1); homoPred.addObjective(new PredatorCatchCloseObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 1); assertTrue(otherScores.get(0).isEmpty()); homoPred.addObjective(new PredatorCatchObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 1); assertTrue(otherScores.get(0).isEmpty()); homoPred.addObjective(new PredatorCatchCloseObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 1); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(otherScores.size(), 1); assertFalse(otherScores.get(0).isEmpty()); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 1); homoPred.addObjective(new PredatorCatchObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 2); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(otherScores.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(otherScores.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(otherScores.size(), 1); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 1); objectives = new ArrayList<ArrayList<GridTorusObjective<T>>>(); otherScores = new ArrayList<ArrayList<GridTorusObjective<T>>>(); objectives.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); MMNEAT.task = new TorusEvolvedPreyVsStaticPredatorsTask(); homoPrey = (TorusEvolvedPreyVsStaticPredatorsTask)MMNEAT.task; assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.size(), 1); assertEquals(otherScores.get(0).size(), 0); assertEquals(otherScores.size(), 1); homoPrey.addObjective(new PreyLongSurvivalTimeObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 1); assertTrue(otherScores.get(0).isEmpty()); homoPrey.addObjective(new PreyMinimizeCaughtObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyLongSurvivalTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 1); assertTrue(otherScores.get(0).isEmpty()); homoPrey.addObjective(new PreyLongSurvivalTimeObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 1); assertTrue(otherScores.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(otherScores.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertEquals(otherScores.size(), 1); assertFalse(otherScores.get(0).isEmpty()); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyLongSurvivalTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 1); homoPrey.addObjective(new PreyMinimizeCaughtObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 2); assertTrue(otherScores.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(otherScores.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(otherScores.get(0).get(1) instanceof PreyLongSurvivalTimeObjective); assertTrue(otherScores.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(otherScores.size(), 1); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyLongSurvivalTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyLongSurvivalTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 1); objectives = new ArrayList<ArrayList<GridTorusObjective<T>>>(); otherScores = new ArrayList<ArrayList<GridTorusObjective<T>>>(); objectives.add(new ArrayList<GridTorusObjective<T>>()); objectives.add(new ArrayList<GridTorusObjective<T>>()); objectives.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); MMNEAT.task = new CooperativePredatorsVsStaticPreyTask(); coPred = (CooperativePredatorsVsStaticPreyTask)MMNEAT.task; assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 0); assertEquals(objectives.get(2).size(), 0); assertEquals(objectives.size(), 3); assertEquals(otherScores.get(0).size(), 0); assertEquals(otherScores.get(1).size(), 0); assertEquals(otherScores.get(2).size(), 0); assertEquals(otherScores.size(), 3); coPred.getLonerTaskInstance().addObjective(new PredatorEatEachPreyQuicklyObjective(), objectives, 1); assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 1); assertEquals(objectives.get(2).size(), 0); assertTrue(objectives.get(1).get(0) instanceof PredatorEatEachPreyQuicklyObjective); assertEquals(objectives.size(), 3); assertEquals(otherScores.size(), 3); assertTrue(otherScores.get(0).isEmpty()); assertTrue(otherScores.get(1).isEmpty()); assertTrue(otherScores.get(2).isEmpty()); coPred.getLonerTaskInstance().addObjective(new PredatorCatchCloseObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 3); assertTrue(otherScores.get(0).isEmpty()); coPred.getLonerTaskInstance().addObjective(new PredatorMinimizeDistanceFromPreyObjective(), otherScores, 2); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(1).get(0) instanceof PredatorEatEachPreyQuicklyObjective); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 3); assertEquals(otherScores.size(), 3); assertTrue(otherScores.get(0).isEmpty()); assertTrue(otherScores.get(1).isEmpty()); assertEquals(otherScores.get(2).size(), 1); assertTrue(otherScores.get(2).get(0) instanceof PredatorMinimizeDistanceFromPreyObjective); coPred.getLonerTaskInstance().addObjective(new PredatorCatchObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 3); assertTrue(otherScores.get(0).isEmpty()); coPred.getLonerTaskInstance().addObjective(new PredatorCatchCloseObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 1); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(otherScores.size(), 3); assertFalse(otherScores.get(0).isEmpty()); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 3); coPred.getLonerTaskInstance().addObjective(new PredatorCatchObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 2); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(otherScores.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(otherScores.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(otherScores.size(), 3); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorCatchCloseObjective); assertFalse(objectives.get(0).get(0) instanceof PredatorCatchObjective); assertFalse(objectives.get(0).get(1) instanceof PredatorCatchCloseObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchObjective); assertEquals(objectives.size(), 3); objectives = new ArrayList<ArrayList<GridTorusObjective<T>>>(); otherScores = new ArrayList<ArrayList<GridTorusObjective<T>>>(); objectives.add(new ArrayList<GridTorusObjective<T>>()); objectives.add(new ArrayList<GridTorusObjective<T>>()); objectives.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); MMNEAT.task = new CooperativePreyVsStaticPredatorsTask(); coPrey = (CooperativePreyVsStaticPredatorsTask)MMNEAT.task; assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 0); assertEquals(objectives.get(2).size(), 0); assertEquals(objectives.size(), 3); assertEquals(otherScores.get(0).size(), 0); assertEquals(otherScores.get(1).size(), 0); assertEquals(otherScores.get(2).size(), 0); assertEquals(otherScores.size(), 3); coPrey.getLonerTaskInstance().addObjective(new PreyLongSurvivalTimeObjective(), objectives, 1); assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 1); assertEquals(objectives.get(2).size(), 0); assertTrue(objectives.get(1).get(0) instanceof PreyLongSurvivalTimeObjective); assertEquals(objectives.size(), 3); assertEquals(otherScores.size(), 3); assertTrue(otherScores.get(0).isEmpty()); assertTrue(otherScores.get(1).isEmpty()); assertTrue(otherScores.get(2).isEmpty()); coPrey.getLonerTaskInstance().addObjective(new PreyMaximizeGameTimeObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 3); assertTrue(otherScores.get(0).isEmpty()); coPrey.getLonerTaskInstance().addObjective(new PreyMaximizeDistanceFromPredatorsObjective(), otherScores, 2); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(1).get(0) instanceof PreyLongSurvivalTimeObjective); assertTrue(objectives.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 3); assertEquals(otherScores.size(), 3); assertTrue(otherScores.get(0).isEmpty()); assertTrue(otherScores.get(1).isEmpty()); assertEquals(otherScores.get(2).size(), 1); assertTrue(otherScores.get(2).get(0) instanceof PreyMaximizeDistanceFromPredatorsObjective); coPrey.getLonerTaskInstance().addObjective(new PreyMinimizeCaughtObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyMaximizeGameTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 3); assertTrue(otherScores.get(0).isEmpty()); coPrey.getLonerTaskInstance().addObjective(new PreyMaximizeGameTimeObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 1); assertTrue(otherScores.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(otherScores.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertEquals(otherScores.size(), 3); assertFalse(otherScores.get(0).isEmpty()); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyMaximizeGameTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 3); coPrey.getLonerTaskInstance().addObjective(new PreyMinimizeCaughtObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 2); assertTrue(otherScores.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(otherScores.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(otherScores.get(0).get(1) instanceof PreyMaximizeGameTimeObjective); assertTrue(otherScores.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(otherScores.size(), 3); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PreyMaximizeGameTimeObjective); assertFalse(objectives.get(0).get(0) instanceof PreyMinimizeCaughtObjective); assertFalse(objectives.get(0).get(1) instanceof PreyMaximizeGameTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PreyMinimizeCaughtObjective); assertEquals(objectives.size(), 3); objectives = new ArrayList<ArrayList<GridTorusObjective<T>>>(); otherScores = new ArrayList<ArrayList<GridTorusObjective<T>>>(); objectives.add(new ArrayList<GridTorusObjective<T>>()); objectives.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); otherScores.add(new ArrayList<GridTorusObjective<T>>()); MMNEAT.task = new CompetitiveHomogeneousPredatorsVsPreyTask(); homoComp = (CompetitiveHomogeneousPredatorsVsPreyTask)MMNEAT.task; assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 0); assertEquals(objectives.size(), 2); assertEquals(otherScores.get(0).size(), 0); assertEquals(otherScores.get(1).size(), 0); assertEquals(otherScores.size(), 2); homoComp.getLonerTaskInstance().addObjective(new PreyLongSurvivalTimeObjective(), objectives, 1); assertEquals(objectives.get(0).size(), 0); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(1).get(0) instanceof PreyLongSurvivalTimeObjective); assertEquals(objectives.size(), 2); assertEquals(otherScores.size(), 2); assertTrue(otherScores.get(0).isEmpty()); assertTrue(otherScores.get(1).isEmpty()); homoComp.getLonerTaskInstance().addObjective(new PredatorMinimizeGameTimeObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PredatorMinimizeGameTimeObjective); assertEquals(objectives.size(), 2); assertTrue(otherScores.get(0).isEmpty()); homoComp.getLonerTaskInstance().addObjective(new PreyMaximizeDistanceFromPredatorsObjective(), otherScores, 1); assertEquals(objectives.get(0).size(), 1); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(1).get(0) instanceof PreyLongSurvivalTimeObjective); assertTrue(objectives.get(0).get(0) instanceof PredatorMinimizeGameTimeObjective); assertEquals(objectives.size(), 2); assertEquals(otherScores.size(), 2); assertTrue(otherScores.get(0).isEmpty()); assertEquals(otherScores.get(1).size(), 1); assertTrue(otherScores.get(1).get(0) instanceof PreyMaximizeDistanceFromPredatorsObjective); homoComp.getLonerTaskInstance().addObjective(new PredatorCatchCloseQuickObjective(), objectives, 0); assertEquals(objectives.get(0).size(), 2); assertEquals(objectives.get(1).size(), 1); assertTrue(objectives.get(0).get(0) instanceof PredatorMinimizeGameTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchCloseQuickObjective); assertEquals(objectives.size(), 2); assertTrue(otherScores.get(0).isEmpty()); homoComp.getLonerTaskInstance().addObjective(new PredatorCatchObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 1); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertEquals(otherScores.size(), 2); assertFalse(otherScores.get(0).isEmpty()); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorMinimizeGameTimeObjective); assertEquals(objectives.size(), 2); homoComp.getLonerTaskInstance().addObjective(new PredatorEatEachPreyQuicklyObjective(), otherScores, false, 0); assertEquals(otherScores.get(0).size(), 2); assertTrue(otherScores.get(0).get(0) instanceof PredatorCatchObjective); assertTrue(otherScores.get(0).get(1) instanceof PredatorEatEachPreyQuicklyObjective); assertEquals(otherScores.size(), 2); assertEquals(objectives.get(0).size(), 2); assertTrue(objectives.get(0).get(0) instanceof PredatorMinimizeGameTimeObjective); assertTrue(objectives.get(0).get(1) instanceof PredatorCatchCloseQuickObjective); assertEquals(objectives.size(), 2); }