This project implements the classic "Rooster Chase" game using an 8×8 chessboard grid in MATLAB. In this game, a farmer tries to capture a rooster by moving on the board according to a strategy based on distance calculations. The farmer uses a greedy algorithm to minimize the distance between them, pushing the rooster into a corner for capture.
- A grid-based representation of the game using a chessboard.
- Farmer movement based on Manhattan distance calculations.
- Rooster movement is randomly.
- Capture logic ensures the game ends within a maximum of 14 moves.
- Visualization of the game board and moves.
- The rooster starts by moving first.
- The farmer then moves to minimize the maximum distance (either in rows or columns) between them.
- The game continues until the farmer catches the rooster in a corner.
- Clone the repository.
- Open the
Main.mfile in MATLAB. - Run the script to see the game in action.
![]() |
- Completed: 2017
- Uploaded: 2024
