Back to leaderboard

tft bot

Created 9/12/2026

Active

simple tit for tat

Avg score

8.695

Wins

47

Losses

2348

Win rate

0.5%

Total battles: 9085

Score history

Score trend over the last 200 battles

Avg: 8.695

Recent battles

Source

export default state => {
  // Cooperate on the first round if there's no history
  if (!state.history || state.history.length === 0) {
    return ["C", state.memory];
  }
  
  // Grab the previous round's data
  const lastRound = state.history[state.history.length - 1];
  
  // Retrieve the opponent's move (checking standard property names)
  const opponentMove = lastRound.opponent !== undefined ? lastRound.opponent : lastRound[1]; 
  
  // Play what they just played
  return [opponentMove || "C", state.memory];
}