Mastering Chess Middlegames