Visualization
The visualization functions are used to plot and track the progress of an evolutionary optimization algorithm. Currently, we support plotting 3D functions and displaying Sudoku grids on the command line.
GeneticAlgorithms.Visualization.print_sudoku
— Methodprint_sudoku(chromosome::Chromosome)
Prints the Sudoku genes of the given chromosome
. Betwee each 3x3 block, lines are drawn to separate the blocks.
GeneticAlgorithms.Visualization.visualize_function_with_contours
— MethodPlots a contour of a 2D function over the specified x and y ranges.
Arguments
f::Function
: The function to visualize.x_range
: Range of x-values (default: (-2.0, 2.0)).y_range
: Range of y-values (default: (-2.0, 2.0)).path
: Optimization path points (default: []).
Returns
A contour plot of the function with optional highlighted points.
GeneticAlgorithms.Visualization.visualize_rosenbrock_results
— Methodvisualize_rosenbrock_results(best_chromosomes::Vector{Chromosome}, save_path::String="result.png")
Generates a visualization of the optimization process for the Rosenbrock fitness function with given best_chromosomes
. The visualization is saved to the specified save_path
.