MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / f

Function f

rl3v2/visualize_hill_climbing.py:5–7  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

3
4# Objective function to minimize (you can change this)
5def f(x, y):
6 # return np.sin(x) + np.cos(y)
7 return -((x - 1)**2 + y**2)
8
9# Evolution Strategies optimizer (simple version)
10def hill_climb(

Callers 2

hill_climbFunction · 0.70
visualize_esFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected