Back to leaderboard

Redgux

Created 9/13/2026

Active

THE ULTIMATE TIT FOR TATTER

Avg score

7.047

Wins

5546

Losses

2796

Win rate

52.7%

Total battles: 10528

Score history

Score trend over the last 199 battles

Avg: 7.047

Recent battles

Source

export default function Redgyx({ history, memory }) {
    const currentRound = history.length;

    if (!memory) {
        memory = { strategy: "C", copy: false, detective: false };
    }


    if (currentRound === 0) return ["C", memory];
    if (currentRound === 1) return ["C", memory];


    const lastOpponentMove = history[currentRound - 1].opponent;


    if (currentRound === 2) {
        const opp0 = history[0].opponent;
        const opp1 = history[1].opponent;

        if (opp0 === "C" && opp1 === "D") {
            memory.detective = true;
        }
    }

    // 5. Trigger copycat override condition on round 31 if opponent never defected
    const totalDefects = history.filter(round => round.opponent === "D").length;
    if (currentRound === 31 && totalDefects === 0) {
        memory.copy = true;
    }


    if (memory.copy || memory.detective) {
        memory.strategy = "D";
    } else if (lastOpponentMove === "D") {
        memory.strategy = "D";
    } else {
        memory.strategy = "C";
    }

    return [memory.strategy, memory];
}