Chemical segregation challenge

How will we find the w and bias values in this? do we need to generate them randomly?