Giter VIP home page Giter VIP logo

magic-square's Introduction

Magic Square Solver

The goal of this project is to develop a genetic algorithm for solving normal magic squares. This repository contains an experiment comparing our genetic algorithm, written in Go, to a constraint satisfaction problem solver, written in Prolog.

Source Layout

  • ga/ and csp/: These directories contain the source code for the genetic algorithm and constraint satisfaction solvers respectively.
  • ga_trial.go and csp_trial.pl: These programs provide entry points to run each solver against specific trials. They accept the same command-line flags, given below, and their output is a timing of the trial.
    • -g <generator>: The generator identifies the algorithm that generated the trial to be run.
    • -o <order>: The order identifies the size of the trial to be run. Only certain combinations of order and generator are valid. See the trials.pl file for valid combinations.
    • -d <difficulty>: The difficulty of the problem must be one of hard, med, or easy.
    • -n <count>: The trial is run repeatedly for some count of iterations and the average time taken is reported.
    • -t <timeout>: If any particular iteration takes longer than the timeout, the program halts and "timeout" is printed.
  • trials.pl: This file contains the trials to run in the experiment.
  • main.sh: This script runs each of the solvers on each of the trials and prints a comma-separated table of the average time taken for each trial.
  • data.csv: This is the experimental data collected from main.sh and referenced in the report.

magic-square's People

Contributors

cbarrick avatar manuelphun avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.