Combinatorial optimization and reasoning with graph neural networks