AutoPlan: Automatic Planning of Interactive Decision-Making Tasks With Large Language Models