Skip to content

Implementation of object-oriented design patterns in a chess game.

License

Notifications You must be signed in to change notification settings

mcoria/chesstango

Repository files navigation

Java CI with Maven lichess-blitz lichess-blitz lichess-rapid

Overview

ChessTango exemplifies the practical application of object-oriented design patterns within a board game context: a chess engine.

The majority of these patterns have been extensively outlined in the GoF book, "Design Patterns: Elements of Reusable Object-Oriented Software (1994)". This book is particularly recommended for beginner programmers. Over time, I've consistently kept a copy of this book on hand for easy reference.

It's important to note that while this project draws heavily from the patterns described in the GoF book, there are instances where unique patterns are employed. These exceptional cases are explicitly identified, along with references to external sources that elucidate their concepts.

It's worth clarifying that the objective of this project isn't to incorporate every conceivable design pattern present within the domain. Rather, I've selectively adopted patterns that aptly address specific challenges posed by the task.

While I've certainly taken performance considerations into account, the predominant non-functional priority remains the precise and coherent implementation of design patterns.

Patterns Index provides a non-exhaust list of the patterns that have been used.

Engine Features

  • Board
    • square-centric 8x8 board representation
    • piece-centric bitboard representation
  • Move generation
    • Implementation has been tested with +100K positions (perft)
  • Representations
    • Forsyth–Edwards Notation (FEN)
    • Portable Game Notation (PGN)
    • Extended Position Description (EPD)
    • Standard Algebraic Notation (SAN)
  • Search
    • Alpha Beta Pruning
    • Zobrist hash
    • Quiescence Search
    • Iterative Deepening
    • Aspiration Windows
    • Transposition Tables
  • Evaluation
    • Piece-Square Tables
  • Polyglot Opening Books
  • Communication protocols
  • Arena for tournaments between ChessTango vs other UCI-compliant engines
  • GraalVM for native image (.exe) packaging

Usage

Chess GUI with UCI support

  1. Download ChessTango binary distribution
  2. Download Arena Chess GUI
  3. From the Arena GUI MenuBar, Select Engines > Install New Engine
  4. Select .exe file type and navigate to location of the saved binary file.
  5. Select the binary file and choose UCI protocol.
  6. Go to the MenuBar, Select Engines > Manage... > Details and Select ChessTango Chess Engine
  7. Under General, Click on the Type drop-down list > select UCI. Apply changes.
  8. You can play now !!!

Lichess BOT

If you prefer to play on-line you can challenge chesstango_bot. For the moment Standard time-controlled (Bullet/Blitz/Rapid) games are acceptable.

Credits