Genetic Algorithm (PyGAD) Plays CoinTex Game





CoinTex is an open-source cross-platform multi-level adventure game developed in Python using Kivy. CoinTex is available for Android at Google Play: https://play.google.com/store/apps/details?id=coin.tex.cointexreactfast&hl=en
To pass a level in CoinTex, the player has to collect all the randomly distributed coins while avoiding collision with the monsters and the fires. The monsters are moved randomly.

Using only the genetic algorithm (GA) without any machine/deep learning algorithms, a game playing agent is created that plays CoinTex like a professional. The agent is able to stand even in complex levels with many coins, monsters, and fires.
The GA is implemented using a Python 3 library named PyGAD. Find its documentation here to get started:
https://pygad.readthedocs.io. Install PyGAD using pip: pip install pygad

The source code of CoinTex at GitHub:
https://github.com/ahmedfgad/CoinTex
The source code of the genetic algorithm agent:
https://github.com/ahmedfgad/CoinTex/PlayerGA
PyGAD must be installed to run the agent.

CoinTex is documented in chapters 5 and 6 of this book: Ahmed Fawzy Gad, Building Android Apps in Python Using Kivy with Android Studio, 2019, Apress, 978-1484250303:
https://www.amazon.com/Building-Android-Python-Using-Studio/dp/1484250303 This book introduces Kivy for building Android apps.

For more information about the genetic algorithm, check this book: Ahmed Fawzy Gad, Practical Computer Vision Applications Using Deep Learning with CNNs, 2018, Apress, 978-1484241660:
https://www.amazon.com/Practical-Computer-Vision-Applications-Learning/dp/1484241665

Keep in touch:
Ahmed Fawzy Gad
ahmed.f.gad@gmail.com
https://www.linkedin.com/in/ahmedfgad
https://www.facebook.com/ahmed.f.gadd
https://twitter.com/ahmedfgad
http://github.com/ahmedfgad

Check my blog posts:
https://blog.paperspace.com/author/ahmed
https://heartbeat.fritz.ai/@ahmedfgad
https://towardsdatascience.com/@ahmedfgad

Check my books:
https://amazon.com/author/ahmedgad

Comments

Popular posts from this blog

Artificial Neural Networks Optimization using Genetic Algorithm with Python