human
3 Parameters - Grid Search"
Please write code following the instructions in jupyter notebook style.

Can you provide a code to 3 Parameters - Grid Search and the other steps required?
assistant
#Here is code to 3 Parameters - Grid Search and the other steps required.

def f(x,y):
    return 1.5 * (np.sin(0.5*x)**2 * np.cos(y) + 0.1*x + 0.2*y)

X = np.linspace(-6, 6, 100)
Y = np.linspace(-5, 5, 100)
X, Y = np.meshgrid(X, Y)
Z = f(X,Y)

plot3D.surface3D(X,Y,Z)

ranges = {
    'x' : np.linspace(-6, 6, num=10),
    'y' : np.linspace(-5, 5, num=10),
    'z' : np.array([-0.5, 0.5]),
    'another' : np.array(['a', 'b'])
}
#np.random.shuffle(ranges['x'])
#np.random.shuffle(ranges['y'])

order = ['x', 'y', 'z', 'another']
class TestEvaluator(op.LocalEvaluator):
    def test_config(self, config):
        #time.sleep(1)
        return f(config.x, config.y) + config.z
optimiser = op.GridSearchOptimiser(ranges, queue_size=100, order=order)
optimiser.poll_interval = 0 # run the optimiser loop faster, not reccomended when the evaluator is anything but instant
#optimiser = op.RandomSearchOptimiser(ranges, queue_size=100, allow_re_tests=False)
evaluator = TestEvaluator(optimiser)

optimiser.start(run_async=True)
evaluator.start(run_async=True)

optimiser.wait_for()
evaluator.wait_for()

optimiser.report()
print(optimiser.log_record)