def get_reward(intervention, state):
    """Return the intervention needed to take action in the simulator."""
    reward = (1e-11 * state.industrial_capital - 5e-07 * state.
        persistent_pollution)
    reward += 2e-08 * state.total_population
    resource_usage = intervention.updates['nonrenewable_resource_usage_factor']
    pollution_generation = intervention.updates[
        'persistent_pollution_generation_factor']
    reward -= 0.3 * (1.0 - resource_usage) ** 2
    reward -= 0.5 * (1.0 - pollution_generation) ** 2
    return reward
