Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Q-table Update with SARSA | Classic RL Algorithms: Q-learning & SARSA
Hands-On Classic RL Algorithms with Python
Seção 1. Capítulo 7
single

single

Challenge: Q-table Update with SARSA

Deslize para mostrar o menu

Tarefa

Deslize para começar a programar

Given a sequence of state-action pairs, update the Q-table using the SARSA rule.

You are provided with a Q-table, a sequence of (state, action) pairs, a learning rate (alpha), a discount factor (gamma), and a list of rewards received after each transition.

  • For each consecutive pair in the state-action sequence, update the Q-value for the current (state, action) using the SARSA update rule.
  • Use the corresponding reward for each state-action transition.
  • Do not update the final state-action pair, as there is no next state-action following it.
  • Apply the SARSA update: Q[state, action] = Q[state, action] + alpha * (reward + gamma * Q[next_state, next_action] - Q[state, action]).

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 7
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt