Back to leaderboard

eyk6

Created 9/10/2026

Active

test bot

Avg score

8.740

Wins

85

Losses

3911

Win rate

0.6%

Total battles: 14649

Score history

Score trend over the last 199 battles

Avg: 8.740

Recent battles

Source

export default function bot({ history }) {
  const trust = 0.01; //1 = good, -1 = bad
  
  let currentTrust = history && history.length > 0 ? (history.at(-1)?.memory ?? trust) : trust;
  const lastOpMove = history && history.length > 0 ? history.at(-1)?.opponent : null;

  if (lastOpMove === "D") {
    currentTrust -= 0.5;
  } else if (lastOpMove === "C") {
    currentTrust += 0.1;
  }

  let move = "C";
  if (currentTrust > 0) {
    move = "C";
  } else {
    move = "D";
  }

  return[move,null];
}