GithubHelp home page GithubHelp logo

sudoku-sft-ga's Introduction

Sudoku-SFT-GA

Implementation of a Sudoku puzzle solver (Task 1) with a GA and a Santa Fe Ant Trail problem with a GP (Task 2).

Task 1

To run the code for the Sudoku GA, use the command below:

python task1_sudoku.py

You will need to have Python 3.6+ installed, Numpy, and Matplotlib. If you have Anaconda 6+ installed, it should also work fine. The file contains three different puzzle (2x2, 3x3 and 4x4). To switch which puzzle is solved, change the puzzle passed to the puzzleProblem variable on line 53. Parameters for the GA like initial population size, start on line 70.

The results for the 2x2 run for 1000 generations is below. alt

The results for the 3x3 run for 1000 generations is below. alt

The results for the 4x4 run or 1000 generations is below. alt

Task 2

The code for the GP implementation for the Santa Fe Ant Trail problem, is built using code from DEAP, the EA library for Python, and their tutorial on GPs for this problems. Their documentation page here also describes how to install it. To run this, use the command below:

python task2_santaFeTrail.py

You will need to have the same libraries installed as above, along with DEAP 1.3+.

The results for max/min/avg fitness over 100 generations is shown below. alt

sudoku-sft-ga's People

Contributors

dmujt 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.