Tuff9
Created 9/9/2026
Active
tuff
Avg score
8.539
Wins
83
Losses
4287
Win rate
0.5%
Total battles: 15908
Score history
Avg: 8.539
Recent battles
- Tuff9 10 vs 10 neuralAdapter V1 Tie
- Tuff9 9.92 vs 9.92 ITS CORN!🌽 THE ONLY THING TH... Tie
- NexBot III 10 vs 10 Tuff9 Tie
- evil meow limited edition 10 vs 10 Tuff9 Tie
- crownbotv2 10 vs 10 Tuff9 Tie
- Tuff9 9.9 vs 9.9 detective_test Tie
- Swimmingbot1v3 5.3 vs 5.24 Tuff9
- Tuff9 10 vs 10 Czechias imperium Tie
- BIUN V3 10 vs 10 Tuff9 Tie
- human test 1 10 vs 10 Tuff9 Tie
- NexBot VI 10 vs 10 Tuff9 Tie
- Tuff9 10 vs 10 GenerousTitForTat Tie
- Reverse Tit for Tat 6.02 vs 5.96 Tuff9
- evil meow 9.91 vs 9.91 Tuff9 Tie
- Mark3 5.06 vs 5.01 Tuff9
- Tuff9 10 vs 10 bigger memory Tie
- Tuff9 9.77 vs 9.77 llama(1.6) Tie
- Tuff9 4.96 vs 5.03 Dev defect def
- DR MUNDO v0.2 10 vs 10 Tuff9 Tie
- Tuff9 9.92 vs 9.92 Poseidon Tie
- Tuff9 10 vs 10 Lagged Punisher Tie
- Tuff9 10 vs 10 Královecký kraj Tie
- hershey bot mentos v3 10 vs 10 Tuff9 Tie
- i copied srihan 9.89 vs 9.89 Tuff9 Tie
- Tuff9 5.03 vs 5.07 cop7
- Tuff9 4.96 vs 5.03 Dev defect def
- Tuff9 10 vs 10 Better-Tuff8 Tie
- test 1e 4.7 vs 4.63 Tuff9
- Opportunist 5.26 vs 5.19 Tuff9
- Tuff9 10 vs 10 playing.to.win Tie
- Forgiver 5.03 vs 4.96 Tuff9
- ApexUltimate v4 9.89 vs 9.89 Tuff9 Tie
- Tuff9 10 vs 10 Always cooperates Tie
- Agnes-distill-Tachyon-v2 9.92 vs 9.92 Tuff9 Tie
- Forgiving Destroyer 10 vs 10 Tuff9 Tie
- Tuff9 4.96 vs 5.02 lift yourself v1.0.1
- Opportunist 6.69 vs 6.69 Tuff9 Tie
- Opportunist v3 5.7 vs 5.64 Tuff9
- test 1c 4.5 vs 4.5 Tuff9 Tie
- Test123 5.03 vs 4.96 Tuff9
- Tuff9 6.33 vs 6.33 RanBot3006 Tie
- Tuff9 10 vs 10 Zemra 2 Tie
- Tuff9 4.5 vs 4.5 evil tic tacs Tie
- yes 5.03 vs 4.96 Tuff9
- ApexUltimate v3 9.9 vs 9.9 Tuff9 Tie
- hershey bot mentos v3 10 vs 10 Tuff9 Tie
- greedy tic tacs 9.2 vs 9.2 Tuff9 Tie
- Tuff9 10 vs 10 goatbotv4.1 Tie
- Tuff9 9.91 vs 9.91 Test Tie
- One Last Win v0.1 10 vs 10 Tuff9 Tie
Source
const H = 6; // hidden size
const INPUT_SIZE = 5; // [opponent_C, opponent_D, own_C, own_D, bias]
const OUTPUT_SIZE = 2; // [C logit, D logit]
const Wxh = [
[0, 1, 0, 0, 0], // h0: reacts to opponent defection
[0, 0, 1, 0, 0], // h1: own defection (unused)
[0, 0, 0, 1, 0], // h2: own cooperation (unused)
[0, 0, 0, 0, 1], // h3: bias unit
[0, 0, 0, 0, 0], // h4: unused
[0, 0, 0, 0, 0] // h5: unused
];
const Whh = [
[0,0,0,0,0,0],
[0,0,0,0,0,0],
[0,0,0,0,0,0],
[0,0,0,0,0,0],
[0,0,0,0,0,0],
[0,0,0,0,0,0]
];
const bh = [0,0,0,0,0,0];
const Why = [
[0, 0, 0, 0, 0, 0], // C logit: only a small bias
[5, 0, 0, 0, 0, 0] // D logit: strong response to h0
];
const by = [0.5, -2]; // biases for C and D
function dot(a, b) {
let sum = 0;
for (let i = 0; i < a.length; i++) sum += a[i] * b[i];
return sum;
}
export default function bot({ history, memory }) {
let h;
if (memory && memory.h) {
h = memory.h;
} else {
h = new Array(H).fill(0);
}
let oppC = 0, oppD = 0, ownC = 0, ownD = 0;
if (history.length > 0) {
const last = history[history.length - 1];
oppC = last.opponent === "C" ? 1 : 0;
oppD = last.opponent === "D" ? 1 : 0;
ownC = last.you === "C" ? 1 : 0;
ownD = last.you === "D" ? 1 : 0;
}
const x = [oppC, oppD, ownC, ownD, 1]; // include bias
const newH = new Array(H);
for (let i = 0; i < H; i++) {
let sum = bh[i];
sum += dot(Wxh[i], x);
sum += dot(Whh[i], h);
newH[i] = Math.tanh(sum);
}
// Compute output logits
const logits = new Array(OUTPUT_SIZE);
for (let i = 0; i < OUTPUT_SIZE; i++) {
logits[i] = by[i] + dot(Why[i], newH);
}
const move = logits[0] >= logits[1] ? "C" : "D";
// Save hidden state in memory
memory = { h: newH };
return [move, memory];
}