An advanced Rock-Paper-Scissors game that uses machine learning to predict player moves based on their previous choices.
- 🔄 Adaptive AI: The computer initially plays randomly but learns and predicts moves based on your past choices.
- 🤖 Neural Network Training: The AI trains itself every time it loses to improve its predictions.
- 📊 Pattern Recognition: The AI stores your last two moves to find patterns and anticipate your next choice.
- 🎮 Classic Gameplay: Enjoy the traditional Rock-Paper-Scissors experience with a modern AI twist.
- The game starts with the computer choosing moves randomly for the first three rounds.
- After collecting enough data, the AI predicts the player's next move based on their last two choices.
- If the AI predicts "Rock," it plays "Paper" to counter it (and similarly for other moves).
- If the AI loses, it retrains its model to improve future predictions.
- Clone the repository:
git clone https://github.com/Supsource/Rock-Paper-Scissors-JS.git
- Navigate to the project directory:
cd Rock-Paper-Scissors-JS
- Open
index.html
in your browser to start playing.
- HTML5, CSS3, JavaScript (ES6+)
- Neural Network-based learning approach
Pull requests and stars are always welcome! If you'd like to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.