Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
EACH INDIVIDUAL:- [1*8] where each column value tells the position of queen in that particular column
FINAL SOLUTION:- each row gives one unique solution in the 'solution' matrix
It has very basic but effective functions of selection,crossover and mutation.
Queens are randomly positioned in the beginning.
I have written it for n-queens.
It gives a good amount of solutions for queens > 8.
Also you can change parameters and test for yourself.
The cross-over logic is given in the attached PDF-cross-over_logic.
Citar como
Swapnil Marathe (2026). Genetic Algorithm for n-queen problem (https://es.mathworks.com/matlabcentral/fileexchange/35820-genetic-algorithm-for-n-queen-problem), MATLAB Central File Exchange. Recuperado .
Agradecimientos
Inspirado por: Travelling salesman problem with Genetic algorithm
Información general
- Versión 1.3.0.0 (5,42 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
