Can machines learn? if so, how much processing power is needed? Seeking to demonstrate the answers to these questions, I developed the Genetic Maze project. A program that uses the concept of Genetic Algorithm to make a machine learn to perform a specific task: Transpose a maze
The instructions here will make the project run on your machine. For more code and development information check the documentation folders as well as the \detailInfo.html file
- An average computer
- A browser
You can find a online implementation here
The program was made entirely using pure javascript (including some graphic libraries listed below) so to run it just download the entire folder and open the file 'main.html' By default this file will open a page in your default browser, from there you can generate a maze (or create your own) for the cells to try to transpose. I recommend using Google Chrome for the app.
If you want to be able to change some features of the program, such as the cell learning rate, mutation ratio and a number of other things. All settings are found in the \ scripts \ config.js file
This is an example of a parameter:
'lineSize': 0.3, //Size of the line dividing the cells of the grid || Default is 0.3
To change it, just change the value after the colon, in this case it would be 0.3 All parameters have their Default value and a description
Contribuitons are very wellcome. I believe this project is a good opportunity to learn how genetic algorithms work. Modifying and adding new features is always a process of learning. If you are interested in contributing please check open an Issue/PR
- P5.js - Used in the graphic part to draw various elements
- Chart.js - Using to render the charts
- João P Maia - Owner, first version
This project is licensed under the MIT License - see the LICENSE.md file for details