Skip to content

A strategic Android game where players battle for dominance on a 5x5 grid using intelligent AI-powered opponents. Features include multiple difficulty levels with AI utilizing Fuzzy Logic, Genetic Algorithms, and Alpha-Beta Pruning for dynamic gameplay.

License

Notifications You must be signed in to change notification settings

george07-t/Color-Wars

Repository files navigation

🎨 Color Wars: A Strategic Game of Colors with AI-Powered Challenges

License: MIT Platform Java

🚀 Overview

Color Wars is a two-player strategic Android game where players engage in a battle of colors to dominate a 5x5 grid. Designed with intelligent AI that adapts its strategy based on the selected difficulty level, this game challenges players to think critically and strategically to outmaneuver their opponents.

🔥 Key Features

  • Three AI Difficulty Levels:
    • Easy: Fuzzy Logic for basic decision-making.
    • Medium: Genetic Algorithms for evolving strategies.
    • Hard: Alpha-Beta Pruning for optimal moves.
  • Turn-Based Strategy: Engage in a thoughtful and tactical gameplay experience.
  • Chain Reactions: Trigger cascading events that can change the course of the game.

🎮 How to Play

  1. Choose Your Difficulty: Start by selecting a difficulty level—Easy, Medium, or Hard.
  2. Place Your Circle: Click on any square on the 5x5 grid to place your first red circle.
  3. Increase Circle Value: Click on your circles to add dots, increasing their value up to 4.
  4. Spread and Conquer: Once a circle reaches 4 dots, it spreads to adjacent squares, capturing opponent circles.
  5. Win the Game: Dominate the entire grid or eliminate your opponent’s circles to win.

Gameplay Screenshots

2
5
3

🛠️ Technologies Used

  • Development Platform: Android Studio
  • Programming Language: Java
  • Artificial Intelligence: Fuzzy Logic, Genetic Algorithms, Alpha-Beta Pruning
  • User Interface: XML Layouts
  • Version Control: Git
  • Testing and Debugging: Android Emulator, Logcat

🧠 AI Implementation

🤖 Fuzzy Logic (Easy Mode)

Simulates human-like decision-making by considering degrees of truth rather than binary logic. Ideal for beginners.

🧬 Genetic Algorithm (Medium Mode)

Inspired by natural selection, this AI evolves its strategy over multiple generations, offering a dynamic and adaptive challenge.

🔍 Alpha-Beta Pruning (Hard Mode)

Optimizes decision-making by pruning irrelevant branches in the decision tree, ensuring the AI makes the most strategic moves.

📚 Educational Value

Color Wars isn’t just a game—it's a learning platform. By playing, users gain insights into:

  • Strategic Thinking and Problem-Solving
  • AI Algorithms in Action: Fuzzy Logic, Genetic Algorithms, Alpha-Beta Pruning
  • Game Theory and Decision-Making

📂 Project Structure

  • app/src/main/java/: Core game logic and AI implementations.
  • app/src/main/res/layout/: XML files for UI design.
  • app/src/main/assets/: Game assets such as images and icons.
  • docs/: Additional documentation and resources.

🚧 Development Process

  1. Game Design: Conceptualized the 5x5 grid and game mechanics.
  2. UI Design: Crafted a user-friendly interface with XML layouts.
  3. AI Integration: Implemented AI algorithms for different difficulty levels.
  4. Testing & Debugging: Ensured a seamless gameplay experience using Android Emulator and Logcat.

🎥 Demo Video

Game.Demo.mp4

🛠️ Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/ColorWars.git
  2. Open in Android Studio.
  3. Build and run the app on an emulator or physical device.

🤝 Contributing

Contributions are welcome! If you have improvements or bug fixes, please open an issue or submit a pull request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues while using Colors Wars or have questions, please open an issue in the GitHub repository. We'll be happy to help you out.

About

A strategic Android game where players battle for dominance on a 5x5 grid using intelligent AI-powered opponents. Features include multiple difficulty levels with AI utilizing Fuzzy Logic, Genetic Algorithms, and Alpha-Beta Pruning for dynamic gameplay.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages