@Override
	protected GPCreature getReplacement(GPCreature current) {
		/**First see if crossover occurs for this creature*/
		double randDouble = RANDGEN.nextDouble(); 
		if (randDouble >= GPConfig.getProbCrossover())
			return current; //do nothing in this case

		/**Randomly select TOURNY_SIZE-1 opponents*/
		List<GPCreature> pool = new ArrayList<GPCreature>();
		pool.add(current); 

        final int maxIndex = TOURNY_SIZE - 1;
		for (int i = 0; i < maxIndex; i++) {
            int randIndex = -1; 
            do {
                randIndex = RANDGEN.nextInt(currentPop.size()); 
            }
            while (randIndex == current.getId()); 

			pool.add(currentPop.get(randIndex)); 
		}

		/**Sort by fitness in ascending order*/
		java.util.Collections.sort(pool);

		try {
			assert(pool.get(0).getFitness() <= pool.get(1).getFitness()):
				"NonSpatialTournamentPop: tournament pool not sorted."; 
		}
		catch (InvalidFitnessException e) {}

		randDouble = RANDGEN.nextDouble();
		GPCreature winner = null;

		/**Randomly select a winner*/
    
		for (int i = 0; i <= maxIndex; i++) {
			if (randDouble < probDistro[i]) {
				winner = pool.get(maxIndex - i); 
				break; 
			}
		}
		assert (winner != null) : 
			"NonSpatialTournamentPop: Failed to select a tournament winner"; 
		
		/**Randomly choose creature to mate with the winner, return offspring*/
		GPCreature randomMate = null; 
		do { //Don't allow winner to reproduce with itself
			randomMate = pool.get(RANDGEN.nextInt(pool.size())); 
		} while (randomMate.getId() == winner.getId()); 

		GPCreature offspring = winner.getOffspring(randomMate); 
		offspring.setId(current.getId()); 
		return offspring; 
	}