/PrologPuzzlePro

This repository contains Prolog code for solving a color puzzle using both uninformed search (breadth-first or depth-first search) and informed search (A* search).

Primary LanguageProlog

PrologPuzzlePro

This repository contains Prolog code for solving a color puzzle using both uninformed search (breadth-first or depth-first search) and informed search (A* search).

Problem:

The puzzle involves a board filled with colored cells (red, yellow, and blue). The goal is to:

  • Find cycles of at least four adjacent cells with the same color (using uninformed search).
  • Find a path between a given start and goal cell of the same color, allowing only horizontal and vertical movement (using informed search with A*).

Features:

Implements Prolog code for both search algorithms. Defines input, state representation, moves, and output for each search type. Solves the color puzzle based on the provided rules. Handles scenarios with and without solutions.

Target Audience:

Students taking an Artificial Intelligence course using Prolog. Developers interested in applying search algorithms to color-based puzzles.

Getting Started:

Clone this repository. Ensure you have a Prolog interpreter installed. Refer to the provided code comments for detailed instructions.

Note:

This repository is for educational purposes and demonstrates core search algorithm concepts.