数独问题的生成
我正在玩数独游戏。我的问题是数独问题的生成。我想提出三个难度的问题。有没有办法生成 3 级问题?
I am doing a sudoku game. My problem is the generation of sudoku questions. I want to generate questions in three difficulties. Is there any idea to generate 3 level questions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我们选择预先生成的数独谜题,也许你可以看看这个:
http://www.setbb.com/phpbb/viewtopic.php ?t=102&mforum=sudoku
我们在 Linux 发行版中使用了终端数独,
它具有批处理生成器模式。
该网站已关闭,但它已针对某些 Linux 发行版进行了打包。
为每个级别生成谜题:简单、中等和困难
解决谜题
我检查了其中一些谜题,他们只有一个解决方案。
If we go for pre generated sudoku puzzles, maybe you could have a look at this :
http://www.setbb.com/phpbb/viewtopic.php?t=102&mforum=sudoku
we used terminal sudoku in the Linux distributions
it has a batch generator mode.
the website is down but it is packaged for some linux distributions.
generate puzzles for each level : easy, medium and hard
solve the puzzles
I checked some of them and they had only one solution.
生成完整(填充)的数独,并在打印数独之前,再次将一定比例的字段留空以供人类填充。
选择要清空的随机字段。提高每个难度级别的空白字段百分比。
Generate full (filled) sudokus and before printing the sudoku out, make some percentage of the fields empty again for the human to fill.
Select random fields to empty. Raise the percentage of empty fields on each difficulty level.