private static void extractTrapDominance(GameState state, double[] features){
		int[] weights = { 9, 8, 7, 5, 4, 1, 2, 3 };
		byte[] pieceRanks = Utilities.calculatePieceTypes(state);
		for(int i = 0; i < TRAP.length; i++){
			for(int j = 0; j < state.piece_bb.length; j++){
				double score = 0;

				for (int cell = 0; cell < 64; cell++){
					if ((state.piece_bb[j] & (1L << cell)) > 0){
						int distance = getDistance(cell, i);
						
						if (distance > 4){
							continue; //dont consider pieces that are greater than 4 away
						} else if (distance == 0){
							distance = 2; //assume that distance of a piece on trap is equivalent to 2 hops away
						}
						
						score += (1.0/distance)*weights[pieceRanks[j]];
						
					}
				}
				
				int trapFeatureID= (j % 2)*TRAP.length + i; //assigns a unique index for each (player, trap square) tuple
				features[NUM_PIECES_FEATURES + NUM_PIECE_RANK_FEATURES + trapFeatureID] += (score / MAX_TRAP_DOMINANCE_SCORE);
			}
		}
		

	}