You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
N-Queens puzzle player. This tool will generate randomly or randomly locked puzzle, you may use this as "a boxing bag" to practice problem solving algorithm.
nqueenplay is N-Queens puzzle player. This tool will generate randomly or randomly locked puzzle, you may use this as "a boxing bag" to practice problem solving algorithm.
Installation
This python package available on pip installation using
pip install nqueenplay
Requirements
Available on Python 3
Documentation
A to Z explanations to use this tool
Generate Random Puzzle
To generate a random puzzle you can do:
N=4# any integernqueens=NQueen(N)
or
N=4# any integernqueens=NQueen(n=N,number_lock=0)# 0 = no lock
Generate Random Locked Puzzle
Random locked mean the distribution of queen is randomize, and there is locking mechanism to make sure the queen position won't change for another run. To generate a random locked puzzle you can do:
N=4# any integerlock=1# any integernqueens=NQueen(n=N,number_lock=lock)
N-Queens puzzle player. This tool will generate randomly or randomly locked puzzle, you may use this as "a boxing bag" to practice problem solving algorithm.