GithubHelp home page GithubHelp logo

d3talsuppo's Introduction

This script is adapted from https://github.com/chengxi600/RLStuff/blob/master/Genetic%20Algorithms/8Queens_GA.ipynb

To run the script, you need python 3 and above, as well as scipy library. Alternatively, you can just run the exe file which contains all the necessary library (Sorry if you are using MacOS, please run the script using python, as I do not have a Mac Computer [Poor Kids No money to buy Apple Product])

To setup the environment please run the command:

pip install scipy

Modification made are detail below:

  • When first initializing the population, added code to prevent duplicating sequence from appearing in the population (No queens on the same column)
  • When mutation occurs, no more adding random sequence to the population, this is done to prevent duplicating queen on the same column
  • Added refresh feature to prevent the algorithm from falling into local point
    • Since initialization plays a huge factor in deriving the answer, reinitialzing the population after a fix epoch is needed to prevent stuck at a local maximum point and not able to find the final answer
  • Added feature to allow user to dynamically change the number of queens, population size, mutation rate, etc.

Result will be save as a text file named Lu_Xinpei_EE6227_Assignment_3_Result.txt. This file is located at the same directory as the program.

Lastly, if you wish to stop the program at any time, press Ctrl + C to stop the program!

d3talsuppo's People

Contributors

cloudtenno avatar

Watchers

 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.