6 ms·
Well now I want to spend a few hours using it to solve the peaceable queens problem: https://youtu.be/IN1fPtY9jYg https://youtu.be/IN1fPtY9jYg
by IndexPointer 7y ago
Well now I want to spend a few hours using it to solve the peaceable queens problem: https://youtu.be/IN1fPtY9jYg https://youtu.be/IN1fPtY9jYg
- cerved 7y agoSounds similar to n-Queens, check out http://www.hakank.org/google_or_tools/nqueens.py http://www.hakank.org/google_or_tools/nqueens.py http://www.hakank.org/google_or_tools/nqueens2.py http://www.hakank.org/google_or_tools/nqueens2.py http://www.hakank.org/google_or_tools/nqueens3.py http://www.hakank.org/google_or_tools/nqueens3.py for inspiration
- hakank 7y agoActually, the Peaceable Army (or Armies) of Queens problem is a separate problem and much harder than the n-queens problem. Here is a MiniZinc model: http://hakank.org/minizinc/peaceableArmyOfQueens.mzn http://hakank.org/minizinc/peaceableArmyOfQueens.mzn , and a Picat model: http://hakank.org/picat/peaceableArmyOfQueens.pi http://hakank.org/picat/peaceableArmyOfQueens.pi (Also: Thanks for your links to my site.)