Lee Wrangler
Created 9/13/2026
Active
work
Avg score
8.169
Wins
2933
Losses
5287
Win rate
26.4%
Total battles: 11128
Score history
Avg: 8.169
Recent battles
- Lee Wrangler 9.14 vs 9.01 apex predator v4
- Lee Wrangler 9.68 vs 9.68 glitch v2.2 for stag hunt Tie
- Lee Wrangler 9.13 vs 9.3 JBot-2
- Lee Wrangler 4.97 vs 5.02 mahoraga v2
- Lee Wrangler 5.17 vs 6.1 FlippityFloppity v3
- the tuff copier 9.52 vs 9.52 Lee Wrangler Tie
- JustBeatIt V7 8.9 vs 8.94 Lee Wrangler
- Tit for Two Tats 9.64 vs 9.85 Lee Wrangler
- playing.to.win 8.62 vs 8.42 Lee Wrangler
- bigger memory 9.2 vs 9.54 Lee Wrangler
- Tit for Two Tats 9.16 vs 9.74 Lee Wrangler
- Lee Wrangler 9.48 vs 9.48 Defected_Boy111 Tie
- Lee Wrangler 4.97 vs 5.02 Test123
- Lee Wrangler 4.92 vs 5.04 FirstBot
- Redgux 8.96 vs 8.96 Lee Wrangler Tie
- Lee Wrangler 4.96 vs 5.03 Forgiver
- ICY EXODILED AIC A-TRONICS 8.21 vs 8.03 Lee Wrangler
- Lee Wrangler 9.6 vs 9.6 crownbotv2 Tie
- Lee Wrangler 7.85 vs 7.8 Lagged Punisher
- random 7.36 vs 6.44 Lee Wrangler
- slash 9.59 vs 9.59 Lee Wrangler Tie
- Lee Wrangler 9.98 vs 9.91 C!
- defect until 2 cops 5.03 vs 4.96 Lee Wrangler
- Lee Wrangler 8.72 vs 8.61 jingolfika
- JBot 6.13 vs 6.07 Lee Wrangler
- Forgiving Destroyer 6.21 vs 6.14 Lee Wrangler
- Lee Wrangler 9.87 vs 9.42 C!
- raju 8.19 vs 8.33 Lee Wrangler
- Lee Wrangler 9.36 vs 9.2 something
- Ω new X 9.44 vs 9.88 Lee Wrangler
- Lee Wrangler 9.98 vs 9.91 better
- Lee Wrangler 9.63 vs 9.49 human test 1
- Veritasium 9.12 vs 9.12 Lee Wrangler Tie
- Lee Wrangler 6.22 vs 6.98 RanBot3003
- Lee Wrangler 6.62 vs 6.68 Dilemma-Bot-Hackclub
- Cobra 9.14 vs 9.2 Lee Wrangler
- Opportunist v4 9.85 vs 9.97 Lee Wrangler
- random 6.35 vs 5.59 Lee Wrangler
- Lee Wrangler 8 vs 1 copycat
- Lee Wrangler 4.97 vs 5.02 Test123
- Lee Wrangler 9.25 vs 9.19 Poseidon
- Cobra 9.62 vs 9.62 Lee Wrangler Tie
- Lee Wrangler 9.07 vs 9.12 WILLIAM SMITH
- Lee Wrangler 9.1 vs 9.03 Defected_Boy111
- Christopher 5.14 vs 5.08 Lee Wrangler
- Chicken banana π π 9.57 vs 9.82 Lee Wrangler
- Lee Wrangler 8.62 vs 8.62 Tieseeeeeker Tie
- Lagged Punisher 9.43 vs 9.43 Lee Wrangler Tie
- no 9.68 vs 9.93 Lee Wrangler
- mahoraga v2 5.03 vs 4.97 Lee Wrangler
Source
// Game Payoffs
const PAYOFF_REWARD = 2; // Mutual Cooperation (C, C)
const PAYOFF_SUCKER = 0; // Sucker's Payoff (C, D)
const PAYOFF_TEMPTATION = 3; // Temptation to Defect (D, C)
const PAYOFF_PUNISHMENT = 1; // Mutual Defection (D, D)
const PAYOFFS = {
C: { C: PAYOFF_REWARD, D: PAYOFF_SUCKER },
D: { C: PAYOFF_TEMPTATION, D: PAYOFF_PUNISHMENT }
};
// Strategy Settings
const INITIAL_COOP_PROB = 0.85;
const LOW_COOP_PROB = 0.5;
const MAX_COOP_PROB = 0.95;
const PROB_INCREMENT = 0.05;
const INITIAL_INTERVAL = 8;
const SCORE_BENCHMARK = 1.5;
const TRUST_THRESHOLD = 0.5;
// Weight Multiplier for the most recent round
const LAST_ROUND_WEIGHT = 3;
// Move Constants
const MOVE_COOPERATE = "C";
const MOVE_DEFECT = "D";
export default function bot({ history, memory }) {
const round = history.length;
// Warm-up phase: Strict Tit-for-Tat
if (round < INITIAL_INTERVAL) {
if (round === 0) {
return [MOVE_COOPERATE, memory];
}
const lastOpponentMove = history.at(-1).opponent;
return [lastOpponentMove, memory];
}
// Initialize or restore state
const state = memory ?? { prob: INITIAL_COOP_PROB };
// Window for the most recent INITIAL_INTERVAL rounds
const recentWindow = history.slice(-INITIAL_INTERVAL);
const totalWindowWeight = (recentWindow.length - 1) + LAST_ROUND_WEIGHT;
// Calculate weighted trust rating over the last INITIAL_INTERVAL rounds
let weightedCoopSum = 0;
for (let i = 0; i < recentWindow.length; i++) {
const weight = i === recentWindow.length - 1 ? LAST_ROUND_WEIGHT : 1;
if (recentWindow[i].opponent === MOVE_COOPERATE) {
weightedCoopSum += weight;
}
}
const weightedTrustScore = weightedCoopSum / totalWindowWeight;
// Calculate weighted average score over the last INITIAL_INTERVAL rounds
let weightedPointsSum = 0;
for (let i = 0; i < recentWindow.length; i++) {
const weight = i === recentWindow.length - 1 ? LAST_ROUND_WEIGHT : 1;
const roundScore = PAYOFFS[recentWindow[i].you][recentWindow[i].opponent];
weightedPointsSum += roundScore * weight;
}
const weightedAvgScore = weightedPointsSum / totalWindowWeight;
// Decision logic evaluated every single round
if (weightedTrustScore < TRUST_THRESHOLD) {
// Trust takes absolute priority
state.prob = weightedTrustScore;
} else {
// Fall back to recent weighted score benchmark
if (weightedAvgScore >= SCORE_BENCHMARK) {
state.prob = Math.min(MAX_COOP_PROB, Math.max(state.prob, INITIAL_COOP_PROB) + PROB_INCREMENT);
} else {
state.prob = LOW_COOP_PROB;
}
}
// Roll move based on current calculated probability
const move = Math.random() < state.prob ? MOVE_COOPERATE : MOVE_DEFECT;
return [move, state];
}