Spring Challenge 2021 - Feedbacks & strategies

Finished at 300 Gold.

Bronze to silver: Sort all moves by tree’s index and print the first move, self shadow avoidance.
Silver to gold: Minimax at depth 1. I assume opponent always grows his best tree that counters whatever move I make. I tried to switch to Genetic Algorithms for a better performance and deeper search but the results were worser than minimax. So I switched back to minimax.

my final eval look like this:

eval(playerId) {
	if (day == 23) {
		solution.score = 10 * (players[playerId].score + players[playerId].sun / 3);
		return;
	}

	
	if(number of trees of size i exceed a hardcoded cap) {
		score -= capPenalty * (numTrees[i] - cap[day][i]);
	}
	if (day < 22 && I'm cutting the last level 3 tree) {
		solution.score -= cuttingLastTreePenalty;
	}
	else if (playerId == 1 || (day > 10
		&& (day + tomorrow's recovery + current sun points >= 35))) {
		solution.score += 3 * players[playerId].score + players[playerId].sun;

		for (int d = 1; (d <= days_depth) && (d + day <= 22); d++) {
			solution.score += recoveryMultiplier[d] * recovery on dth day from today;
		}
	}
	else {
		for (int d = 1; d <= days_depth; d++) {
			solution.score += recoveryMultiplier[d] * recovery on dth day from today
		}
		solution.score += for each tree pow(priority[pos.y][pos.x], 3) * tree size  * dayMultiplier[d]; //divide this by two if enemy shadows this position.
	}
}
int cuttingLastTreePenalty = 10000000;
int recoveryMultiplier[6] = { 0, 10000, 5000, 3000, 2000, 1000 };
int dayMultiplier[6] = { 0, 5, 4, 3, 2, 1 };
5 Likes