数独自动计算及自动生成不同难易程度题目的源码

上传者: u013475716 | 上传时间: 2021-05-22 14:53:07 | 文件大小: 208KB | 文件类型: RAR
一、数独说明:数独由九行,九列组成,又分为顺序排列的九宫。每行、每列及每宫都包含九个格,九个格中填放1到9的不重复的数字。 二、自动计算原理(三步法): 1、基础法:找出空格中唯一可填的数字。方法是,先假设某空格中可填入九个数字,然后去掉所在行、所在列、所在宫中的已有数字。余下如果是唯一一个数字,那么这个数字就是结果 2、找唯一法:例如果某行、某列或某宫中只剩一个空格,那么九个数字中缺少的那个就是结果。 3、求唯余法:对于存在多个可能值的空格,循环取其中一个作为假设值,然后反复利用方法1和方法2去测试,如果出错冲突或导致别的空格无值可填时,说明假设的值是错误的。并对别剩余未找到唯一值的空格进行同样操作,直至找到可行的一个方案。 三、自动出题,是自动求解的反向过程,先给出答案,再组合题目: 1、数独难易程度跟数独已知的数字个数有一定关系,但不是必然关系。可分为四级,根据网友“数独难度分级”的文章https://wenku.baidu.com/view/af550ed51a37f111f1855ba0.html,结果是分布在0到1之间的一系列值,值越少越容易。 2、出题时,先利用随机数往81个空格中填入不冲突的值。方法是,因为对角线的三宫中的数字互不干扰,用随机数填充这三宫,然后根据数独规则要求随机填入另外六宫。 3、这是最终结果,然后根据难易要求,随机将结果中的一定数量(可以用随机数)的方格清空。数独题已经形成。再根据网友提供的级别计算公式,计算形成的数独题的难易程度是否符合要求。(此时的数独答案不是唯一的) 4、难易程度具体计算公式是:两个空格所有可能值如果有依赖关系值为1,没依赖关系值为0。如此汇总所有空格之间的关系值为A,再除以空格个数B的18倍。即A/(18*B)。0—0.25为0级,0.25—0.5为1级,0.5—0.75为2级,0.75—1为3组。

文件下载

资源详情

[{"title":"( 62 个子文件 208KB ) 数独自动计算及自动生成不同难易程度题目的源码","children":[{"title":"Shudu.sln <span style='color:#111;'> 982B </span>","children":null,"spread":false},{"title":"Shudu","children":[{"title":"Resources","children":[{"title":"next_green.png <span style='color:#111;'> 519B </span>","children":null,"spread":false},{"title":"resultset_next.png <span style='color:#111;'> 395B </span>","children":null,"spread":false},{"title":"forward_blue.png <span style='color:#111;'> 425B </span>","children":null,"spread":false},{"title":"rewind_green.png <span style='color:#111;'> 415B </span>","children":null,"spread":false},{"title":"head_ico.png <span style='color:#111;'> 624B </span>","children":null,"spread":false},{"title":"control_record.png <span style='color:#111;'> 661B </span>","children":null,"spread":false},{"title":"control_end_blue.png <span style='color:#111;'> 737B </span>","children":null,"spread":false},{"title":"resultset_previous.png <span style='color:#111;'> 389B </span>","children":null,"spread":false},{"title":"control_play.png <span style='color:#111;'> 592B </span>","children":null,"spread":false},{"title":"resultset_first.png <span style='color:#111;'> 522B </span>","children":null,"spread":false},{"title":"book02.png <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"filesave.png <span style='color:#111;'> 898B </span>","children":null,"spread":false},{"title":"control_pause_blue.png <span style='color:#111;'> 721B </span>","children":null,"spread":false},{"title":"control_fastforward_blue.png <span style='color:#111;'> 736B </span>","children":null,"spread":false},{"title":"control_end.png <span style='color:#111;'> 621B </span>","children":null,"spread":false},{"title":"control_fastforward.png <span style='color:#111;'> 607B </span>","children":null,"spread":false},{"title":"control_pause.png <span style='color:#111;'> 598B </span>","children":null,"spread":false},{"title":"rewind_blue.png <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"reverse_blue.png <span style='color:#111;'> 402B </span>","children":null,"spread":false},{"title":"resultset_last.png <span style='color:#111;'> 524B </span>","children":null,"spread":false},{"title":"control_play_blue.png <span style='color:#111;'> 717B </span>","children":null,"spread":false},{"title":"Icon1.ico <span style='color:#111;'> 44.39KB </span>","children":null,"spread":false},{"title":"undo.png <span style='color:#111;'> 707B </span>","children":null,"spread":false},{"title":"hammer_screwdriver.png <span style='color:#111;'> 879B </span>","children":null,"spread":false},{"title":"next_blue.png <span style='color:#111;'> 530B </span>","children":null,"spread":false}],"spread":false},{"title":"UserLabel.vb <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"LieoSplitButton.resx <span style='color:#111;'> 5.86KB </span>","children":null,"spread":false},{"title":"FormMain.Designer.vb <span style='color:#111;'> 28.07KB </span>","children":null,"spread":false},{"title":"FormMain.resx <span style='color:#111;'> 6.08KB </span>","children":null,"spread":false},{"title":"My Project","children":[{"title":"Settings.settings <span style='color:#111;'> 279B </span>","children":null,"spread":false},{"title":"AssemblyInfo.vb <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false},{"title":"Settings.Designer.vb <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"Application.Designer.vb <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 8.29KB </span>","children":null,"spread":false},{"title":"Resources.Designer.vb <span style='color:#111;'> 6.75KB </span>","children":null,"spread":false},{"title":"Application.myapp <span style='color:#111;'> 510B </span>","children":null,"spread":false}],"spread":true},{"title":"MyLabel.vb <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 188B </span>","children":null,"spread":false},{"title":"FormMain.vb <span style='color:#111;'> 87.37KB </span>","children":null,"spread":false},{"title":"LieoSplitButton.vb <span style='color:#111;'> 6.16KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Shudu.LieoSplitButton.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Shudu.vbproj.GenerateResource.Cache <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"Shudu.vbprojResolveAssemblyReference.cache <span style='color:#111;'> 10.36KB </span>","children":null,"spread":false},{"title":"Shudu.Resources.resources <span style='color:#111;'> 7.75KB </span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"My Project.Resources.Designer.vb.dll <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"Shudu.FormMain.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 8.37KB </span>","children":null,"spread":false},{"title":"Shudu.pdb <span style='color:#111;'> 105.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 12.37KB </span>","children":null,"spread":false},{"title":"Shudu.exe <span style='color:#111;'> 73.00KB </span>","children":null,"spread":false},{"title":"Shudu.vbproj.FileListAbsolute.txt <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"Shudu.xml <span style='color:#111;'> 12.51KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"Shudu.vshost.exe.config <span style='color:#111;'> 188B </span>","children":null,"spread":false},{"title":"Shudu.exe.config <span style='color:#111;'> 188B </span>","children":null,"spread":false},{"title":"Shudu.pdb <span style='color:#111;'> 105.50KB </span>","children":null,"spread":false},{"title":"Shudu.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"Shudu.vshost.exe <span style='color:#111;'> 22.16KB </span>","children":null,"spread":false},{"title":"Shudu.exe <span style='color:#111;'> 73.00KB </span>","children":null,"spread":false},{"title":"Shudu.xml <span style='color:#111;'> 12.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"Release","children":null,"spread":false}],"spread":true},{"title":"Shudu.vbproj <span style='color:#111;'> 7.83KB </span>","children":null,"spread":false}],"spread":false},{"title":".vs","children":[{"title":"Shudu","children":[{"title":"v14","children":[{"title":".suo <span style='color:#111;'> 57.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明