Chessable is an advanced chess data management system designed to store, manage, and analyze a large database of grandmaster-level chess games. This project leverages sophisticated data structures to efficiently handle vast amounts of chess-related information, including details about players, events, game outcomes, openings, and specific moves played in each game.
The core objective of Chessable is to utilize these data structures not only for efficient data storage but also to perform complex queries and analytics, providing insights into chess strategies and trends among grandmasters.
- Game Analysis: Analyze games based on openings, player performance, and specific board positions.
- Player Statistics: Track player performance over time, including win rates, most played openings, and head-to-head matchups against other players.
- Event Insights: Access detailed information about chess events, including location, date, and associated games.
- Opening Repertoire: Explore detailed opening variations and their popularity among top-level players.
- Dynamic Queries: Perform on-the-fly queries to retrieve data based on complex criteria such as ECO codes, event locations, or specific moves.
Chessable employs the following data structures to optimize data handling and operations:
- Arrays: Used for storing ordered data where quick access is required.
- Linked Lists: Ideal for dynamic data where insertions and deletions are frequent.
- Hash Tables: Facilitate rapid data retrieval and efficient data indexing for player and game lookups.
- AVL Trees: Ensure balanced data storage, providing efficient order statistics and optimized search times.
-
Clone the Repository:
git clone https://github.com/munimdev/Chessable.git cd Chessable -
Configure and Build (requires CMake 3.20+ and a C++ compiler):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release -
Run the Application:
./build/chessable_cli
Optional dataset overrides:
./build/chessable_cli --pgn ./src/WorldCup2021.pgn --openings ./src/pgndata.txt
-
Run Tests:
ctest --test-dir build --output-on-failure
Chessable is designed with a menu-driven interface that allows users to perform various operations:
- Get Openings by ECO: Retrieve all openings associated with a specific ECO code.
- Player Statistics: View detailed statistics for a selected player.
- Event Information: Get detailed information about chess events.
- Most Played Moves: Analyze the most played moves from a given board position.
Users can navigate through the menu by entering the number corresponding to each action and following the on-screen prompts to enter additional details.
To load and analyze your own dataset of chess games, follow these steps:
-
Prepare Your Dataset: Ensure your dataset is in Portable Game Notation (PGN) format, which is standard for representing chess games. The file should contain one or more chess games, with each game described according to the PGN standard.
-
Place the Dataset in the Project Directory: Copy your
.pgnfile into the Chessable project directory. This is where the compiled application resides. -
Run with Your Dataset:
- Pass dataset paths at runtime using CLI flags:
./build/chessable_cli --pgn ./your_dataset.pgn --openings ./src/pgndata.txt
-
Rebuild the Application after code changes:
cmake --build build --config Release
-
Run Chessable with the New Dataset:
./build/chessable_cli
- Now, Chessable will load and utilize your custom dataset for all operations.
Here's a snapshot of an example operation using Chessable:
Contributions to Chessable are welcome! If you have suggestions for improvements or bug fixes, please fork the repository and submit a pull request.
-
Fork the Repository: Navigate to the GitHub page and click the "Fork" button.
-
Create a Feature Branch:
git checkout -b new-feature
-
Commit Your Changes:
git commit -am 'Add some feature' -
Push to the Branch:
git push origin new-feature
-
Submit a Pull Request:
Chessable is released under the MIT License. See the LICENSE file for more details.
For support, contact email.
