ryanhs / simple-genetic-algorithm
PHP中的简单遗传算法
1.0.3
2015-01-08 09:01 UTC
Requires (Dev)
- phpunit/phpunit: 4.4.*
This package is not auto-updated.
Last update: 2024-09-14 15:52:54 UTC
README
PHP中的简单遗传算法,我创建这个包只是为了举例说明如何在PHP中实现遗传算法。如果您感兴趣,请通过邮箱 mr.ryansilalahi@gmail.com 联系我 :-)
请参阅 interface/GeneticAlgorithm.php
安装
您可以使用composer(packagist)下载此包
composer require ryanhs/simple-genetic-algorithm
示例
在example目录中您可以找到以下示例
- example1.php
- example2.php
- example3.php
示例 1
require '/vendor/autoload.php'; // composer autoload
$ga = new \SimpleGeneticAlgorithm\SimpleGeneticAlgorithm(array(
'mutation' => 25, // 25%
'goal' => 'Astari Ghaniarti',
'delay' => 50, // ms, if debug is false, then delay forced to 0
'debug' => true,
));
$ga->run(); // just run because debug is true
许可
MIT 许可证