{"id":29091178,"url":"https://github.com/shiven-lohia/tadfish-engine","last_synced_at":"2026-04-30T07:33:08.247Z","repository":{"id":300604966,"uuid":"1006545050","full_name":"shiven-lohia/tadfish-engine","owner":"shiven-lohia","description":"Tadfish is an intermediate-level chess engine written in C++ with a Python-based GUI.","archived":false,"fork":false,"pushed_at":"2025-07-27T03:23:38.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T07:32:20.929Z","etag":null,"topics":["chess","chess-engine","chess-gui","cpp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiven-lohia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T14:06:27.000Z","updated_at":"2025-07-27T03:23:41.000Z","dependencies_parsed_at":"2025-06-22T17:34:09.768Z","dependency_job_id":"959f8ed8-f7a0-4ddf-b8d6-7643bf1b446e","html_url":"https://github.com/shiven-lohia/tadfish-engine","commit_stats":null,"previous_names":["shiven-lohia/tadfish-engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shiven-lohia/tadfish-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiven-lohia%2Ftadfish-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiven-lohia%2Ftadfish-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiven-lohia%2Ftadfish-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiven-lohia%2Ftadfish-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiven-lohia","download_url":"https://codeload.github.com/shiven-lohia/tadfish-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiven-lohia%2Ftadfish-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32458237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-engine","chess-gui","cpp"],"created_at":"2025-06-28T06:05:46.268Z","updated_at":"2026-04-30T07:33:08.233Z","avatar_url":"https://github.com/shiven-lohia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tadfish Engine and GUI\n\nTadfish is an intermediate-level chess engine written in C++ with a Python-based GUI. It was developed as a coding project to explore core concepts in game tree search, evaluation heuristics, and C++ performance optimization.\n\n---\n\n## Features\n\n* Roughly ~**1700-1800** elo based on testing against Stockfish\n* C++ backend for efficient move generation and evaluation\n* Python GUI using Tkinter and Pygame for interactive gameplay\n* Chess.com-like sound effects and graphical feedback\n\n### Engine Techniques\n\n* **Negamax** framework for simplified recursive game tree search\n* **Alpha-Beta Pruning** to eliminate unnecessary branches\n* **Piece-Square Tables (PST)** for positional evaluation\n* **Precomputed pseudo-legal move generation** for performance\n* **Iterative Deepening** to allow time-based search depth\n* **Aspiration Windows** to improve Alpha-Beta performance\n* **Quiescent Search** to avoid horizon effect on volatile positions\n* **Move Ordering** using **MVV-LVA** (Most Valuable Victim - Least Valuable Attacker)\n\n### Game Modes\n\n* Player vs Player\n* Player vs Tadfish\n* Tadfish vs Stockfish\n* Tadfish vs Tadfish\n\n---\n\n## Upcoming Features\n\n* Complete UCI support (Very high prioity)\n* Opening book support (high priority)\n* Transposition Tables (high priority)\n* NNUE based evaluation (lower priority)\n* Adjustable difficulty levels\n* Game history and PGN export\n* Timers for competitive play\n* Ability to draw arrows in GUI by right clicking\n* Dynamic evaluation bar in GUI\n\n---\n\n## How to Run\n\n### 1. Compile the Engine (C++)\n\n```bash\ng++ -Iinclude src/*.cpp main.cpp -o tadfish\n```\n\n### 2. Run the GUI (Python)\n\nMake sure you have `python-chess`, `pygame`, and `tkinter` installed. Run the corresponding python file for the gamemode you want to play.\n\n```bash\n# Example: Play against Tadfish\npython player_vs_tadfish.py\n```\n\n---\n\n## Known Drawbacks\n\n* No opening theory\n* Only supports one move outputs taking FEN as input, limited UCI support\n* No multithreading or parallelism yet\n* Lacks time control or search depth adjustments\n* Sometimes prone to stalemate in winning positions while playing against itself\n\n---\n\n## Version History\n\n| Version   | Description                                                                                                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Beta**  | Initial PvP GUI, Chess backend in C++                                                                                                                                              |\n| **v1.0**   | Basic engine with evaluation using material value and PST and search using minimax. Improved UI by adding drag moves, legal move highlight, piece sounds, capture/checkmate sounds |\n| **v1.0.1** | Added a second GUI for simulating Tadfish vs Tadfish for testing                                                                                                                   |\n| **v1.0.2** | Added precompute.h with precomputed pseudo-legal moves for every piece at every square                                                                                             |\n| **v1.0.3** | Fixed bugs related to pawn promotion, en passant, and castling                                                                                                                     |\n| **v1.1**   | Changed to negamax with alpha-beta pruning; added different endgame PST for pieces like the king                                                                                   |\n| **v1.1.1** | Implemented MVV-LVA move ordering to improve alpha-beta pruning efficiency                                                                                                         |\n| **v1.2**   | Added Iterative Deepening, Quiescent Search, and Aspiration Windows                                                                                                                |\n| **v1.2.1** | Fixed bug with king not switching to endgame PST correctly                                                                                                                         |\n| **v1.3**   | Rewrote castling logic to prevent castling through attacked squares                                                                                                                |\n| **v1.3.1** | Fixed infinite recursion bug in castling move generation                                                                                                                           |\n| **v2.0**   | Complete overhaul of GUI with a dark theme; fixed critical GUI bugs                                                                                                                |\n| **v2.1**   | Added GUIs for Player vs Tadfish and Tadfish vs Stockfish                                                                                                                          |\n| **v2.1.1** | Updated all GUIs to match new dark-themed design                                                                                                                                   |\n| **v2.1.2** | Minor updates to all GUIs                                                                                                                                                          |\n| **v2.2**   | Cleaned up code directory; improved code comments                                                                                                                                  |\n\n---\n\n## Project Structure\n\n```\n.\n├── audio/                  # Sound effects\n├── images/                 # GUI graphics\n├── include/                # C++ header files\n├── src/                    # Engine source files\n├── test_engines/           # Optional engines (e.g., Stockfish)\n├── player_vs_player.py     # GUI: PvP mode\n├── player_vs_tadfish.py    # GUI: Player vs Tadfish\n├── tadfish_vs_stockfish.py # GUI: Tadfish vs Stockfish\n├── tadfish_vs_tadfish.py   # GUI: Tadfish mirror match\n├── main.cpp                # Engine entry point\n└── tadfish.exe             # Compiled engine binary\n```\n\n## Author\n\nDeveloped by [Shiven Lohia](https://github.com/shiven-lohia)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiven-lohia%2Ftadfish-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiven-lohia%2Ftadfish-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiven-lohia%2Ftadfish-engine/lists"}