{"id":15176686,"url":"https://github.com/ravakili/backgammonai","last_synced_at":"2026-02-24T00:39:27.944Z","repository":{"id":253929473,"uuid":"844958681","full_name":"ravakili/BackGammonAI","owner":"ravakili","description":"This repository contains the code and models for a Backgammon AI that provides move predictions at three different difficulty levels: easy, medium, and hard.","archived":false,"fork":false,"pushed_at":"2024-08-20T10:10:16.000Z","size":43753,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T18:50:16.471Z","etag":null,"topics":["ai","google-drive","neural-networks","reinforcement-learning","tensorflow"],"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/ravakili.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}},"created_at":"2024-08-20T09:55:16.000Z","updated_at":"2024-08-20T10:12:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4213488-690d-41fe-aba3-144097ece6ba","html_url":"https://github.com/ravakili/BackGammonAI","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"a7e0c173eb25f3b3f9bb31925e5575fd249834a0"},"previous_names":["ravakili/backgammonai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravakili/BackGammonAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravakili%2FBackGammonAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravakili%2FBackGammonAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravakili%2FBackGammonAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravakili%2FBackGammonAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravakili","download_url":"https://codeload.github.com/ravakili/BackGammonAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravakili%2FBackGammonAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281739020,"owners_count":26553092,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"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","google-drive","neural-networks","reinforcement-learning","tensorflow"],"created_at":"2024-09-27T13:40:20.575Z","updated_at":"2025-10-30T03:38:32.145Z","avatar_url":"https://github.com/ravakili.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BackGammonAI\n\nThis repository contains the code and models for a Backgammon AI that provides move predictions at three different difficulty levels: easy, medium, and hard. The AI models are built using TensorFlow and trained on Backgammon game data. The repository includes scripts for training the models and for generating predictions from a given board state.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Project Structure](#project-structure)\n- [Requirements](#requirements)\n- [Usage](#usage)\n  - [Training the Models](#training-the-models)\n  - [Generating Predictions](#generating-predictions)\n- [Model Details](#model-details)\n- [Contributing](#contributing)\n\n## Overview\n\nThe Backgammon AI project allows users to classify Backgammon board states and get the top move predictions based on the AI's understanding of the game. Three models of varying complexity (easy, medium, and hard) are included to cater to different levels of gameplay sophistication.\n\n## Project Structure\n```bash\n├── datasets/\n│ ├── trainingX.csv\n│ ├── trainingY.csv\n│ ├── testX.csv\n│ └── testY.csv\n├── labels/\n│ └── labels.txt\n├── models/\n│ ├── easy_model.keras\n│ ├── medium_model.keras\n│ └── hard_model.keras\n├── trainModels.py\n├── getTop10Moves.py\n└── README.md\n```\n\n- `datasets/`: Contains the training and test datasets.\n- `labels/`: Includes the labels file that maps model outputs to moves.\n- `models/`: Contains the pre-trained models for easy, medium, and hard difficulties.\n- `trainModels.py`: Script for training the models.\n- `getTop10Moves.py`: Script for generating predictions from a given board state.\n\n## Requirements\n\n- Python 3.x\n- TensorFlow 2.x\n- NumPy\n\nYou can install the required packages using:\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### Training the Models\nTo train the models, run the `train_models.py` script:\n\n```bash\npython train_models.py\n```\nThis will train the easy, medium, and hard models using the data in the datasets/ directory. The trained models will be saved in the models/ directory.\n\nGenerating Predictions\nTo generate predictions for a given board state, run the predict_moves.py script:\n\n```bash\npython predict_moves.py\n```\nYou'll be prompted to input the board state as a comma-separated string of values. The script will output the top 10 move predictions from all three difficulty models (easy, medium, and hard).\n\n## Model Details\n### Easy Model:\nArchitecture: 2 layers, 64 neurons each\nPurpose: Quick and less accurate predictions\n### Medium Model:\nArchitecture: 3 layers, 128 neurons each\nPurpose: Balanced performance with reasonable accuracy\n### Hard Model:\nArchitecture: 4 layers, 256 neurons each\nPurpose: Complex and accurate predictions, suitable for advanced gameplay\n## Contributing\nContributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are encouraged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravakili%2Fbackgammonai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravakili%2Fbackgammonai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravakili%2Fbackgammonai/lists"}