Dive into a world where you’re not just a player, but a creator. In this interactive game, you design the maze, but here’s the twist: Can you design a maze swiftly, using the least time possible, yet make our AI take the maximum time to find its way? The challenge? Make the AI ponder over your crafty creation. While our AI boasts of solving most mazes in a mere moment, we’ve added a graphic representation of the ant’s journey to allow you to savor the AI’s decision-making, one step at a time. The stakes? Your creativity versus AI’s intelligence. Get your creator’s cap, and let the games begin!
At the start of the game, you’re presented with a blank canvas. Here, you get to wear the hat of a creator:
Note: You can even make it further challenging by limiting the count of each terrain type. For example, you can limit yourself from using the number of obstacles, grassland, and swamplands you can use. This will make the mage creation more challenging.
The program uses the A* algorithm to find the shortest path from the ant to the food. The ant is the start and the food is the goal. The ant can move in 8 directions.
When the game starts, the user is asked to select:
After the user has selected the cells, the program calculates the shortest path from the ant to the food. The program uses the A* algorithm to find the shortest path. The A* algorithm uses a heuristic function to find the shortest path. The heuristic function used in this program is the Manhattan distance. The program shows the search evaluation of the A* algorithm. When the path is found, the ant starts moving from the start cell to the goal cell.
This repository uses CI/CD to automatically build and release the program for Windows, macOS, and Linux. The program is packaged as a JAR file. The JAR file is then packaged into an MSI file for Windows, a DMG file for macOS, and a DEB file for Linux. The program is built using GitHub Actions and is released using GitHub Releases. The program is built for the following platforms:
You can find them here in the Releases section.
Downloading the jar file is preferred. You can download the release version of the Game from the latest release here. The program is packaged as a JAR file. You can run the program by double-clicking on the JAR file.
cd ~/Downloads
sudo dpkg -i ./ant-path-finding-v1.0.0-linux_amd64.deb # Replace the filename/version with the name of the DEB file you downloaded
sudo apt-get install -f
You can start the game by searching for it in the applications menu named ant-path-finding
or by running the following command in the terminal:
/opt/ant-path-finding/bin/ant-path-finding
sudo apt update
sudo apt install default-jre
cd ~/Downloads
chmod +x ant-path-finding-v1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
java -jar ant-path-finding-v1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
There are 2 methods. Downloading the dmg file or downloading the jar file.
I am not a registered Apple developer, That is why you will get a warning when you try to open the app. Thus, you will have to bypass the security settings to run the app. Here are the steps:
Click on the .dmg file you have downloaded.
Drag the app to the Applications folder.
In the Finder, locate the Ant Path Finding app.
(Don’t use Launchpad to do this. Launchpad doesn’t allow you to access the shortcut menu.)
Press and hold Control then click the app icon.
Click Open.
The app is saved as an exception to your security settings, and you can open it in the future by double-clicking it just as you can any registered app.
Make sure you have JRE installed on your computer. You can download JRE here or here.
cd ~/Downloads
chmod +x ant-path-finding-v1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
java -jar ant-path-finding-v1.0.0.jar # Replace the filename with the name of the JAR file you downloaded
At this point, the Windows smart screen will block the app from running. As I am not a signed developer by Microsoft, this warning will appear.
Confirming Java:
Make sure you have JRE installed on your computer. You can download JRE here or here.
Ensure that Java is added to your PATH
so that it can be accessed from the command prompt. During the JRE installation, You will have the option to add to your path. It is unchecked by default. Make sure to enable it. To check if Java is installed, run the following command in Command Prompt or PowerShell:
java -version
If Java is installed, you should see the version number. If you see an error, you need to install Java. See above for instructions on installing Java.
cd c:\Users\username\Downloads # Replace username with your username
java -jar ant-path-finding-v1.0.0.jar
In all cases, once the commands are followed, the Java application packaged inside the JAR file should start running.
sudo apt-get remove ant-path-finding