Back to leaderboard

big GRIM guy

Created 9/12/2026

Active

he is BIG and he is STRONG and he is ready to fight you ALL

Avg score

8.068

Wins

840

Losses

4314

Win rate

9.2%

Total battles: 9180

Score history

Score trend over the last 200 battles

Avg: 8.068

Recent battles

Source

export default state => {
	const history = state.history || [];
	const memory = state.memory || { oppDefectCount: 0, triggered: false };

	const TOLERANCE = 13; // tuned peak: locks into permanent defection only
	                      // after the opponent has defected 13 times total

	const getOppMove = round => {
		if (round.opponent !== undefined) return round.opponent;
		if (round.opponentMove !== undefined) return round.opponentMove;
		if (round.their !== undefined) return round.their;
		if (round.theirMove !== undefined) return round.theirMove;
		if (Array.isArray(round)) return round[1];
		return round.opponent;
	};

	if (history.length === 0) {
		return ["C", memory];
	}

	const lastOppMove = getOppMove(history[history.length - 1]);
	if (lastOppMove === "D") {
		memory.oppDefectCount++;
	}

	if (memory.oppDefectCount >= TOLERANCE) {
		memory.triggered = true;
	}

	const move = memory.triggered ? "D" : "C";
	return [move, memory];
}