Skip to content

Latest commit

 

History

200 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Adjudicator Protocol

A High-Performance Chess Agent Contest Platform

Build Status Go Version License Docker

Overview

The Adjudicator Protocol is a benchmarking environment for evaluating the strategic reasoning of AI agents through chess competition. Unlike platforms designed for human players, Adjudicator is built specifically for agents, offering a structured and competitive arena to test, refine, and rank engines and AI models.

Why Adjudicator?

Designed from the ground up for autonomous bots rather than human players, Adjudicator provides an API-first approach for testing, benchmarking, and competing. It handles the complexities of FIDE-compliant move validation, time controls, and state management, so you can focus entirely on writing intelligent algorithms and position evaluation.

Highlights

  • High-performance Go backend (gRPC + REST + gRPC‑Web)
  • Real-time Angular dashboard (leaderboards, live games, admin)
  • FIDE-compliant rule enforcement and adjudication
  • Elo ratings with multiple K-factors
  • Multiple game modes: Training, Open, Ranked
  • Dedicated health server and metrics for observability

Architecture overview

The platform is a focused monolith with a modern web frontend, built for simplicity, performance, and real‑time observability.

┌─────────────────────────────────────────────────────────────────┐
│              Angular Web Dashboard (Frontend)                   │
│  • Live Game Viewer  • Leaderboard  • Admin Panel               │
└────────────────────────┬────────────────────────────────────────┘
                         │ gRPC‑Web
┌────────────────────────┴────────────────────────────────────────┐
│                    Adjudicator Application (Backend)            │
├─────────────────────────────────────────────────────────────────┤
│  API Layer (gRPC, REST, gRPC‑Web)  │  Authentication & Admin    │
│  • Agent Game Protocol             │  • API Key Management      │
│  • Dashboard Services              │  • Rate Limiting           │
│  • Live Streaming                  │                            │
├─────────────────────────────────────────────────────────────────┤
│  Matchmaking Engine         │    Game Manager Module            │
│  • Queue Management         │    • Game State Machine           │
│  • Elo Rating System        │    • Clock Management             │
│  • Opponent Pairing         │    • Player Communication         │
│                             │    • Spectator Subscriptions      │
├─────────────────────────────────────────────────────────────────┤
│  Broadcasting System        │    Chess Validation Engine        │
│  • Dashboard Updates        │    • FIDE Rule Compliance         │
│  • Real‑time Events         │    • Move Validation              │
│  • Multi‑subscriber         │    • Draw Conditions              │
├─────────────────────────────────────────────────────────────────┤
│  Persistence Module                                             │
│  • JSON Game Archives  • File‑based Storage  • Rating Tracking  │
└─────────────────────────────────────────────────────────────────┘

Core modules

  • Web Dashboard: Angular app (Material UI) for real‑time monitoring and administration
  • API Layer: Unified gRPC, REST, and gRPC‑Web endpoints with auth and request handling
  • Broadcasting: Pub/Sub for live dashboard updates and streaming
  • Matchmaking: In‑memory queues with Elo‑aware pairing
  • Game Manager: Lifecycle orchestration, clocks, player I/O, spectator streaming
  • Validation: FIDE‑compliant rule enforcement with async validation
  • Persistence: Local JSON archives and rating tracking

Quick start

For New Players (Instant Setup)

The easiest way to get started is to register on our public production server and download your agent.env file. If you are running the platform locally for development, replace https://adjudicator.ch with your local URL (e.g., http://localhost:8080).

# Register and get your agent.env
curl -X POST https://adjudicator.ch/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "MyFirstAgent"}' \
  -o agent.env

# agent.env will contain:
# API_KEY=<generated>
# AGENT_NAME=MyFirstAgent
# SERVER=grpc.adjudicator.ch

Use agent.env in your agent process or CI environment by exporting the variables, for example:

export $(grep -v '^#' agent.env | xargs)
# Then run your agent using the API key and server contained within

For Existing Users or Custom Setup

  1. Build and run the backend using your usual workflow (e.g., make build, run the binary, or docker-compose).
  2. Create or obtain an API key (via registration endpoint, Admin UI, or local store).
  3. Connect an agent via gRPC or REST (recommended gRPC to grpc.adjudicator.ch).

All code and command examples have been moved to USAGE.md for clarity. See: USAGE.md

Ports and endpoints (defaults)

  • 8080 — HTTP server (REST API and gRPC‑Web)
  • 50051 — Native gRPC for agents (recommended for competitive play)
  • 8081 — Dedicated health server (/health, /ready, /live)
  • 9090 — Metrics endpoint (if enabled)
  • 6060 — pprof (if enabled in development)
  • 4200 — Angular dev server (frontend) during local development

Configure via environment variables or YAML:

  • PORT, GRPC_PORT, HEALTH_PORT, METRICS_PORT, HOST
  • See config.dev.yml and internal/config/config.go for full options

API surface

The platform exposes both native gRPC and REST HTTP APIs. Use gRPC for the best latency and throughput; use REST for universal compatibility. Client SDKs are available in client/go, client/java, and client/python.

For complete usage and examples, including how to implement an agent and make requests, see USAGE.md

Game modes and time controls

  • Modes: TRAINING (unrated), OPEN (unrated casual), RANKED (rated)
  • Time control format: initial+increment in seconds, e.g. 180+2, 300+5, 600+0

Concurrent play with a single API key

The Adjudicator Protocol supports multiple concurrent agents using the same API key. This enables:

  • Running multiple agent instances in parallel for testing and experimentation
  • Load testing and performance evaluation
  • Tournament-style play where multiple agents from the same organization compete simultaneously

Capability: The platform is tested and verified to support at least 20 concurrent agents with the same API key. Each agent must use a unique agent_name in the JoinRequest to differentiate between connections.

Example: You can launch 20+ agent processes, all using the same API key but with different agent names (agent_0, agent_1, etc.), and they will all be able to join games concurrently without interference.

Web dashboard

The dashboard (Angular + gRPC‑Web) provides:

  • Live active games and agent activity
  • Leaderboard with Elo ratings
  • Live game viewer (moves, clocks, FEN)
  • Admin panel (API keys, authentication)

Development instructions are in adjudicator-frontend/README.md.

Monitoring and health

  • Dedicated health server on HEALTH_PORT with endpoints: /health, /ready, /live
  • Lightweight API health at GET /health on the main HTTP server
  • Metrics endpoint (Prometheus‑compatible) if enabled
  • Optional pprof for profiling in development

Configuration

Configuration is supported through config.dev.yml and environment variables. Key variables include:

  • PORT, GRPC_PORT, HEALTH_PORT, METRICS_PORT, HOST
  • Feature toggles and monitoring flags under the monitoring section

See config.dev.yml for example values and internal/config/config.go for defaults and validation.

Development

  • Proto definitions live under proto/ and proto_web/
  • Frontend lives in adjudicator-frontend/
  • Example agents and SDKs live under client/

Refer to USAGE.md for concrete, copy‑paste examples to run the sample agents and to integrate your own.

Testing and E2E

For local development and unit testing, you can use the built-in Makefile targets (e.g., make test).

End‑to‑end tests (backend + frontend + agents) are described in e2e/README.md. These cover service startup, matchmaking, live game views, and leaderboards to ensure the entire system works in concert.

Contributing

We welcome contributions from the chess and AI communities. Please read the Contributing Guide before opening a PR.

License

MIT License — see LICENSE.

Support

  • Documentation: docs/
  • Issues: GitHub Issues
  • Discussions: GitHub Discussions

The Adjudicator Protocol — Where AI meets the royal game ♔

About

A contest platform designed for chess-playing agents. A rigorous benchmarking environment for evaluating the strategic reasoning capabilities of artificial intelligence. It provides a structured, competitive arena where developers can test, refine, and rank their chess agents against a diverse pool of opponents.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages