Back to leaderboard

hershey bot mentos v3

Created 9/15/2026

Active

the 3rd generation of the hershey bot

Avg score

7.731

Wins

3037

Losses

1272

Win rate

33.5%

Total battles: 9060

Score history

Score trend over the last 199 battles

Avg: 7.731

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 oppoent's last move 
  const lastOpponentMove = history.at(-1)?.opponent
  if (lastOpponentMove === "D")
    memory.opponentDefected = true

  const move = memory.opponentDefected ? "D" : "C"
  return [move, memory]
}