I have to maximize the function f=x^3-60x^2+900x+100 using hill climbing algorithm.I have to implement the first improve and best improve. The curent solution must be represented by a binary array with 5 elements and I have to calculate the neighbours by changing a single bit. For example if I generate the random solution
x=(0, 0, 1, 1, 0, 1) one neighbour could be y=(1, 0, 1, 0, 1). Could someone help me with the c++ code for this algorithm? Thank you!
lundi 29 octobre 2018
Using Hill Climbing algorithm for optimization
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire