The MiniMax algorithm is especially known and applicable for calculating the best move (optimal move) in two player games where all the information is available.
Here, we will try to show how MiniMax can be used to solve a route finding problem, by making one (the customer / passenger / fare) route selector to select the minimum distance route and the other one (the driver of the taxi) to select the maximum distance route from the goal or destination place, alternatively (max, min). Example of the distance from source to destination
The data input to the system is file-based. The following data is stored in a file called “ourRoutes.txt”. ourRoutes.txt looks like this
The First thing a user should do when using this Route Finding Program using Min-Max algorithm is to prepare the map, the format of the map should be similar to the above format.
E.g. Stadium_*_9: this means Stadium is the last path to destination and its distance is 9 KM to Saris through Stadium path.
When the user runs the program, the route finding program “form” will be displayed. First, select the path of the file that contains the state space and enter the destination place in the text box. The steps are:
The system automatically performs the following task: