the thinker
Created 8/31/2026
Active
a bot who thinks all the time has nothing to think about except thoughts
Avg score
7.779
Wins
11645
Losses
13080
Win rate
37.1%
Total battles: 31368
Score history
Avg: 7.779
Recent battles
- the thinker 8.01 vs 8.01 Grudger Tie
- Královecký kraj 6.96 vs 7.01 the thinker
- the thinker 7.25 vs 7.25 Destroyer Tie
- JBot 8.13 vs 8.2 the thinker
- Always Defect 5.02 vs 4.97 the thinker
- the thinker 4.52 vs 4.58 FlippityFloppity v3
- Wikipedia 7.89 vs 7.89 the thinker Tie
- fightAggression 8.92 vs 8.98 the thinker
- Mark3 8.7 vs 8.76 the thinker
- the thinker 5.01 vs 5.08 Corn Farmer v2
- FlippityFloppity v3 4.55 vs 4.55 the thinker Tie
- the thinker 9.56 vs 9.49 The Ultimate Bot v3
- Always Cooperate 5.5 vs 9 the thinker
- The Generous 9.72 vs 9.66 the thinker
- the thinker 9.69 vs 9.63 Not my bot
- BestBot TFT Safe 9.8 vs 9.8 the thinker Tie
- BeeBot2 4.5 vs 4.5 the thinker Tie
- the thinker 9.35 vs 7.46 detective
- DR MUNDO v0.3 9.61 vs 9.75 the thinker
- ITS CORN!🌽 THE ONLY THING TH... 6.13 vs 9.07 the thinker
- the thinker 8.23 vs 8.38 Bumwinnah4
- something 9.67 vs 9.67 the thinker Tie
- Agnes-distill-Tachyon-v3 7.91 vs 8.09 the thinker
- the thinker 5.19 vs 5.32 JBot-2
- crownbotv2 9.56 vs 9.66 the thinker
- the thinker 4.97 vs 5.02 Firstborn v2
- Dilemma-Bot-Hackclub 7.89 vs 7.89 the thinker Tie
- the thinker 7.8 vs 7.58 MoveStealer V3.6
- the thinker 9.67 vs 9.62 The Ultimate Bot v3
- the thinker 9.46 vs 9.33 human test 1
- Harvest V3 MAX 8.49 vs 8.56 the thinker
- the thinker 7.56 vs 7.69 Defect Half v2
- AcyclicTitForTat 6.31 vs 5.49 the thinker
- the thinker 5.89 vs 6.18 random
- ApexUltimate v4 9.7 vs 9.7 the thinker Tie
- the thinker 9.56 vs 9.51 JustBeatIt V5
- Number 1 9.09 vs 8.71 the thinker
- Cooperate2 7.71 vs 7.76 the thinker
- the thinker 9.44 vs 9.37 fightAggression
- adaptative v2.1 9.43 vs 9.65 the thinker
- the thinker v2 9.63 vs 9.69 the thinker
- the thinker 4.97 vs 5.01 lift yourself v1.0.1
- the thinker 8.26 vs 8.31 rollingdabeff
- the thinker 8.35 vs 8.3 the thinker v2
- FirstBot 5.02 vs 4.95 the thinker
- the thinker 4.5 vs 4.5 test 1c Tie
- the thinker 9.71 vs 9.56 JustBeatIt V7
- the thinker 9.32 vs 7.28 A Rational Individual
- the thinker 4.96 vs 5.03 JustDefunct
- Test2 5.03 vs 4.96 the thinker
Source
export default function bot({history, memory}) {
const round = history.length;
if (round === 0) return ["C", initMemory()];
const m = memory ?? initMemory();
const last = history.at(-1);
const lastOpponentMove = last.opponent;
m.recent.push(lastOpponentMove);
if (m.recent.length > 3) m.recent.shift();
const shortDefectRate =
m.recent.length > 0
? m.recent.filter(x => x === "D").length / m.recent.length
: 0;
m.coopStreak = lastOpponentMove === "C" ? m.coopStreak + 1 : 0;
const payoff = payoffOf(last.you, last.opponent);
m.payoffs.push(payoff);
if (m.payoffs.length > 6) m.payoffs.shift();
const avgPayoff = m.payoffs.reduce((a, b) => a + b, 0) / m.payoffs.length;
if (m.testPending > 0) {
m.testPending--;
if (m.testPending === 0) {
if (lastOpponentMove === "C") {
m.confirmedSoft = true;
m.retaliatory = false;
} else {
m.confirmedSoft = false;
m.retaliatory = true;
}
}
}
const TEST_THRESHOLD = 70;
const RETEST_THRESHOLD = 20;
let move;
if (m.payoffs.length >= 4 && avgPayoff <= 0.8) {
move = "D";
m.confirmedSoft = false;
} else if (m.confirmedSoft) {
if (lastOpponentMove === "D") {
m.confirmedSoft = false;
move = "D";
} else {
move = "D";
}
} else if (shortDefectRate >= 0.5) {
move = lastOpponentMove === "D" ? "D" : "C";
} else if (m.testPending === 0 && m.coopStreak >= (m.retaliatory ? RETEST_THRESHOLD : TEST_THRESHOLD)) {
move = "D";
m.testPending = 2;
} else if (lastOpponentMove === "D") {
move = Math.random() < 0.4 ? "C" : "D";
} else {
move = "C";
}
return [move, m] // Move must come 1st, then memory 2nd
}
function payoffOf(you, opp) {
if (you === "C" && opp === "C") return 2;
if (you === "D" && opp === "C") return 3;
if (you === "C" && opp === "D") return 0;
return 1;
}
function initMemory() {
return {
recent: [],
coopStreak: 0,
payoffs: [],
confirmedSoft: false,
retaliatory: false,
testPending: 0
};
}