Suguru Puzzle in CP

Suguru Puzzle in CP


I was reading this interesting paper then I decided to code it in CP (just for fun).

The reference paper whch I borrowed the title image from


Rules

  • Every cell holds a single digit. (some cells are already filled)
  • These cells team up into containers, marked by bold borders, ranging from cozy one-cell hideouts to bustling five-cell neighborhoods (though most are five).
  • Fill each container with a unique sequence of digits, starting from 1 and climbing up like eager mountaineers.
  • Neighboring cells, even those diagonal pals, can't share the same digit. It's like a quirky neighborhood rule to keep things interesting!

CP model

Code

Result

you may follow the repository on github to access the latest projects

https://github.com/OptimizationExpert/Pyomo

Armin Esfandi

Graduate Trainee Asset Operation | Optimization and Digitalization | Data Analyst

6 个月

??????

Ashkan Fakhri

Assistant Professor at University of Science and Technology of Mazandaran

6 个月

??????

Bara'a Alsardi, PMP

Planning Engineer | Project Manager | Future Energy Leader 2023| Forward McKinsey alumni

6 个月

You're newsletter has always inspired me.. could u plz visit your dm. Thanks.

回复
Manfred Weis

Dipl.Math., Data Scientist at Garmin Würzburg GmbH, Germany

6 个月

The nice thing about combinatorial puzzles is that they are easy to understand but hard to solve; even people without a background in mathematics can anticipate the joy of developing ideas for solutions.

Mehdi Mehrabi

control project expert

6 个月

Python

要查看或添加评论,请登录

社区洞察

其他会员也浏览了