input: Write a python function to simulate one episode of the Gridworld game.
  assert simulate_episode([0, 1, 1, 3]) == (np.array([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0]]), 1, True)
  assert simulate_episode([3, 3, 3, 1, 1, 0, 0, 2, 2]) == (np.array([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0]]), 1, True)
  assert simulate_episode([0, 0, 0, 0]) == (np.array([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0]]), 1, True)
output: import numpy as np
  
  def simulate_episode(actions):
      grid = np.zeros((4, 4))
      position = [0, 0]
      reward = 0
      is_terminal = False
  
      for action in actions:
          if is_terminal:
              break
  
          if action == 0:  # Up
              position[0] = max(position[0] - 1, 0)
          elif action == 1:  # Right
              position[1] = min(position[1] + 1, 3)
          elif action == 2:  # Down
              position[0] = min(position[0] + 1, 3)
          elif action == 3:  # Left
              position[1] = max(position[1] - 1, 0)
  
          if position == [3, 3]:
              reward = 1
              is_terminal = True
  
      grid[position[0], position[1]] = 1
      return grid, reward, is_terminal