Finding a function's coefficients from inputs and target outputs

Hi There,

I have a mathematical problem and all I require is direction as to how to go about solving it.

I have 3 variable non-linear function, , whose values are either 0 or 1. The function f is as follows:

I have a huge sample of different values of x1 x2 x3 and a huge sample of the output (call it 'Z', whose value is also either 0 or 1) such as:

How would I go about calculating the values of 'a' to 'g', if I know the input and the output? I was thinking about using a neural network. Does anyone have any better ideas?

Thank you in advance!

PS - excuse the long explanation.