A Simple Application and Design of Genetic Algorithm in Card Problem

来源 :电脑知识与技术 | 被引量 : 0次 | 上传用户:FlamesTsui
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
  Abstract: According to traditional card problem solving which is based on the idea of genetic algorithm(GA), a set of algorithms is designed to find final solution. For each process in genetic algorithm, including choices of fitness function, parameters determination and coding scheme selection,classic algorithm is used to realize the various steps, and ultimately to find solution of problems.
  Key words: genetic algorithm; card problem; fitness function; parameters determination; coding scheme selection
  中图分类号:TP393.06 文献标识码:A 文章编号:1009-3044(2016)05-0025-02
  1 Introduction
  Genetic algorithm has been wildly used in several parts of our modern society. It is popular to solve problems by using the mind of genetic algorithm (GA). In this article, a classical card problem is going to be solved by GA, which is a simple example to show the procedure.
  1.1 Card problem
  Card problem is a famous mathematic problem in western country. If there are ten cards from A to 10, it is possible that the number of five chosen cards can add to 36 and the number of rest five cards can multiply to 360. So the problem is how to find out what the five cards that we choose are.
  1.2 Genetic algorithm (GA)
  Genetic Algorithm (GA) is an iterative algorithm for global optimization. This Algorithm, based on Darwin’s theory of evolution, is a stochastic search algorithm by simulating the process of natural selection.
  Genetic algorithm describes the biological evolution in an abstract way. Copy, crossover and mutation are three most important parameters in evolution and will be set as three operators of the algorithm. These operators in each iteration have a set of answers, which are originally randomly generated. After each iteration, a new set of answers are generated by genetic manipulation simulated evolution. The new answers are evaluated by an objective function. This process is repeated until it reaches some form of convergence.
  A new set of answers not only can selectively retain some old answers with high value of objective function, but also includes some new answers obtained by combining other answers. Therefore, the genetic algorithm can remain the potential gene in each iteration during evolutionary process, which means that the results of genetic algorithms are always looking for the best value for the evaluation function. Generally, the Genetic algorithm is kind of optimization process which is reliable and can be proved mathematically. The key issues of GA are the choice of fitness function, parameters determination and coding scheme selection.   2 Algorithm Design
  2.1 Coding scheme selection
  As there are 10 cards used in card problem, the length of chromosome is set as 10. So a two-dimension array with 10 columns is designed. Then, the original population is generated by random function. Meanwhile, the capacity of population should also be set to reach the need of reproduction.
  2.3 Crossover function
  At the beginning, the crossover rate should be set. The method that determine whether it is going to crossover is roulette wheel. The lower environmental adaption would be instead of by the function below:
  2.5 Reproduction upper limit calculation
  As the original data come from random function, the algorithm may not get the final answers after a long time calculation. So it is necessary to set an upper limit for reproduction, when reach the limitation, the program would stop.
  3 Results and Discussion
  Based on the GA, the program was designed and the parameters were set as follows:
  The population was 30, the crossover rate was 0.6, the mutation rate was 0.01 and the reproduction upper limit was 1000. The output results are displayed on figure 1, figure 2 and figure 3.
  In summary, the program got the results of card problem by using the genetic algorithm. It is clear that GA is a reliable and effective algorithm methods in many area. However, GA still has its disadvantages, like it may not be able to get answers after a long time. In the future, the GA would solve more and more realistic problems and have more applications with the development of itself.
  References:
  [1] S.G. Ficici and J.B. Pollack.A game-theoretic approach to the simple coevolutionary algorithm[C].Proc. of the Sixth International Conference on Parallel Problem Solving from Nature,Paris, France, 2000: 467-476.
  [2] Ren Xienan.Study on optimization of BP neural network based on genetic algorithm and Matlab simulation[D].Tianjin:Tianjin Normal University.
  [3] Xi Yugeng,Chai Tianyou,Yun Weimin.Survey on genetic algorithm [J].Control Theory and Applications,1996(6):697-708.
其他文献
摘要:案例教学法对于计算机专业是一种新的教学形式,能激发学生的学习积极性,提高学生分析问题和解决问题的能力。该文以扫雷游戏为例阐述了在VB教学中采用案例教学法对控件数组、函数过程、递归算法等重要的知识点进行教学设计和教学实施的过程。  关键词:案例教学法;案例设计;控件数组  中图分类号:G642 文献标识码:A 文章编号:1009-3044(2016)22-0108-03  案例教学法,在计算机
摘要:近年来,随着高校的不断扩招,高校学工系统的内涵和外延在不断地扩展与充实,因此高校对于学工系统的需求和功能的完善日趋急切。学工管理系统是高校信息化管理的重要组成部分,天津理工大学作为一所以理工科为主的综合性大学,设有17个专业学院,62个本科专业,在校学生26482人,因此学工系统的高性能、高效率和高稳定性就变得尤为重要。  关键词:学工系统;学生信息;需求分析;功能分析  中图分类号:TP3
摘要:电子书包是教育信息化的新兴教学媒体。对于很多教学者而言,如何巧妙恰当的将电子书包投入教学,仍需深入研究。采用文献研究的方法,分析多篇文献的基础之上,先对电子书包的概念进行了对比分析;再归类总结了不同学科及不同教学模式的背景下,对电子书包投入教学的运用情况;最后,就多篇文章中提出的电子书包的优势与劣势进行了概括总结。为今后教育者能快速掌握电子书包教学的使用要领、避免使用不当,提供了有力的支持、
摘要:该文主要介绍了嵌入式实时多任务操作系统μC/OS-II,分析了其工作原理,讲述了将μC/OS-II 移植 DSP 的微处理器的开发板中的过程,以及在此基础上实现了μC/OS-II  在伺服电机控制系统中的应用。  关键词:μC/OS-II;DSP;移植;伺服控制  中图分类号:TP391 文献标识码:A 文章编号:1009-3044(2016)07-0247-02  1 概述  制造业日益发
摘要:Powerpoint属于利用率很高的演示软件,而Prezi软件在制作课件方面具有独特优势,Prezi适合制作短小突出内容的课件,该文以网页设计课件中《站点》这个知识点为例,介绍使用Prezi制作课件的具体过程和策略。  关键词:Prezi;交互式;课件;软件  中图分类号:TP393 文献标识码:A 文章编号:1009-3044(2016)07-0198-03  随着教育信息化和网络的快速发
摘要:该文在研究校内实训基地——校园客运站和校园火车票营销服务中心运营管理模式的基础上,针对校内实训基地信息化建设进行阐述与分析,构建校内实训基地信息化建设体系结构,分析其实现的有效途径及保障措施,为培养信息化人才提供实践平台。  关键词:实训基地;信息化;体系结构;途径  中图分类号:TP393 文献标识码:A 文章编号:1009-3044(2016)05-0127-02  2013年,辽宁省教
书名:唐代舞蹈诗研究  作者:杨名  出版社:人民出版社  出版时间:2016年  ISBN:9787010160870  定价:55元  舞蹈诗指唐代诗歌中对舞蹈、舞人、舞境作相关描写的诗歌,以及以诗歌形式被保存下来的舞曲歌辞。唐王朝国力强盛,社会开放,文化繁荣,诗歌与乐舞发展都臻于佳境。作为舞蹈艺术的载体和詩歌艺术的代表,唐代舞蹈诗具有文学、文化与艺术等多重研究价值。由长江大学文学院杨名博士编
摘要:针对概论性课程中存在的问题,基于项目教学法,以集成电路概论课程为例,提出了教学改革方案。同时结合集成电路封装信号完整性的教学内容,分析与探索了项目教学法在实际教学中的应用。实践表明:将项目教学法引入到概论性课程的教学中,提高了学生的理解能力和创新能力,从而提升了教学质量。  关键词:项目教学法;概论性课程;教学改革;集成电路;信号完整性  中图分类号:TP393 文献标识码:A 文章编号:1
摘要:现在的教育已经不是“一支粉笔谈天下”的局面了,随着信息技术的发展和不断更新,许多教学媒体应运而生,并逐渐的应用到教学中。PPT作为多媒体教学中的一种,目前在大学教学中很受欢迎,但是教师在使用PPT進行教学中,也存在许多问题,影响了教学效果。该文以《现代教育技术》公选课为例,总结了使用PPT后的优点和存在的问题,并提出了相应的解决措施,希望对今后的教学会有所帮助。  关键词:PPT教学;大学教
摘要:目前信息网络技术的发展已日益成熟,而企业管理也呈现出信息、科学、智能化管理的新趋势。真正实现将现代科技运用于提升企业的管理效率是企业竞争中稳健发展的关键。而固定资产在企业资产中是处于关键组成部分的地位,具有数量庞大的统计和处理工作量,以及流程繁杂。在现代高速动态变化中,以往传统的管理模式已难以满足现代化管理的需求。该文在于为青城有限公司的企业资产管理进行了管理系统设计,并设计出以下模块:系统