Skip to content

atifali/hill-climbing

Repository files navigation

Numerical Optimization using "hill climbing" (aka Gradient Ascent)

The following is the repo-map for this repository, use this to find your way through the currently jumbled up structure:

== ####Brute Force Maximum Search in 1D: Use the script "brutemax_tester.m" for your sample function, the script uses the function brutemax.m and a sample result brutemax_result.jpg is included.

== ####Brute Force Maximum Search in 2D: Use the script "bfsearch.m" for your sample function, a sample result bfsearch_result is included.

== ####Plotting Contour Maps for 2D: Use the script "plot_contour.m" for your sample function and contour resolution, a sample result contour.jpg is included.

== ####Numerical Partial Differential Error Analysis for 2D: Use the script "pdifftest.m" to use a sample function along with its analytical expressions for the partial differentials against the numerical ones, sample plots for the error are included (pdiff_test1.jpg, pdiff_test2.jpg, pdiff_test3.jpg). Some thoughts on the default function and its results from this script are included in pdifftest_result.txt.

== ####Numerical "Hill-Climbing" in 2D: Use the script "hillclimb_tester.m" for a sample function along with other optimization parameters, the script uses function hillclimb.m for the iterations that it carries out for the user-defined initial conditions in the parent script. Sample results are included (hillclimber_result1.jpg, hillclimber_result2.jpg, hillclimber_result3.jpg).