No description
  • Kotlin 87%
  • Shell 7%
  • CSS 3.5%
  • Batchfile 2.5%
Find a file
Kilian K 014e821c08 fix(ci): use release-cli assets-link for GitLab releases.
Replace unsupported --assets-path with artifact URLs pointing at the build job outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 16:37:11 +02:00
.gradle Initial commit 2026-06-06 15:12:41 +02:00
.idea Initial commit 2026-06-06 15:12:41 +02:00
build Initial commit 2026-06-06 15:12:41 +02:00
gradle/wrapper Initial commit 2026-06-06 15:12:41 +02:00
resources Remove dead code and add project documentation. 2026-06-06 15:28:17 +02:00
src Remove dead code and add project documentation. 2026-06-06 15:28:17 +02:00
.gitignore Remove dead code and add project documentation. 2026-06-06 15:28:17 +02:00
.gitlab-ci.yml fix(ci): use release-cli assets-link for GitLab releases. 2026-06-06 16:37:11 +02:00
ARCHITECTURE.md ci: add GitLab pipeline with tagged releases. 2026-06-06 16:19:54 +02:00
build.gradle.kts ci: add GitLab pipeline with tagged releases. 2026-06-06 16:19:54 +02:00
gradlew Initial commit 2026-06-06 15:12:41 +02:00
gradlew.bat Initial commit 2026-06-06 15:12:41 +02:00
README.md ci: add GitLab pipeline with tagged releases. 2026-06-06 16:19:54 +02:00
settings.gradle.kts Initial commit 2026-06-06 15:12:41 +02:00
WMPredict.iml Initial commit 2026-06-06 15:12:41 +02:00

WMPredict

Monte Carlo prediction engine for the 2026 FIFA World Cup (48 teams, 12 groups, 32-team knockout). Built in Kotlin on the JVM with a JavaFX GUI and a CLI for scripting.

Features

  • Match predictions — Poisson xG model from blended Elo ratings; score, fun score, W/D/L probabilities, plausibility
  • Play-day schedule — 72 group fixtures across 17 calendar days (June 1127)
  • Live ratingseloratings.net, FIFA world ranking points, bundled fallback
  • Elo blending — scale-calibrated mean/median or primary-source mode
  • Recorded results — update standings, Elo, and downstream predictions (upset cascades)
  • Knockout bracket — official FIFA-style bracket from brackets.json
  • Monte Carlo — champion probability simulation
  • JavaFX GUI — tabs for predictions, recording results, match lookup, Elo, Monte Carlo, played results

Requirements

  • JDK 21
  • Display server for the GUI (or use CLI only)

Quick start

./gradlew run                              # JavaFX GUI (default)
./gradlew run --args="predict"             # all predictions (CLI)
./gradlew run --args="predict playday 3"   # one play day
./gradlew run --args="MATCH Germany France"
./gradlew run --args="record 7 1 2"        # record group match M7
./gradlew run --args="elo"                 # Elo report
./gradlew run --args="monte-carlo 5000"    # Monte Carlo simulation

Build without running:

./gradlew build

Project layout

src/
  Main.kt                 # CLI entry
  service/                # TournamentService (shared API)
  ui/                     # JavaFX application
  prediction/             # Poisson model, tournament predictor
  tournament/             # Groups, bracket, knockout engine
  montecarlo/             # Simulation engine
  rating/                 # Elo sources, blending, adjustment
  io/                     # JSON loaders and live fetchers
  model/                  # Core data types
resources/
  groups.json             # 12 groups × 4 teams
  schedule.json           # 72 group fixtures
  brackets.json           # Knockout bracket
  elo.json                # Cached ratings fallback
  results.json            # User-recorded scores
  team_aliases.json       # Name normalisation

See ARCHITECTURE.md for design details.

Data files

File Purpose
groups.json Tournament groups and team names
schedule.json Match numbers, play days, dates, home/away
brackets.json R32 → Final slot wiring
elo.json Offline Elo fallback (~worldfootballrankings scale)
results.json Played scores (matchNumber or matchId)
team_aliases.json Maps external names → canonical tournament names

Recorded results are written back to resources/results.json at runtime.

Elo sources

When Fetch live ratings is enabled:

  1. eloratings.net — World Football Elo (TSV)
  2. FIFA pointsapi.fifa.com men's ranking
  3. cached elo.json — bundled fallback

The Elo blend setting controls how a single Team.elo is derived (default: scale-calibrated mean). See ARCHITECTURE.md.

Prediction model (short)

  1. Elo difference → expected goals λ (Poisson)
  2. Outcome probabilities (home / draw / away)
  3. Most likely exact scoreline within the predicted outcome
  4. Fun score — rounded xG plus winner bonus tiers (display only)
  5. Plausibility — how likely the score is under the Poisson model

Knockout matches never use draw scorelines in predictions; ties are labelled “Level” (90 minutes).

CI/CD and releases (GitLab)

Pipelines run on merge requests, main, and version tags.

Trigger Jobs Output
MR / main push build Job artifacts (JAR + zip/tar), 30 days
Tag v* (e.g. v1.0.0) build + release GitLab Release with attached assets

Create a release:

git tag v1.0.0
git push origin v1.0.0

The tag (without the v prefix) becomes the Gradle project version, so assets are named e.g. WMPredict-1.0.0.zip.

Download artifacts from CI/CD → Pipelines → job → Browse artifacts, or from Deploy → Releases after tagging.

License

No license file is included yet. Treat as private unless otherwise stated.