Training with minmax