{
  "id": 10175290,
  "title": "I found the Clash of Clans API and ended up building a war simulator",
  "url": "https://urgent.news/2026/09/27/i-found-the-clash-of-clans-api-and-ended-up-building-a-war-simulator",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-27T08:36:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kavinkumarr/i-found-the-clash-of-clans-api-and-ended-up-building-a-war-simulator-58n9"
  },
  "original_language": "en",
  "account": "The Clash of Clans developer API caught the attention of a curious developer, who decided to build a war simulator called WarOracle. The basic concept behind WarOracle is to simulate Clash of Clans wars and provide an estimate of how they might unfold. To achieve this, the developer collects data such as the current war status, players involved, Town Hall levels, heroes, equipment, and previous attack history.\n\nUsing this data, WarOracle performs Monte Carlo simulations to generate various outcomes, including win, loss, and draw probabilities, the expected final stars, and the possible final score range and distribution of simulated outcomes. One of the more challenging aspects of the project was handling ongoing wars. Since already completed attacks are known outcomes, the system treats them as fixed values and only simulates the remaining attacks.\n\nThe developer also explored using the same data to generate attacker and target assignments, but is still uncertain if this feature is truly valuable. The backend of WarOracle is built using Spring Boot and Java, while the frontend is developed with React. To optimize the simulation engine, the developer is currently experimenting with how much player-specific history should factor into the outcomes versus relying on general historical data.\n\nThe project is open-source and can be found at https://waroracle.me. The developer is primarily motivated by curiosity and seeks feedback on whether WarOracle provides value to Clash of Clans players. Additionally, the developer is interested in learning about best practices for modeling limited and noisy data when building simulation and probabilistic systems.",
  "summary": "I was looking for something to build and came across the Clash of Clans developer API. I didn't have a particular problem I wanted to solve. I just started looking through the API and wondering what I could build with the data it exposes. That eventually turned into WarOracle. The basic idea is to simulate a Clash of Clans war and see how it could play out. For a clan, I look at the current war,…",
  "key_points": [
    "Developer builds WarOracle to simulate Clash of Clans wars",
    "Uses Monte Carlo simulations for win/loss/draw probabilities",
    "Open-source project available at https://waroracle.me"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}