A dynamic maze was created to allow users to experiment with different search algorithms. The maze is randomly generated by the user, and they can choose a start and an end point. Then, they can select a search algorithm, such as breadth-first search, depth-first search, A* search, etc.
As the search progresses, the path taken is highlighted with different colors. This allows users to clearly and interactively visualize the search process.
Course: SINF0042 - ARTIFICIAL INTELLIGENCE (2022.2 - TIND01)
iavideo.mp4
This guide provides step-by-step instructions for running the AI-Maze-Game application using Docker and Xming on a Windows machine.
Before you begin, make sure you have the following installed:
- Docker: Install Docker for Windows
- Xming: Xming-6-9-0-31-setup.exe
- Install Xming by running the
Xming-6-9-0-31-setup.exe
installer. - Open a terminal where the Dockerfile is located.
- Build the Docker image by running the following command:
docker build -t projetoia .
- Run the Docker container with Xming by running the following command:
docker run -it --name projetoia -e DISPLAY=host.docker.internal:0 projetoia
- Note: Make sure to replace
projetoia
with the name of your Docker image if you used a different name in step 3.
- Note: Make sure to replace
- Navigate to the Maze-IA directory by running the following command:
cd AI-Maze-Game/ && cd Maze-IA && ls
- Run the AI-Maze-Game application by running the following command:
python3 game.py
sudo dnf install -y wget bzip2 ca-certificates curl glib2 libXext libSM libXrender
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/youruser/miniconda3
echo 'export PATH="/home/youruser/miniconda3/bin:$PATH"' >> ~/.bashrc
source /home/youruser/miniconda3/bin/activate
(base) [youruser]$ conda install -y -c conda-forge graph-tool
(base) [youruser]$ conda install -y -c conda-forge pygame
(base) [youruser]$ conda install -y numpy
make the clone: git clone https://github.com/NathanaelSantos/AI-Maze-Game.git
(base) [nathan]$ cd AI-Maze-Game/
(base) [nathan AI-Maze-Game]$ cd Maze-IA/
(base) [nathan Maze-IA]$ python3 game.py
Before starting, make sure you have the following prerequisites:
- Ubuntu (any recent version)
- Internet access
First, we need to install some necessary dependencies for the installation of Miniconda.
sudo apt-get update
sudo apt-get install -y wget bzip2 ca-certificates curl libglib2.0-0 libxext6 libsm6 libxrender1
Download the Miniconda installer using the wget command.
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Run the Miniconda installation script and install it in the /home/yourusername/miniconda3 directory.
bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/youruser/miniconda3
Add the Miniconda bin directory to your PATH so that Conda commands are recognized.
echo 'export PATH="/home/youruser/miniconda3/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Activate the base Conda environment.
source /home/youruser/miniconda3/bin/activate
Use Conda to install the necessary packages: graph-tool, pygame, and numpy.
conda install -y -c conda-forge graph-tool
conda install -y -c conda-forge pygame
conda install -y numpy
Clone the AI-Maze-Game repository from GitHub.
git clone https://github.com/NathanaelSantos/AI-Maze-Game.git
Navigate to the game directory and run it.
cd AI-Maze-Game/
cd Maze-IA/
python3 game.py
If you disconnect from the session, you can reconnect to the Conda environment by running:
source /home/youruser/miniconda3/bin/activate
- Press the B key to activate or deactivate the "paint mode" (activated by default).
- You can draw new walls in the maze by clicking with the left button of the mouse, while the paint mode is activated.
- Press the S key to save a maze file. You can open it in the option "Import save".
- After drawing your maze, press the SPACE key to show the search algorithm menu.
- Select the algorithm by clicking with the left button of the mouse.
- Enjoy watching.
![]() |
![]() |
![]() |
Guilherme Santos Costa Bacharel em Sistemas de Informação |
José Nathanael Santos Matos Bacharel em Sistemas de Informação |
Pedro Antonio Santos Lima Bacharel em Sistemas de Informação |
![]() |
ALCIDES XAVIER BENICASA Departamento: Sistemas de Informação - DSI/UFS |
This project is licensed under the MIT License.
Remember to replace the example information with relevant information for your project.