PHPGen

所属分类:人工智能/神经网络/深度学习
开发工具:PHP
文件大小:5KB
下载次数:0
上传日期:2012-07-06 12:22:45
上 传 者sh-1993
说明:  PHP遗传编程
(PHP Genetic Programming)

文件列表:
genV2.php (12309, 2012-07-06)

PHPGen =========== > A Genetic Programming Example in PHP. View Live ---------------------------------------------------- Install from https://github.com/Mvin/PHPGen Usage ---------------------------------------------------- * Include or Require the class in your php file. * Create a new instance of the class with the required parameters: ```php $test = new Genetic(10, 20, array(1,2,3), 10); ``` * Call the run() method on the instance of the class. ```php $test->run(); ``` * run() will echo results to the screen in the following format: > Generations: 1000 Chromosones: 50, > Solving for 12 Using only: 1's ,2's ,3's , > > Highest Fitness Achieved: > Result: return 3*3+3; > > Answer: 12 Fitness: 92 Constructor Docs ---------------------------------------------------- * 1st Parameter: Number of generations * 2nd Parameter: Number of Chromosomes * 3rd Parameter: Array of seed numbers, followed by the desired result * 4th Parameter: The maximum representation size ```php Constructor expects: __construct(int, int, array(), int) ``` Credits ------- >Author: Matthew Vincent (Mvin.net) 2012

近期下载者

相关文件


收藏者