Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Q-table Update with Q-learning | Classic RL Algorithms: Q-learning & SARSA
Hands-On Classic RL Algorithms with Python
Abschnitt 1. Kapitel 3
single

single

Challenge: Q-table Update with Q-learning

Swipe um das Menü anzuzeigen

Aufgabe

Wischen, um mit dem Codieren zu beginnen

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]).

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt