Skip to content

nrchua/CSE203B_NQueens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSE203B_NQueens

Make Data

Run: python make_data.py The data will be stored in folders ./board_initialiations/xxx_yyy. xxx is the size of the board (with leading 0s if not 3 digits long) and yyy is the number of queens initialized (with leading 0s if not 3 digits long). Inside each folder, each .csv file consists of one random initialization. There will also be a corresponding .dzn file for the Gecode solver using MiniZinc.

ILP

Dependencies

  • PuLP: pip install pulp

Run the ILP

Run: python ilp.py <./board_initializations/xxx_yyy>

This will run the ILP solver over each initialization in the xxx_yyy folder and print out the mean runtime.

Constraint Programming (Gecode)

Dependencies

  • MiniZinc

Run the MiniZinc Gecode solver

Run: python run_nqueens_minizinc.py ./board_initializations/xxx_yyy/

This will run the constraint programming solver Gecode over each initialization in the xxx_yyy folder and print out the mean runtime.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages