{"id":28175503,"url":"https://github.com/mrtbk/shadow-code","last_synced_at":"2026-01-30T03:05:47.588Z","repository":{"id":293728229,"uuid":"975072658","full_name":"MrTBK/Shadow-Code","owner":"MrTBK","description":"🎮 A feature-rich chess game with Deep Reinforcement Learning (DRL) AI and real-time online multiplayer — built with Python and Pygame.","archived":false,"fork":false,"pushed_at":"2025-04-30T22:27:17.000Z","size":12802,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T17:51:23.062Z","etag":null,"topics":["ai","chess","deep-learning","dqn","game-development","multiplayer","pygame","python","reinforcement-learning","socket-programming"],"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/MrTBK.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-04-29T18:31:55.000Z","updated_at":"2025-04-30T22:27:20.000Z","dependencies_parsed_at":"2025-05-16T20:53:38.840Z","dependency_job_id":null,"html_url":"https://github.com/MrTBK/Shadow-Code","commit_stats":null,"previous_names":["mrtbk/shadow-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrTBK/Shadow-Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTBK%2FShadow-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTBK%2FShadow-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTBK%2FShadow-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTBK%2FShadow-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrTBK","download_url":"https://codeload.github.com/MrTBK/Shadow-Code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrTBK%2FShadow-Code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28897662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"online","status_checked_at":"2026-01-30T02:00:06.810Z","response_time":66,"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":["ai","chess","deep-learning","dqn","game-development","multiplayer","pygame","python","reinforcement-learning","socket-programming"],"created_at":"2025-05-15T23:14:24.059Z","updated_at":"2026-01-30T03:05:47.583Z","avatar_url":"https://github.com/MrTBK.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ♟️ Shadow-Code\n\n**Shadow-Code** is a feature-rich chess game that supports both local AI battles and online multiplayer. Play against a Deep Reinforcement Learning (DRL) agent trained from scratch or connect with friends over a real-time socket-based network—all with an elegant Pygame-based interface and animated visuals.\n\n---\n\n## 🚀 Features\n\n- ✅ **Local Play vs AI**  \n  Play against a trained Deep Q-Network (DQN)-based DRL agent.\n\n- 🌐 **Online Multiplayer**  \n  Host or join real-time matches using TCP sockets.\n\n- 🎞️ **Smooth Animations**  \n  Enjoy sliding piece animations for a polished experience.\n\n- 👑 **Promotion Interface**  \n  Promote pawns with a clean graphical selection.\n\n- 🔊 **Sound Effects**  \n  Custom sounds for moves, captures, and promotions.\n\n- 📋 **Move History Sidebar**  \n  Track your game progress with a live move list.\n\n---\n\n## 🛠 Installation\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/MrTBK/Shadow-Code.git\ncd Shadow-Code\n```\n\n### 2. Install dependencies\n\nInstall the required packages via pip:\n\n```bash\npip install -r requirements.txt\n```\n\n\u003e **Note**: Requires Python 3.8+ and PyTorch.\n\n---\n\n## 🧠 Running the Game\n\nTo start the game:\n\n```bash\npython main.py\n```\n\n---\n\n## 🎮 Modes of Play\n\n### 🧑‍💻 Local Play (vs DRL)\n\n- Select **Local** from the menu.\n- Play against a Deep Q-Learning agent trained on legal chess states.\n\n### 🌐 Online Multiplayer\n\n#### Host a Game\n\n- Select **Online** → **Host**.\n- Wait for an opponent to connect.\n- Game starts automatically after connection.\n\n#### Join a Game\n\n- Select **Online** → **Join**.\n- Enter the IP address of the host machine.\n- Connect and start playing.\n\n---\n\n## 📁 Project Structure\n\n```\nShadow-Code/\n├── assets/               # Piece images \u0026 sound files\n├── dqn.py                # DQN agent definition and utilities\n├── game.py               # Game logic and rendering\n├── interface.py          # UI handling (board, promotion UI, sounds)\n├── server.py             # Socket-based networking\n├── main.py               # Entry point\n├── README.md\n└── requirements.txt\n```\n\n---\n\n## 🧠 DRL Agent Training\n\nOur AI uses a Deep Q-Network with a flat board tensor input. Training code and logs are included in the project for reproducibility. If no `dqn_checkpoint.pt` exists, training can be resumed automatically.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtbk%2Fshadow-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtbk%2Fshadow-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtbk%2Fshadow-code/lists"}