{"id":22832638,"url":"https://github.com/scar17off/chess-ai","last_synced_at":"2025-03-31T02:19:24.657Z","repository":{"id":262880524,"uuid":"888650066","full_name":"scar17off/chess-ai","owner":"scar17off","description":"Chess engine powered by neural networks featuring web and desktop interfaces, training capabilities, and grandmaster opening support.","archived":false,"fork":false,"pushed_at":"2024-11-14T19:14:48.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-06T07:21:28.657Z","etag":null,"topics":["artificial-intelligence","chess","chess-engine","chess-openings","deep-learning","game-ai","gradio","gui","machine-learning","neural-networks","pygame","python","training-data","web-interface"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scar17off.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-11-14T19:06:25.000Z","updated_at":"2024-11-14T22:28:25.000Z","dependencies_parsed_at":"2024-11-14T20:29:38.640Z","dependency_job_id":null,"html_url":"https://github.com/scar17off/chess-ai","commit_stats":null,"previous_names":["scar17off/chess-ai"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar17off%2Fchess-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar17off%2Fchess-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar17off%2Fchess-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scar17off%2Fchess-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scar17off","download_url":"https://codeload.github.com/scar17off/chess-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246403902,"owners_count":20771530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["artificial-intelligence","chess","chess-engine","chess-openings","deep-learning","game-ai","gradio","gui","machine-learning","neural-networks","pygame","python","training-data","web-interface"],"created_at":"2024-12-12T21:08:23.879Z","updated_at":"2025-03-31T02:19:24.634Z","avatar_url":"https://github.com/scar17off.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chess AI with Neural Network\n\nA sophisticated chess engine powered by a neural network, featuring both a graphical user interface and a web interface for gameplay and training.\n\n## Features\n\n- Neural network-based chess AI\n- Interactive chess board visualization\n- Multiple game modes (AI vs Human, Free Play)\n- Training system with grandmaster-style game generation\n- Model management and persistence\n- Support for common chess openings\n- Real-time move evaluation visualization\n\n## Installation\n\n1. Clone the repository\n2. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n3. Generate training games:\n```bash\npython generate_training_games.py\n```\n\n## Usage\n\n### Web Interface\n\nRun the web interface with:\n```bash\npython webui.py\n```\n\nThis launches a Gradio-based web interface with the following features:\n- Interactive chess board\n- Move input and validation\n- AI move calculation\n- Model selection and management\n- Training game generation\n- Model training interface\n\nFeatures include:\n- Pygame-based graphical interface\n- Neural network visualization\n- Real-time move evaluation\n- Direct mouse interaction\n\n## Training\n\nThe AI can be trained using:\n1. Generated grandmaster-style games\n2. Custom game recordings\n\nTo generate training games:\n```bash\npython generate_training_games.py\n```\n\nThe system supports various grandmaster openings including:\n- Sicilian Defense\n- Ruy Lopez\n- Italian Game\n- French Defense\n- Caro-Kann\n- Queen's Gambit\n- King's Indian\n- And more...\n\n## Configuration\n\nGame parameters can be adjusted in `chess_config.json`:\n```json\n{\n\"DEFAULT_NUM_GAMES\": 20,\n\"MIN_MOVES_PER_GAME\": 30,\n\"MAX_MOVES_PER_GAME\": 100,\n\"RANDOMIZATION_FACTOR\": 0.2,\n\"CENTER_CONTROL_BONUS\": 1.2,\n\"DEVELOPMENT_BONUS\": 1.1,\n\"CHECK_BONUS\": 0.5,\n\"CAPTURE_BONUS\": 0.3\n}\n```\n\n## Project Structure\n\n- `webui.py`: Web interface implementation\n- `neural_network.py`: Neural network model\n- `game_recorder.py`: Game recording functionality\n- `generate_training_games.py`: Training data generation\n- `chess_config.json`: Configuration parameters\n- `models/`: Saved model states\n- `games/`: Recorded and generated games\n- `pieces/`: Chess piece images\n\n## Model Architecture\n\nThe neural network evaluates chess positions using:\n- Piece positions and values\n- Board control\n- Development factors\n- King safety\n- Material balance\n- Tactical opportunities\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscar17off%2Fchess-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscar17off%2Fchess-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscar17off%2Fchess-ai/lists"}