Magic Square Solver This is a program that searches for the most optimal solution to solve the magic square based on the parameters (length of matrix) given to it. You can get this program running using swi-prolog.