These programs make magic squares and rectangles using "Constraint-Based Local Search".
(For non-square rectangles, input the order as two numbers.)
There are 3 similar programs: CompleteSquare, CompleteSquareSteps, and MagicSquares.

Given an input square with some cell values between 1 and NxN specified,
(and other cell values 0), CompleteSquare attempts to complete a magic square by
placing the remaining values. The square type can be input as semimagic, magic,
or associative.

For successful solutions, CompleteSquareSteps shows the steps of the search.
The number exchanges at each step and the intermediate squares are written to files.

MagicSquares does not require an input file.
MagicSquares (only) also supports concentric and pandiagonal. (Pandiagonal succeeds only for small orders.)

See:
http://budshaw.ca/Download.html#complete
http://budshaw.ca/Download.html#magics
http://budshaw.ca/addenda/downloadNotes.html#completenotes

Features

  • constraint-based local search
  • tabu search
  • randomly generated starting rectangles
  • user-supplied starting rectangles
  • user-supplied rectangle templates

Project Samples

Project Activity

See All Activity >

Follow mssolutions

mssolutions Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of mssolutions!

Additional Project Details

Intended Audience

Science/Research, Education, End Users/Desktop

Programming Language

C++

Related Categories

C++ Games, C++ Algorithms, C++ Mathematics Software

Registered

2013-12-26