diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/Figure_1.png b/Domains/AI-ML/MiniProjects/digit_recognizer/Figure_1.png new file mode 100644 index 00000000..c0d71f0e Binary files /dev/null and b/Domains/AI-ML/MiniProjects/digit_recognizer/Figure_1.png differ diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/README.md b/Domains/AI-ML/MiniProjects/digit_recognizer/README.md new file mode 100644 index 00000000..654e002e --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/README.md @@ -0,0 +1,61 @@ + MNIST DIGIT CLASSIFIER + +**Contributor:** Dhiraj201226 +**Domain:** AI-ML +**Difficulty:** [Beginner] + +## Description +It's a complete machine learning project, written in Python using the PyTorch library. Its entire purpose is to look at a small, grayscale image of a handwritten number and correctly identify what number it is (from 0 to 9 currently). + +This project solves the fundamental problem of automatic image classification. + +Specifically, it provides an automated solution to the real-world challenge of Optical Character Recognition (OCR) for digits. This is a classic problem in computer vision. + +## Dataset +- **Source**: Automatically via torchvision.datasets.MNIST(..., download=True), which automatically downloads the dataset from official mirrors (like one hosted on AWS S3). + +- **Size**: 70000 images + +- **Features**: Each image is 28*28 pixel grayscale image +and it is flattened into a 1-dimensional vector of 784 features (28 * 28 = 784). + +## Model Architecture +- Algorithm/Architecture used: +Simple Feed-Forward Neural Network (MLP) built with PyTorch (nn.Module). It has one hidden layer: Input (784 features) -> Linear(784 -> 512) -> ReLU -> Linear(512 -> 10) -> Output Scores. + + KEY HYPERPARAMETERS + + ->INPUT_SIZE: 784 +->NUM_CLASSES: 10 +->NUM_EPOCHS: 50 +->BATCH_SIZE: 100 +->LEARNING_RATE: 0.001 + + - Training approach +The model is trained on 50 epoches for better accuracy and also the 70k dataset is divided into 56k for training and 14k for test +dataset is traine on 56k immages. + +## Requirements +matplotlib==3.9.0 +numpy==1.26.4 +packaging==24.1 +pillow==10.4.0 +torch==2.3.1+cpu +torchvision==0.18.1+cpu + +# Train model +python train.py{ + RUN model.py and config.py before it. +} + +# Make predictions +python predict.py + +## Results +- Accuracy: 99.76%(training dataset) +- Other metrics: final training loss: +- Sample outputs:In random infernece it predicted all images correct. +refer to Figure_1.png +## References +->Learning representations by back-propagating errors (1986) - Rumelhart, Hinton, Williams +->ImageNet Classification with Deep Convolutional Neural Networks (2012)- Krizhevsky, Sutskever, Hinton \ No newline at end of file diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/config.cpython-310.pyc b/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/config.cpython-310.pyc new file mode 100644 index 00000000..6956157b Binary files /dev/null and b/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/config.cpython-310.pyc differ diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/model.cpython-310.pyc b/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/model.cpython-310.pyc new file mode 100644 index 00000000..f3d1a546 Binary files /dev/null and b/Domains/AI-ML/MiniProjects/digit_recognizer/__pycache__/model.cpython-310.pyc differ diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/config.py b/Domains/AI-ML/MiniProjects/digit_recognizer/config.py new file mode 100644 index 00000000..f957d322 --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/config.py @@ -0,0 +1,20 @@ +# config.py +import torch + +# --- Model Hyperparameters --- +INPUT_SIZE = 784 # 28x28 +HIDDEN_SIZE = 512 +NUM_CLASSES = 10 + +# --- Training Hyperparameters --- +NUM_EPOCHS = 15 +BATCH_SIZE = 100 +LEARNING_RATE = 0.001 +DATA_DIR = './data' +MODEL_PATH = 'mnist_nn1.pth' + +# --- Data & Reproducibility --- +RANDOM_SEED = 42 + +# --- Device --- +DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") \ No newline at end of file diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/model.py b/Domains/AI-ML/MiniProjects/digit_recognizer/model.py new file mode 100644 index 00000000..18f228cf --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/model.py @@ -0,0 +1,15 @@ +# model.py +import torch.nn as nn + +class NeuralNetwork(nn.Module): + def __init__(self, input_size, hidden_size, num_classes): + super(NeuralNetwork, self).__init__() + self.l1 = nn.Linear(input_size, hidden_size) + self.relu = nn.ReLU() + self.l2 = nn.Linear(hidden_size, num_classes) + + def forward(self, x): + out = self.l1(x) + out = self.relu(out) + out = self.l2(out) + return out \ No newline at end of file diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/predict.py b/Domains/AI-ML/MiniProjects/digit_recognizer/predict.py new file mode 100644 index 00000000..b25307d6 --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/predict.py @@ -0,0 +1,67 @@ +# predict.py +import torch +import torchvision.transforms as transforms +from torchvision.datasets import MNIST +from torch.utils.data import DataLoader, random_split, ConcatDataset +import matplotlib.pyplot as plt + +# Import from our custom files +from model import NeuralNetwork +import config as cfg + +def get_test_batch(): + torch.manual_seed(cfg.RANDOM_SEED) + + transform = transforms.ToTensor() + + # Load and split data exactly as in train.py + train_dataset = MNIST(root=cfg.DATA_DIR, train=True, transform=transform, download=True) + test_dataset = MNIST(root=cfg.DATA_DIR, train=False, transform=transform, download=True) + combined_dataset = ConcatDataset([train_dataset, test_dataset]) + train_size = int(0.8 * len(combined_dataset)) + test_size = len(combined_dataset) - train_size + _, test_dataset = random_split(combined_dataset, [train_size, test_size]) + + # Create the test loader + test_loader = DataLoader(test_dataset, batch_size=cfg.BATCH_SIZE, shuffle=False) + + # Get one batch + examples = iter(test_loader) + example_data, example_targets = next(examples) + + return example_data, example_targets + +def main(): + # --- 1. Load a batch of test data --- + example_data, example_targets = get_test_batch() + + # --- 2. Initialize and Load Model --- + model = NeuralNetwork(cfg.INPUT_SIZE, cfg.HIDDEN_SIZE, cfg.NUM_CLASSES).to(cfg.DEVICE) + try: + model.load_state_dict(torch.load(cfg.MODEL_PATH, map_location=cfg.DEVICE)) + except FileNotFoundError: + print(f"Error: Model file not found at {cfg.MODEL_PATH}") + print("Please run train.py first to train and save the model.") + return + + model.eval() + + # --- 3. Make Predictions --- + with torch.no_grad(): + example_images = example_data.reshape(-1, 28 * 28).to(cfg.DEVICE) + outputs = model(example_images) + _, preds = torch.max(outputs.data, 1) + + # --- 4. Visualize Predictions --- + print("Plotting predictions for 6 test images...") + plt.figure(figsize=(10, 4)) + for i in range(6): + plt.subplot(2, 3, i + 1) + plt.imshow(example_data[i][0], cmap='gray') + plt.title(f'Actual: {example_targets[i].item()}, Predicted: {preds[i].item()}') + plt.axis('off') + plt.tight_layout() + plt.show() + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/requirements.txt b/Domains/AI-ML/MiniProjects/digit_recognizer/requirements.txt new file mode 100644 index 00000000..a8606b12 --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/requirements.txt @@ -0,0 +1,6 @@ +matplotlib==3.9.0 +numpy==1.26.4 +packaging==24.1 +pillow==10.4.0 +torch==2.3.1+cpu +torchvision==0.18.1+cpu \ No newline at end of file diff --git a/Domains/AI-ML/MiniProjects/digit_recognizer/train.py b/Domains/AI-ML/MiniProjects/digit_recognizer/train.py new file mode 100644 index 00000000..9856b702 --- /dev/null +++ b/Domains/AI-ML/MiniProjects/digit_recognizer/train.py @@ -0,0 +1,101 @@ +# train.py +import torch +import torch.nn as nn +import torchvision.transforms as transforms +from torchvision.datasets import MNIST +from torch.utils.data import DataLoader, random_split, ConcatDataset + +# Import from our custom files +from model import NeuralNetwork +import config as cfg + +def get_data_loaders(batch_size, random_seed, data_dir): + + torch.manual_seed(random_seed) + + transform = transforms.ToTensor() + + # Load original train and test datasets + train_dataset = MNIST(root=data_dir, train=True, transform=transform, download=True) + test_dataset = MNIST(root=data_dir, train=False, transform=transform, download=True) + + # Combine them + combined_dataset = ConcatDataset([train_dataset, test_dataset]) + + # Create new 80/20 split + train_size = int(0.8 * len(combined_dataset)) + test_size = len(combined_dataset) - train_size + train_dataset, test_dataset = random_split(combined_dataset, [train_size, test_size]) + + # Create DataLoaders + train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True) + test_loader = DataLoader(test_dataset, batch_size=batch_size, shuffle=False) + + return train_loader, test_loader + +def main(): + # --- 1. Load Data --- + train_loader, test_loader = get_data_loaders(cfg.BATCH_SIZE, cfg.RANDOM_SEED, cfg.DATA_DIR) + + # --- 2. Initialize Model, Loss, and Optimizer --- + model = NeuralNetwork(cfg.INPUT_SIZE, cfg.HIDDEN_SIZE, cfg.NUM_CLASSES).to(cfg.DEVICE) + criterion = nn.CrossEntropyLoss() + optimizer = torch.optim.Adam(model.parameters(), lr=cfg.LEARNING_RATE) + + # --- 3. Training Loop --- + print("Starting training...") + n_total_steps = len(train_loader) + for epoch in range(cfg.NUM_EPOCHS): + for i, (images, labels) in enumerate(train_loader): + # Reshape images to (batch_size, 784) and move to device + images = images.reshape(-1, 28 * 28).to(cfg.DEVICE) + labels = labels.to(cfg.DEVICE) + + # Forward pass + predict_outputs = model(images) + loss = criterion(predict_outputs, labels) + + # Backward pass and optimization + loss.backward() + optimizer.step() + optimizer.zero_grad() + + if (i + 1) % 500 == 0: + print(f'Epoch [{epoch + 1}/{cfg.NUM_EPOCHS}], Step [{i + 1}/{n_total_steps}], Loss: {loss.item():.4f}') + + print("Training finished.") + + # --- 4. Evaluation --- + with torch.no_grad(): + train_correct = 0 + train_samples = 0 + for images, labels in train_loader: + images = images.reshape(-1, 28 * 28).to(cfg.DEVICE) + labels = labels.to(cfg.DEVICE) + outputs = model(images) + _, predicted = torch.max(outputs.data, 1) + train_samples += labels.size(0) + train_correct += (predicted == labels).sum().item() + + train_acc = 100.0 * train_correct / train_samples + print(f'Accuracy of the network on the {train_samples} training images: {train_acc:.2f} %') + + test_correct = 0 + test_samples = 0 + for images, labels in test_loader: + images = images.reshape(-1, 28 * 28).to(cfg.DEVICE) + labels = labels.to(cfg.DEVICE) + outputs = model(images) + _, predicted = torch.max(outputs.data, 1) + test_samples += labels.size(0) + test_correct += (predicted == labels).sum().item() + + test_acc = 100.0 * test_correct / test_samples + print(f'Accuracy of the network on the {test_samples} test images: {test_acc:.2f} %') + + # --- 5. Save the Model --- + torch.save(model.state_dict(), cfg.MODEL_PATH) + print(f"Model saved to {cfg.MODEL_PATH}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/Domains/Frontend/MiniProjects/TodoApp/index.html b/Domains/Frontend/MiniProjects/TodoApp/index.html index fb9c1deb..fe8de31c 100644 --- a/Domains/Frontend/MiniProjects/TodoApp/index.html +++ b/Domains/Frontend/MiniProjects/TodoApp/index.html @@ -9,13 +9,11 @@
-

πŸ“ My Todo List

Stay organized, stay productive

-
πŸ“ My Todo List
-
@@ -42,26 +39,21 @@

πŸ“ My Todo List

- - -
πŸ“‹

No tasks yet. Add one above to get started!

- diff --git a/Domains/Frontend/MiniProjects/new1/1.css b/Domains/Frontend/MiniProjects/new1/1.css new file mode 100644 index 00000000..11eb45ce --- /dev/null +++ b/Domains/Frontend/MiniProjects/new1/1.css @@ -0,0 +1,148 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap'); + +:root { + --bg-color: #2c3e50; + --text-color: #ecf0f1; + --button-bg: #3498db; + --button-hover-bg: #2980b9; + --win-color: #2ecc71; + --lose-color: #e74c3c; + --draw-color: #95a5a6; +} + +body { + font-family: 'Poppins', sans-serif; + background-color: var(--bg-color); + color: var(--text-color); + text-align: center; + padding: 20px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 100vh; + margin: 0; +} + +h1 { + font-size: 2.5rem; + margin-bottom: 10px; +} + +.scores { + display: flex; + justify-content: center; + gap: 50px; + font-size: 1.5rem; + margin-bottom: 20px; +} + +.score-box { + background-color: rgba(0, 0, 0, 0.2); + padding: 10px 20px; + border-radius: 10px; +} + +#player-score, #computer-score { + font-weight: 600; + font-size: 2rem; +} + +p#action-message { + font-size: 1.2rem; + height: 25px; /* Reserve space to prevent layout shifts */ + margin-bottom: 20px; +} + +.choices { + margin: 20px 0; +} + +.choices button { + font-size: 3rem; + padding: 15px; + margin: 0 10px; + border: 3px solid transparent; + border-radius: 50%; /* Make buttons circular */ + width: 100px; + height: 100px; + background-color: var(--button-bg); + color: white; + cursor: pointer; + transition: all 0.2s ease; + transform: translateY(0); +} + +.choices button:hover { + background-color: var(--button-hover-bg); + transform: translateY(-5px); +} + +/* Animation for when a button is clicked */ +.choices button:active { + transform: translateY(2px) scale(0.95); +} + +.results { + display: flex; + justify-content: center; + align-items: center; + gap: 40px; + margin-top: 30px; + height: 100px; /* Reserve space */ +} + +.choice-display { + font-size: 1.2rem; + opacity: 0; /* Hidden by default */ + transform: scale(0.5); + transition: all 0.4s ease-in-out; +} + +.choice-display.visible { + opacity: 1; + transform: scale(1); +} + +.choice-display span { + display: block; + font-size: 3rem; + margin-top: 10px; +} + +h2#result { + font-size: 2rem; + height: 40px; /* Reserve space */ + margin-top: 20px; + opacity: 0; + transform: scale(0); + transition: all 0.4s ease; +} + +h2#result.visible { + opacity: 1; + transform: scale(1); +} + +.result-win { color: var(--win-color); } +.result-lose { color: var(--lose-color); } +.result-draw { color: var(--draw-color); } + +#reset-button { + margin-top: 30px; + padding: 10px 20px; + font-size: 1rem; + border: none; + border-radius: 5px; + background-color: #c0392b; + color: white; + cursor: pointer; + opacity: 0; + visibility: hidden; + transition: opacity 0.3s, visibility 0.3s; +} + +#reset-button.visible { + opacity: 1; + visibility: visible; +} diff --git a/Domains/Frontend/MiniProjects/new1/1.html b/Domains/Frontend/MiniProjects/new1/1.html new file mode 100644 index 00000000..c468b866 --- /dev/null +++ b/Domains/Frontend/MiniProjects/new1/1.html @@ -0,0 +1,37 @@ + + + + + + Rock Paper Scissors + + + + +

Rock, Paper, Scissors

+
+
Player: 0
+
Computer: 0
+
+ +

Choose your weapon!

+ +
+ + + +
+ +
+
You chose
+
Computer chose
+
+ +

+ + + + + + + diff --git a/Domains/Frontend/MiniProjects/new1/1.js b/Domains/Frontend/MiniProjects/new1/1.js new file mode 100644 index 00000000..6621a276 --- /dev/null +++ b/Domains/Frontend/MiniProjects/new1/1.js @@ -0,0 +1,143 @@ + +const playerScoreEl = document.getElementById('player-score'); +const computerScoreEl = document.getElementById('computer-score'); +const playerChoiceEl = document.getElementById('player-choice'); +const computerChoiceEl = document.getElementById('computer-choice'); +const resultEl = document.getElementById('result'); +const actionMessageEl = document.getElementById('action-message'); +const choiceButtons = document.querySelectorAll('.choices button'); +const playerChoiceBox = document.getElementById('player-choice-box'); +const computerChoiceBox = document.getElementById('computer-choice-box'); +const resetButton = document.getElementById('reset-button'); + + +let playerScore = 0; +let computerScore = 0; +const choices = ['rock', 'paper', 'scissors']; +const emojiMap = { + rock: 'πŸͺ¨', + paper: 'πŸ“„', + scissors: 'βœ‚οΈ' +}; + +choiceButtons.forEach(button => { + button.addEventListener('click', () => handlePlayerChoice(button.id)); +}); + +resetButton.addEventListener('click', resetGame); + +function handlePlayerChoice(playerChoice) { + toggleButtons(false); + + playerChoiceBox.classList.remove('visible'); + computerChoiceBox.classList.remove('visible'); + resultEl.classList.remove('visible'); + actionMessageEl.textContent = 'Computer is thinking...'; + playerChoiceEl.textContent = emojiMap[playerChoice]; + playerChoiceBox.classList.add('visible'); + + setTimeout(() => { + const computerChoice = getComputerChoice(); + computerChoiceEl.textContent = emojiMap[computerChoice]; + computerChoiceBox.classList.add('visible'); + + const result = getResult(playerChoice, computerChoice); + updateScore(result); + + displayResult(result); + toggleButtons(true); + + resetButton.classList.add('visible'); + }, 1000); + +/** + * Generates a random choice for the computer. + * @returns {string} - The computer's choice ('rock', 'paper', or 'scissors'). + */ +function getComputerChoice() { + const randomNumber = Math.floor(Math.random() * 3); + return choices[randomNumber]; +} + +/** + * Determines the winner of the round. + * @param {string} player - The player's choice. + * @param {string} computer - The computer's choice. + * @returns {string} - The result message ('win', 'lose', or 'draw'). + */ +function getResult(player, computer) { + if (player === computer) { + return 'draw'; + } + if ( + (player === 'rock' && computer === 'scissors') || + (player === 'paper' && computer === 'rock') || + (player === 'scissors' && computer === 'paper') + ) { + return 'win'; + } + return 'lose'; +} + +/** + * Updates the score based on the round result. + * @param {string} result - The result of the round. + */ +function updateScore(result) { + if (result === 'win') { + playerScore++; + playerScoreEl.textContent = playerScore; + } else if (result === 'lose') { + computerScore++; + computerScoreEl.textContent = computerScore; + } +} + +/** + * Displays the final result message and applies styling. + * @param {string} result - The result of the round. + */ +function displayResult(result) { + let message = ''; + switch(result) { + case 'win': + message = 'You Win!'; + break; + case 'lose': + message = 'You Lose!'; + break; + case 'draw': + message = "It's a Draw!"; + break; + } + resultEl.textContent = message; + resultEl.className = `result-${result}`; // e.g., 'result-win' + resultEl.classList.add('visible'); + actionMessageEl.textContent = 'Play again?'; +} + +/** + * Resets the game to its initial state. + */ +function resetGame() { + playerScore = 0; + computerScore = 0; + playerScoreEl.textContent = '0'; + computerScoreEl.textContent = '0'; + resultEl.classList.remove('visible'); + playerChoiceBox.classList.remove('visible'); + computerChoiceBox.classList.remove('visible'); + actionMessageEl.textContent = 'Choose your weapon!'; + resetButton.classList.remove('visible'); +} + +/** + * Enables or disables the choice buttons. + * @param {boolean} enable - True to enable, false to disable. + */ +function toggleButtons(enable) { + choiceButtons.forEach(button => { + button.disabled = !enable; + }); +} +} \ No newline at end of file diff --git a/Domains/Frontend/MiniProjects/new1/README.md b/Domains/Frontend/MiniProjects/new1/README.md new file mode 100644 index 00000000..5ee892ad --- /dev/null +++ b/Domains/Frontend/MiniProjects/new1/README.md @@ -0,0 +1,120 @@ +# βœ… Todo App + +**Contributor:** Dhiraj201226 +**Domain:** Frontend +**Difficulty:** Beginner +**Tech Stack:** HTML, CSS, JavaScript + +--- + +## πŸ“ Description + +This is a sleek and interactive web game where you can play the classic Rock, Paper, Scissors against the computer. + +The page has a modern dark theme and features large, satisfying emoji buttons (πŸͺ¨, πŸ“„, βœ‚οΈ) that animate when you play. It keeps a running score for both you and the computer. When you make a move, there's a brief, suspenseful pause before the choices are revealed with a smooth animation. + +The final result is displayed in a large, colorful messageβ€”green for a win, red for a lossβ€”making it instantly clear who won the round. A "Play Again" button appears after each round, letting you reset the scores and start a new match anytime. + +## 🎯 Features + +Interactive Gameplay: The game responds to player clicks on the Rock, Paper, and Scissors buttons to initiate a round. + +Score Tracking: It keeps a running score for both the player and the computer, updating the display after each round. + +Random Computer AI: The computer's choice is randomly generated for each round, making the game unpredictable. + +Suspenseful Delay: A one-second setTimeout creates a brief, dramatic pause after you make your choice, simulating the computer "thinking" before revealing its move. + +Clear Result Display: The game clearly announces whether you win, lose, or draw. + +Animated UI: The game uses CSS classes like .visible to create smooth fade-in and scaling animations for the choices and results, making the experience more polished. + +Game Reset: A "Play Again" button appears after the first round, allowing the user to reset the scores and start a new game at any time. + +## πŸ› οΈ Tech Stack + +HTML (HyperText Markup Language): This is used for the core structure of your game, defining all the elements like the title, score boxes, buttons, and result displays. + +CSS (Cascading Style Sheets): This provides all the styling, including the dark theme, colors, fonts, button shapes, and the animations that make the game feel interactive and polished. + +JavaScript (Vanilla JS): This is the programming language that runs all the game's logic. It's "vanilla" because it doesn't use any external frameworks or libraries. It handles everything from detecting button clicks and generating the computer's choice to updating the score and displaying the final result. + +--- + +## πŸš€ How to Run + +### Method 1: Direct Browser + +1. Download or clone this folder +2. Open `index.html` in your browser +3. Start playing!! + +### Method 2: Live Server + +1. Install VS Code Live Server extension +2. Right-click on `1.html` +3. Select "Open with Live Server" +4. App opens at `http://localhost:5500` + +--- + +## πŸ“ Project Structure + +``` +new1/ +β”œβ”€β”€ 1.html # Main HTML file +β”œβ”€β”€ 1.css # Styling +β”œβ”€β”€ 1.js # JavaScript logic +β”œβ”€β”€ README.md # Documentation +└── ss.png # Web screenshot + + +## πŸ“š Learning Outcomes + +->DOM Manipulation +->Event Handling +->Conditional Logic +->State Management +->Asynchronous JavaScript +->CSS Transitions & Animations +->Modern CSS Layout +--- + + +## πŸ› Known Issues + +->Rapid Clicking Issue: If you click a choice button very rapidly, it's possible to start a new round before the 1-second setTimeout delay from the previous round has finished. This can cause the UI animations and state updates to get slightly out of sync. It's a minor visual glitch but can be confusing. + +->No Clear "End Game": The score keeps track indefinitely. While this is fine for a casual game, there's no defined win condition (e.g., "First to 5 wins!"). A player might not know when a "match" is over. + +->Draws Don't Feel Neutral: A "draw" round still prompts the user with "Play again?", which feels a bit like the end of a decisive round. It might be better to immediately prompt "Go again!" or "It's a tie, choose again!" without needing the reset button. + +--- + +## πŸš€ Future Enhancements + +1. Make a dataabase to store history of all games +2. Also add a option to play with friends +3. Also to play with other online players +4. Improve UI/UX +5. Some rewards after winning a game to make it more interesting. + +--- + +## πŸ“„ License + +MIT License - Free to use and modify! + +--- + +## 🀝 Contributing + +This is a sample project for ProjectHive. Feel free to: +- Fork and enhance +- Report issues +- Suggest improvements +- Use as learning material + +--- + +**Happy Coding! πŸš€** diff --git a/Domains/Frontend/MiniProjects/new1/ss.png b/Domains/Frontend/MiniProjects/new1/ss.png new file mode 100644 index 00000000..ca831073 Binary files /dev/null and b/Domains/Frontend/MiniProjects/new1/ss.png differ diff --git a/data/MNIST/raw/t10k-images-idx3-ubyte b/data/MNIST/raw/t10k-images-idx3-ubyte new file mode 100644 index 00000000..1170b2ca Binary files /dev/null and b/data/MNIST/raw/t10k-images-idx3-ubyte differ diff --git a/data/MNIST/raw/t10k-images-idx3-ubyte.gz b/data/MNIST/raw/t10k-images-idx3-ubyte.gz new file mode 100644 index 00000000..5ace8ea9 Binary files /dev/null and b/data/MNIST/raw/t10k-images-idx3-ubyte.gz differ diff --git a/data/MNIST/raw/t10k-labels-idx1-ubyte b/data/MNIST/raw/t10k-labels-idx1-ubyte new file mode 100644 index 00000000..d1c3a970 Binary files /dev/null and b/data/MNIST/raw/t10k-labels-idx1-ubyte differ diff --git a/data/MNIST/raw/t10k-labels-idx1-ubyte.gz b/data/MNIST/raw/t10k-labels-idx1-ubyte.gz new file mode 100644 index 00000000..a7e14154 Binary files /dev/null and b/data/MNIST/raw/t10k-labels-idx1-ubyte.gz differ diff --git a/data/MNIST/raw/train-images-idx3-ubyte b/data/MNIST/raw/train-images-idx3-ubyte new file mode 100644 index 00000000..bbce2765 Binary files /dev/null and b/data/MNIST/raw/train-images-idx3-ubyte differ diff --git a/data/MNIST/raw/train-images-idx3-ubyte.gz b/data/MNIST/raw/train-images-idx3-ubyte.gz new file mode 100644 index 00000000..b50e4b6b Binary files /dev/null and b/data/MNIST/raw/train-images-idx3-ubyte.gz differ diff --git a/data/MNIST/raw/train-labels-idx1-ubyte b/data/MNIST/raw/train-labels-idx1-ubyte new file mode 100644 index 00000000..d6b4c5db Binary files /dev/null and b/data/MNIST/raw/train-labels-idx1-ubyte differ diff --git a/data/MNIST/raw/train-labels-idx1-ubyte.gz b/data/MNIST/raw/train-labels-idx1-ubyte.gz new file mode 100644 index 00000000..707a576b Binary files /dev/null and b/data/MNIST/raw/train-labels-idx1-ubyte.gz differ diff --git a/mnist_nn.pth b/mnist_nn.pth new file mode 100644 index 00000000..f72c6a82 Binary files /dev/null and b/mnist_nn.pth differ diff --git a/mnist_nn1.pth b/mnist_nn1.pth new file mode 100644 index 00000000..f536d66a Binary files /dev/null and b/mnist_nn1.pth differ diff --git a/viseron b/viseron new file mode 160000 index 00000000..73ab4563 --- /dev/null +++ b/viseron @@ -0,0 +1 @@ +Subproject commit 73ab456331a62188851dbdd548c958964a07aa5f