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 Q-learning | Classic RL Algorithms: Q-learning & SARSA
Hands-On Classic RL Algorithms with Python
Seção 1. Capítulo 3
single

single

Challenge: Q-table Update with Q-learning

Deslize para mostrar o menu

Tarefa

Deslize para começar a programar

Challenge: Given a Q-table and a sequence of actions, update the Q-values using the Q-learning rule.

  • For each transition in transitions, update the Q-value in q_table for the given state and action using the Q-learning update formula.
  • Each transition is a tuple: (state, action, reward, next_state).
  • Use the learning rate alpha and discount factor gamma for the update.
  • The Q-learning update formula is:
    Q[state, action] = Q[state, action] + alpha * (reward + gamma * max(Q[next_state]) - 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 3
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