Solving Graph-based Public Goods Games with Tree Search and Imitation Learning