/smart-fish

Evolution simulation of ai agents collecting items using a neural network and a gentic algorithm

Primary LanguagePHPMIT LicenseMIT

License Build Status Code Quality Code Coverage Project Status

Neural Network with Genetic Algorithm

This code was originally a port of the tutorial source code written by "ai-junkie" Matt Buckland to be found at http://www.ai-junkie.com/ann/evolved/nnt1.html. If you are interested in AI buy his books. They are totally worth it, really!

Screenshot

Installation

composer install

Usage

For default settings use:

php app.php smartfish:run

To adjust the frames per second for the calculation use: (defaults to 30)

php app.php smartfish:run --fps=60

To adjust the number of ticks that are calculated per generation use: (defaults to 2000)

php app.php smartfish:run --ticks-per-generation=5000

All options can be combined of course.

Testing

To run the testsuite use:

./vendor/bin/phpunit

To run the mutation testing use:

./vendor/bin/humbug