Swimmingbot1v3
Created 9/13/2026
Active
Adaptive v3
Avg score
5.719
Wins
8216
Losses
1884
Win rate
77.2%
Total battles: 10637
Score history
Avg: 5.719
Recent battles
- Veritasium 5.16 vs 5.2 Swimmingbot1v3
- Defected_Boy111 5.25 vs 5.31 Swimmingbot1v3
- Swimmingbot1v3 5.75 vs 5.11 BestBot TFT Safe
- Swimmingbot1v3 5.3 vs 5.24 Tuff9
- kind but faster detective 5.09 vs 4.97 Swimmingbot1v3
- Swimmingbot1v3 5.27 vs 5.21 MoveStealer v2
- Swimmingbot1v3 7.84 vs 2.74 Swimmingbot2
- Swimmingbot1v3 5.48 vs 5.35 jingolfika
- Swimmingbot1v3 6.16 vs 4.41 BIUN V3
- bigger memory 5.18 vs 5.23 Swimmingbot1v3
- Swimmingbot1v3 5.84 vs 5.16 BestBot TFT Safe
- Swimmingbot1v3 5.76 vs 5.35 apex predator v4
- Mabey 5.06 vs 4.92 Swimmingbot1v3
- no 1.52 vs 8.12 Swimmingbot1v3
- Swimmingbot1v3 5.56 vs 5.36 ApexUltimate v3
- Harvest V3 MAX 5.37 vs 5.75 Swimmingbot1v3
- Swimmingbot1v3 5.33 vs 5.26 Test
- Swimmingbot1v3 5.32 vs 5.25 DR MUNDO v0.3
- Swimmingbot1v3 4.92 vs 5.06 JustDefunct
- Bot 1 5.02 vs 5.78 Swimmingbot1v3
- Swimmingbot1v3 5.29 vs 5.23 NexBot III
- Swimmingbot1v3 6.42 vs 4.13 random5050
- cop5 5.14 vs 5.1 Swimmingbot1v3
- AaravC Bot 1 5.23 vs 5.29 Swimmingbot1v3
- Cooperate2 5.19 vs 5.24 Swimmingbot1v3
- Swimmingbot1v3 5.19 vs 5.15 Apex
- Swimmingbot1v3 7.4 vs 7.47 AcyclicTitForTat
- BestBot TFT Safe 5.01 vs 5.66 Swimmingbot1v3
- Swimmingbot1v3 5.57 vs 5.22 fightAggression
- One Last Win v0.1 5.2 vs 5.25 Swimmingbot1v3
- Cobra 5.25 vs 5.32 Swimmingbot1v3
- The Ultimate Bot v3 5.4 vs 5.54 Swimmingbot1v3
- Swimmingbot1v3 5.33 vs 5.26 Aura67
- Swimmingbot1v3 5.28 vs 5.22 Tieseeeeeeeeeeeeker v2
- Dev defect def 5.09 vs 4.88 Swimmingbot1v3
- always defect 5.09 vs 4.88 Swimmingbot1v3
- raju 5.23 vs 5.29 Swimmingbot1v3
- Swimmingbot1v3 5.33 vs 5.26 ٠new X
- Bumwinnah2 6.82 vs 7.78 Swimmingbot1v3
- kind detective 5.15 vs 5.02 Swimmingbot1v3
- Wikipedia 5.18 vs 5.23 Swimmingbot1v3
- fightAggression 4.93 vs 5.61 Swimmingbot1v3
- Swimmingbot1v3 5.58 vs 4.34 llama(1.6)
- mahad kay 5.08 vs 4.89 Swimmingbot1v3
- Swimmingbot1v3 5.93 vs 5.08 Tachyon-v1
- BeeBot3 5.5 vs 5.5 Swimmingbot1v3 Tie
- tie II 5.29 vs 5.29 Swimmingbot1v3 Tie
- Always Defect 5.04 vs 4.95 Swimmingbot1v3
- Swimmingbot1v3 5.22 vs 5.18 tit for tat
- evil meow limited edition 5.31 vs 5.77 Swimmingbot1v3
Source
export default function bot(state) {
const history = state?.history || [];
const memory = state?.memory || {
mode: "unknown",
farming: false,
farmRounds: 0,
probes: 0,
punish: 0,
cooperation: 0,
defection: 0
};
const round = history.length;
if (round === 0) {
return ["C", memory];
}
const last = history[round - 1];
const opp = last.opponent;
const mine = last.you;
if (opp === "C") {
memory.cooperation++;
} else {
memory.defection++;
}
if (round === 1) {
return ["C", memory];
}
if (round === 2) {
if (
history[0].opponent === "C" &&
history[1].opponent === "C"
) {
memory.mode = "cooperative";
}
if (
history[0].opponent === "D" &&
history[1].opponent === "D"
) {
memory.mode = "aggressive";
}
return ["C", memory];
}
if (round >= 6 && memory.defection === 0) {
memory.mode = "always-cooperate";
}
if (memory.mode === "always-cooperate") {
if (opp === "D") {
memory.mode = "reactive";
memory.farming = false;
return ["D", memory];
}
return ["D", memory];
}
if (round >= 5 && memory.cooperation === 0) {
memory.mode = "always-defect";
return ["D", memory];
}
if (round >= 7) {
let matches = 0;
let checks = 0;
for (let i = 1; i < round; i++) {
if (
history[i].opponent ===
history[i - 1].you
) {
matches++;
}
checks++;
}
if (
checks >= 6 &&
matches / checks >= 0.8
) {
memory.mode = "tft";
}
}
if (round >= 8) {
let reverse = 0;
let checks = 0;
for (let i = 1; i < round; i++) {
if (
history[i].opponent !==
history[i - 1].you
) {
reverse++;
}
checks++;
}
if (
checks >= 7 &&
reverse / checks >= 0.8
) {
memory.mode = "reverse";
}
}
if (round >= 8) {
let alternating = true;
const start = Math.max(1, round - 8);
for (let i = start; i < round; i++) {
if (
history[i].opponent ===
history[i - 1].opponent
) {
alternating = false;
break;
}
}
if (alternating) {
memory.mode = "alternating";
}
}
const window = Math.min(10, round);
let recentC = 0;
let recentD = 0;
for (
let i = round - window;
i < round;
i++
) {
if (history[i].opponent === "C") {
recentC++;
} else {
recentD++;
}
}
const cooperationRate =
recentC / window;
const defectionRate =
recentD / window;
if (defectionRate >= 0.8) {
memory.mode = "aggressive";
memory.farming = false;
return ["D", memory];
}
if (memory.farming) {
if (opp === "D") {
memory.farming = false;
memory.mode = "reactive";
memory.punish = 1;
return ["D", memory];
}
memory.farmRounds++;
return ["D", memory];
}
if (
round >= 12 &&
round <= 30 &&
memory.probes < 2 &&
cooperationRate >= 0.85
) {
memory.probes++;
return ["D", memory];
}
if (
memory.probes > 0 &&
opp === "C" &&
mine === "D"
) {
memory.farming = true;
memory.mode = "farmer";
return ["D", memory];
}
if (cooperationRate >= 0.75) {
if (opp === "D") {
memory.punish = 1;
return ["D", memory];
}
if (memory.punish > 0) {
memory.punish--;
}
return ["C", memory];
}
if (memory.mode === "tft") {
if (
opp === "D" &&
round >= 4
) {
memory.punish = 1;
return ["D", memory];
}
if (
memory.punish > 0 &&
opp === "C"
) {
memory.punish--;
return ["C", memory];
}
return [opp, memory];
}
if (memory.mode === "reverse") {
if (opp === "C") {
return ["D", memory];
}
return ["C", memory];
}
if (memory.mode === "alternating") {
if (opp === "C") {
return ["D", memory];
}
return ["C", memory];
}
if (round >= 4) {
const previous = history[round - 2];
if (
previous.you === "D" &&
previous.opponent === "D" &&
mine === "D" &&
opp === "D"
) {
if (cooperationRate >= 0.4) {
memory.punish = 0;
return ["C", memory];
}
}
}
if (defectionRate >= 0.45) {
if (opp === "D") {
memory.punish = 1;
return ["D", memory];
}
if (memory.punish > 0) {
memory.punish--;
return ["C", memory];
}
return ["D", memory];
}
if (opp === "D") {
memory.punish = 1;
return ["D", memory];
}
return ["C", memory];
}