Dealing with Sparse Rewards Using Graph Neural Networks