This is a solver for the Queens game, an original LinkedIn game.
- Clone the repo
- Run
npm run start <file-path>
Note: The file should be a JSON file with a N x N matrix where each cell is the color id (a char). There is an example in the examples folder
This are a few of the strategies you develop naturally playing the game which are all you need to solve the puzzle.
Any set of N colors that can only be placed in N columns or N rows are the only colors that will have queens in said N columns or N rows. You can eliminate any color that does not belong to said set.
Example: In the following image, the pink and the orange colors can only be placed in columns 2 and 3
Being that it is 2 colors that can only be placed in those 2 columns then no other color can be placed in those columns.
Solo candidates as the name describes are colors that only have one possible candidate therefore the queen must be there.
Example: Purple has only one possible candidate
Killers are candidates that eliminate an entire color if a queen was placed there.
Example: If there were to be a queen in the place of the eliminated candidate then the purple color would not be solvable. Note: A killer is any candidate that neighbours a subset of the purple figure example.



