Automating reward function configuration for drug design