Back to leaderboard

Test

Created 9/9/2026

Active

This a test to see where I need to improve the bot on

Avg score

7.858

Wins

5410

Losses

2414

Win rate

33.8%

Total battles: 15996

Score history

Score trend over the last 200 battles

Avg: 7.858

Recent battles

Source

export default function bot({ history, memory }) {
  // If memory is null, set it to an object with a property to track whether the opponent has defected
  memory = memory ?? { opponentDefected: false }
  // Get the opponent's last move
  const lastOpponentMove = history.at(-1)?.opponent
  if (lastOpponentMove === "D")
  memory.opponentDefected = true
  const move = memory.opponentDefected ? "D" : "C"
  return [move, memory]
}