Skip to content

atharvadk/AIAlgorithmSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Algorithm Simulator

Java PRs Welcome

A menu-driven console-based AI Algorithm Simulator designed for teaching and demonstrating core Artificial Intelligence search algorithms. Perfect for students, educators, and anyone preparing for competitive exams like GATE.

📚 Table of Contents

🎯 Overview

This project goes beyond simple algorithm execution—it explains each step with clear console outputs, making complex AI concepts accessible and understandable. Developed as part of the AI3001 – Artificial Intelligence course, it's ideal for:

  • 🎓 University and college-level examinations
  • 📝 Competitive exam preparation (GATE, etc.)
  • 💡 Building conceptual understanding of AI search techniques
  • 👥 Group learning and collaborative study

✨ Features

  • 🖥️ Menu-driven console interface - Easy navigation through different algorithms
  • 📖 Step-by-step explanations - Understand the "why" behind each decision
  • 🔍 Internal state visualization - See OPEN lists, queues, and priority queues in action
  • 📊 Proper data structures - Queue, Stack, Priority Queue implementations
  • 🗂️ Modular architecture - Clean, organized code structure
  • 📝 Execution logging - Track algorithm behavior over time
  • ⏱️ Performance timing - Measure algorithm execution time

🧠 Algorithms Implemented

Uninformed Search Algorithms

  • Breadth First Search (BFS) - Level-by-level graph traversal
  • Depth First Search (DFS) - Deep exploration of graph paths

Informed Search Algorithms

  • Best First Search - Greedy heuristic-based search
  • A Search* - Optimal pathfinding with heuristics
  • Hill Climbing - Local search optimization
  • AO (AND-OR Graph Search)* - Handles problem decomposition

Each algorithm includes:

  • ✅ Conceptual explanation before execution
  • ✅ Intermediate step visualization
  • ✅ Final path/solution display
  • ✅ Limitation highlights (local maxima, plateaus, etc.)

🚀 Installation

Prerequisites

  • Java Development Kit (JDK) 11 or higher
  • Command line interface (Terminal/CMD)

Clone the Repository

git clone https://github.com/yourusername/ai-algorithm-simulator.git
cd ai-algorithm-simulator

Compile the Project

javac -d bin src/**/*.java

💻 Usage

Run the Simulator

java -cp bin main.Main

Menu Navigation

Once launched, you'll see a menu like this:

===========================================
   AI Algorithm Simulator
===========================================
1. Breadth First Search (BFS)
2. Depth First Search (DFS)
3. Best First Search
4. A* Search
5. Hill Climbing
6. AO* Search
0. Exit
===========================================
Enter your choice:

Simply enter the number corresponding to the algorithm you want to explore!

📁 Project Structure

AI-Algorithm-Simulator/
│
├── src/
│   ├── main/
│   │   └── Main.java                 # Entry point (menu-driven)
│   │
│   ├── search/
│   │   ├── SearchDemo.java           # Search menu handler
│   │   ├── Graph.java                # Graph representation
│   │   ├── Node.java                 # Node structure
│   │   ├── BFS.java                  # Breadth First Search
│   │   ├── DFS.java                  # Depth First Search
│   │   ├── BestFirstSearch.java      # Best First Search
│   │   ├── AStar.java                # A* Algorithm
│   │   ├── HillClimbing.java         # Hill Climbing
│   │   └── AOStar.java               # AO* Algorithm
│   │
│   └── utils/
│       ├── DisplayHelper.java        # Console formatting utilities
│       ├── Logger.java               # Logging utility
│       └── Timer.java                # Execution time measurement
│
├── logs/
│   └── execution.log                 # Runtime logs
│
├── bin/                              # Compiled class files
│
├── README.md                         # This file
├── LICENSE                           # License information
└── CONTRIBUTING.md                   # Contribution guidelines

🎓 Educational Focus

This simulator stands out by providing deep learning insights:

Feature Benefit
Decision Explanation Understand why each node is selected
Data Structure Visualization See how queues and priority queues change in real-time
Algorithm Limitations Learn about local maxima, plateaus, and non-optimal paths
Gate Smashers-Style Learning Explanations match popular educational approaches

Unlike typical implementations that just show output, we teach the underlying concepts.

🔧 Why Java?

  • Strong OOP support - Clean class hierarchies for algorithms
  • Package structuring - Logical code organization
  • Readability - Easy to follow for learners
  • Debugging tools - Simplified troubleshooting
  • Group projects - Better than C/C++ for collaboration

⚠️ Current Limitations

  • Console-based only (no GUI yet)
  • Graphs are predefined (no dynamic input)
  • Not optimized for very large graphs (focus is teaching, not performance)

🚀 Future Enhancements

  • GUI-based visualization with JavaFX
  • User-defined graph input
  • Step-by-step pause/resume mode
  • Comparative performance analysis
  • Additional algorithms (Minimax, Alpha-Beta Pruning, CSP)
  • Export results to PDF/CSV
  • Interactive graph builder

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

👥 Contributors

This project is developed as a group academic project for the course AI3001 – Artificial Intelligence.

Team Members

🙏 Acknowledgments

  • Inspired by Gate Smashers educational content
  • Course instructor and teaching assistants
  • All contributors and testers
  • The AI/ML student community

⭐ Star this repository if you find it helpful!

Made with ❤️ for AI learners everywhere

About

A console-based AI Algorithm Simulator for learning and visualizing core search algorithms used in Artificial Intelligence.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages