Open Live Script For this example, consider a 5-by-5 grid world with the following rules: A 5-by-5 g …